linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] wl1271: handle HW watchdog interrupt
@ 2010-10-27 12:09 Eliad Peller
  2010-10-27 12:09 ` [PATCH 2/2] wl1271: add recover testmode command Eliad Peller
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Eliad Peller @ 2010-10-27 12:09 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luciano Coelho

unmask the WL1271_ACX_INTR_WATCHDOG interrupt.
when getting it - enqueue a recovery work and bail out.

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 drivers/net/wireless/wl12xx/wl1271_acx.h  |    3 ++-
 drivers/net/wireless/wl12xx/wl1271_main.c |    8 ++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h
index 7589167..b7c4908 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.h
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.h
@@ -61,7 +61,8 @@
 					    WL1271_ACX_INTR_HW_AVAILABLE  | \
 					    WL1271_ACX_INTR_DATA)
 
-#define WL1271_INTR_MASK                   (WL1271_ACX_INTR_EVENT_A      | \
+#define WL1271_INTR_MASK                   (WL1271_ACX_INTR_WATCHDOG     | \
+					    WL1271_ACX_INTR_EVENT_A      | \
 					    WL1271_ACX_INTR_EVENT_B      | \
 					    WL1271_ACX_INTR_HW_AVAILABLE | \
 					    WL1271_ACX_INTR_DATA)
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index c54887c..c9b51f4 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -529,6 +529,14 @@ static void wl1271_irq_work(struct work_struct *work)
 
 		intr &= WL1271_INTR_MASK;
 
+		if (unlikely(intr & WL1271_ACX_INTR_WATCHDOG)) {
+			wl1271_error("watchdog interrupt received! starting recovery.");
+			ieee80211_queue_work(wl->hw, &wl->recovery_work);
+
+			/* we are going to restart the chip. ignore any other interrupt. */
+			goto out;
+		}
+
 		if (intr & WL1271_ACX_INTR_DATA) {
 			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA");
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-11-02 11:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 12:09 [PATCH 1/2] wl1271: handle HW watchdog interrupt Eliad Peller
2010-10-27 12:09 ` [PATCH 2/2] wl1271: add recover testmode command Eliad Peller
2010-11-01 13:24   ` Luciano Coelho
2010-11-01 20:59     ` Eliad Peller
2010-11-01 21:21       ` Gábor Stefanik
2010-11-01 21:42         ` Luciano Coelho
2010-11-02  7:05           ` Eliad Peller
2010-11-02  7:34             ` Luciano Coelho
2010-11-02 10:10   ` Luciano Coelho
2010-11-01 13:22 ` [PATCH 1/2] wl1271: handle HW watchdog interrupt Luciano Coelho
2010-11-01 20:49   ` Eliad Peller
2010-11-02 10:11 ` Luciano Coelho
2010-11-02 11:10   ` Eliad Peller

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).