瀏覽代碼

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>
Johannes Berg 13 年之前
父節點
當前提交
f9e6e95b63
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/mac80211/rate.h

+ 1 - 1
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);