diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 1 |
4 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 1bffd156b155..f2f672bc5966 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -564,6 +564,7 @@ struct ath_ant_comb { | |||
564 | #define PS_WAIT_FOR_PSPOLL_DATA BIT(2) | 564 | #define PS_WAIT_FOR_PSPOLL_DATA BIT(2) |
565 | #define PS_WAIT_FOR_TX_ACK BIT(3) | 565 | #define PS_WAIT_FOR_TX_ACK BIT(3) |
566 | #define PS_BEACON_SYNC BIT(4) | 566 | #define PS_BEACON_SYNC BIT(4) |
567 | #define PS_TSFOOR_SYNC BIT(5) | ||
567 | 568 | ||
568 | struct ath_rate_table; | 569 | struct ath_rate_table; |
569 | 570 | ||
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 22cd241a098b..637dbc5f7b67 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -620,7 +620,13 @@ static void ath_beacon_config_sta(struct ath_softc *sc, | |||
620 | ath9k_hw_disable_interrupts(ah); | 620 | ath9k_hw_disable_interrupts(ah); |
621 | ath9k_hw_set_sta_beacon_timers(ah, &bs); | 621 | ath9k_hw_set_sta_beacon_timers(ah, &bs); |
622 | ah->imask |= ATH9K_INT_BMISS; | 622 | ah->imask |= ATH9K_INT_BMISS; |
623 | ath9k_hw_set_interrupts(ah, ah->imask); | 623 | |
624 | /* | ||
625 | * If the beacon config is called beacause of TSFOOR, | ||
626 | * Interrupts will be enabled back at the end of ath9k_tasklet | ||
627 | */ | ||
628 | if (!(sc->ps_flags & PS_TSFOOR_SYNC)) | ||
629 | ath9k_hw_set_interrupts(ah, ah->imask); | ||
624 | } | 630 | } |
625 | 631 | ||
626 | static void ath_beacon_config_adhoc(struct ath_softc *sc, | 632 | static void ath_beacon_config_adhoc(struct ath_softc *sc, |
@@ -661,7 +667,12 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, | |||
661 | ath9k_hw_disable_interrupts(ah); | 667 | ath9k_hw_disable_interrupts(ah); |
662 | ath9k_beacon_init(sc, nexttbtt, intval); | 668 | ath9k_beacon_init(sc, nexttbtt, intval); |
663 | sc->beacon.bmisscnt = 0; | 669 | sc->beacon.bmisscnt = 0; |
664 | ath9k_hw_set_interrupts(ah, ah->imask); | 670 | /* |
671 | * If the beacon config is called beacause of TSFOOR, | ||
672 | * Interrupts will be enabled back at the end of ath9k_tasklet | ||
673 | */ | ||
674 | if (!(sc->ps_flags & PS_TSFOOR_SYNC)) | ||
675 | ath9k_hw_set_interrupts(ah, ah->imask); | ||
665 | } | 676 | } |
666 | 677 | ||
667 | static bool ath9k_allow_beacon_config(struct ath_softc *sc, | 678 | static bool ath9k_allow_beacon_config(struct ath_softc *sc, |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 3de115df9164..c171d111ecf7 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -718,7 +718,8 @@ void ath9k_tasklet(unsigned long data) | |||
718 | */ | 718 | */ |
719 | ath_dbg(common, ATH_DBG_PS, | 719 | ath_dbg(common, ATH_DBG_PS, |
720 | "TSFOOR - Sync with next Beacon\n"); | 720 | "TSFOOR - Sync with next Beacon\n"); |
721 | sc->ps_flags |= PS_WAIT_FOR_BEACON | PS_BEACON_SYNC; | 721 | sc->ps_flags |= PS_WAIT_FOR_BEACON | PS_BEACON_SYNC | |
722 | PS_TSFOOR_SYNC; | ||
722 | } | 723 | } |
723 | 724 | ||
724 | if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) | 725 | if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index c5b7cbe59bfa..a485c040bf80 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -572,6 +572,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) | |||
572 | ath_dbg(common, ATH_DBG_PS, | 572 | ath_dbg(common, ATH_DBG_PS, |
573 | "Reconfigure Beacon timers based on timestamp from the AP\n"); | 573 | "Reconfigure Beacon timers based on timestamp from the AP\n"); |
574 | ath_set_beacon(sc); | 574 | ath_set_beacon(sc); |
575 | sc->ps_flags &= ~PS_TSFOOR_SYNC; | ||
575 | } | 576 | } |
576 | 577 | ||
577 | if (ath_beacon_dtim_pending_cab(skb)) { | 578 | if (ath_beacon_dtim_pending_cab(skb)) { |