brcmfmac: enable watchdog when bus initialization is complete
authorArend van Spriel <arend@broadcom.com>
Mon, 6 Jan 2014 11:40:44 +0000 (12:40 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 6 Jan 2014 20:48:03 +0000 (15:48 -0500)
Change condition in brcmf_sdio_wd_timer() function to program
watchdog only when in BRCMF_BUS_DATA state. This avoids watchdog
being active during initialization. During initialization the
SDIO save&restore capability is determined which affect the
bus sleep mechanism used in watchdog thread.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

index ae5f040edb1cb83349021a5b2c62498ebe2e5335..124f5e8adfc94969a87b11a506a102f6e6cb837d 100644 (file)
@@ -4105,7 +4105,7 @@ void brcmf_sdio_wd_timer(struct brcmf_sdio *bus, uint wdtick)
        }
 
        /* don't start the wd until fw is loaded */
-       if (bus->sdiodev->bus_if->state == BRCMF_BUS_DOWN)
+       if (bus->sdiodev->bus_if->state != BRCMF_BUS_DATA)
                return;
 
        if (wdtick) {