From: Sujith Manoharan Date: Mon, 21 Feb 2011 02:19:08 +0000 (+0530) Subject: ath9k_htc: Protect ampdu_action with a mutex X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=87df89579a4a3e6c767603acb762115159655745;p=linux-beck.git ath9k_htc: Protect ampdu_action with a mutex This is required when issuing commands to the firmware. Signed-off-by: Sujith Manoharan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 9620f4532f02..04cb243416ae 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -1639,6 +1639,8 @@ static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw, struct ath9k_htc_sta *ista; int ret = 0; + mutex_lock(&priv->mutex); + switch (action) { case IEEE80211_AMPDU_RX_START: break; @@ -1663,6 +1665,8 @@ static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw, ath_err(ath9k_hw_common(priv->ah), "Unknown AMPDU action\n"); } + mutex_unlock(&priv->mutex); + return ret; }