aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/xmit.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-12-23 18:58:40 -0500
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 3e192fd9591c..e28889bc0ac5 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)
1140static void ath_drain_txdataq(struct ath_softc *sc, bool retry_tx) 1140static void ath_drain_txdataq(struct ath_softc *sc, bool retry_tx)
1141{ 1141{
1142 struct ath_hal *ah = sc->sc_ah; 1142 struct ath_hal *ah = sc->sc_ah;
1143 int i, status, npend = 0; 1143 int i, npend = 0;
1144 1144
1145 if (!(sc->sc_flags & SC_OP_INVALID)) { 1145 if (!(sc->sc_flags & SC_OP_INVALID)) {
1146 for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { 1146 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)
1155 } 1155 }
1156 1156
1157 if (npend) { 1157 if (npend) {
1158 int r;
1158 /* TxDMA not stopped, reset the hal */ 1159 /* TxDMA not stopped, reset the hal */
1159 DPRINTF(sc, ATH_DBG_XMIT, "Unable to stop TxDMA. Reset HAL!\n"); 1160 DPRINTF(sc, ATH_DBG_XMIT, "Unable to stop TxDMA. Reset HAL!\n");
1160 1161
1161 spin_lock_bh(&sc->sc_resetlock); 1162 spin_lock_bh(&sc->sc_resetlock);
1162 if (!ath9k_hw_reset(ah, 1163 r = ath9k_hw_reset(ah, sc->sc_ah->ah_curchan, true);
1163 sc->sc_ah->ah_curchan, 1164 if (r)
1164 sc->tx_chan_width,
1165 sc->sc_tx_chainmask, sc->sc_rx_chainmask,
1166 sc->sc_ht_extprotspacing, true, &status)) {
1167
1168 DPRINTF(sc, ATH_DBG_FATAL, 1165 DPRINTF(sc, ATH_DBG_FATAL,
1169 "Unable to reset hardware; hal status %u\n", 1166 "Unable to reset hardware; reset status %u\n",
1170 status); 1167 r);
1171 }
1172 spin_unlock_bh(&sc->sc_resetlock); 1168 spin_unlock_bh(&sc->sc_resetlock);
1173 } 1169 }
1174 1170