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

Commit 2066d3ad 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 9099432d
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ enum icnss_driver_state {
	ICNSS_REJUVENATE,
	ICNSS_MODE_ON,
	ICNSS_BLOCK_SHUTDOWN,
	ICNSS_PDR,
};

struct ce_irq_list {
@@ -479,6 +480,7 @@ static struct icnss_priv {
	uint32_t fw_error_fatal_irq;
	uint32_t fw_early_crash_irq;
	struct completion unblock_shutdown;
	bool is_ssr;
} *penv;

#ifdef CONFIG_ICNSS_DEBUG
@@ -1203,6 +1205,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);
@@ -2328,9 +2339,11 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv)

	icnss_call_driver_shutdown(priv);

	clear_bit(ICNSS_REJUVENATE, &penv->state);
	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;
@@ -2716,6 +2729,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,
@@ -2830,6 +2845,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)
@@ -4090,6 +4108,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);
+1 −0
Original line number Diff line number Diff line
@@ -145,4 +145,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_ */