aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 21:04:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:24 -0400
commitae17e986091637e7ef5a8224c7b689029b105131 (patch)
tree184fb207b36348f4ac989831b3425d9d67221e02 /drivers/net/wireless/iwlwifi/iwl-agn-rs.c
parent323ce79a9cdbf838ea577677b1ddace8e0b4d4c6 (diff)
mac80211: move txrate_idx into RC algorithms
The sta_info->txrate_idx member isn't used by all RC algorithms in the way it was intended to be used, move it into those that require it (only PID) and keep track in the core code of which rate was last used for reporting to userspace and the mesh MLME. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c13
1 files changed, 2 insertions, 11 deletions
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;