diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2013-06-28 04:39:59 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-07-16 02:57:57 -0400 |
commit | 822854b0b1d8f893279ca717f3d084aa5fcd9ff5 (patch) | |
tree | e1966e30e509c4bce35845d07284928100a24773 /net/mac80211/ibss.c | |
parent | 803768f54ef84cb4aaac0b51274b11b31885588c (diff) |
mac80211: enable HT overrides for ibss
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index ea7b9c2c7e66..7f290a8562ef 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -179,8 +179,12 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
179 | chandef.width != NL80211_CHAN_WIDTH_5 && | 179 | chandef.width != NL80211_CHAN_WIDTH_5 && |
180 | chandef.width != NL80211_CHAN_WIDTH_10 && | 180 | chandef.width != NL80211_CHAN_WIDTH_10 && |
181 | sband->ht_cap.ht_supported) { | 181 | sband->ht_cap.ht_supported) { |
182 | pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, | 182 | struct ieee80211_sta_ht_cap ht_cap; |
183 | sband->ht_cap.cap); | 183 | |
184 | memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap)); | ||
185 | ieee80211_apply_htcap_overrides(sdata, &ht_cap); | ||
186 | |||
187 | pos = ieee80211_ie_build_ht_cap(pos, &ht_cap, ht_cap.cap); | ||
184 | /* | 188 | /* |
185 | * Note: According to 802.11n-2009 9.13.3.1, HT Protection | 189 | * Note: According to 802.11n-2009 9.13.3.1, HT Protection |
186 | * field and RIFS Mode are reserved in IBSS mode, therefore | 190 | * field and RIFS Mode are reserved in IBSS mode, therefore |
@@ -1051,6 +1055,11 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | |||
1051 | memcpy(sdata->u.ibss.ssid, params->ssid, params->ssid_len); | 1055 | memcpy(sdata->u.ibss.ssid, params->ssid, params->ssid_len); |
1052 | sdata->u.ibss.ssid_len = params->ssid_len; | 1056 | sdata->u.ibss.ssid_len = params->ssid_len; |
1053 | 1057 | ||
1058 | memcpy(&sdata->u.ibss.ht_capa, ¶ms->ht_capa, | ||
1059 | sizeof(sdata->u.ibss.ht_capa)); | ||
1060 | memcpy(&sdata->u.ibss.ht_capa_mask, ¶ms->ht_capa_mask, | ||
1061 | sizeof(sdata->u.ibss.ht_capa_mask)); | ||
1062 | |||
1054 | /* | 1063 | /* |
1055 | * 802.11n-2009 9.13.3.1: In an IBSS, the HT Protection field is | 1064 | * 802.11n-2009 9.13.3.1: In an IBSS, the HT Protection field is |
1056 | * reserved, but an HT STA shall protect HT transmissions as though | 1065 | * reserved, but an HT STA shall protect HT transmissions as though |
@@ -1131,6 +1140,11 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
1131 | presp = rcu_dereference_protected(ifibss->presp, | 1140 | presp = rcu_dereference_protected(ifibss->presp, |
1132 | lockdep_is_held(&sdata->wdev.mtx)); | 1141 | lockdep_is_held(&sdata->wdev.mtx)); |
1133 | RCU_INIT_POINTER(sdata->u.ibss.presp, NULL); | 1142 | RCU_INIT_POINTER(sdata->u.ibss.presp, NULL); |
1143 | |||
1144 | /* on the next join, re-program HT parameters */ | ||
1145 | memset(&ifibss->ht_capa, 0, sizeof(ifibss->ht_capa)); | ||
1146 | memset(&ifibss->ht_capa_mask, 0, sizeof(ifibss->ht_capa_mask)); | ||
1147 | |||
1134 | sdata->vif.bss_conf.ibss_joined = false; | 1148 | sdata->vif.bss_conf.ibss_joined = false; |
1135 | sdata->vif.bss_conf.ibss_creator = false; | 1149 | sdata->vif.bss_conf.ibss_creator = false; |
1136 | sdata->vif.bss_conf.enable_beacon = false; | 1150 | sdata->vif.bss_conf.enable_beacon = false; |