linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jouni Malinen <jouni.malinen@atheros.com>
To: "John W. Linville" <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
	Jouni Malinen <jouni.malinen@atheros.com>
Subject: [PATCH 3/7] ath9k: Use TSFOOR interrupt to trigger TSF sync with next Beacon
Date: Tue, 19 May 2009 17:01:40 +0300	[thread overview]
Message-ID: <20090519140224.951046895@atheros.com> (raw)
In-Reply-To: 20090519140137.708996030@atheros.com

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>

---
 drivers/net/wireless/ath/ath9k/main.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- wireless-testing.orig/drivers/net/wireless/ath/ath9k/main.c	2009-05-19 16:32:31.000000000 +0300
+++ wireless-testing/drivers/net/wireless/ath/ath9k/main.c	2009-05-19 16:32:33.000000000 +0300
@@ -480,6 +480,16 @@ static void ath9k_tasklet(unsigned long 
 	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);

-- 

-- 
Jouni Malinen                                            PGP id EFC895FA

  parent reply	other threads:[~2009-05-19 14:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 14:01 [PATCH 0/7] ath9k/mac80211: Power save fixes Jouni Malinen
2009-05-19 14:01 ` [PATCH 1/7] ath9k: Wake up for TX in mac80211 timeout=0 sleep mode Jouni Malinen
2009-05-19 14:01 ` [PATCH 2/7] ath9k: Do not try to calibrate radio when in " Jouni Malinen
2009-05-19 14:01 ` Jouni Malinen [this message]
2009-05-19 14:01 ` [PATCH 4/7] ath9k: Wake up for RX filter changes Jouni Malinen
2009-05-19 14:01 ` [PATCH 5/7] ath9k: Set PM field in frame control when in PS mode Jouni Malinen
2009-05-19 14:01 ` [PATCH 6/7] mac80211: PS processing for every Beacon with our AID in TIM Jouni Malinen
2009-05-19 14:51   ` Johannes Berg
2009-05-19 14:01 ` [PATCH 7/7] mac80211: Do not override AID in the duration field Jouni Malinen
2009-05-19 14:52   ` Johannes Berg
2009-05-19 16:25     ` [PATCH v2 " Jouni Malinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090519140224.951046895@atheros.com \
    --to=jouni.malinen@atheros.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).