summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-23 16:29:21 +0400
committerJohannes Berg <johannes.berg@intel.com>2012-08-20 16:13:41 +0400
commitf9e6e95b63758202fe2ce43bd7c922db2ff50f80 (patch)
tree1dd1ffc5779e22015ea55e2911708f1c4156425a
parent9e99a127b5724d7a2cd9d2973b10981d56e1d647 (diff)
downloadlinux-f9e6e95b63758202fe2ce43bd7c922db2ff50f80.tar.xz
mac80211: use oper_channel in rate init
Using hw.conf.channel is wrong as it could be the temporary channel if the station is added from the workqueue while the device is already on another channel. Use oper_channel instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/rate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index 6e4fd32c6617..10de668eb9f6 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -56,7 +56,7 @@ static inline void rate_control_rate_init(struct sta_info *sta)
if (!ref)
return;
- sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
+ sband = local->hw.wiphy->bands[local->oper_channel->band];
ref->ops->rate_init(ref->priv, sband, ista, priv_sta);
set_sta_flag(sta, WLAN_STA_RATE_CONTROL);