aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.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:55 -0400
commit679ef4eadde1f8e55074427c0d8de2da55ca81f9 (patch)
tree35d87a3631699ee7bed7296731bc86a4ea767a3c /net/mac80211/util.c
parent568d6e289736c9c78cd8723aa81415daffafeff9 (diff)
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,
832 832
833 memset(&qparam, 0, sizeof(qparam)); 833 memset(&qparam, 0, sizeof(qparam));
834 834
835 use_11b = (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ) && 835 use_11b = (local->oper_channel->band == IEEE80211_BAND_2GHZ) &&
836 !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE); 836 !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE);
837 837
838 /* 838 /*
@@ -919,7 +919,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
919 if ((supp_rates[i] & 0x7f) * 5 > 110) 919 if ((supp_rates[i] & 0x7f) * 5 > 110)
920 have_higher_than_11mbit = 1; 920 have_higher_than_11mbit = 1;
921 921
922 if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ && 922 if (local->oper_channel->band == IEEE80211_BAND_2GHZ &&
923 have_higher_than_11mbit) 923 have_higher_than_11mbit)
924 sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE; 924 sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE;
925 else 925 else