#if defined(WL_EXT_IAPSTA) && defined(ISAM_PREINIT)
int bytes_written = 0;
#endif
+ int retry;
mutex_lock(&dhd->pub.ndev_op_sync);
return BCME_OK;
}
- if (!dhd_download_fw_on_driverload) {
- if (!dhd_driver_init_done) {
+ for (retry = 0; ++retry; ) {
+ if (!dhd_download_fw_on_driverload && !dhd_driver_init_done) {
DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
- mutex_unlock(&dhd->pub.ndev_op_sync);
- return -1;
+ if (retry > 3) {
+ mutex_unlock(&dhd->pub.ndev_op_sync);
+ return -1;
+ } else {
+ OSL_SLEEP(1000);
+ }
+ } else {
+ break;
}
}
#if defined(WL_EXT_IAPSTA) && defined(ISAM_PREINIT)
int bytes_written = 0;
#endif
+ int retry;
#if defined(PREVENT_REOPEN_DURING_HANG)
/* WAR : to prevent calling dhd_open abnormally in quick succession after hang event */
return -1;
}
#endif /* WLAN_ACCEL_BOOT */
- if (!dhd_driver_init_done) {
- DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
- mutex_unlock(&dhd->pub.ndev_op_sync);
- return -1;
+ for (retry_init = 0; ++retry_init; ) {
+ if (!dhd_download_fw_on_driverload && !dhd_driver_init_done) {
+ DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
+ if (retry_init > 3) {
+ mutex_unlock(&dhd->pub.ndev_op_sync);
+ return -1;
+ } else {
+ OSL_SLEEP(1000);
+ }
+ } else {
+ break;
+ }
}
}
int bytes_written = 0;
#endif
int retry = POWERUP_MAX_RETRY;
+ int retry_init;
#if defined(PREVENT_REOPEN_DURING_HANG)
/* WAR : to prevent calling dhd_open abnormally in quick succession after hang event */
dhd->wl_accel_force_reg_on = TRUE;
}
#endif /* WLAN_ACCEL_BOOT */
- if (!dhd_driver_init_done) {
- DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
- mutex_unlock(&dhd->pub.ndev_op_sync);
- return -1;
+ for (retry_init = 0; ++retry_init; ) {
+ if (!dhd_download_fw_on_driverload && !dhd_driver_init_done) {
+ DHD_ERROR(("%s: WLAN driver is not initialized\n", __FUNCTION__));
+ if (retry_init > 3) {
+ mutex_unlock(&dhd->pub.ndev_op_sync);
+ return -1;
+ } else {
+ OSL_SLEEP(1000);
+ }
+ } else {
+ break;
+ }
}
}