diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2010-11-26 12:54:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-29 14:41:28 -0500 |
commit | 46047784b8cdcfc916f6c1cccee0c18dd1223dfd (patch) | |
tree | f52ec927be084fd2802a980b3da2228f8d90aaa0 /drivers/net/wireless/ath/ath9k/main.c | |
parent | c426ee247e40a70490f3d67d3c9c7d1aba54516f (diff) |
ath9k: Disable SWBA interrupt on remove_interface
while removing beaconing mode interface, SWBA interrupt
was never disabled when there are no other beaconing interfaces.
Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1cdbdbe33ab5..dace215b693e 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1519,6 +1519,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1519 | struct ath_softc *sc = aphy->sc; | 1519 | struct ath_softc *sc = aphy->sc; |
1520 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1520 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
1521 | struct ath_vif *avp = (void *)vif->drv_priv; | 1521 | struct ath_vif *avp = (void *)vif->drv_priv; |
1522 | bool bs_valid = false; | ||
1522 | int i; | 1523 | int i; |
1523 | 1524 | ||
1524 | ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); | 1525 | ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); |
@@ -1547,7 +1548,15 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1547 | "slot\n", __func__); | 1548 | "slot\n", __func__); |
1548 | sc->beacon.bslot[i] = NULL; | 1549 | sc->beacon.bslot[i] = NULL; |
1549 | sc->beacon.bslot_aphy[i] = NULL; | 1550 | sc->beacon.bslot_aphy[i] = NULL; |
1550 | } | 1551 | } else if (sc->beacon.bslot[i]) |
1552 | bs_valid = true; | ||
1553 | } | ||
1554 | if (!bs_valid && (sc->sc_ah->imask & ATH9K_INT_SWBA)) { | ||
1555 | /* Disable SWBA interrupt */ | ||
1556 | sc->sc_ah->imask &= ~ATH9K_INT_SWBA; | ||
1557 | ath9k_ps_wakeup(sc); | ||
1558 | ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_ah->imask); | ||
1559 | ath9k_ps_restore(sc); | ||
1551 | } | 1560 | } |
1552 | 1561 | ||
1553 | sc->nvifs--; | 1562 | sc->nvifs--; |