Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170623
b: refs/heads/master
c: 7fda166
h: refs/heads/master
i:
  170621: e86e7b3
  170619: 2b514f2
  170615: dc7dd73
  170607: 843d27b
  170591: 7f9726d
  170559: bba7384
  170495: 6e23c51
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Oct 7, 2009
1 parent a090842 commit 40b022f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 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: 211f5859af951788a3fe4752142a5e9047afa5d8
refs/heads/master: 7fda16665152851fe65ee73e24afdcaf67acba59
23 changes: 14 additions & 9 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,17 @@ void ath_cleanup(struct ath_softc *sc)
ieee80211_free_hw(sc->hw);
}

static void ath9k_uninit_hw(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;

BUG_ON(!ah);

ath9k_exit_debug(ah);
ath9k_hw_detach(ah);
sc->sc_ah = NULL;
}

void ath_detach(struct ath_softc *sc)
{
struct ieee80211_hw *hw = sc->hw;
Expand Down Expand Up @@ -1365,9 +1376,7 @@ void ath_detach(struct ath_softc *sc)
ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
ath_gen_timer_free(ah, sc->btcoex.no_stomp_timer);

ath9k_exit_debug(ah);
ath9k_hw_detach(ah);
sc->sc_ah = NULL;
ath9k_uninit_hw(sc);
}

static int ath9k_reg_notifier(struct wiphy *wiphy,
Expand Down Expand Up @@ -1850,10 +1859,8 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
if (ATH_TXQ_SETUP(sc, i))
ath_tx_cleanupq(sc, &sc->tx.txq[i]);

ath9k_exit_debug(ah);
bad_free_hw:
ath9k_hw_detach(ah);
sc->sc_ah = NULL;
ath9k_uninit_hw(sc);
return r;
}

Expand Down Expand Up @@ -1966,9 +1973,7 @@ int ath_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
if (ATH_TXQ_SETUP(sc, i))
ath_tx_cleanupq(sc, &sc->tx.txq[i]);

ath9k_exit_debug(ah);
ath9k_hw_detach(ah);
sc->sc_ah = NULL;
ath9k_uninit_hw(sc);

return error;
}
Expand Down

0 comments on commit 40b022f

Please sign in to comment.