aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorAvri Altman <avri.altman@intel.com>2013-11-18 12:06:48 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-12-02 05:51:51 -0500
commit017b45bb5c5b40d9da1ea671aa8bc2eaec73675f (patch)
tree16cbb2aeadef0631bb94cfbfc12e8db42701615c /net/mac80211/mlme.c
parent2ce6a0f554868ef6b07966254a612f710a909136 (diff)
mac80211: update ht flag if bss configuration changed
There's a bug in tracking HT opmode changes in mac80211, it fails to update the driver when the channel parameters don't change. Move the code to do the HT opmode checking independently of the channel/bandwidth tracking. Signed-off-by: Avri Altman <avri.altman@intel.com> [edit commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2bb3a8631b17..33bcf8018d8e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -330,6 +330,16 @@ static int ieee80211_config_bw(struct ieee80211_sub_if_data *sdata,
330 if (WARN_ON_ONCE(!sta)) 330 if (WARN_ON_ONCE(!sta))
331 return -EINVAL; 331 return -EINVAL;
332 332
333 /*
334 * if bss configuration changed store the new one -
335 * this may be applicable even if channel is identical
336 */
337 ht_opmode = le16_to_cpu(ht_oper->operation_mode);
338 if (sdata->vif.bss_conf.ht_operation_mode != ht_opmode) {
339 *changed |= BSS_CHANGED_HT;
340 sdata->vif.bss_conf.ht_operation_mode = ht_opmode;
341 }
342
333 chan = sdata->vif.bss_conf.chandef.chan; 343 chan = sdata->vif.bss_conf.chandef.chan;
334 sband = local->hw.wiphy->bands[chan->band]; 344 sband = local->hw.wiphy->bands[chan->band];
335 345
@@ -416,14 +426,6 @@ static int ieee80211_config_bw(struct ieee80211_sub_if_data *sdata,
416 IEEE80211_RC_BW_CHANGED); 426 IEEE80211_RC_BW_CHANGED);
417 } 427 }
418 428
419 ht_opmode = le16_to_cpu(ht_oper->operation_mode);
420
421 /* if bss configuration changed store the new one */
422 if (sdata->vif.bss_conf.ht_operation_mode != ht_opmode) {
423 *changed |= BSS_CHANGED_HT;
424 sdata->vif.bss_conf.ht_operation_mode = ht_opmode;
425 }
426
427 return 0; 429 return 0;
428} 430}
429 431