summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@qca.qualcomm.com>2015-06-29 14:15:18 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-07-01 08:27:22 -0700
commit1da2d58ebdce67fd87803f29abd06685cdcb0a49 (patch)
treec16e1658a1ec17c9227aeecf1ad0b186ebf509d0
parent3b121573e407b34de840e7e35c7c7fe341038902 (diff)
qcacld: Handle error if failed to suspend link
prima to qcacld-2.0 propagation Handle error properly if failed to suspend link because of the link already being suspended. Change-Id: I33bc4018850e82d1d72c512384971feccfe74285 CRs-Fixed: 815772
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c40
1 files changed, 24 insertions, 16 deletions
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 7774f13def2b..fe7e1600ab6d 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -266,9 +266,12 @@ limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_
return;
}
- if( pMac->lim.gpLimSuspendCallback )
+ if( pMac->lim.gpLimSuspendCallback ||
+ pMac->lim.gLimSystemInScanLearnMode )
{
- limLog( pMac, LOGE, "%s:%d: gLimSuspendLink callback is not NULL...something is wrong", __func__, __LINE__ );
+ limLog( pMac, LOGE, FL("Something is wrong, SuspendLinkCbk:%p "
+ "IsSystemInScanLearnMode:%d"), pMac->lim.gpLimSuspendCallback,
+ pMac->lim.gLimSystemInScanLearnMode );
callback( pMac, eHAL_STATUS_FAILURE, data );
return;
}
@@ -1483,18 +1486,18 @@ void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data
if(status != eHAL_STATUS_SUCCESS)
{
limLog(pMac, LOGE, FL("OEM_DATA: failed in suspend link"));
- goto error;
+ /* If failed to suspend the link, there is no need
+ * to resume link. Return failure.
+ */
+ limSetOemDataReqModeFailed(pMac, status, data);
}
else
{
PELOGE(limLog(pMac, LOGE, FL("OEM_DATA: Calling limSendHalOemDataReq"));)
limSendHalOemDataReq(pMac);
- return;
}
-error:
- limResumeLink(pMac, limSetOemDataReqModeFailed, NULL);
- return ;
+ return;
} /*** end limSendHalOemDataReq() ***/
#endif //FEATURE_OEM_DATA_SUPPORT
@@ -2241,6 +2244,12 @@ limProcessMlmJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
//suspend link
limLog(pMac, LOG1, FL("Suspend link as LimSession on sessionid %d"
"is off channel"),sessionId);
+ if (limIsLinkSuspended(pMac))
+ {
+ limLog(pMac, LOGE, FL("Link is already suspended for some other"
+ " reason. Return failure on sessionId:%d"), sessionId);
+ goto error;
+ }
limSuspendLink(pMac, eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN,
limProcessMlmPostJoinSuspendLink, (tANI_U32*)psessionEntry );
}
@@ -2262,22 +2271,21 @@ limProcessMlmJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
else
{
/**
- * Should not have received JOIN req in states other than
- * Idle state or on AP.
- * Return join confirm with invalid parameters code.
- */
- PELOGE(limLog(pMac, LOGE,
- FL("Unexpected Join request for role %d state %X"),
- GET_LIM_SYSTEM_ROLE(psessionEntry),
- psessionEntry->limMlmState);)
- limPrintMlmState(pMac, LOGE, psessionEntry->limMlmState);
+ * Should not have received JOIN req in states other than
+ * Idle state or on AP.
+ * Return join confirm with invalid parameters code.
+ */
limLog(pMac, LOGE,
FL("SessionId:%d Unexpected Join request for role %d state %X "),
psessionEntry->peSessionId, GET_LIM_SYSTEM_ROLE(psessionEntry),
psessionEntry->limMlmState);
+ limPrintMlmState(pMac, LOGE, psessionEntry->limMlmState);
}
error:
+ vos_mem_free(pMsgBuf);
+ if (psessionEntry != NULL)
+ psessionEntry->pLimMlmJoinReq = NULL;
mlmJoinCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;