ath9k: fix up a refcount imbalance error in the IRQ related fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
fe12d51cd4
commit
82d580e8b5
3 changed files with 39 additions and 7 deletions
|
@ -118,7 +118,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||||
@@ -375,9 +375,14 @@ void ath9k_tasklet(unsigned long data)
|
@@ -375,21 +375,20 @@ void ath9k_tasklet(unsigned long data)
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
enum ath_reset_type type;
|
enum ath_reset_type type;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -134,7 +134,39 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
ath9k_ps_wakeup(sc);
|
ath9k_ps_wakeup(sc);
|
||||||
spin_lock(&sc->sc_pcu_lock);
|
spin_lock(&sc->sc_pcu_lock);
|
||||||
|
|
||||||
@@ -480,7 +485,7 @@ void ath9k_tasklet(unsigned long data)
|
if (status & ATH9K_INT_FATAL) {
|
||||||
|
type = RESET_TYPE_FATAL_INT;
|
||||||
|
ath9k_queue_reset(sc, type);
|
||||||
|
-
|
||||||
|
- /*
|
||||||
|
- * Increment the ref. counter here so that
|
||||||
|
- * interrupts are enabled in the reset routine.
|
||||||
|
- */
|
||||||
|
- atomic_inc(&ah->intr_ref_cnt);
|
||||||
|
ath_dbg(common, RESET, "FATAL: Skipping interrupts\n");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
@@ -405,11 +404,6 @@ void ath9k_tasklet(unsigned long data)
|
||||||
|
type = RESET_TYPE_BB_WATCHDOG;
|
||||||
|
ath9k_queue_reset(sc, type);
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- * Increment the ref. counter here so that
|
||||||
|
- * interrupts are enabled in the reset routine.
|
||||||
|
- */
|
||||||
|
- atomic_inc(&ah->intr_ref_cnt);
|
||||||
|
ath_dbg(common, RESET,
|
||||||
|
"BB_WATCHDOG: Skipping interrupts\n");
|
||||||
|
goto out;
|
||||||
|
@@ -422,7 +416,6 @@ void ath9k_tasklet(unsigned long data)
|
||||||
|
if ((sc->gtt_cnt >= MAX_GTT_CNT) && !ath9k_hw_check_alive(ah)) {
|
||||||
|
type = RESET_TYPE_TX_GTT;
|
||||||
|
ath9k_queue_reset(sc, type);
|
||||||
|
- atomic_inc(&ah->intr_ref_cnt);
|
||||||
|
ath_dbg(common, RESET,
|
||||||
|
"GTT: Skipping interrupts\n");
|
||||||
|
goto out;
|
||||||
|
@@ -480,7 +473,7 @@ void ath9k_tasklet(unsigned long data)
|
||||||
ath9k_btcoex_handle_interrupt(sc, status);
|
ath9k_btcoex_handle_interrupt(sc, status);
|
||||||
|
|
||||||
/* re-enable hardware interrupt */
|
/* re-enable hardware interrupt */
|
||||||
|
@ -143,7 +175,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
out:
|
out:
|
||||||
spin_unlock(&sc->sc_pcu_lock);
|
spin_unlock(&sc->sc_pcu_lock);
|
||||||
ath9k_ps_restore(sc);
|
ath9k_ps_restore(sc);
|
||||||
@@ -544,7 +549,9 @@ irqreturn_t ath_isr(int irq, void *dev)
|
@@ -544,7 +537,9 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
||||||
/* Cache the status */
|
/* Cache the status */
|
||||||
|
@ -154,7 +186,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
if (status & SCHED_INTR)
|
if (status & SCHED_INTR)
|
||||||
sched = true;
|
sched = true;
|
||||||
@@ -590,7 +597,7 @@ chip_reset:
|
@@ -590,7 +585,7 @@ chip_reset:
|
||||||
|
|
||||||
if (sched) {
|
if (sched) {
|
||||||
/* turn off every interrupt */
|
/* turn off every interrupt */
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
|
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
|
||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||||
@@ -541,6 +541,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
@@ -529,6 +529,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||||
if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
|
if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@
|
||||||
|
|
||||||
u8 ath9k_parse_mpdudensity(u8 mpdudensity)
|
u8 ath9k_parse_mpdudensity(u8 mpdudensity)
|
||||||
{
|
{
|
||||||
@@ -662,6 +664,7 @@ void ath_reset_work(struct work_struct *
|
@@ -650,6 +652,7 @@ void ath_reset_work(struct work_struct *
|
||||||
static int ath9k_start(struct ieee80211_hw *hw)
|
static int ath9k_start(struct ieee80211_hw *hw)
|
||||||
{
|
{
|
||||||
struct ath_softc *sc = hw->priv;
|
struct ath_softc *sc = hw->priv;
|
||||||
|
@ -351,7 +351,7 @@
|
||||||
struct ath_hw *ah = sc->sc_ah;
|
struct ath_hw *ah = sc->sc_ah;
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
|
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
|
||||||
@@ -740,6 +743,11 @@ static int ath9k_start(struct ieee80211_
|
@@ -728,6 +731,11 @@ static int ath9k_start(struct ieee80211_
|
||||||
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue