From 33148d507f836a1d23e502b4d8dd8dddf1cf5ea3 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 8 May 2009 21:21:06 +0200 Subject: [PATCH] --- yaml --- r: 150266 b: refs/heads/master c: 413ad50a5c15f3bae8075c15b101679f05c37a69 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/mac80211/ieee80211_i.h | 6 ++++++ trunk/net/mac80211/mlme.c | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index cb7111090498..df5838aa23e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9ed6bcce77f75d98af6ee07069deac6041948bee +refs/heads/master: 413ad50a5c15f3bae8075c15b101679f05c37a69 diff --git a/trunk/net/mac80211/ieee80211_i.h b/trunk/net/mac80211/ieee80211_i.h index 03e0d22603c8..081c57427308 100644 --- a/trunk/net/mac80211/ieee80211_i.h +++ b/trunk/net/mac80211/ieee80211_i.h @@ -427,6 +427,12 @@ struct ieee80211_sub_if_data { int drop_unencrypted; + /* + * keep track of whether the HT opmode (stored in + * vif.bss_info.ht_operation_mode) is valid. + */ + bool ht_opmode_valid; + /* Fragment table for host-based reassembly */ struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX]; unsigned int fragment_next; diff --git a/trunk/net/mac80211/mlme.c b/trunk/net/mac80211/mlme.c index a1f2332a6fed..6d00e3f738c0 100644 --- a/trunk/net/mac80211/mlme.c +++ b/trunk/net/mac80211/mlme.c @@ -155,9 +155,11 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, ht_opmode = le16_to_cpu(hti->operation_mode); /* if bss configuration changed store the new one */ - if (sdata->vif.bss_conf.ht_operation_mode != ht_opmode) { + if (!sdata->ht_opmode_valid || + sdata->vif.bss_conf.ht_operation_mode != ht_opmode) { changed |= BSS_CHANGED_HT; sdata->vif.bss_conf.ht_operation_mode = ht_opmode; + sdata->ht_opmode_valid = true; } return changed; @@ -1047,6 +1049,9 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, /* channel(_type) changes are handled by ieee80211_hw_config */ local->oper_channel_type = NL80211_CHAN_NO_HT; + /* on the next assoc, re-program HT parameters */ + sdata->ht_opmode_valid = false; + local->power_constr_level = 0; del_timer_sync(&local->dynamic_ps_timer);