diff options
author | Sujith.Manoharan@atheros.com <Sujith.Manoharan@atheros.com> | 2010-05-11 06:54:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-12 16:39:05 -0400 |
commit | 05a30f9cf2a57ebbb2b616b5394e06b893179f13 (patch) | |
tree | 460405945f816f5a85e6aeab41b314fd3d813de5 | |
parent | 9feaddc77b2a2ee460f39d1420f9675db972659e (diff) |
ath9k_htc: Lock sta_notify() callback
Since ->sta_notify() can sleep, protect
the callback with a mutex.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 6c386dad1d40..9d371c18eb41 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -1452,6 +1452,8 @@ static void ath9k_htc_sta_notify(struct ieee80211_hw *hw, | |||
1452 | struct ath9k_htc_priv *priv = hw->priv; | 1452 | struct ath9k_htc_priv *priv = hw->priv; |
1453 | int ret; | 1453 | int ret; |
1454 | 1454 | ||
1455 | mutex_lock(&priv->mutex); | ||
1456 | |||
1455 | switch (cmd) { | 1457 | switch (cmd) { |
1456 | case STA_NOTIFY_ADD: | 1458 | case STA_NOTIFY_ADD: |
1457 | ret = ath9k_htc_add_station(priv, vif, sta); | 1459 | ret = ath9k_htc_add_station(priv, vif, sta); |
@@ -1464,6 +1466,8 @@ static void ath9k_htc_sta_notify(struct ieee80211_hw *hw, | |||
1464 | default: | 1466 | default: |
1465 | break; | 1467 | break; |
1466 | } | 1468 | } |
1469 | |||
1470 | mutex_unlock(&priv->mutex); | ||
1467 | } | 1471 | } |
1468 | 1472 | ||
1469 | static int ath9k_htc_conf_tx(struct ieee80211_hw *hw, u16 queue, | 1473 | static int ath9k_htc_conf_tx(struct ieee80211_hw *hw, u16 queue, |