aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/xmit.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-12-23 15:58:40 -0800
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:29 -0500
commitae8d2858c54f52dc4df513a818cc4e1257fd9143 (patch)
treee58f270784474a5d244b8d296b8e10bb6c912fa2 /drivers/net/wireless/ath9k/xmit.c
parentce111badf5ac387e9eefe1f2bba751f595994cb2 (diff)
ath9k: consolidate arguments on hw reset
HW reset calls pass the same variables or structs which we can obtain easily from ah. Although this also applies during channel changes as we will keep around the ath9k_channel passed as an argument for now. We now also now propagate the hw reset errors down. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath9k/xmit.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 3e192fd9591..e28889bc0ac 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -1140,7 +1140,7 @@ static void ath_tx_stopdma(struct ath_softc *sc, struct ath_txq *txq)
static void ath_drain_txdataq(struct ath_softc *sc, bool retry_tx)
{
struct ath_hal *ah = sc->sc_ah;
- int i, status, npend = 0;
+ int i, npend = 0;
if (!(sc->sc_flags & SC_OP_INVALID)) {
for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
@@ -1155,20 +1155,16 @@ static void ath_drain_txdataq(struct ath_softc *sc, bool retry_tx)
}
if (npend) {
+ int r;
/* TxDMA not stopped, reset the hal */
DPRINTF(sc, ATH_DBG_XMIT, "Unable to stop TxDMA. Reset HAL!\n");
spin_lock_bh(&sc->sc_resetlock);
- if (!ath9k_hw_reset(ah,
- sc->sc_ah->ah_curchan,
- sc->tx_chan_width,
- sc->sc_tx_chainmask, sc->sc_rx_chainmask,
- sc->sc_ht_extprotspacing, true, &status)) {
-
+ r = ath9k_hw_reset(ah, sc->sc_ah->ah_curchan, true);
+ if (r)
DPRINTF(sc, ATH_DBG_FATAL,
- "Unable to reset hardware; hal status %u\n",
- status);
- }
+ "Unable to reset hardware; reset status %u\n",
+ r);
spin_unlock_bh(&sc->sc_resetlock);
}