diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index adc35df734..4d3c6b77a6 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9764,8 +9764,6 @@ int hdd_psoc_idle_shutdown(struct device *dev) else ret = __hdd_psoc_idle_shutdown(hdd_ctx); - cds_set_recovery_in_progress(false); - return ret; } @@ -9838,6 +9836,10 @@ static void hdd_psoc_idle_timeout_callback(void *priv) hdd_debug("System suspend in progress. Restart idle shutdown timer"); hdd_psoc_idle_timer_start(hdd_ctx); } + + /* Clear the recovery flag for PCIe discrete soc after idle shutdown*/ + if (PLD_BUS_TYPE_PCIE == pld_get_bus_type(hdd_ctx->parent_dev)) + cds_set_recovery_in_progress(false); } #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h index 780e3fbc16..f92853c481 100644 --- a/core/pld/inc/pld_common.h +++ b/core/pld/inc/pld_common.h @@ -733,4 +733,11 @@ static inline int pld_nbuf_pre_alloc_free(struct sk_buff *skb) return 0; } #endif +/** + * pld_get_bus_type() - Bus type of the device + * @dev: device + * + * Return: PLD bus type + */ +enum pld_bus_type pld_get_bus_type(struct device *dev); #endif diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 53fd7f971d..20e6cb3b8c 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -200,7 +200,7 @@ static struct dev_node *pld_get_dev_node(struct device *dev) * * Return: PLD bus type */ -static enum pld_bus_type pld_get_bus_type(struct device *dev) +enum pld_bus_type pld_get_bus_type(struct device *dev) { struct dev_node *dev_node = pld_get_dev_node(dev);