/* Run until signal received */
while (1) {
if (down_interruptible (&dhd->watchdog_sem) == 0) {
- dhd_os_wake_lock(&dhd->pub);
if (dhd->pub.dongle_reset == FALSE) {
/* Call the bus module watchdog */
}
/* Count the tick for reference */
dhd->pub.tickcnt++;
+
+ /* Reschedule the watchdog */
+ if (dhd->wd_timer_valid)
+ mod_timer(&dhd->timer, jiffies + dhd_watchdog_ms * HZ / 1000);
+
dhd_os_wake_unlock(&dhd->pub);
}
else
dhd_os_wake_lock(&dhd->pub);
if (dhd->watchdog_pid >= 0) {
up(&dhd->watchdog_sem);
-
- /* Reschedule the watchdog */
- if (dhd->wd_timer_valid) {
- mod_timer(&dhd->timer, jiffies + dhd_watchdog_ms * HZ / 1000);
- }
- dhd_os_wake_unlock(&dhd->pub);
return;
}
dhd_os_proto_unblock(dhdp);
/* Expect app to have torn down any connection before calling */
/* Stop the bus, disable F2 */
+ dhd_os_sdlock(dhdp);
+
dhd_bus_stop(bus, FALSE);
/* Clean tx/rx buffer pointers, detach from the dongle */
bus->dhd->dongle_reset = TRUE;
bus->dhd->up = FALSE;
+ dhd_os_sdunlock(dhdp);
+
DHD_TRACE(("%s: WLAN OFF DONE\n", __FUNCTION__));
/* App can now remove power from device */
} else