Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c15a0078 authored by Yue Ma's avatar Yue Ma Committed by Gerrit - the friendly Code Review server
Browse files

cnss2: Remove redundant checking from fw_ready_hdlr



Move some redundant checkings from fw_ready_hdlr function to
call_driver_probe function. call_driver_probe function should
be the final place to decide what to do for most of cases.

Change-Id: Ic21b81f63af6ab2900cee60fd88842e3da4b6274
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent f4f64c90
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -416,11 +416,8 @@ static int cnss_fw_ready_hdlr(struct cnss_plat_data *plat_priv)
	} else if (test_bit(CNSS_COLD_BOOT_CAL, &plat_priv->driver_state)) {
		ret = cnss_wlfw_wlan_mode_send_sync(plat_priv,
						    CNSS_CALIBRATION);
	} else if (test_bit(CNSS_DRIVER_LOADING, &plat_priv->driver_state) ||
		   test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state)) {
		ret = cnss_bus_call_driver_probe(plat_priv);
	} else {
		complete(&plat_priv->power_up_complete);
		ret = cnss_bus_call_driver_probe(plat_priv);
	}

	if (ret && test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state))
+2 −0
Original line number Diff line number Diff line
@@ -525,6 +525,8 @@ int cnss_pci_call_driver_probe(struct cnss_pci_data *pci_priv)
		clear_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state);
		clear_bit(CNSS_DRIVER_LOADING, &plat_priv->driver_state);
		set_bit(CNSS_DRIVER_PROBED, &plat_priv->driver_state);
	} else {
		complete(&plat_priv->power_up_complete);
	}

	return 0;