mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:19:34 +02:00
wifi: mac80211: fix monitor min_def bandwidth
Due to reshuffling, the min_def is no longer calculated taking a newly created monitor interface into account as link->conf->chanctx_conf is only assigned after the new bandwidth has been calculated. To handle this, rsvd_for is assigned, but the monitor code didn't handle that. Fix this by checking rsvd_for for monitor explicitly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260715213312.9fe95421689d.I24e08f95e97deb46c6393ee732057d63e6436a2e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
+4
-2
@@ -607,10 +607,12 @@ ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local,
|
||||
max_bw = max(max_bw, width);
|
||||
}
|
||||
|
||||
if (!rsvd_for ||
|
||||
rsvd_for->sdata == rcu_access_pointer(local->monitor_sdata))
|
||||
if (!rsvd_for)
|
||||
goto check_monitor;
|
||||
|
||||
if (rsvd_for->sdata == rcu_access_pointer(local->monitor_sdata))
|
||||
return max(max_bw, ctx->conf.def.width);
|
||||
|
||||
/* Consider the link for which this chanctx is reserved/going to be assigned */
|
||||
width = ieee80211_get_width_of_link(rsvd_for);
|
||||
max_bw = max(max_bw, width);
|
||||
|
||||
Reference in New Issue
Block a user