summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-sta.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2010-05-28 09:28:39 -0700
committerReinette Chatre <reinette.chatre@intel.com>2010-06-14 10:51:16 -0700
commitda5ae1cfff4cc5b9392eab59b227ad907626d7aa (patch)
tree67776b88a0f37dc2c0f2b839076279d1ecd78239 /drivers/net/wireless/iwlwifi/iwl-sta.c
parentb054b747a694927879c94dd11af54d04346aed7d (diff)
downloadblackbird-op-linux-da5ae1cfff4cc5b9392eab59b227ad907626d7aa.tar.gz
blackbird-op-linux-da5ae1cfff4cc5b9392eab59b227ad907626d7aa.zip
iwlwifi: serialize station management actions
We are seeing some race conditions between incoming station management requests (station add/remove) and the internal unassoc RXON command that modifies station table. Modify these flows to require the mutex to be held and thus serializing them. This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2207 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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 83a26361a9b5..c27c13fbb1ae 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -1373,10 +1373,14 @@ int iwl_mac_sta_remove(struct ieee80211_hw *hw,
IWL_DEBUG_INFO(priv, "received request to remove station %pM\n",
sta->addr);
+ mutex_lock(&priv->mutex);
+ IWL_DEBUG_INFO(priv, "proceeding to remove station %pM\n",
+ sta->addr);
ret = iwl_remove_station(priv, sta_common->sta_id, sta->addr);
if (ret)
IWL_ERR(priv, "Error removing station %pM\n",
sta->addr);
+ mutex_unlock(&priv->mutex);
return ret;
}
EXPORT_SYMBOL(iwl_mac_sta_remove);
OpenPOWER on IntegriCloud