aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 56d4a93cd8e5..d45cf0b5db05 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1269,6 +1269,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
1269 struct ath_softc *sc = aphy->sc; 1269 struct ath_softc *sc = aphy->sc;
1270 struct ath_hw *ah = sc->sc_ah; 1270 struct ath_hw *ah = sc->sc_ah;
1271 struct ath_common *common = ath9k_hw_common(ah); 1271 struct ath_common *common = ath9k_hw_common(ah);
1272 int i;
1272 1273
1273 mutex_lock(&sc->mutex); 1274 mutex_lock(&sc->mutex);
1274 1275
@@ -1281,7 +1282,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
1281 cancel_work_sync(&sc->paprd_work); 1282 cancel_work_sync(&sc->paprd_work);
1282 cancel_work_sync(&sc->hw_check_work); 1283 cancel_work_sync(&sc->hw_check_work);
1283 1284
1284 if (!sc->num_sec_wiphy) { 1285 for (i = 0; i < sc->num_sec_wiphy; i++) {
1286 if (sc->sec_wiphy[i])
1287 break;
1288 }
1289
1290 if (i == sc->num_sec_wiphy) {
1285 cancel_delayed_work_sync(&sc->wiphy_work); 1291 cancel_delayed_work_sync(&sc->wiphy_work);
1286 cancel_work_sync(&sc->chan_work); 1292 cancel_work_sync(&sc->chan_work);
1287 } 1293 }