ICNSS_DRIVER_UNLOADING,
ICNSS_REJUVENATE,
ICNSS_BLOCK_SHUTDOWN,
+ ICNSS_PDR,
};
struct ce_irq_list {
u16 line_number;
char function_name[QMI_WLFW_FUNCTION_NAME_LEN_V01 + 1];
struct completion unblock_shutdown;
+ bool is_ssr;
} *penv;
#ifdef CONFIG_ICNSS_DEBUG
}
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);
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->is_ssr = false;
if (!priv->ops || !priv->ops->reinit)
goto out;
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,
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)
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);
extern u8 *icnss_get_wlan_mac_address(struct device *dev, uint32_t *num);
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_ */