aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2009-10-30 17:36:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-11-02 15:39:47 -0500
commit5ad13f8ce76814b37842c15301287efd607c6d26 (patch)
tree5e29880e17d9fdf9470b949088cdeae26696b00e /drivers/net/wireless/iwlwifi/iwl-agn-rs.c
parent62a94926183374d8414ab2ec633d9fe9530644ec (diff)
iwlagn: move rate scale initialization to init function
This fits better in how the callbacks operate (alloc does allocation and init does initialization). This also helps if we later want to do our own initialization without relying on the mac80211 allocation. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> 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, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 27d4ece4d467..43edd8fd4405 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2477,19 +2477,12 @@ static void *rs_alloc_sta(void *priv_rate, struct ieee80211_sta *sta,
2477 struct iwl_lq_sta *lq_sta; 2477 struct iwl_lq_sta *lq_sta;
2478 struct iwl_station_priv *sta_priv = (struct iwl_station_priv *) sta->drv_priv; 2478 struct iwl_station_priv *sta_priv = (struct iwl_station_priv *) sta->drv_priv;
2479 struct iwl_priv *priv; 2479 struct iwl_priv *priv;
2480 int i, j;
2481 2480
2482 priv = (struct iwl_priv *)priv_rate; 2481 priv = (struct iwl_priv *)priv_rate;
2483 IWL_DEBUG_RATE(priv, "create station rate scale window\n"); 2482 IWL_DEBUG_RATE(priv, "create station rate scale window\n");
2484 2483
2485 lq_sta = &sta_priv->lq_sta; 2484 lq_sta = &sta_priv->lq_sta;
2486 2485
2487 lq_sta->lq.sta_id = 0xff;
2488
2489 for (j = 0; j < LQ_SIZE; j++)
2490 for (i = 0; i < IWL_RATE_COUNT; i++)
2491 rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]);
2492
2493 return lq_sta; 2486 return lq_sta;
2494} 2487}
2495 2488
@@ -2502,6 +2495,12 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
2502 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; 2495 struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
2503 struct iwl_lq_sta *lq_sta = priv_sta; 2496 struct iwl_lq_sta *lq_sta = priv_sta;
2504 2497
2498 lq_sta->lq.sta_id = 0xff;
2499
2500 for (j = 0; j < LQ_SIZE; j++)
2501 for (i = 0; i < IWL_RATE_COUNT; i++)
2502 rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]);
2503
2505 lq_sta->flush_timer = 0; 2504 lq_sta->flush_timer = 0;
2506 lq_sta->supp_rates = sta->supp_rates[sband->band]; 2505 lq_sta->supp_rates = sta->supp_rates[sband->band];
2507 for (j = 0; j < LQ_SIZE; j++) 2506 for (j = 0; j < LQ_SIZE; j++)