Do not check for tx status timeout everytime we perform txstatus tasklet.
Perform check once per half a second.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct data_queue *queue;
struct queue_entry *entry;
+ if (time_before(jiffies,
+ rt2x00dev->last_nostatus_check + msecs_to_jiffies(500)))
+ return false;
+
+ rt2x00dev->last_nostatus_check = jiffies;
+
tx_queue_for_each(rt2x00dev, queue) {
entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
if (rt2800_entry_txstatus_timeout(entry))
return true;
}
+
return false;
}
EXPORT_SYMBOL_GPL(rt2800_txstatus_timeout);
rt2800_txdone(rt2x00dev);
- rt2800_txdone_nostatus(rt2x00dev);
+ if (rt2800_txstatus_timeout(rt2x00dev))
+ rt2800_txdone_nostatus(rt2x00dev);
if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
rt2800mmio_enable_interrupt(rt2x00dev,
*/
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
+ unsigned long last_nostatus_check;
+
/*
* Timer to ensure tx status reports are read (rt2800usb).
*/
*/
tx_queue_for_each(rt2x00dev, queue)
rt2x00queue_start_queue(queue);
+ rt2x00dev->last_nostatus_check = jiffies;
rt2x00queue_start_queue(rt2x00dev->rx);
}