diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-05-08 15:21:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-11 15:23:57 -0400 |
commit | 413ad50a5c15f3bae8075c15b101679f05c37a69 (patch) | |
tree | 332bec3cf38b25fba1a712138ea92d83964cf9b9 /net/mac80211/mlme.c | |
parent | 9ed6bcce77f75d98af6ee07069deac6041948bee (diff) |
mac80211: properly track HT operation_mode
When we disassociate, we set the channel to non-HT which
obviously invalidates any ht_operation_mode setting. But
when we then associate with the next AP again, we might
still have the ht_operation_mode from the previous AP
cached and fail to configure the hardware with the new
(but unchanged) operation mode. This patch fixes it by
separately tracking whether our cache is valid.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |