Commit deb75188 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville

ath9k: avoid enabling interrupts while processing rx

The assumsion is that while processing ath9k tasklet,
interrupts were already disabled and it will be enabled
at the completion of ath9k tasklet. But whenever TSFOOR is raised,
the driver configures the beacon timers after having received a
beacon frame from the AP which inturn enables the interrupts.

Cc: stable@kernel.org
Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 38bb3e9d
...@@ -564,6 +564,7 @@ struct ath_ant_comb { ...@@ -564,6 +564,7 @@ struct ath_ant_comb {
#define PS_WAIT_FOR_PSPOLL_DATA BIT(2) #define PS_WAIT_FOR_PSPOLL_DATA BIT(2)
#define PS_WAIT_FOR_TX_ACK BIT(3) #define PS_WAIT_FOR_TX_ACK BIT(3)
#define PS_BEACON_SYNC BIT(4) #define PS_BEACON_SYNC BIT(4)
#define PS_TSFOOR_SYNC BIT(5)
struct ath_rate_table; struct ath_rate_table;
......
...@@ -620,6 +620,12 @@ static void ath_beacon_config_sta(struct ath_softc *sc, ...@@ -620,6 +620,12 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
ath9k_hw_disable_interrupts(ah); ath9k_hw_disable_interrupts(ah);
ath9k_hw_set_sta_beacon_timers(ah, &bs); ath9k_hw_set_sta_beacon_timers(ah, &bs);
ah->imask |= ATH9K_INT_BMISS; ah->imask |= ATH9K_INT_BMISS;
/*
* If the beacon config is called beacause of TSFOOR,
* Interrupts will be enabled back at the end of ath9k_tasklet
*/
if (!(sc->ps_flags & PS_TSFOOR_SYNC))
ath9k_hw_set_interrupts(ah, ah->imask); ath9k_hw_set_interrupts(ah, ah->imask);
} }
...@@ -661,6 +667,11 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, ...@@ -661,6 +667,11 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
ath9k_hw_disable_interrupts(ah); ath9k_hw_disable_interrupts(ah);
ath9k_beacon_init(sc, nexttbtt, intval); ath9k_beacon_init(sc, nexttbtt, intval);
sc->beacon.bmisscnt = 0; sc->beacon.bmisscnt = 0;
/*
* If the beacon config is called beacause of TSFOOR,
* Interrupts will be enabled back at the end of ath9k_tasklet
*/
if (!(sc->ps_flags & PS_TSFOOR_SYNC))
ath9k_hw_set_interrupts(ah, ah->imask); ath9k_hw_set_interrupts(ah, ah->imask);
} }
......
...@@ -718,7 +718,8 @@ void ath9k_tasklet(unsigned long data) ...@@ -718,7 +718,8 @@ void ath9k_tasklet(unsigned long data)
*/ */
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, ATH_DBG_PS,
"TSFOOR - Sync with next Beacon\n"); "TSFOOR - Sync with next Beacon\n");
sc->ps_flags |= PS_WAIT_FOR_BEACON | PS_BEACON_SYNC; sc->ps_flags |= PS_WAIT_FOR_BEACON | PS_BEACON_SYNC |
PS_TSFOOR_SYNC;
} }
if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
......
...@@ -572,6 +572,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) ...@@ -572,6 +572,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, ATH_DBG_PS,
"Reconfigure Beacon timers based on timestamp from the AP\n"); "Reconfigure Beacon timers based on timestamp from the AP\n");
ath_set_beacon(sc); ath_set_beacon(sc);
sc->ps_flags &= ~PS_TSFOOR_SYNC;
} }
if (ath_beacon_dtim_pending_cab(skb)) { if (ath_beacon_dtim_pending_cab(skb)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment