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

Commit 1f8fda9a authored by Sandeep Singh's avatar Sandeep Singh
Browse files

icnss: Add a flag to indicate PDR



During pdr case wlan host driver is not doing the cleanup of
ipa module. So after sap mode recovery in pdr case data
packets are not going on ipa path even ipa is enabled.
To address this issue send pdr indication to wlan host driver.

Change-Id: Ib0480870d3218da61edb0309725787c0382957ab
Signed-off-by: default avatarSandeep Singh <sandsing@codeaurora.org>
parent 2b065eb4
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -635,6 +635,15 @@ bool icnss_is_rejuvenate(void)
}
EXPORT_SYMBOL(icnss_is_rejuvenate);

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

int icnss_power_off(struct device *dev)
{
	struct icnss_priv *priv = dev_get_drvdata(dev);
@@ -1084,9 +1093,11 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv)

	icnss_call_driver_shutdown(priv);

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

	if (!priv->ops || !priv->ops->reinit)
		goto out;
@@ -1431,6 +1442,8 @@ static int icnss_modem_notifier_nb(struct notifier_block *nb,
	if (code != SUBSYS_BEFORE_SHUTDOWN)
		return NOTIFY_OK;

	priv->is_ssr = true;

	if (code == SUBSYS_BEFORE_SHUTDOWN && !notif->crashed &&
	    test_bit(ICNSS_BLOCK_SHUTDOWN, &priv->state)) {
		if (!wait_for_completion_timeout(&priv->unblock_shutdown,
@@ -1556,6 +1569,9 @@ static int icnss_service_notifier_notify(struct notifier_block *nb,
	if (notification != SERVREG_NOTIF_SERVICE_STATE_DOWN_V01)
		goto done;

	if (!priv->is_ssr)
		set_bit(ICNSS_PDR, &priv->state);

	event_data = kzalloc(sizeof(*event_data), GFP_KERNEL);

	if (event_data == NULL)
@@ -2751,6 +2767,9 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv)
			continue;
		case ICNSS_BLOCK_SHUTDOWN:
			seq_puts(s, "BLOCK SHUTDOWN");
			continue;
		case ICNSS_PDR:
			seq_puts(s, "PDR TRIGGERED");
		}

		seq_printf(s, "UNKNOWN-%d", i);
+2 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ enum icnss_driver_state {
	ICNSS_REJUVENATE,
	ICNSS_MODE_ON,
	ICNSS_BLOCK_SHUTDOWN,
	ICNSS_PDR,
};

struct ce_irq_list {
@@ -361,6 +362,7 @@ struct icnss_priv {
	uint64_t vph_pwr;
	bool vbatt_supported;
	char function_name[WLFW_FUNCTION_NAME_LEN + 1];
	bool is_ssr;
};

int icnss_call_driver_uevent(struct icnss_priv *priv,
+1 −0
Original line number Diff line number Diff line
@@ -138,4 +138,5 @@ extern bool icnss_is_fw_down(void);
extern bool icnss_is_rejuvenate(void);
extern int icnss_trigger_recovery(struct device *dev);
extern void icnss_block_shutdown(bool status);
extern bool icnss_is_pdr(void);
#endif /* _ICNSS_WLAN_H_ */