aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/rc.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-12-07 11:12:10 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-12 13:48:24 -0500
commit3706de6f58962ba74c18eb4cb1ebe034ff723037 (patch)
treef7abfd387c67b07ae27c57609a7aa819140ae103 /drivers/net/wireless/ath9k/rc.c
parent40990ec01fcca0b86a19c13a5d3deb77da1913a7 (diff)
ath9k: Maintain rate table choice after association
A scan run after association would change sc_curmode which is used to get the current rate table. This patch fixes it by removing sc_curmode and setting the rate table in usage in cur_rate_table on association. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/rc.c')
-rw-r--r--drivers/net/wireless/ath9k/rc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index 8eec66756c75..0ae5988e0b65 100644
--- a/drivers/net/wireless/ath9k/rc.c
+++ b/drivers/net/wireless/ath9k/rc.c
@@ -874,9 +874,8 @@ static void ath_rc_ratefind(struct ath_softc *sc,
874 * So, set fourth rate in series to be same as third one for 874 * So, set fourth rate in series to be same as third one for
875 * above conditions. 875 * above conditions.
876 */ 876 */
877 if ((sc->sc_curmode == ATH9K_MODE_11NG_HT20) || 877 if ((sc->hw->conf.channel->band == IEEE80211_BAND_2GHZ) &&
878 (sc->sc_curmode == ATH9K_MODE_11NG_HT40PLUS) || 878 (sc->hw->conf.ht.enabled)) {
879 (sc->sc_curmode == ATH9K_MODE_11NG_HT40MINUS)) {
880 u8 dot11rate = rate_table->info[rix].dot11rate; 879 u8 dot11rate = rate_table->info[rix].dot11rate;
881 u8 phy = rate_table->info[rix].phy; 880 u8 phy = rate_table->info[rix].phy;
882 if (i == 4 && 881 if (i == 4 &&
@@ -1354,8 +1353,8 @@ static void ath_rc_init(struct ath_softc *sc,
1354 sta->ht_cap.ht_supported, 1353 sta->ht_cap.ht_supported,
1355 is_cw_40); 1354 is_cw_40);
1356 } else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) { 1355 } else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) {
1357 /* sc_curmode would be set on init through config() */ 1356 /* cur_rate_table would be set on init through config() */
1358 rate_table = sc->hw_rate_table[sc->sc_curmode]; 1357 rate_table = sc->cur_rate_table;
1359 } 1358 }
1360 1359
1361 if (!rate_table) { 1360 if (!rate_table) {