net: wireless: bcm4329: Fix setting HT clock race conditions

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
Dmitry Shmidt
2010-09-29 10:22:59 -07:00
committed by Colin Cross
parent 461a510e68
commit 7e39a212ce
2 changed files with 9 additions and 7 deletions

View File

@@ -1379,7 +1379,6 @@ dhd_watchdog_thread(void *data)
/* 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 */
@@ -1387,6 +1386,11 @@ dhd_watchdog_thread(void *data)
}
/* 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
@@ -1404,12 +1408,6 @@ dhd_watchdog(ulong data)
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;
}

View File

@@ -5808,6 +5808,8 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
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 */
@@ -5816,6 +5818,8 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
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