aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-23 14:29:21 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-07-31 16:18:55 +0200
commit679ef4eadde1f8e55074427c0d8de2da55ca81f9 (patch)
tree35d87a3631699ee7bed7296731bc86a4ea767a3c /net/mac80211/util.c
parentmac80211: use oper_channel in managed mlme (diff)
downloadlinux-dev-679ef4eadde1f8e55074427c0d8de2da55ca81f9.tar.xz
linux-dev-679ef4eadde1f8e55074427c0d8de2da55ca81f9.zip
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.c4
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