wlan: Do not let APPS suspend if roaming is in progress
If the Apps enters power collapse (suspend) during roaming (lfr
bgscan split scan, full scan, pre-auth or reassociation);
this shall lead to heart beat failures.
Fix this by protecting entire roaming process by voting
-ve and not letting APPS to power collapse.
CRs-Fixed: 456176
Change-Id: I440fdb02c439a1f8754099ad9acf8eafe4158d4b
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 98f6e7f..7f79fb3 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -4760,6 +4760,7 @@
{
tPmcState pmcState = pmcGetPmcState(pHddCtx->hHal);
tANI_BOOLEAN scanRspPending = csrNeighborRoamScanRspPending(pHddCtx->hHal);
+ tANI_BOOLEAN inMiddleOfRoaming = csrNeighborMiddleOfRoaming(pHddCtx->hHal);
hdd_config_t *pConfig = pHddCtx->cfg_ini;
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
hdd_adapter_t *pAdapter = NULL;
@@ -4789,11 +4790,12 @@
if (((pConfig->fIsImpsEnabled || pConfig->fIsBmpsEnabled)
&& (pmcState != IMPS && pmcState != BMPS
&& pmcState != STOPPED && pmcState != STANDBY)) ||
- (eANI_BOOLEAN_TRUE == scanRspPending))
+ (eANI_BOOLEAN_TRUE == scanRspPending) ||
+ (eANI_BOOLEAN_TRUE == inMiddleOfRoaming))
{
hddLog( LOGE, "%s: do not allow APPS power collapse-"
- "pmcState = %d scanRspPending = %d",
- __func__, pmcState, scanRspPending );
+ "pmcState = %d scanRspPending = %d inMiddleOfRoaming = %d",
+ __func__, pmcState, scanRspPending, inMiddleOfRoaming );
return FALSE;
}
}