aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 2f9c149fd481..fddda206def2 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2105,6 +2105,8 @@ static void ath9k_stop(struct ieee80211_hw *hw)
2105 struct ath_wiphy *aphy = hw->priv; 2105 struct ath_wiphy *aphy = hw->priv;
2106 struct ath_softc *sc = aphy->sc; 2106 struct ath_softc *sc = aphy->sc;
2107 2107
2108 mutex_lock(&sc->mutex);
2109
2108 aphy->state = ATH_WIPHY_INACTIVE; 2110 aphy->state = ATH_WIPHY_INACTIVE;
2109 2111
2110 cancel_delayed_work_sync(&sc->ath_led_blink_work); 2112 cancel_delayed_work_sync(&sc->ath_led_blink_work);
@@ -2117,13 +2119,10 @@ static void ath9k_stop(struct ieee80211_hw *hw)
2117 2119
2118 if (sc->sc_flags & SC_OP_INVALID) { 2120 if (sc->sc_flags & SC_OP_INVALID) {
2119 DPRINTF(sc, ATH_DBG_ANY, "Device not present\n"); 2121 DPRINTF(sc, ATH_DBG_ANY, "Device not present\n");
2122 mutex_unlock(&sc->mutex);
2120 return; 2123 return;
2121 } 2124 }
2122 2125
2123 mutex_lock(&sc->mutex);
2124
2125 cancel_delayed_work_sync(&sc->tx_complete_work);
2126
2127 if (ath9k_wiphy_started(sc)) { 2126 if (ath9k_wiphy_started(sc)) {
2128 mutex_unlock(&sc->mutex); 2127 mutex_unlock(&sc->mutex);
2129 return; /* another wiphy still in use */ 2128 return; /* another wiphy still in use */