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>
This commit is contained in:
parent
273686d664
commit
568d6e2897
|
@ -185,15 +185,15 @@ static u32 ieee80211_config_ht_tx(struct ieee80211_sub_if_data *sdata,
|
||||||
u16 ht_opmode;
|
u16 ht_opmode;
|
||||||
bool disable_40 = false;
|
bool disable_40 = false;
|
||||||
|
|
||||||
sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
|
sband = local->hw.wiphy->bands[local->oper_channel->band];
|
||||||
|
|
||||||
switch (sdata->vif.bss_conf.channel_type) {
|
switch (sdata->vif.bss_conf.channel_type) {
|
||||||
case NL80211_CHAN_HT40PLUS:
|
case NL80211_CHAN_HT40PLUS:
|
||||||
if (local->hw.conf.channel->flags & IEEE80211_CHAN_NO_HT40PLUS)
|
if (local->oper_channel->flags & IEEE80211_CHAN_NO_HT40PLUS)
|
||||||
disable_40 = true;
|
disable_40 = true;
|
||||||
break;
|
break;
|
||||||
case NL80211_CHAN_HT40MINUS:
|
case NL80211_CHAN_HT40MINUS:
|
||||||
if (local->hw.conf.channel->flags & IEEE80211_CHAN_NO_HT40MINUS)
|
if (local->oper_channel->flags & IEEE80211_CHAN_NO_HT40MINUS)
|
||||||
disable_40 = true;
|
disable_40 = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1274,7 +1274,7 @@ static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
|
||||||
}
|
}
|
||||||
|
|
||||||
use_short_slot = !!(capab & WLAN_CAPABILITY_SHORT_SLOT_TIME);
|
use_short_slot = !!(capab & WLAN_CAPABILITY_SHORT_SLOT_TIME);
|
||||||
if (sdata->local->hw.conf.channel->band == IEEE80211_BAND_5GHZ)
|
if (sdata->local->oper_channel->band == IEEE80211_BAND_5GHZ)
|
||||||
use_short_slot = true;
|
use_short_slot = true;
|
||||||
|
|
||||||
if (use_protection != bss_conf->use_cts_prot) {
|
if (use_protection != bss_conf->use_cts_prot) {
|
||||||
|
@ -2364,7 +2364,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
|
||||||
if (baselen > len)
|
if (baselen > len)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rx_status->freq != local->hw.conf.channel->center_freq)
|
if (rx_status->freq != local->oper_channel->center_freq)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ifmgd->assoc_data && !ifmgd->assoc_data->have_beacon &&
|
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,
|
||||||
!(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) {
|
!(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) {
|
||||||
struct ieee80211_supported_band *sband;
|
struct ieee80211_supported_band *sband;
|
||||||
|
|
||||||
sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
|
sband = local->hw.wiphy->bands[local->oper_channel->band];
|
||||||
|
|
||||||
changed |= ieee80211_config_ht_tx(sdata, elems.ht_operation,
|
changed |= ieee80211_config_ht_tx(sdata, elems.ht_operation,
|
||||||
bssid, true);
|
bssid, true);
|
||||||
|
|
Loading…
Reference in New Issue