iwlwifi: reset the tid_data when a station is removed
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 23 Nov 2011 09:37:27 +0000 (11:37 +0200)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 16 Dec 2011 15:23:25 +0000 (07:23 -0800)
Since the station is removed, we need to reset the information that
was accounted for this station.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-sta.c

index 63d948d21c04895ba0944a4b25ccb04771d87b24..6bf33119e025252094041d482c2466df33b1e136 100644 (file)
@@ -463,6 +463,7 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 sta_id,
                       const u8 *addr)
 {
        unsigned long flags;
+       u8 tid;
 
        if (!iwl_is_ready(priv->shrd)) {
                IWL_DEBUG_INFO(priv,
@@ -501,6 +502,10 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 sta_id,
                priv->stations[sta_id].lq = NULL;
        }
 
+       for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++)
+               memset(&priv->tid_data[sta_id][tid], 0,
+                       sizeof(priv->tid_data[sta_id][tid]));
+
        priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE;
 
        priv->num_stations--;