diff options
Diffstat (limited to 'drivers/net/wireless/ath9k/rc.c')
-rw-r--r-- | drivers/net/wireless/ath9k/rc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c index 76acd2b75fcd..0ae5988e0b65 100644 --- a/drivers/net/wireless/ath9k/rc.c +++ b/drivers/net/wireless/ath9k/rc.c | |||
@@ -817,7 +817,7 @@ static void ath_rc_ratefind(struct ath_softc *sc, | |||
817 | struct ath_rate_table *rate_table; | 817 | struct ath_rate_table *rate_table; |
818 | struct ieee80211_tx_rate *rates = tx_info->control.rates; | 818 | struct ieee80211_tx_rate *rates = tx_info->control.rates; |
819 | 819 | ||
820 | rate_table = sc->hw_rate_table[sc->sc_curmode]; | 820 | rate_table = sc->cur_rate_table; |
821 | rix = ath_rc_ratefind_ht(sc, ath_rc_priv, rate_table, 1, | 821 | rix = ath_rc_ratefind_ht(sc, ath_rc_priv, rate_table, 1, |
822 | is_probe, is_retry); | 822 | is_probe, is_retry); |
823 | nrix = rix; | 823 | nrix = rix; |
@@ -874,10 +874,9 @@ 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)) { | 879 | u8 dot11rate = rate_table->info[rix].dot11rate; |
880 | 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 && |
883 | ((dot11rate == 2 && phy == WLAN_RC_PHY_HT_40_SS) || | 882 | ((dot11rate == 2 && phy == WLAN_RC_PHY_HT_40_SS) || |
@@ -1094,7 +1093,7 @@ static void ath_rc_update_ht(struct ath_softc *sc, | |||
1094 | int rate; | 1093 | int rate; |
1095 | u8 last_per; | 1094 | u8 last_per; |
1096 | bool state_change = false; | 1095 | bool state_change = false; |
1097 | struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode]; | 1096 | struct ath_rate_table *rate_table = sc->cur_rate_table; |
1098 | int size = ath_rc_priv->rate_table_size; | 1097 | int size = ath_rc_priv->rate_table_size; |
1099 | 1098 | ||
1100 | if ((tx_rate < 0) || (tx_rate > rate_table->rate_cnt)) | 1099 | if ((tx_rate < 0) || (tx_rate > rate_table->rate_cnt)) |
@@ -1254,7 +1253,7 @@ static void ath_rc_tx_status(struct ath_softc *sc, | |||
1254 | u8 flags; | 1253 | u8 flags; |
1255 | u32 i = 0, rix; | 1254 | u32 i = 0, rix; |
1256 | 1255 | ||
1257 | rate_table = sc->hw_rate_table[sc->sc_curmode]; | 1256 | rate_table = sc->cur_rate_table; |
1258 | 1257 | ||
1259 | /* | 1258 | /* |
1260 | * If the first rate is not the final index, there | 1259 | * If the first rate is not the final index, there |
@@ -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) { |
@@ -1432,6 +1431,7 @@ static void ath_rc_init(struct ath_softc *sc, | |||
1432 | ath_rc_priv->max_valid_rate = k; | 1431 | ath_rc_priv->max_valid_rate = k; |
1433 | ath_rc_sort_validrates(rate_table, ath_rc_priv); | 1432 | ath_rc_sort_validrates(rate_table, ath_rc_priv); |
1434 | ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4]; | 1433 | ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4]; |
1434 | sc->cur_rate_table = rate_table; | ||
1435 | } | 1435 | } |
1436 | 1436 | ||
1437 | /* Rate Control callbacks */ | 1437 | /* Rate Control callbacks */ |