summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-06-23 12:04:55 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:14 +0200
commitba323e29859458fb180e8a99b4382d0cbf72d47f (patch)
treead4b0441b73965ac04707ba6f1fe32ccc559327f /net/mac80211/mesh.c
parent062e8e02dfd43c94b0d601c071e8a5c50bed830e (diff)
downloadlinux-stable-ba323e29859458fb180e8a99b4382d0cbf72d47f.tar.gz
linux-stable-ba323e29859458fb180e8a99b4382d0cbf72d47f.tar.bz2
linux-stable-ba323e29859458fb180e8a99b4382d0cbf72d47f.zip
wifi: mac80211: separate out connection downgrade flags
Separate out the connection downgrade flags from the ifmgd->flags and put them into the link information instead. While at it, make them a separate sparse type so we don't get confused about where they belong and have static checking on correct handling. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r--net/mac80211/mesh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index ba4e0921fa5d..b656cb647763 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -1129,7 +1129,8 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata,
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
struct ieee80211_supported_band *sband;
int err;
- u32 sta_flags, vht_cap_info = 0;
+ ieee80211_conn_flags_t conn_flags = 0;
+ u32 vht_cap_info = 0;
sdata_assert_lock(sdata);
@@ -1137,16 +1138,15 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata,
if (!sband)
return false;
- sta_flags = 0;
switch (sdata->vif.bss_conf.chandef.width) {
case NL80211_CHAN_WIDTH_20_NOHT:
- sta_flags |= IEEE80211_STA_DISABLE_HT;
+ conn_flags |= IEEE80211_CONN_DISABLE_HT;
fallthrough;
case NL80211_CHAN_WIDTH_20:
- sta_flags |= IEEE80211_STA_DISABLE_40MHZ;
+ conn_flags |= IEEE80211_CONN_DISABLE_40MHZ;
fallthrough;
case NL80211_CHAN_WIDTH_40:
- sta_flags |= IEEE80211_STA_DISABLE_VHT;
+ conn_flags |= IEEE80211_CONN_DISABLE_VHT;
break;
default:
break;
@@ -1159,7 +1159,7 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata,
memset(&params, 0, sizeof(params));
err = ieee80211_parse_ch_switch_ie(sdata, elems, sband->band,
vht_cap_info,
- sta_flags, sdata->vif.addr,
+ conn_flags, sdata->vif.addr,
&csa_ie);
if (err < 0)
return false;