mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
net: wireless: bcm4329: Fix setting HT clock race conditions
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
committed by
Colin Cross
parent
461a510e68
commit
7e39a212ce
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user