diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-11-08 13:03:52 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-12-19 17:23:53 +0300 |
commit | eae7df016c30468e09481a75b1339f0ab5ece222 (patch) | |
tree | 06c5ab657e3b9d370b7a7ef1d82f9d604e278849 /drivers | |
parent | f395d41f2a0343fa9d989d8f53e5640329554dd8 (diff) | |
download | linux-eae7df016c30468e09481a75b1339f0ab5ece222.tar.xz |
mt76: debugfs: fix queue reporting for mt76-usb
Fix number of rx-queued frames reported by mt76_usb driver.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 2d8be76c1674 ("mt76: debugfs: improve queue node readability")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/debugfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c index 027d9ea17d04..47e9911ee9fe 100644 --- a/drivers/net/wireless/mediatek/mt76/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/debugfs.c @@ -74,14 +74,15 @@ EXPORT_SYMBOL_GPL(mt76_queues_read); static int mt76_rx_queues_read(struct seq_file *s, void *data) { struct mt76_dev *dev = dev_get_drvdata(s->private); - int i; + int i, queued; seq_puts(s, " queue | hw-queued | head | tail |\n"); mt76_for_each_q_rx(dev, i) { struct mt76_queue *q = &dev->q_rx[i]; + queued = mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued; seq_printf(s, " %9d | %9d | %9d | %9d |\n", - i, q->queued, q->head, q->tail); + i, queued, q->head, q->tail); } return 0; |