bcm4329: Sync with current kernel version
Change-Id: I9b8deeeedc5e125e6d1f171d9350c06b14b8aa75
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
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 @@
/* 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 @@
}
/* 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_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_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 @@
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 @@
if (bus->dhd->dongle_reset) {
/* Turn on WLAN */
+ dhd_os_sdlock(dhdp);
+
/* Reset SD client */
bcmsdh_reset(bus->sdh);
@@ -5858,6 +5864,7 @@
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 @@
#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;