]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ath9k_htc: Protect ampdu_action with a mutex
authorSujith Manoharan <Sujith.Manoharan@atheros.com>
Mon, 21 Feb 2011 02:19:08 +0000 (07:49 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 23 Feb 2011 21:25:27 +0000 (16:25 -0500)
This is required when issuing commands to the firmware.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index 9620f4532f022a8ca6275bc41c5a31fae4ab0acc..04cb243416ae1261a2ad233519f6784130d91c9c 100644 (file)
@@ -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;
 }