Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9fc1061 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

rt2x00: rt2800usb: schedule txdone work on timeout



This is fix for my current commit
ed61e2b0
"rt2x00: rt2800usb: rework txdone code"

We should schedule txdone work on timeout, otherwise if newer get
tx status from hardware, we will never report tx status to mac80211
and eventually never wakeup tx queue.

Reported-by: default avatarJakub Kicinski <moorray@wp.pl>
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b603c03e
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -163,7 +163,13 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,


		/* Reschedule urb to read TX status again instantly */
		/* Reschedule urb to read TX status again instantly */
		return true;
		return true;
	} else if (rt2800usb_txstatus_pending(rt2x00dev)) {
	}

	/* Check if there is any entry that timedout waiting on TX status */
	if (rt2800usb_txstatus_timeout(rt2x00dev))
		queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);

	if (rt2800usb_txstatus_pending(rt2x00dev)) {
		/* Read register after 250 us */
		/* Read register after 250 us */
		hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000),
		hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000),
			      HRTIMER_MODE_REL);
			      HRTIMER_MODE_REL);