Skip to content

Commit

Permalink
mac80211: use oper_channel in rate init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Aug 20, 2012
1 parent 9e99a12 commit f9e6e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/rate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f9e6e95

Please sign in to comment.