aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath9k/rc.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c13
3 files changed, 5 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index 226d70c73fe6..1cc9daf44550 100644
--- a/drivers/net/wireless/ath9k/rc.c
+++ b/drivers/net/wireless/ath9k/rc.c
@@ -2039,7 +2039,6 @@ static void ath_rate_init(void *priv, void *priv_sta,
2039 DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__); 2039 DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__);
2040 2040
2041 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2041 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
2042 sta->txrate_idx = rate_lowest_index(local, sband, sta);
2043 2042
2044 ath_setup_rates(local, sta); 2043 ath_setup_rates(local, sta);
2045 if (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) { 2044 if (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index f751b9097592..a279bf1dc9b0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -334,13 +334,11 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
334 334
335 for (i = IWL_RATE_COUNT - 1; i >= 0; i--) { 335 for (i = IWL_RATE_COUNT - 1; i >= 0; i--) {
336 if (sta->sta.supp_rates[local->hw.conf.channel->band] & (1 << i)) { 336 if (sta->sta.supp_rates[local->hw.conf.channel->band] & (1 << i)) {
337 sta->txrate_idx = i; 337 rs_sta->last_txrate_idx = i;
338 break; 338 break;
339 } 339 }
340 } 340 }
341 341
342 rs_sta->last_txrate_idx = sta->txrate_idx;
343
344 /* For 5 GHz band it start at IWL_FIRST_OFDM_RATE */ 342 /* For 5 GHz band it start at IWL_FIRST_OFDM_RATE */
345 if (local->hw.conf.channel->band == IEEE80211_BAND_5GHZ) 343 if (local->hw.conf.channel->band == IEEE80211_BAND_5GHZ)
346 rs_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; 344 rs_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE;
@@ -809,15 +807,13 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
809 807
810 rs_sta->last_txrate_idx = index; 808 rs_sta->last_txrate_idx = index;
811 if (sband->band == IEEE80211_BAND_5GHZ) 809 if (sband->band == IEEE80211_BAND_5GHZ)
812 sta->txrate_idx = rs_sta->last_txrate_idx - IWL_FIRST_OFDM_RATE; 810 sel->rate_idx = rs_sta->last_txrate_idx - IWL_FIRST_OFDM_RATE;
813 else 811 else
814 sta->txrate_idx = rs_sta->last_txrate_idx; 812 sel->rate_idx = rs_sta->last_txrate_idx;
815 813
816 rcu_read_unlock(); 814 rcu_read_unlock();
817 815
818 IWL_DEBUG_RATE("leave: %d\n", index); 816 IWL_DEBUG_RATE("leave: %d\n", index);
819
820 sel->rate_idx = sta->txrate_idx;
821} 817}
822 818
823static struct rate_control_ops rs_ops = { 819static struct rate_control_ops rs_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index f7191a9a7fb7..a8711c314e6a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2064,14 +2064,6 @@ out:
2064 i = index; 2064 i = index;
2065 lq_sta->last_txrate_idx = i; 2065 lq_sta->last_txrate_idx = i;
2066 2066
2067 /* sta->txrate_idx is an index to A mode rates which start
2068 * at IWL_FIRST_OFDM_RATE
2069 */
2070 if (lq_sta->band == IEEE80211_BAND_5GHZ)
2071 sta->txrate_idx = i - IWL_FIRST_OFDM_RATE;
2072 else
2073 sta->txrate_idx = i;
2074
2075 return; 2067 return;
2076} 2068}
2077 2069
@@ -2234,7 +2226,6 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2234 2226
2235 lq_sta->flush_timer = 0; 2227 lq_sta->flush_timer = 0;
2236 lq_sta->supp_rates = sta->sta.supp_rates[sband->band]; 2228 lq_sta->supp_rates = sta->sta.supp_rates[sband->band];
2237 sta->txrate_idx = 3;
2238 for (j = 0; j < LQ_SIZE; j++) 2229 for (j = 0; j < LQ_SIZE; j++)
2239 for (i = 0; i < IWL_RATE_COUNT; i++) 2230 for (i = 0; i < IWL_RATE_COUNT; i++)
2240 rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]); 2231 rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]);
@@ -2269,11 +2260,11 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2269 } 2260 }
2270 2261
2271 /* Find highest tx rate supported by hardware and destination station */ 2262 /* Find highest tx rate supported by hardware and destination station */
2263 lq_sta->last_txrate_idx = 3;
2272 for (i = 0; i < sband->n_bitrates; i++) 2264 for (i = 0; i < sband->n_bitrates; i++)
2273 if (sta->sta.supp_rates[sband->band] & BIT(i)) 2265 if (sta->sta.supp_rates[sband->band] & BIT(i))
2274 sta->txrate_idx = i; 2266 lq_sta->last_txrate_idx = i;
2275 2267
2276 lq_sta->last_txrate_idx = sta->txrate_idx;
2277 /* For MODE_IEEE80211A, skip over cck rates in global rate table */ 2268 /* For MODE_IEEE80211A, skip over cck rates in global rate table */
2278 if (local->hw.conf.channel->band == IEEE80211_BAND_5GHZ) 2269 if (local->hw.conf.channel->band == IEEE80211_BAND_5GHZ)
2279 lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; 2270 lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE;