From 0bb376064ebdb1e694801f1a80a189fe5b61fe47 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Tue, 18 Dec 2012 14:43:34 -0800 Subject: [PATCH] net: wireless: bcmdhd: Postpone taking wd_wake lock Change-Id: I3926d7a1a357d173144f408996f35f0929db711e Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcmdhd/dhd_linux.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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)); -- 2.34.1