aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-23 08:29:21 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-31 10:18:53 -0400
commit568d6e289736c9c78cd8723aa81415daffafeff9 (patch)
tree919923260707a19ab051f764c5b1282262913567 /net/mac80211/mlme.c
parent273686d664daae1aa728b76e45720273b26dd876 (diff)
mac80211: use oper_channel in managed mlme
Using hw.conf.channel is wrong as it could be the temporary channel if any function like the beacon get function is called while scanning or during other temporary out-of-channel activities. Use oper_channel instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 682055207588..2657a5645a8a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -185,15 +185,15 @@ static u32 ieee80211_config_ht_tx(struct ieee80211_sub_if_data *sdata,
185 u16 ht_opmode; 185 u16 ht_opmode;
186 bool disable_40 = false; 186 bool disable_40 = false;
187 187
188 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 188 sband = local->hw.wiphy->bands[local->oper_channel->band];
189 189
190 switch (sdata->vif.bss_conf.channel_type) { 190 switch (sdata->vif.bss_conf.channel_type) {
191 case NL80211_CHAN_HT40PLUS: 191 case NL80211_CHAN_HT40PLUS:
192 if (local->hw.conf.channel->flags & IEEE80211_CHAN_NO_HT40PLUS) 192 if (local->oper_channel->flags & IEEE80211_CHAN_NO_HT40PLUS)
193 disable_40 = true; 193 disable_40 = true;
194 break; 194 break;
195 case NL80211_CHAN_HT40MINUS: 195 case NL80211_CHAN_HT40MINUS:
196 if (local->hw.conf.channel->flags & IEEE80211_CHAN_NO_HT40MINUS) 196 if (local->oper_channel->flags & IEEE80211_CHAN_NO_HT40MINUS)
197 disable_40 = true; 197 disable_40 = true;
198 break; 198 break;
199 default: 199 default:
@@ -1274,7 +1274,7 @@ static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
1274 } 1274 }
1275 1275
1276 use_short_slot = !!(capab & WLAN_CAPABILITY_SHORT_SLOT_TIME); 1276 use_short_slot = !!(capab & WLAN_CAPABILITY_SHORT_SLOT_TIME);
1277 if (sdata->local->hw.conf.channel->band == IEEE80211_BAND_5GHZ) 1277 if (sdata->local->oper_channel->band == IEEE80211_BAND_5GHZ)
1278 use_short_slot = true; 1278 use_short_slot = true;
1279 1279
1280 if (use_protection != bss_conf->use_cts_prot) { 1280 if (use_protection != bss_conf->use_cts_prot) {
@@ -2364,7 +2364,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
2364 if (baselen > len) 2364 if (baselen > len)
2365 return; 2365 return;
2366 2366
2367 if (rx_status->freq != local->hw.conf.channel->center_freq) 2367 if (rx_status->freq != local->oper_channel->center_freq)
2368 return; 2368 return;
2369 2369
2370 if (ifmgd->assoc_data && !ifmgd->assoc_data->have_beacon && 2370 if (ifmgd->assoc_data && !ifmgd->assoc_data->have_beacon &&
@@ -2528,7 +2528,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
2528 !(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) { 2528 !(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) {
2529 struct ieee80211_supported_band *sband; 2529 struct ieee80211_supported_band *sband;
2530 2530
2531 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2531 sband = local->hw.wiphy->bands[local->oper_channel->band];
2532 2532
2533 changed |= ieee80211_config_ht_tx(sdata, elems.ht_operation, 2533 changed |= ieee80211_config_ht_tx(sdata, elems.ht_operation,
2534 bssid, true); 2534 bssid, true);