aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ieee80211_i.h6
-rw-r--r--net/mac80211/mlme.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 03e0d22603c8..081c57427308 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -427,6 +427,12 @@ struct ieee80211_sub_if_data {
427 427
428 int drop_unencrypted; 428 int drop_unencrypted;
429 429
430 /*
431 * keep track of whether the HT opmode (stored in
432 * vif.bss_info.ht_operation_mode) is valid.
433 */
434 bool ht_opmode_valid;
435
430 /* Fragment table for host-based reassembly */ 436 /* Fragment table for host-based reassembly */
431 struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX]; 437 struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
432 unsigned int fragment_next; 438 unsigned int fragment_next;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index a1f2332a6fed..6d00e3f738c0 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -155,9 +155,11 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
155 ht_opmode = le16_to_cpu(hti->operation_mode); 155 ht_opmode = le16_to_cpu(hti->operation_mode);
156 156
157 /* if bss configuration changed store the new one */ 157 /* if bss configuration changed store the new one */
158 if (sdata->vif.bss_conf.ht_operation_mode != ht_opmode) { 158 if (!sdata->ht_opmode_valid ||
159 sdata->vif.bss_conf.ht_operation_mode != ht_opmode) {
159 changed |= BSS_CHANGED_HT; 160 changed |= BSS_CHANGED_HT;
160 sdata->vif.bss_conf.ht_operation_mode = ht_opmode; 161 sdata->vif.bss_conf.ht_operation_mode = ht_opmode;
162 sdata->ht_opmode_valid = true;
161 } 163 }
162 164
163 return changed; 165 return changed;
@@ -1047,6 +1049,9 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1047 /* channel(_type) changes are handled by ieee80211_hw_config */ 1049 /* channel(_type) changes are handled by ieee80211_hw_config */
1048 local->oper_channel_type = NL80211_CHAN_NO_HT; 1050 local->oper_channel_type = NL80211_CHAN_NO_HT;
1049 1051
1052 /* on the next assoc, re-program HT parameters */
1053 sdata->ht_opmode_valid = false;
1054
1050 local->power_constr_level = 0; 1055 local->power_constr_level = 0;
1051 1056
1052 del_timer_sync(&local->dynamic_ps_timer); 1057 del_timer_sync(&local->dynamic_ps_timer);