Skip to content

Commit

Permalink
mt76: mt7615: rely on mt76_queues_read for mt7622
Browse files Browse the repository at this point in the history
As previous devices, mt7622 relies on multiple hw queues while for
mt7615 we have just on per band hw queue and the mcu demux the traffic
according to the packet AC. In order to dump all configured hw queues,
rely on mt76_queues_read for mt7622 in mt7615 debugfs

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Feb 14, 2020
1 parent 4dbd56b commit e226309
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debugfs.c
Expand Up @@ -30,7 +30,7 @@ int mt76_queues_read(struct seq_file *s, void *data)
struct mt76_dev *dev = dev_get_drvdata(s->private);
int i;

for (i = 0; i < __MT_TXQ_MAX; i++) {
for (i = 0; i < ARRAY_SIZE(dev->q_tx); i++) {
struct mt76_sw_queue *q = &dev->q_tx[i];

if (!q->q)
Expand Down
8 changes: 6 additions & 2 deletions mt7615/debugfs.c
Expand Up @@ -264,8 +264,12 @@ int mt7615_init_debugfs(struct mt7615_dev *dev)
if (!dir)
return -ENOMEM;

debugfs_create_devm_seqfile(dev->mt76.dev, "queues", dir,
mt7615_queues_read);
if (is_mt7615(&dev->mt76))
debugfs_create_devm_seqfile(dev->mt76.dev, "queues", dir,
mt7615_queues_read);
else
debugfs_create_devm_seqfile(dev->mt76.dev, "queues", dir,
mt76_queues_read);
debugfs_create_devm_seqfile(dev->mt76.dev, "acq", dir,
mt7615_queues_acq);
debugfs_create_file("ampdu_stat", 0400, dir, dev, &fops_ampdu_stat);
Expand Down

0 comments on commit e226309

Please sign in to comment.