mac80211: use oper_channel in rate init

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:44 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f9e6e95b63758202fe2ce43bd7c922db2ff50f80
Commit:     f9e6e95b63758202fe2ce43bd7c922db2ff50f80
Parent:     9e99a127b5724d7a2cd9d2973b10981d56e1d647
Author:     Johannes Berg <johannes.berg at intel.com>
AuthorDate: Mon Jul 23 14:29:21 2012 +0200
Committer:  Johannes Berg <johannes.berg at intel.com>
CommitDate: Mon Aug 20 14:13:41 2012 +0200

    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 at intel.com>
---
 net/mac80211/rate.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index 6e4fd32..10de668 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);



More information about the linux-mtd-cvs mailing list