diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2009-10-16 14:25:55 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:33 -0400 |
commit | 8d9698b3e6ce3c50f9ec5a0aaea4da82d5af7779 (patch) | |
tree | 652b1fecb395e4f41397bfa68d11144dfe918ccf /drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |
parent | cc1282f63b53d0967bd96ed56aa3d2463dc4b4b6 (diff) |
iwlagn: store station rate scale information in mac80211 station structure
Currently mac80211 initializes the rate scaling before notifying the driver
of the station's existence. The driver dealt with this by not relying on
mac80211's station notifications and instead mixing this functionality with
the rate scaling code and other places. To clean this up the driver needs
to do rate scaling initialization after being notified of the station, this
can be done if the rate scaling information forms part of the station
information passed from mac80211 to driver.
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.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 2d4ec1a6595..27d4ece4d46 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c @@ -2475,19 +2475,17 @@ static void *rs_alloc_sta(void *priv_rate, struct ieee80211_sta *sta, gfp_t gfp) { struct iwl_lq_sta *lq_sta; + struct iwl_station_priv *sta_priv = (struct iwl_station_priv *) sta->drv_priv; struct iwl_priv *priv; int i, j; priv = (struct iwl_priv *)priv_rate; IWL_DEBUG_RATE(priv, "create station rate scale window\n"); - lq_sta = kzalloc(sizeof(struct iwl_lq_sta), gfp); + lq_sta = &sta_priv->lq_sta; - if (lq_sta == NULL) - return NULL; lq_sta->lq.sta_id = 0xff; - for (j = 0; j < LQ_SIZE; j++) for (i = 0; i < IWL_RATE_COUNT; i++) rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]); @@ -2719,11 +2717,9 @@ static void rs_free(void *priv_rate) static void rs_free_sta(void *priv_r, struct ieee80211_sta *sta, void *priv_sta) { - struct iwl_lq_sta *lq_sta = priv_sta; struct iwl_priv *priv __maybe_unused = priv_r; IWL_DEBUG_RATE(priv, "enter\n"); - kfree(lq_sta); IWL_DEBUG_RATE(priv, "leave\n"); } |