aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-28 11:44:52 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-05-10 18:08:53 -0400
commit1fa61b2e793dad51271c7ce39377daade51261d7 (patch)
tree1165dc3d721f1db83a459687b70bb3b4fdfafec9 /drivers/net/wireless/iwlwifi/iwl-sta.c
parentc0222df86e55576ef879795b5a158c46e6653f07 (diff)
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 354eb13a8515..7da8edeb5256 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,
596/** 596/**
597 * iwl_remove_station - Remove driver's knowledge of station. 597 * iwl_remove_station - Remove driver's knowledge of station.
598 */ 598 */
599static int iwl_remove_station(struct iwl_priv *priv, const u8 *addr) 599int iwl_remove_station(struct iwl_priv *priv, const u8 *addr)
600{ 600{
601 int sta_id = IWL_INVALID_STATION; 601 int sta_id = IWL_INVALID_STATION;
602 int i, ret = -EINVAL; 602 int i, ret = -EINVAL;
@@ -647,6 +647,10 @@ static int iwl_remove_station(struct iwl_priv *priv, const u8 *addr)
647 goto out; 647 goto out;
648 } 648 }
649 649
650 if (priv->stations[sta_id].used & IWL_STA_LOCAL) {
651 kfree(priv->stations[sta_id].lq);
652 priv->stations[sta_id].lq = NULL;
653 }
650 654
651 priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE; 655 priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE;
652 656
@@ -663,6 +667,7 @@ out:
663 spin_unlock_irqrestore(&priv->sta_lock, flags); 667 spin_unlock_irqrestore(&priv->sta_lock, flags);
664 return ret; 668 return ret;
665} 669}
670EXPORT_SYMBOL_GPL(iwl_remove_station);
666 671
667/** 672/**
668 * iwl_clear_ucode_stations() - clear entire station table driver and/or ucode 673 * iwl_clear_ucode_stations() - clear entire station table driver and/or ucode