diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-12 13:16:18 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-12 13:16:18 +0100 |
commit | f8cb22cbb8383c9f41e6ccbcd4fb94edb1048bda (patch) | |
tree | 9b3a333224ec895c053a694dcaff526502b84e6c /drivers/net/wireless/ath9k | |
parent | 044d408409cc4e1bc75c886e27ca85c270db104c (diff) | |
parent | ebdcc81c71937b30e09110c02a1e8a21fa770b6f (diff) | |
download | kernel_goldelico_gta04-f8cb22cbb8383c9f41e6ccbcd4fb94edb1048bda.zip kernel_goldelico_gta04-f8cb22cbb8383c9f41e6ccbcd4fb94edb1048bda.tar.gz kernel_goldelico_gta04-f8cb22cbb8383c9f41e6ccbcd4fb94edb1048bda.tar.bz2 |
Merge branch 'linus' into irq/genirq
Diffstat (limited to 'drivers/net/wireless/ath9k')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 727f067..0e80990 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c @@ -1538,6 +1538,7 @@ bad2: bad: if (ah) ath9k_hw_detach(ah); + ath9k_exit_debug(sc); return error; } @@ -1545,7 +1546,7 @@ bad: static int ath_attach(u16 devid, struct ath_softc *sc) { struct ieee80211_hw *hw = sc->hw; - int error = 0; + int error = 0, i; DPRINTF(sc, ATH_DBG_CONFIG, "Attach ATH hw\n"); @@ -1589,11 +1590,11 @@ static int ath_attach(u16 devid, struct ath_softc *sc) /* initialize tx/rx engine */ error = ath_tx_init(sc, ATH_TXBUF); if (error != 0) - goto detach; + goto error_attach; error = ath_rx_init(sc, ATH_RXBUF); if (error != 0) - goto detach; + goto error_attach; #if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE) /* Initialze h/w Rfkill */ @@ -1601,8 +1602,9 @@ static int ath_attach(u16 devid, struct ath_softc *sc) INIT_DELAYED_WORK(&sc->rf_kill.rfkill_poll, ath_rfkill_poll); /* Initialize s/w rfkill */ - if (ath_init_sw_rfkill(sc)) - goto detach; + error = ath_init_sw_rfkill(sc); + if (error) + goto error_attach; #endif error = ieee80211_register_hw(hw); @@ -1611,8 +1613,16 @@ static int ath_attach(u16 devid, struct ath_softc *sc) ath_init_leds(sc); return 0; -detach: - ath_detach(sc); + +error_attach: + /* cleanup tx queues */ + for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) + if (ATH_TXQ_SETUP(sc, i)) + ath_tx_cleanupq(sc, &sc->tx.txq[i]); + + ath9k_hw_detach(sc->sc_ah); + ath9k_exit_debug(sc); + return error; } |