aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-08 14:06:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-11 16:41:25 -0400
commit72d874c67c3cdf21ca95045baabac6a5843222d8 (patch)
tree35991acbb640abc8f12aefa27cdcfc832a7d084d
parentac06697c79bad09e44a8b1d52104014016fb90de (diff)
ath9k_hw: make ath9k_hw_set_interrupts use ah->imask by default
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c2
6 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 9cdeaebc844..a13cabb9543 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -515,7 +515,7 @@ static void ath_beacon_config_ap(struct ath_softc *sc,
515 sc->sc_flags |= SC_OP_TSF_RESET; 515 sc->sc_flags |= SC_OP_TSF_RESET;
516 ath9k_beacon_init(sc, nexttbtt, intval); 516 ath9k_beacon_init(sc, nexttbtt, intval);
517 sc->beacon.bmisscnt = 0; 517 sc->beacon.bmisscnt = 0;
518 ath9k_hw_set_interrupts(ah, ah->imask); 518 ath9k_hw_set_interrupts(ah);
519 ath9k_hw_enable_interrupts(ah); 519 ath9k_hw_enable_interrupts(ah);
520} 520}
521 521
@@ -643,7 +643,7 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
643 ath9k_hw_set_sta_beacon_timers(ah, &bs); 643 ath9k_hw_set_sta_beacon_timers(ah, &bs);
644 ah->imask |= ATH9K_INT_BMISS; 644 ah->imask |= ATH9K_INT_BMISS;
645 645
646 ath9k_hw_set_interrupts(ah, ah->imask); 646 ath9k_hw_set_interrupts(ah);
647 ath9k_hw_enable_interrupts(ah); 647 ath9k_hw_enable_interrupts(ah);
648} 648}
649 649
@@ -679,7 +679,7 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
679 ath9k_beacon_init(sc, nexttbtt, intval); 679 ath9k_beacon_init(sc, nexttbtt, intval);
680 sc->beacon.bmisscnt = 0; 680 sc->beacon.bmisscnt = 0;
681 681
682 ath9k_hw_set_interrupts(ah, ah->imask); 682 ath9k_hw_set_interrupts(ah);
683 ath9k_hw_enable_interrupts(ah); 683 ath9k_hw_enable_interrupts(ah);
684} 684}
685 685
@@ -821,11 +821,11 @@ void ath9k_set_beaconing_status(struct ath_softc *sc, bool status)
821 if (status) { 821 if (status) {
822 /* Re-enable beaconing */ 822 /* Re-enable beaconing */
823 ah->imask |= ATH9K_INT_SWBA; 823 ah->imask |= ATH9K_INT_SWBA;
824 ath9k_hw_set_interrupts(ah, ah->imask); 824 ath9k_hw_set_interrupts(ah);
825 } else { 825 } else {
826 /* Disable SWBA interrupt */ 826 /* Disable SWBA interrupt */
827 ah->imask &= ~ATH9K_INT_SWBA; 827 ah->imask &= ~ATH9K_INT_SWBA;
828 ath9k_hw_set_interrupts(ah, ah->imask); 828 ath9k_hw_set_interrupts(ah);
829 tasklet_kill(&sc->bcon_tasklet); 829 tasklet_kill(&sc->bcon_tasklet);
830 ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq); 830 ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq);
831 } 831 }
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index fd0f84ebdb5..61eee8c49a1 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -155,7 +155,7 @@ static void ath9k_gen_timer_start(struct ath_hw *ah,
155 if ((ah->imask & ATH9K_INT_GENTIMER) == 0) { 155 if ((ah->imask & ATH9K_INT_GENTIMER) == 0) {
156 ath9k_hw_disable_interrupts(ah); 156 ath9k_hw_disable_interrupts(ah);
157 ah->imask |= ATH9K_INT_GENTIMER; 157 ah->imask |= ATH9K_INT_GENTIMER;
158 ath9k_hw_set_interrupts(ah, ah->imask); 158 ath9k_hw_set_interrupts(ah);
159 ath9k_hw_enable_interrupts(ah); 159 ath9k_hw_enable_interrupts(ah);
160 } 160 }
161} 161}
@@ -170,7 +170,7 @@ static void ath9k_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer)
170 if (timer_table->timer_mask.val == 0) { 170 if (timer_table->timer_mask.val == 0) {
171 ath9k_hw_disable_interrupts(ah); 171 ath9k_hw_disable_interrupts(ah);
172 ah->imask &= ~ATH9K_INT_GENTIMER; 172 ah->imask &= ~ATH9K_INT_GENTIMER;
173 ath9k_hw_set_interrupts(ah, ah->imask); 173 ath9k_hw_set_interrupts(ah);
174 ath9k_hw_enable_interrupts(ah); 174 ath9k_hw_enable_interrupts(ah);
175 } 175 }
176} 176}
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 22f23eafe8b..835e81d8ef0 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -827,9 +827,9 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah)
827} 827}
828EXPORT_SYMBOL(ath9k_hw_enable_interrupts); 828EXPORT_SYMBOL(ath9k_hw_enable_interrupts);
829 829
830void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints) 830void ath9k_hw_set_interrupts(struct ath_hw *ah)
831{ 831{
832 enum ath9k_int omask = ah->imask; 832 enum ath9k_int ints = ah->imask;
833 u32 mask, mask2; 833 u32 mask, mask2;
834 struct ath9k_hw_capabilities *pCap = &ah->caps; 834 struct ath9k_hw_capabilities *pCap = &ah->caps;
835 struct ath_common *common = ath9k_hw_common(ah); 835 struct ath_common *common = ath9k_hw_common(ah);
@@ -837,7 +837,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
837 if (!(ints & ATH9K_INT_GLOBAL)) 837 if (!(ints & ATH9K_INT_GLOBAL))
838 ath9k_hw_disable_interrupts(ah); 838 ath9k_hw_disable_interrupts(ah);
839 839
840 ath_dbg(common, ATH_DBG_INTERRUPT, "0x%x => 0x%x\n", omask, ints); 840 ath_dbg(common, ATH_DBG_INTERRUPT, "New interrupt mask 0x%x\n", ints);
841 841
842 mask = ints & ATH9K_INT_COMMON; 842 mask = ints & ATH9K_INT_COMMON;
843 mask2 = 0; 843 mask2 = 0;
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 5eb4ee45432..736fcbee919 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -735,7 +735,7 @@ int ath9k_hw_beaconq_setup(struct ath_hw *ah);
735 735
736/* Interrupt Handling */ 736/* Interrupt Handling */
737bool ath9k_hw_intrpend(struct ath_hw *ah); 737bool ath9k_hw_intrpend(struct ath_hw *ah);
738void ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints); 738void ath9k_hw_set_interrupts(struct ath_hw *ah);
739void ath9k_hw_enable_interrupts(struct ath_hw *ah); 739void ath9k_hw_enable_interrupts(struct ath_hw *ah);
740void ath9k_hw_disable_interrupts(struct ath_hw *ah); 740void ath9k_hw_disable_interrupts(struct ath_hw *ah);
741 741
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 366912f16ff..93fbe6f4089 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -273,7 +273,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
273 273
274 ath9k_cmn_update_txpow(ah, sc->curtxpow, 274 ath9k_cmn_update_txpow(ah, sc->curtxpow,
275 sc->config.txpowlimit, &sc->curtxpow); 275 sc->config.txpowlimit, &sc->curtxpow);
276 ath9k_hw_set_interrupts(ah, ah->imask); 276 ath9k_hw_set_interrupts(ah);
277 ath9k_hw_enable_interrupts(ah); 277 ath9k_hw_enable_interrupts(ah);
278 278
279 if (!(sc->sc_flags & (SC_OP_OFFCHANNEL)) && start) { 279 if (!(sc->sc_flags & (SC_OP_OFFCHANNEL)) && start) {
@@ -833,7 +833,7 @@ irqreturn_t ath_isr(int irq, void *dev)
833 833
834 if (status & ATH9K_INT_RXEOL) { 834 if (status & ATH9K_INT_RXEOL) {
835 ah->imask &= ~(ATH9K_INT_RXEOL | ATH9K_INT_RXORN); 835 ah->imask &= ~(ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
836 ath9k_hw_set_interrupts(ah, ah->imask); 836 ath9k_hw_set_interrupts(ah);
837 } 837 }
838 838
839 if (status & ATH9K_INT_MIB) { 839 if (status & ATH9K_INT_MIB) {
@@ -1409,7 +1409,7 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1409 ah->imask &= ~ATH9K_INT_TSFOOR; 1409 ah->imask &= ~ATH9K_INT_TSFOOR;
1410 } 1410 }
1411 1411
1412 ath9k_hw_set_interrupts(ah, ah->imask); 1412 ath9k_hw_set_interrupts(ah);
1413 1413
1414 /* Set up ANI */ 1414 /* Set up ANI */
1415 if (iter_data.naps > 0) { 1415 if (iter_data.naps > 0) {
@@ -1584,7 +1584,7 @@ static void ath9k_enable_ps(struct ath_softc *sc)
1584 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) { 1584 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) {
1585 if ((ah->imask & ATH9K_INT_TIM_TIMER) == 0) { 1585 if ((ah->imask & ATH9K_INT_TIM_TIMER) == 0) {
1586 ah->imask |= ATH9K_INT_TIM_TIMER; 1586 ah->imask |= ATH9K_INT_TIM_TIMER;
1587 ath9k_hw_set_interrupts(ah, ah->imask); 1587 ath9k_hw_set_interrupts(ah);
1588 } 1588 }
1589 ath9k_hw_setrxabort(ah, 1); 1589 ath9k_hw_setrxabort(ah, 1);
1590 } 1590 }
@@ -1604,7 +1604,7 @@ static void ath9k_disable_ps(struct ath_softc *sc)
1604 PS_WAIT_FOR_TX_ACK); 1604 PS_WAIT_FOR_TX_ACK);
1605 if (ah->imask & ATH9K_INT_TIM_TIMER) { 1605 if (ah->imask & ATH9K_INT_TIM_TIMER) {
1606 ah->imask &= ~ATH9K_INT_TIM_TIMER; 1606 ah->imask &= ~ATH9K_INT_TIM_TIMER;
1607 ath9k_hw_set_interrupts(ah, ah->imask); 1607 ath9k_hw_set_interrupts(ah);
1608 } 1608 }
1609 } 1609 }
1610 1610
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index d28a5ddc799..33d30792d7d 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1970,7 +1970,7 @@ requeue:
1970 1970
1971 if (!(ah->imask & ATH9K_INT_RXEOL)) { 1971 if (!(ah->imask & ATH9K_INT_RXEOL)) {
1972 ah->imask |= (ATH9K_INT_RXEOL | ATH9K_INT_RXORN); 1972 ah->imask |= (ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
1973 ath9k_hw_set_interrupts(ah, ah->imask); 1973 ath9k_hw_set_interrupts(ah);
1974 } 1974 }
1975 1975
1976 return 0; 1976 return 0;