Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131952
b: refs/heads/master
c: 40b130a
h: refs/heads/master
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Feb 23, 2009
1 parent 515e7ab commit 4c4609f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c138dcee7d4a9e68cce546a45968bbf5dbfce80
refs/heads/master: 40b130a947672d0ca886b718bfc4bd7641b6b39d
24 changes: 17 additions & 7 deletions trunk/drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1538,14 +1538,15 @@ static int ath_init(u16 devid, struct ath_softc *sc)
bad:
if (ah)
ath9k_hw_detach(ah);
ath9k_exit_debug(sc);

return error;
}

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");

Expand Down Expand Up @@ -1589,20 +1590,21 @@ 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 */
if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
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);
Expand All @@ -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;
}

Expand Down

0 comments on commit 4c4609f

Please sign in to comment.