aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/link.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/link.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
index 42fc0a374c61..d4549e9aac5c 100644
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -50,8 +50,7 @@ void ath_tx_complete_poll_work(struct work_struct *work)
50 if (needreset) { 50 if (needreset) {
51 ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, 51 ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,
52 "tx hung, resetting the chip\n"); 52 "tx hung, resetting the chip\n");
53 RESET_STAT_INC(sc, RESET_TYPE_TX_HANG); 53 ath9k_queue_reset(sc, RESET_TYPE_TX_HANG);
54 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
55 return; 54 return;
56 } 55 }
57 56
@@ -69,6 +68,7 @@ void ath_hw_check(struct work_struct *work)
69 unsigned long flags; 68 unsigned long flags;
70 int busy; 69 int busy;
71 u8 is_alive, nbeacon = 1; 70 u8 is_alive, nbeacon = 1;
71 enum ath_reset_type type;
72 72
73 ath9k_ps_wakeup(sc); 73 ath9k_ps_wakeup(sc);
74 is_alive = ath9k_hw_check_alive(sc->sc_ah); 74 is_alive = ath9k_hw_check_alive(sc->sc_ah);
@@ -78,7 +78,7 @@ void ath_hw_check(struct work_struct *work)
78 else if (!is_alive && AR_SREV_9300(sc->sc_ah)) { 78 else if (!is_alive && AR_SREV_9300(sc->sc_ah)) {
79 ath_dbg(common, RESET, 79 ath_dbg(common, RESET,
80 "DCU stuck is detected. Schedule chip reset\n"); 80 "DCU stuck is detected. Schedule chip reset\n");
81 RESET_STAT_INC(sc, RESET_TYPE_MAC_HANG); 81 type = RESET_TYPE_MAC_HANG;
82 goto sched_reset; 82 goto sched_reset;
83 } 83 }
84 84
@@ -90,7 +90,7 @@ void ath_hw_check(struct work_struct *work)
90 busy, sc->hw_busy_count + 1); 90 busy, sc->hw_busy_count + 1);
91 if (busy >= 99) { 91 if (busy >= 99) {
92 if (++sc->hw_busy_count >= 3) { 92 if (++sc->hw_busy_count >= 3) {
93 RESET_STAT_INC(sc, RESET_TYPE_BB_HANG); 93 type = RESET_TYPE_BB_HANG;
94 goto sched_reset; 94 goto sched_reset;
95 } 95 }
96 } else if (busy >= 0) { 96 } else if (busy >= 0) {
@@ -102,7 +102,7 @@ void ath_hw_check(struct work_struct *work)
102 goto out; 102 goto out;
103 103
104sched_reset: 104sched_reset:
105 ieee80211_queue_work(sc->hw, &sc->hw_reset_work); 105 ath9k_queue_reset(sc, type);
106out: 106out:
107 ath9k_ps_restore(sc); 107 ath9k_ps_restore(sc);
108} 108}
@@ -119,8 +119,7 @@ static bool ath_hw_pll_rx_hang_check(struct ath_softc *sc, u32 pll_sqsum)
119 count++; 119 count++;
120 if (count == 3) { 120 if (count == 3) {
121 ath_dbg(common, RESET, "PLL WAR, resetting the chip\n"); 121 ath_dbg(common, RESET, "PLL WAR, resetting the chip\n");
122 RESET_STAT_INC(sc, RESET_TYPE_PLL_HANG); 122 ath9k_queue_reset(sc, RESET_TYPE_PLL_HANG);
123 ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
124 count = 0; 123 count = 0;
125 return true; 124 return true;
126 } 125 }