aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-12-18 15:08:34 +0100
committerJohannes Berg <johannes.berg@intel.com>2016-02-24 09:04:21 +0100
commit8ac3c70419176b0fbc4aeae30de661f690b2e3ae (patch)
treed4581a3b2301e9d60b7424a922fc61aa26244db0 /net/mac80211/mesh.c
parentcfg80211: add more warnings for inconsistent ops (diff)
downloadlinux-dev-8ac3c70419176b0fbc4aeae30de661f690b2e3ae.tar.xz
linux-dev-8ac3c70419176b0fbc4aeae30de661f690b2e3ae.zip
mac80211: refactor HT/VHT to chandef code
The station MLME and IBSS/mesh ones use entirely different code for interpreting HT and VHT operation elements. Change the code that interprets them a bit - it now modifies an existing chandef - and use it also in the MLME code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r--net/mac80211/mesh.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index fa28500f28fd..9a8e7b57c86e 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -91,11 +91,10 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,
if (sdata->vif.bss_conf.basic_rates != basic_rates)
return false;
- ieee80211_ht_oper_to_chandef(sdata->vif.bss_conf.chandef.chan,
- ie->ht_operation, &sta_chan_def);
-
- ieee80211_vht_oper_to_chandef(sdata->vif.bss_conf.chandef.chan,
- ie->vht_operation, &sta_chan_def);
+ cfg80211_chandef_create(&sta_chan_def, sdata->vif.bss_conf.chandef.chan,
+ NL80211_CHAN_NO_HT);
+ ieee80211_chandef_ht_oper(ie->ht_operation, &sta_chan_def);
+ ieee80211_chandef_vht_oper(ie->vht_operation, &sta_chan_def);
if (!cfg80211_chandef_compatible(&sdata->vif.bss_conf.chandef,
&sta_chan_def))