From: Sujith Manoharan <sujith@msujith.org>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 6/7] ath9k: Clear additional WoW events
Date: Thu, 5 Feb 2015 10:22:43 +0530 [thread overview]
Message-ID: <1423111964-19626-7-git-send-email-sujith@msujith.org> (raw)
In-Reply-To: <1423111964-19626-1-git-send-email-sujith@msujith.org>
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
The events for patterns 8..15 need to be
cleared on wakeup.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_wow.c | 5 ++++-
drivers/net/wireless/ath/ath9k/reg_wow.h | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_wow.c b/drivers/net/wireless/ath/ath9k/ar9003_wow.c
index 34763c4..efeb9d7 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_wow.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_wow.c
@@ -230,10 +230,12 @@ u32 ath9k_hw_wow_wakeup(struct ath_hw *ah)
AR_PMCTRL_PWR_STATE_D1D3);
/*
- * clear all events
+ * Clear all events.
*/
REG_WRITE(ah, AR_WOW_PATTERN,
AR_WOW_CLEAR_EVENTS(REG_READ(ah, AR_WOW_PATTERN)));
+ REG_WRITE(ah, AR_MAC_PCU_WOW4,
+ AR_WOW_CLEAR_EVENTS2(REG_READ(ah, AR_MAC_PCU_WOW4)));
/*
* restore the beacon threshold to init value
@@ -251,6 +253,7 @@ u32 ath9k_hw_wow_wakeup(struct ath_hw *ah)
ath9k_hw_configpcipowersave(ah, false);
ah->wow.wow_event_mask = 0;
+ ah->wow.wow_event_mask2 = 0;
return wow_status;
}
diff --git a/drivers/net/wireless/ath/ath9k/reg_wow.h b/drivers/net/wireless/ath/ath9k/reg_wow.h
index 42ed4ee..4530540 100644
--- a/drivers/net/wireless/ath/ath9k/reg_wow.h
+++ b/drivers/net/wireless/ath/ath9k/reg_wow.h
@@ -90,11 +90,13 @@
AR_WOW_BEACON_FAIL | \
AR_WOW_KEEP_ALIVE_FAIL))
+#define AR_WOW2_PATTERN_EN(x) ((x & 0xff) << 0)
#define AR_WOW2_PATTERN_FOUND_SHIFT 8
#define AR_WOW2_PATTERN_FOUND(x) (x & (0xff << AR_WOW2_PATTERN_FOUND_SHIFT))
#define AR_WOW2_PATTERN_FOUND_MASK ((0xff) << AR_WOW2_PATTERN_FOUND_SHIFT)
#define AR_WOW_STATUS2(x) (x & AR_WOW2_PATTERN_FOUND_MASK)
+#define AR_WOW_CLEAR_EVENTS2(x) (x & ~(AR_WOW2_PATTERN_EN(0xff)))
#define AR_WOW_AIFS_CNT(x) (x & 0xff)
#define AR_WOW_SLOT_CNT(x) ((x & 0xff) << 8)
--
2.2.2
next prev parent reply other threads:[~2015-02-05 4:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 4:52 [PATCH 0/7] ath9k patches Sujith Manoharan
2015-02-05 4:52 ` [PATCH 1/7] ath9k: Fix descriptors for keep-alive frame Sujith Manoharan
2015-02-26 13:00 ` [1/7] " Kalle Valo
2015-02-05 4:52 ` [PATCH 2/7] ath9k: Set keep awake timer Sujith Manoharan
2015-02-05 4:52 ` [PATCH 3/7] ath9k: Add new MCI states Sujith Manoharan
2015-02-05 4:52 ` [PATCH 4/7] ath9k: Check MCI PowerSave state Sujith Manoharan
2015-02-05 4:52 ` [PATCH 5/7] ath9k: Handle additional patterns on wakeup Sujith Manoharan
2015-02-05 4:52 ` Sujith Manoharan [this message]
2015-02-05 4:52 ` [PATCH 7/7] ath9k: Restart TSF2 timers " Sujith Manoharan
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=1423111964-19626-7-git-send-email-sujith@msujith.org \
--to=sujith@msujith.org \
--cc=linux-wireless@vger.kernel.org \
/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).