summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-12-18 09:08:34 -0500
committerJohannes Berg <johannes.berg@intel.com>2016-02-24 03:04:21 -0500
commit8ac3c70419176b0fbc4aeae30de661f690b2e3ae (patch)
treed4581a3b2301e9d60b7424a922fc61aa26244db0 /net/mac80211/ibss.c
parentde3bb771f471ba7c745a913b95eee70d5fb199b1 (diff)
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/ibss.c')
-rw-r--r--net/mac80211/ibss.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index f7fc0e00497f..e5e8a317b865 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1050,9 +1050,8 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
1050 struct cfg80211_chan_def chandef; 1050 struct cfg80211_chan_def chandef;
1051 enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth; 1051 enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth;
1052 1052
1053 ieee80211_ht_oper_to_chandef(channel, 1053 cfg80211_chandef_create(&chandef, channel, NL80211_CHAN_NO_HT);
1054 elems->ht_operation, 1054 ieee80211_chandef_ht_oper(elems->ht_operation, &chandef);
1055 &chandef);
1056 1055
1057 memcpy(&htcap_ie, elems->ht_cap_elem, sizeof(htcap_ie)); 1056 memcpy(&htcap_ie, elems->ht_cap_elem, sizeof(htcap_ie));
1058 rates_updated |= ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband, 1057 rates_updated |= ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
@@ -1066,9 +1065,8 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
1066 struct ieee80211_vht_cap cap_ie; 1065 struct ieee80211_vht_cap cap_ie;
1067 struct ieee80211_sta_vht_cap cap = sta->sta.vht_cap; 1066 struct ieee80211_sta_vht_cap cap = sta->sta.vht_cap;
1068 1067
1069 ieee80211_vht_oper_to_chandef(channel, 1068 ieee80211_chandef_vht_oper(elems->vht_operation,
1070 elems->vht_operation, 1069 &chandef);
1071 &chandef);
1072 memcpy(&cap_ie, elems->vht_cap_elem, sizeof(cap_ie)); 1070 memcpy(&cap_ie, elems->vht_cap_elem, sizeof(cap_ie));
1073 ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband, 1071 ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, sband,
1074 &cap_ie, sta); 1072 &cap_ie, sta);