aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorGravatar Johannes Berg <johannes.berg@intel.com> 2022-06-27 14:10:18 +0200
committerGravatar Johannes Berg <johannes.berg@intel.com> 2022-07-15 11:43:16 +0200
commit1dd0f31c23aa15d201576ae0b2a478cad8d7458f (patch)
treecbdf27c7a13e391cfb26c39550ddb9d152226910 /net/mac80211/ieee80211_i.h
parentwifi: mac80211: split IEEE80211_STA_DISABLE_WMM to link data (diff)
downloadlinux-1dd0f31c23aa15d201576ae0b2a478cad8d7458f.tar.gz
linux-1dd0f31c23aa15d201576ae0b2a478cad8d7458f.tar.bz2
linux-1dd0f31c23aa15d201576ae0b2a478cad8d7458f.zip
wifi: mac80211: mlme: use ieee80211_get_link_sband()
This requires a few more changes. While at it, also add a warning to ieee80211_get_sband() to avoid it being used when there are multiple links. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 3e360bcaa03b..a0743c78d171 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1539,6 +1539,8 @@ ieee80211_get_sband(struct ieee80211_sub_if_data *sdata)
struct ieee80211_chanctx_conf *chanctx_conf;
enum nl80211_band band;
+ WARN_ON(sdata->vif.valid_links);
+
rcu_read_lock();
chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);