DHD_OS_WAKE_LOCK(&dhd->pub);
+ /* send to dongle only if we are not waiting for reload already */
+ if (dhd->pub.hang_was_sent) {
+ DHD_ERROR(("%s: HANG was sent up earlier\n", __FUNCTION__));
+ DHD_OS_WAKE_LOCK_TIMEOUT_ENABLE(&dhd->pub, DHD_EVENT_TIMEOUT);
+ DHD_OS_WAKE_UNLOCK(&dhd->pub);
+ return OSL_ERROR(BCME_DONGLE_DOWN);
+ }
+
ifidx = dhd_net2idx(dhd, net);
DHD_TRACE(("%s: ifidx %d, cmd 0x%04x\n", __FUNCTION__, ifidx, cmd));
goto done;
}
- /* send to dongle only if we are not waiting for reload already */
- if (dhd->pub.hang_was_sent) {
- DHD_ERROR(("%s: HANG was sent up earlier. Not talking to the chip\n",
- __FUNCTION__));
- bcmerror = BCME_DONGLE_DOWN;
- goto done;
- }
-
/* check for local dhd ioctl and handle it */
if (driver == DHD_IOCTL_MAGIC) {
bcmerror = dhd_ioctl((void *)&dhd->pub, &ioc, buf, buflen);
if (ifidx == 0)
wl_android_wifi_off(net);
#endif
-
+ dhd->pub.hang_was_sent = 0;
OLD_MOD_DEC_USE_COUNT;
return 0;
}
#if defined(WL_CFG80211)
DHD_ERROR(("\n%s\n", dhd_version));
wl_android_wifi_on(net);
- dhd->pub.hang_was_sent = 0;
#endif
if (dhd->pub.busstate != DHD_BUS_DATA) {