aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-28 08:44:52 -0700
committerReinette Chatre <reinette.chatre@intel.com>2010-05-10 15:08:53 -0700
commit1fa61b2e793dad51271c7ce39377daade51261d7 (patch)
tree1165dc3d721f1db83a459687b70bb3b4fdfafec9 /drivers/net/wireless/iwlwifi/iwl-sta.c
parentc0222df86e55576ef879795b5a158c46e6653f07 (diff)
downloadkernel_samsung_smdk4412-1fa61b2e793dad51271c7ce39377daade51261d7.zip
kernel_samsung_smdk4412-1fa61b2e793dad51271c7ce39377daade51261d7.tar.gz
kernel_samsung_smdk4412-1fa61b2e793dad51271c7ce39377daade51261d7.tar.bz2
iwlwifi: manage IBSS station properly
Currently iwlwifi will eventually exhaust the station table when adding the BSSID station for IBSS mode, unless the interface is set down. The new mac80211 ibss joined/left notification allows us to fix that easily by moving the code to add the IBSS station to the notification, and also adding code to remove it again when we leave the IBSS. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 354eb13..7da8ede 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -596,7 +596,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv,
/**
* iwl_remove_station - Remove driver's knowledge of station.
*/
-static int iwl_remove_station(struct iwl_priv *priv, const u8 *addr)
+int iwl_remove_station(struct iwl_priv *priv, const u8 *addr)
{
int sta_id = IWL_INVALID_STATION;
int i, ret = -EINVAL;
@@ -647,6 +647,10 @@ static int iwl_remove_station(struct iwl_priv *priv, const u8 *addr)
goto out;
}
+ if (priv->stations[sta_id].used & IWL_STA_LOCAL) {
+ kfree(priv->stations[sta_id].lq);
+ priv->stations[sta_id].lq = NULL;
+ }
priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE;
@@ -663,6 +667,7 @@ out:
spin_unlock_irqrestore(&priv->sta_lock, flags);
return ret;
}
+EXPORT_SYMBOL_GPL(iwl_remove_station);
/**
* iwl_clear_ucode_stations() - clear entire station table driver and/or ucode