]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wl1271: handle HW watchdog interrupt
authorEliad Peller <eliad@wizery.com>
Wed, 27 Oct 2010 12:09:57 +0000 (14:09 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Nov 2010 18:25:24 +0000 (13:25 -0500)
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>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
drivers/net/wireless/wl12xx/wl1271_acx.h
drivers/net/wireless/wl12xx/wl1271_main.c

index 75891676091263afdeb9dd9a8e54594890b2cf02..b7c490845f3e15c19a4e5562c2261308e0150268 100644 (file)
@@ -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)
index a3a1ebc578a3699d8f718b8d3878481d128342c5..f5b1d19bc88d7f1a13ff66563693fb792c533a6d 100644 (file)
@@ -529,6 +529,15 @@ 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);
+
+                       /* restarting the chip. ignore any other interrupt. */
+                       goto out;
+               }
+
                if (intr & WL1271_ACX_INTR_DATA) {
                        wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA");