mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -128,11 +128,7 @@ void mt76_scan_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
dev->scan.chan = req->channels[dev->scan.chan_idx++];
|
||||
cfg80211_chandef_create(&chandef, dev->scan.chan, NL80211_CHAN_HT20);
|
||||
if (phy->main_chandef.chan == dev->scan.chan) {
|
||||
chandef = phy->main_chandef;
|
||||
offchannel = false;
|
||||
}
|
||||
offchannel = mt76_offchannel_chandef(phy, dev->scan.chan, &chandef);
|
||||
|
||||
mt76_set_channel(phy, &chandef, offchannel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user