diff options
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 39b278053056..c541516a2e9d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1313,23 +1313,6 @@ static void ath_start_rfkill_poll(struct ath_softc *sc) | |||
1313 | wiphy_rfkill_start_polling(sc->hw->wiphy); | 1313 | wiphy_rfkill_start_polling(sc->hw->wiphy); |
1314 | } | 1314 | } |
1315 | 1315 | ||
1316 | static void ath_clean_core(struct ath_softc *sc); | ||
1317 | static void ath9k_uninit_hw(struct ath_softc *sc); | ||
1318 | |||
1319 | void ath_cleanup(struct ath_softc *sc) | ||
1320 | { | ||
1321 | struct ath_hw *ah = sc->sc_ah; | ||
1322 | struct ath_common *common = ath9k_hw_common(ah); | ||
1323 | |||
1324 | ath_clean_core(sc); | ||
1325 | free_irq(sc->irq, sc); | ||
1326 | ath_bus_cleanup(common); | ||
1327 | kfree(sc->sec_wiphy); | ||
1328 | ieee80211_free_hw(sc->hw); | ||
1329 | |||
1330 | ath9k_uninit_hw(sc); | ||
1331 | } | ||
1332 | |||
1333 | static void ath9k_uninit_hw(struct ath_softc *sc) | 1316 | static void ath9k_uninit_hw(struct ath_softc *sc) |
1334 | { | 1317 | { |
1335 | struct ath_hw *ah = sc->sc_ah; | 1318 | struct ath_hw *ah = sc->sc_ah; |
@@ -1388,6 +1371,20 @@ void ath_detach(struct ath_softc *sc) | |||
1388 | ath9k_uninit_hw(sc); | 1371 | ath9k_uninit_hw(sc); |
1389 | } | 1372 | } |
1390 | 1373 | ||
1374 | void ath_cleanup(struct ath_softc *sc) | ||
1375 | { | ||
1376 | struct ath_hw *ah = sc->sc_ah; | ||
1377 | struct ath_common *common = ath9k_hw_common(ah); | ||
1378 | |||
1379 | ath_clean_core(sc); | ||
1380 | free_irq(sc->irq, sc); | ||
1381 | ath_bus_cleanup(common); | ||
1382 | kfree(sc->sec_wiphy); | ||
1383 | ieee80211_free_hw(sc->hw); | ||
1384 | |||
1385 | ath9k_uninit_hw(sc); | ||
1386 | } | ||
1387 | |||
1391 | static int ath9k_reg_notifier(struct wiphy *wiphy, | 1388 | static int ath9k_reg_notifier(struct wiphy *wiphy, |
1392 | struct regulatory_request *request) | 1389 | struct regulatory_request *request) |
1393 | { | 1390 | { |