diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-11-08 11:03:52 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-12-19 15:23:53 +0100 |
commit | eae7df016c30468e09481a75b1339f0ab5ece222 (patch) | |
tree | 06c5ab657e3b9d370b7a7ef1d82f9d604e278849 /drivers/net/wireless/mediatek | |
parent | mt76: mt7921: add support for PCIe ID 0x0608/0x0616 (diff) | |
download | linux-eae7df016c30468e09481a75b1339f0ab5ece222.tar.xz linux-eae7df016c30468e09481a75b1339f0ab5ece222.zip |
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/net/wireless/mediatek')
-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; |