]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mt76: optimize ROC for same-channel case
authorFelix Fietkau <nbd@nbd.name>
Mon, 9 Mar 2026 06:07:25 +0000 (06:07 +0000)
committerFelix Fietkau <nbd@nbd.name>
Tue, 24 Mar 2026 15:49:31 +0000 (15:49 +0000)
commitf72dd74dd0b69e3a87b4702f3c860e9a7318d5dd
tree348d790dd6768d791ce48b518b93a822f0d867c2
parentde62b24224ac1533c17b3d5bae77164a82ae2e49
wifi: mt76: optimize ROC for same-channel case

mt76_remain_on_channel() always creates an HT20 chandef and goes
offchannel, even when the ROC channel matches the operating channel.
This unnecessarily narrows bandwidth and triggers beacon stop/restart.

When the ROC channel matches the current operating channel, preserve
the full chandef and skip the offchannel transition, matching the
optimization already present in the scan code.

Extract the shared same-channel detection into mt76_offchannel_chandef()
and use it in both ROC and scan paths.

Link: https://patch.msgid.link/20260309060730.87840-6-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/channel.c
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/scan.c