diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-03-01 04:12:57 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-03 15:39:21 -0500 |
commit | 4fa004373133ece3d9b1c0a7e243b0e53760b165 (patch) | |
tree | e70b44c3d6a5afef0238caff3c7eefbcc74b0bc0 | |
parent | b08dfd0435333818a03b38867c556ebcbb3abc02 (diff) |
mac80211: Fix HT rate control configuration
Handling HT configuration changes involved setting the channel
with the new HT parameters and then issuing a rate_update()
notification to the driver.
This behavior changed after the off-channel changes. Now, the channel
is not updated with the new HT params in enable_ht() - instead, it
is now done when the scan work terminates. This results in the driver
depending on stale information, defaulting to non-HT mode always.
Fix this by passing the new channel type to the driver.
Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 6 | ||||
-rw-r--r-- | include/net/mac80211.h | 3 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 3 | ||||
-rw-r--r-- | net/mac80211/rate.h | 5 |
4 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index ac34a055c713..0e79e58cf4c9 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -1323,7 +1323,7 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, | |||
1323 | 1323 | ||
1324 | static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband, | 1324 | static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband, |
1325 | struct ieee80211_sta *sta, void *priv_sta, | 1325 | struct ieee80211_sta *sta, void *priv_sta, |
1326 | u32 changed) | 1326 | u32 changed, enum nl80211_channel_type oper_chan_type) |
1327 | { | 1327 | { |
1328 | struct ath_softc *sc = priv; | 1328 | struct ath_softc *sc = priv; |
1329 | struct ath_rate_priv *ath_rc_priv = priv_sta; | 1329 | struct ath_rate_priv *ath_rc_priv = priv_sta; |
@@ -1340,8 +1340,8 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband, | |||
1340 | if (sc->sc_ah->opmode != NL80211_IFTYPE_STATION) | 1340 | if (sc->sc_ah->opmode != NL80211_IFTYPE_STATION) |
1341 | return; | 1341 | return; |
1342 | 1342 | ||
1343 | if (sc->hw->conf.channel_type == NL80211_CHAN_HT40MINUS || | 1343 | if (oper_chan_type == NL80211_CHAN_HT40MINUS || |
1344 | sc->hw->conf.channel_type == NL80211_CHAN_HT40PLUS) | 1344 | oper_chan_type == NL80211_CHAN_HT40PLUS) |
1345 | oper_cw40 = true; | 1345 | oper_cw40 = true; |
1346 | 1346 | ||
1347 | oper_sgi40 = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? | 1347 | oper_sgi40 = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ? |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 80eb7cc42ce9..45d7d44d7cbe 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -2426,7 +2426,8 @@ struct rate_control_ops { | |||
2426 | struct ieee80211_sta *sta, void *priv_sta); | 2426 | struct ieee80211_sta *sta, void *priv_sta); |
2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, | 2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, |
2428 | struct ieee80211_sta *sta, | 2428 | struct ieee80211_sta *sta, |
2429 | void *priv_sta, u32 changed); | 2429 | void *priv_sta, u32 changed, |
2430 | enum nl80211_channel_type oper_chan_type); | ||
2430 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | 2431 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, |
2431 | void *priv_sta); | 2432 | void *priv_sta); |
2432 | 2433 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5a268761e4c5..0ab284c32135 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -177,7 +177,8 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
177 | sta = sta_info_get(sdata, bssid); | 177 | sta = sta_info_get(sdata, bssid); |
178 | if (sta) | 178 | if (sta) |
179 | rate_control_rate_update(local, sband, sta, | 179 | rate_control_rate_update(local, sband, sta, |
180 | IEEE80211_RC_HT_CHANGED); | 180 | IEEE80211_RC_HT_CHANGED, |
181 | local->oper_channel_type); | ||
181 | rcu_read_unlock(); | 182 | rcu_read_unlock(); |
182 | } | 183 | } |
183 | 184 | ||
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index b6108bca96d4..065a96190e32 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h | |||
@@ -66,7 +66,8 @@ static inline void rate_control_rate_init(struct sta_info *sta) | |||
66 | 66 | ||
67 | static inline void rate_control_rate_update(struct ieee80211_local *local, | 67 | static inline void rate_control_rate_update(struct ieee80211_local *local, |
68 | struct ieee80211_supported_band *sband, | 68 | struct ieee80211_supported_band *sband, |
69 | struct sta_info *sta, u32 changed) | 69 | struct sta_info *sta, u32 changed, |
70 | enum nl80211_channel_type oper_chan_type) | ||
70 | { | 71 | { |
71 | struct rate_control_ref *ref = local->rate_ctrl; | 72 | struct rate_control_ref *ref = local->rate_ctrl; |
72 | struct ieee80211_sta *ista = &sta->sta; | 73 | struct ieee80211_sta *ista = &sta->sta; |
@@ -74,7 +75,7 @@ static inline void rate_control_rate_update(struct ieee80211_local *local, | |||
74 | 75 | ||
75 | if (ref && ref->ops->rate_update) | 76 | if (ref && ref->ops->rate_update) |
76 | ref->ops->rate_update(ref->priv, sband, ista, | 77 | ref->ops->rate_update(ref->priv, sband, ista, |
77 | priv_sta, changed); | 78 | priv_sta, changed, oper_chan_type); |
78 | } | 79 | } |
79 | 80 | ||
80 | static inline void *rate_control_alloc_sta(struct rate_control_ref *ref, | 81 | static inline void *rate_control_alloc_sta(struct rate_control_ref *ref, |