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

Commit 774eb6d6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "icnss: Add a flag to indicare FW rejuvenate"

parents b6e3842a c4997349
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -284,6 +284,7 @@ enum icnss_driver_state {
	ICNSS_HOST_TRIGGERED_PDR,
	ICNSS_FW_DOWN,
	ICNSS_DRIVER_UNLOADING,
	ICNSS_REJUVENATE,
};

struct ce_irq_list {
@@ -1172,6 +1173,14 @@ bool icnss_is_fw_down(void)
}
EXPORT_SYMBOL(icnss_is_fw_down);

bool icnss_is_rejuvenate(void)
{
	if (!penv)
		return false;
	else
		return test_bit(ICNSS_REJUVENATE, &penv->state);
}
EXPORT_SYMBOL(icnss_is_rejuvenate);

int icnss_power_off(struct device *dev)
{
@@ -2093,6 +2102,7 @@ static void icnss_qmi_wlfw_clnt_ind(struct qmi_handle *handle,
		event_data->crashed = true;
		event_data->fw_rejuvenate = true;
		fw_down_data.crashed = true;
		set_bit(ICNSS_REJUVENATE, &penv->state);
		icnss_call_driver_uevent(penv, ICNSS_UEVENT_FW_DOWN,
					 &fw_down_data);
		icnss_driver_event_post(ICNSS_DRIVER_EVENT_PD_SERVICE_DOWN,
@@ -2283,6 +2293,7 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv)

	icnss_call_driver_shutdown(priv);

	clear_bit(ICNSS_REJUVENATE, &penv->state);
	clear_bit(ICNSS_PD_RESTART, &priv->state);
	priv->early_crash_ind = false;

@@ -4000,6 +4011,9 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv)
		case ICNSS_FW_DOWN:
			seq_puts(s, "FW DOWN");
			continue;
		case ICNSS_REJUVENATE:
			seq_puts(s, "FW REJUVENATE");
			continue;
		case ICNSS_DRIVER_UNLOADING:
			seq_puts(s, "DRIVER UNLOADING");
		}
+1 −0
Original line number Diff line number Diff line
@@ -142,5 +142,6 @@ extern unsigned int icnss_socinfo_get_serial_number(struct device *dev);
extern bool icnss_is_qmi_disable(struct device *dev);
extern bool icnss_is_fw_ready(void);
extern bool icnss_is_fw_down(void);
extern bool icnss_is_rejuvenate(void);
extern int icnss_trigger_recovery(struct device *dev);
#endif /* _ICNSS_WLAN_H_ */