mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
net: wireless: bcm4329: Add sdlock to firmware loading
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
committed by
Colin Cross
parent
1b13947f3d
commit
aa781dcc1a
@@ -2186,12 +2186,15 @@ dhd_bus_start(dhd_pub_t *dhdp)
|
||||
|
||||
DHD_TRACE(("%s: \n", __FUNCTION__));
|
||||
|
||||
dhd_os_sdlock(dhdp);
|
||||
|
||||
/* try to download image and nvram to the dongle */
|
||||
if (dhd->pub.busstate == DHD_BUS_DOWN) {
|
||||
if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh,
|
||||
fw_path, nv_path))) {
|
||||
DHD_ERROR(("%s: dhdsdio_probe_download failed. firmware = %s nvram = %s\n",
|
||||
__FUNCTION__, fw_path, nv_path));
|
||||
dhd_os_sdunlock(dhdp);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -2201,8 +2204,9 @@ dhd_bus_start(dhd_pub_t *dhdp)
|
||||
dhd_os_wd_timer(&dhd->pub, dhd_watchdog_ms);
|
||||
|
||||
/* Bring up the bus */
|
||||
if ((ret = dhd_bus_init(&dhd->pub, TRUE)) != 0) {
|
||||
if ((ret = dhd_bus_init(&dhd->pub, FALSE)) != 0) {
|
||||
DHD_ERROR(("%s, dhd_bus_init failed %d\n", __FUNCTION__, ret));
|
||||
dhd_os_sdunlock(dhdp);
|
||||
return ret;
|
||||
}
|
||||
#if defined(OOB_INTR_ONLY)
|
||||
@@ -2211,6 +2215,7 @@ dhd_bus_start(dhd_pub_t *dhdp)
|
||||
dhd->wd_timer_valid = FALSE;
|
||||
del_timer_sync(&dhd->timer);
|
||||
DHD_ERROR(("%s Host failed to resgister for OOB\n", __FUNCTION__));
|
||||
dhd_os_sdunlock(dhdp);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -2223,9 +2228,12 @@ dhd_bus_start(dhd_pub_t *dhdp)
|
||||
dhd->wd_timer_valid = FALSE;
|
||||
del_timer_sync(&dhd->timer);
|
||||
DHD_ERROR(("%s failed bus is not ready\n", __FUNCTION__));
|
||||
dhd_os_sdunlock(dhdp);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dhd_os_sdunlock(dhdp);
|
||||
|
||||
#ifdef EMBEDDED_PLATFORM
|
||||
bcm_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN, iovbuf, sizeof(iovbuf));
|
||||
dhdcdc_query_ioctl(dhdp, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf));
|
||||
|
||||
Reference in New Issue
Block a user