diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2008-12-07 21:42:10 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-12 13:48:24 -0500 |
commit | 3706de6f58962ba74c18eb4cb1ebe034ff723037 (patch) | |
tree | f7abfd387c67b07ae27c57609a7aa819140ae103 /drivers/net/wireless/ath9k/rc.c | |
parent | 40990ec01fcca0b86a19c13a5d3deb77da1913a7 (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.c | 9 |
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, * So, set fourth rate in series to be same as third one for * above conditions. */ - if ((sc->sc_curmode == ATH9K_MODE_11NG_HT20) || - (sc->sc_curmode == ATH9K_MODE_11NG_HT40PLUS) || - (sc->sc_curmode == ATH9K_MODE_11NG_HT40MINUS)) { + if ((sc->hw->conf.channel->band == IEEE80211_BAND_2GHZ) && + (sc->hw->conf.ht.enabled)) { u8 dot11rate = rate_table->info[rix].dot11rate; u8 phy = rate_table->info[rix].phy; if (i == 4 && @@ -1354,8 +1353,8 @@ static void ath_rc_init(struct ath_softc *sc, sta->ht_cap.ht_supported, is_cw_40); } else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) { - /* sc_curmode would be set on init through config() */ - rate_table = sc->hw_rate_table[sc->sc_curmode]; + /* cur_rate_table would be set on init through config() */ + rate_table = sc->cur_rate_table; } if (!rate_table) { |