summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorJouni Malinen2009-05-19 16:01:40 +0200
committerJohn W. Linville2009-05-20 20:46:33 +0200
commit54ce846e2c5ade77bc6650d8e8c7e775e01ad859 (patch)
treea328ee0be7e0df7fabfb5e82a0cd967919192a58 /drivers/net/wireless/ath/ath9k/main.c
parentath9k: Do not try to calibrate radio when in sleep mode (diff)
downloadkernel-qcow2-linux-54ce846e2c5ade77bc6650d8e8c7e775e01ad859.tar.gz
kernel-qcow2-linux-54ce846e2c5ade77bc6650d8e8c7e775e01ad859.tar.xz
kernel-qcow2-linux-54ce846e2c5ade77bc6650d8e8c7e775e01ad859.zip
ath9k: Use TSFOOR interrupt to trigger TSF sync with next Beacon
If the chip complains about TSF sync, make sure we remain awake to sync with the next Beacon frame. In theory, this should not be needed since we are currently trying to receive all Beacon frames, anyway, better have this code ready should we ever change that. Signed-off-by: Jouni Malinen <jouni.malinen@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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index dd54fa727a61..d2ef9732c1d9 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -480,6 +480,16 @@ static void ath9k_tasklet(unsigned long data)
if (status & ATH9K_INT_TX)
ath_tx_tasklet(sc);
+ if ((status & ATH9K_INT_TSFOOR) &&
+ (sc->hw->conf.flags & IEEE80211_CONF_PS)) {
+ /*
+ * TSF sync does not look correct; remain awake to sync with
+ * the next Beacon.
+ */
+ DPRINTF(sc, ATH_DBG_PS, "TSFOOR - Sync with next Beacon\n");
+ sc->sc_flags |= SC_OP_WAIT_FOR_BEACON;
+ }
+
/* re-enable hardware interrupt */
ath9k_hw_set_interrupts(sc->sc_ah, sc->imask);
ath9k_ps_restore(sc);