diff options
| author | Kalikinkar dhara <c_kaliki@qca.qualcomm.com> | 2014-04-06 16:01:29 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-04-10 07:12:46 -0700 |
| commit | 56a0f58a50883c940bc666255a5eb22cdd52084e (patch) | |
| tree | 7044473dfb46e110128aa287016d6385c5996248 | |
| parent | 36cf564cf7f14f3fab5d25ecbbcd68f82d50538b (diff) | |
qcacld: wlan: After assoc wait till set key before entering BMPS.
Once associated, device enters in BMPS after
BMPS_TRAFFIC_TIMER msec even if key exchange is not completed.
Set remainInPowerActiveTillDHCP so DUT waits for
(DHCP_REMAIN_POWER_ACTIVE_THRESHOLD*BMPS_TRAFFIC_TIMER) msec
before going in BMPS if key exchange does not complete.
(cherry picked from commit I3104e002baea3b0d54d652db7eec90f04f0f40bd)
CRs-Fixed: 643945
Change-Id: I2d04117311b6b8190097573a8160eb7bd552a4f5
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 11 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index e43b7625a539..2615ceb1492a 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -5360,6 +5360,12 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman So moving this after saving the profile */ //csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINED ); + + /* Reset remainInPowerActiveTillDHCP as it might have been set + * by last failed secured connection. + * It should be set only for secured connection. + */ + pMac->pmc.remainInPowerActiveTillDHCP = FALSE; if( CSR_IS_INFRASTRUCTURE( pProfile ) ) { pSession->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED; @@ -5445,6 +5451,11 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman //Set the subestate to WaitForKey in case authentiation is needed csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId ); + /* Set remainInPowerActiveTillDHCP to make sure we wait for + * until keys are set before going into BMPS. + */ + pMac->pmc.remainInPowerActiveTillDHCP = TRUE; + if(pProfile->bWPSAssociation) { key_timeout_interval = CSR_WAIT_FOR_WPS_KEY_TIMEOUT_PERIOD; diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index babf3dacbf83..15faefa5b414 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -4820,6 +4820,9 @@ eHalStatus sme_RoamSetKey(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamSetKey *pS smsLog(pMac, LOGE, FL("Invalid key length %d"), pSetKey->keyLength); return eHAL_STATUS_FAILURE; } + /*Once Setkey is done, we can go in BMPS*/ + if(pSetKey->keyLength) + pMac->pmc.remainInPowerActiveTillDHCP = FALSE; status = sme_AcquireGlobalLock( &pMac->sme ); if ( HAL_STATUS_SUCCESS( status ) ) |
