diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-23 16:29:21 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-31 18:18:55 +0400 |
commit | 679ef4eadde1f8e55074427c0d8de2da55ca81f9 (patch) | |
tree | 35d87a3631699ee7bed7296731bc86a4ea767a3c /net/mac80211/util.c | |
parent | 568d6e289736c9c78cd8723aa81415daffafeff9 (diff) | |
download | linux-679ef4eadde1f8e55074427c0d8de2da55ca81f9.tar.xz |
mac80211: use oper_channel in utils and config
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/util.c')
-rw-r--r-- | net/mac80211/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 037d148e9f19..39005eca1a59 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -832,7 +832,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, memset(&qparam, 0, sizeof(qparam)); - use_11b = (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ) && + use_11b = (local->oper_channel->band == IEEE80211_BAND_2GHZ) && !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE); /* @@ -919,7 +919,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, if ((supp_rates[i] & 0x7f) * 5 > 110) have_higher_than_11mbit = 1; - if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ && + if (local->oper_channel->band == IEEE80211_BAND_2GHZ && have_higher_than_11mbit) sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE; else |