diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2018-04-30 16:19:17 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-05-04 15:34:20 +0300 |
commit | 811a3991510735566b66069fdd4ce3ce33a2ec18 (patch) | |
tree | 1431ea28c03e0d6460ab19247f2a5f5c3deab492 /drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | |
parent | 9c87758cf0893d6d3b51aac34546807b138cb3e7 (diff) | |
download | linux-811a3991510735566b66069fdd4ce3ce33a2ec18.tar.xz |
rt2x00: check against flushing empty queue
We have check if queue is not empty when start flushing queues on
by mac80211 callback, but we also can start flushing queues by internal
driver calls. So move check into rt2x00queue_flush_queue() to assure
we do not flush empty queue anytime.
Additionally add warning if we start to kick empty queue as in such
situation we set wrong index in the HW queue, what can confuse the HW
and have various negative consequences.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2800mmio.c')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c index 1123e2bed803..e1a7ed7e4892 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c @@ -600,6 +600,7 @@ void rt2800mmio_kick_queue(struct data_queue *queue) case QID_AC_VI: case QID_AC_BE: case QID_AC_BK: + WARN_ON_ONCE(rt2x00queue_empty(queue)); entry = rt2x00queue_get_entry(queue, Q_INDEX); rt2x00mmio_register_write(rt2x00dev, TX_CTX_IDX(queue->qid), entry->entry_idx); |