[PATCH 0/4] wifi: mt76: mt7663s: less work on an idle link

From: Ryan Brue

Date: Mon Nov 30 2026 - 12:34:25 EST


On an MT7663 SDIO module (mt7663s, an Amazon Fire TV Stick 3rd gen,
MT8695) associated to a 2.4 GHz access point and otherwise idle, the
SDIO host took about 6200 interrupts a second, and the CPU frequency
changed about 90 times a second as the FIFO txrx worker kept waking.
I found two causes, patches 2 and 3:

2. The other-BSS beacon drop that mt7615_mac_set_beacon_filter() turns
on at association is undone by the next configure_filter call, so
every beacon on the channel reached mac80211 (about 300 a second
here). With the bit kept, it is now set only while associated and
cleared while mac80211 asks for other BSSs' frames (monitor). This
one affects the PCIe parts as well.
3. The SDIO status worker was woken on every queue pass, with or
without completed entries. mt7921s shares this code; I could only
test it on mt7663s.

With both, the interrupt rate falls to about 3600 a second (and the
status worker's wakeups from about 1100 to 200); association, ping and
a 40 MB download behave as before.

Patch 1 comes first because patch 2 makes the beacon drop stick: the
count of AP/mesh/IBSS interfaces that should turn it off has stayed 0
since 2021, so without patch 1 an AP brought up on the same phy would
keep dropping other BSSs' beacons. Tested with a NetworkManager hotspot:
MT_WF_RFCR bit 11 clear with the AP up, set again after reassociating as
a station, and debugfs refuses runtime PM while the AP is up. I could
not check the AP's beaconing from here (no 2.4 GHz receiver at hand,
and the world regulatory domain doesn't allow a 5 GHz AP).

Patch 4 came up while trying runtime PM: switching it off through
debugfs left mac_work stopped. A related question, without a patch:
with runtime PM on, mt76_connac_power_save_sched() cancels the pending
mac_work on every activity while the chip is awake, and on this idle
link mac_work then never ran (0 times in 20 s), so the survey, MIB
counters, SCS and the tx status timeout stop. Is that intended, or
should mac_work be cancelled only when the chip goes to sleep? mt7921
and mt7925 have the same pattern as patch 4 in their pm_set debugfs
handlers; I have no hardware to test them on, so I didn't edit them.

These patches were written with the help of an LLM.

Signed-off-by: Ryan Brue <ryanbrue.dev@xxxxxxxxx>
---
Ryan Brue (4):
wifi: mt76: mt7615: count beaconing interfaces again
wifi: mt76: mt7615: keep the other-BSS beacon drop in rxfilter
wifi: mt76: sdio: wake the status worker only for completed entries
wifi: mt76: mt7615: restart mac_work when runtime PM is disabled

.../net/wireless/mediatek/mt76/mt7615/debugfs.c | 7 +++++
drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 32 +++++++++-------------
drivers/net/wireless/mediatek/mt76/mt7615/main.c | 28 ++++++++++++++++++-
drivers/net/wireless/mediatek/mt76/sdio_txrx.c | 14 ++++++----
4 files changed, 56 insertions(+), 25 deletions(-)
---
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
change-id: 20261117-rbrue-sheldon-upstreaming-mt76-sdio-idle-ce020d9d39aa

Best regards,
--
Ryan Brue <ryanbrue.dev@xxxxxxxxx>