From: Michael Shih <michael.shih@mediatek.com>
To: <nbd@nbd.name>, <lorenzo@kernel.org>
Cc: <linux-wireless@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>, <kun.wu@mediatek.com>,
<deren.wu@mediatek.com>, <sean.wang@mediatek.com>,
<quan.zhou@mediatek.com>, <ryder.lee@mediatek.com>,
<leon.yen@mediatek.com>, <litien.chang@mediatek.com>,
<jb.tsai@mediatek.com>, <eason.Lai@mediatek.com>,
Michael Shih <michael.shih@mediatek.com>
Subject: [PATCH v5 0/2] wifi: mt76: mt7925: per-channel survey dump during scan
Date: Thu, 12 Nov 2026 15:55:55 +0800 [thread overview]
Message-ID: <20261112075558.1813785-1-michael.shih@mediatek.com> (raw)
In-Reply-To: <20260831032832.83338-1-eason.lai@mediatek.com>
This series improves channel survey reporting for mt7925 so that
"iw <dev> survey dump" shows meaningful per-channel airtime.
Patch 1 adds a stats debugfs infrastructure (shared stats.c/stats.h and
the firmware MIB plumbing) that patch 2 builds on.
Patch 2 wires up two channel survey accounting paths on top of it:
- the home/operating channel, settled from assign_vif_chanctx() since
mt7925 is firmware/chanctx managed and never goes through
__mt76_set_channel(); and
- the scanned channels, folded in from the per-channel airtime carried
by the firmware scan-done CHNLINFO event.
After the series, both the connected channel and every channel visited
during a firmware-offloaded scan report non-zero active/busy/rx/tx time.
Changes since v4:
---
v2: (1) Remove redundant code to fix build errors.
(2) Move UNI_CMD_MIB_DATA enum definition from 'mt76/mt76_connac_mcu.h' to
'mt7925/stats.h' to avoid redeclartion with 'mt76/mt7996/mcu.h'
v3: (1) Remove redundant code to fix build errors.
(2) Move UNI_CMD_MIB_DATA enum definition from 'mt76/mt76_connac_mcu.h' to
'mt7925/stats.h' to avoid redeclartion with 'mt76/mt7996/mcu.h'
v4: (1) Fix inconsistent indenting.
(2) Fix array offset 'band_idx' as to before use, not after use.
v5: Adding the second patch for supporting channel survey command: "iw <dev> survey dump"
---
Michael Shih (2):
wifi: mt76: mt7928: Add debugfs for stats to provide debug purpose
wifi: mt76: mt7925: support per-channel survey dump during scan
drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 2 +
.../wireless/mediatek/mt76/mt76_connac_mcu.h | 173 ++++
.../wireless/mediatek/mt76/mt7925/Makefile | 2 +-
.../wireless/mediatek/mt76/mt7925/debugfs.c | 344 +++++++
.../net/wireless/mediatek/mt76/mt7925/main.c | 12 +
.../net/wireless/mediatek/mt76/mt7925/mcu.h | 30 +
.../wireless/mediatek/mt76/mt7925/mt7925.h | 7 +
.../net/wireless/mediatek/mt76/mt7925/pci.c | 2 +-
.../net/wireless/mediatek/mt76/mt7925/stats.c | 884 ++++++++++++++++++
.../net/wireless/mediatek/mt76/mt7925/stats.h | 315 +++++++
.../net/wireless/mediatek/mt76/mt7925/usb.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt792x.h | 6 +
13 files changed, 1778 insertions(+), 4 deletions(-)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7925/stats.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7925/stats.h
--
2.45.2
next prev parent reply other threads:[~2026-11-12 7:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 3:07 [PATCH v1] wifi: mt76: mt7928: Add debugfs for stats to provide debug purpose Eason Lai
2026-08-25 4:00 ` kernel test robot
2026-08-25 7:55 ` kernel test robot
2026-08-27 5:54 ` [PATCH v2] " Eason Lai
2026-08-27 8:44 ` [PATCH v3] " Eason Lai
2026-08-28 7:39 ` kernel test robot
2026-08-31 3:28 ` [PATCH v4] " Eason Lai
2026-11-12 7:55 ` Michael Shih [this message]
2026-11-12 7:55 ` [PATCH v5 1/2] " Michael Shih
2026-11-13 0:46 ` kernel test robot
2026-11-13 11:09 ` kernel test robot
2026-11-12 7:55 ` [PATCH v5 2/2] wifi: mt76: mt7925: support per-channel survey dump during scan Michael Shih
2026-11-13 15:00 ` Devin Wittmayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112075558.1813785-1-michael.shih@mediatek.com \
--to=michael.shih@mediatek.com \
--cc=deren.wu@mediatek.com \
--cc=eason.Lai@mediatek.com \
--cc=jb.tsai@mediatek.com \
--cc=kun.wu@mediatek.com \
--cc=leon.yen@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=litien.chang@mediatek.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=quan.zhou@mediatek.com \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox