From: Dmitry Shmidt Date: Tue, 18 Dec 2012 22:43:34 +0000 (-0800) Subject: net: wireless: bcmdhd: Postpone taking wd_wake lock X-Git-Tag: firefly_0821_release~7613^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0bb376064ebdb1e694801f1a80a189fe5b61fe47;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Postpone taking wd_wake lock Change-Id: I3926d7a1a357d173144f408996f35f0929db711e Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index bf6d85554ede..9e9f5b62a427 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -3991,15 +3991,13 @@ dhd_os_wd_timer(void *bus, uint wdtick) if (!dhd) return; - if (wdtick) - DHD_OS_WD_WAKE_LOCK(pub); - flags = dhd_os_spin_lock(pub); /* don't start the wd until fw is loaded */ if (pub->busstate == DHD_BUS_DOWN) { dhd_os_spin_unlock(pub, flags); - DHD_OS_WD_WAKE_UNLOCK(pub); + if (!wdtick) + DHD_OS_WD_WAKE_UNLOCK(pub); return; } @@ -4017,6 +4015,7 @@ dhd_os_wd_timer(void *bus, uint wdtick) } if (wdtick) { + DHD_OS_WD_WAKE_LOCK(pub); dhd_watchdog_ms = (uint)wdtick; /* Re arm the timer, at last watchdog period */ mod_timer(&dhd->timer, jiffies + msecs_to_jiffies(dhd_watchdog_ms));