@@ -509,7 +509,6 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter)
}
if (adapter->mfg_mode) {
adapter->hw_status = MWIFIEX_HW_STATUS_READY;
- ret = -EINPROGRESS;
} else {
for (i = 0; i < adapter->priv_num; i++) {
ret = mwifiex_sta_init_cmd(adapter->priv[i],
@@ -527,7 +526,7 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter)
adapter->hw_status = MWIFIEX_HW_STATUS_READY;
- return ret;
+ return 0;
}
/*
@@ -589,12 +589,9 @@ static int _mwifiex_fw_dpc(const struct firmware *firmware, void *context)
adapter->init_wait_q_woken = false;
ret = mwifiex_init_fw(adapter);
- if (ret == -1) {
+ if (ret == -1)
goto err_init_fw;
- } else if (!ret) {
- adapter->hw_status = MWIFIEX_HW_STATUS_READY;
- goto done;
- }
+
/* Wait for mwifiex_init to complete */
if (!adapter->mfg_mode) {
wait_event_interruptible(adapter->init_wait_q,
@@ -2433,11 +2433,9 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init)
ret = mwifiex_send_cmd(priv, HostCmd_CMD_11N_CFG,
HostCmd_ACT_GEN_SET, 0, &tx_cfg, true);
- if (init) {
+ if (init)
/* set last_init_cmd before sending the command */
priv->adapter->last_init_cmd = HostCmd_CMD_11N_CFG;
- ret = -EINPROGRESS;
- }
return ret;
}