diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2010-10-07 15:15:11 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-07 15:15:11 -0700 |
commit | c220888442d0b5602318c7f4f4a120b55efa7b5e (patch) | |
tree | ee86b8d672f84a2a15fb70789355ea076986c254 /bcm4329 | |
parent | 3e465bed88a22de33d452e5ac8524813d916275d (diff) | |
parent | 900f1defbe1f39ca6af8356521961c249174f304 (diff) | |
download | hardware_broadcom_wlan-c220888442d0b5602318c7f4f4a120b55efa7b5e.zip hardware_broadcom_wlan-c220888442d0b5602318c7f4f4a120b55efa7b5e.tar.gz hardware_broadcom_wlan-c220888442d0b5602318c7f4f4a120b55efa7b5e.tar.bz2 |
am 900f1def: bcm4329: Sync with current kernel version
Merge commit '900f1defbe1f39ca6af8356521961c249174f304'
* commit '900f1defbe1f39ca6af8356521961c249174f304':
bcm4329: Sync with current kernel version
Diffstat (limited to 'bcm4329')
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_linux.c | 12 | ||||
-rw-r--r-- | bcm4329/src/dhd/sys/dhd_sdio.c | 7 | ||||
-rw-r--r-- | bcm4329/src/shared/linux_osl.c | 4 |
3 files changed, 14 insertions, 9 deletions
diff --git a/bcm4329/src/dhd/sys/dhd_linux.c b/bcm4329/src/dhd/sys/dhd_linux.c index 2eff469..f687b31 100644 --- a/bcm4329/src/dhd/sys/dhd_linux.c +++ b/bcm4329/src/dhd/sys/dhd_linux.c @@ -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; } diff --git a/bcm4329/src/dhd/sys/dhd_sdio.c b/bcm4329/src/dhd/sys/dhd_sdio.c index bd73556..ff1bded 100644 --- a/bcm4329/src/dhd/sys/dhd_sdio.c +++ b/bcm4329/src/dhd/sys/dhd_sdio.c @@ -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 @@ -5827,6 +5831,8 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag) if (bus->dhd->dongle_reset) { /* Turn on WLAN */ + dhd_os_sdlock(dhdp); + /* Reset SD client */ bcmsdh_reset(bus->sdh); @@ -5858,6 +5864,7 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag) bcmerror = BCME_SDIO_ERROR; } else bcmerror = BCME_SDIO_ERROR; + dhd_os_sdunlock(dhdp); } else { bcmerror = BCME_NOTDOWN; DHD_ERROR(("%s: Set DEVRESET=FALSE invoked when device is on\n", diff --git a/bcm4329/src/shared/linux_osl.c b/bcm4329/src/shared/linux_osl.c index 6383e00..d00bd1c 100644 --- a/bcm4329/src/shared/linux_osl.c +++ b/bcm4329/src/shared/linux_osl.c @@ -21,7 +21,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: linux_osl.c,v 1.125.12.3.8.6 2009/12/09 01:29:03 Exp $ + * $Id: linux_osl.c,v 1.125.12.3.8.7 2010/05/04 21:10:04 Exp $ */ @@ -511,7 +511,7 @@ osl_mfree(osl_t *osh, void *addr, uint size) #ifdef DHD_USE_STATIC_BUF if (bcm_static_buf) { - if ((addr > (void *)bcm_static_buf) && ((unsigned char *)addr \ + if ((addr > (void *)bcm_static_buf) && ((unsigned char *)addr <= ((unsigned char *)bcm_static_buf + STATIC_BUF_TOTAL_LEN))) { int buf_idx = 0; |