summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeela Venkata Kiran Kumar Reddy Chirala <kchirala@qca.qualcomm.com>2013-09-11 18:48:46 -0700
committerMadan Mohan Koyyalamudi <mkoyyala@qca.qualcomm.com>2013-11-15 13:50:07 -0800
commit84bf64465e6729c2756b939ffeb96431d55c3947 (patch)
tree78de599774fbbd1c2fef007fd14ec008612d3401
parentde01d74553537147adcbe1fd4f0fbbc3ad6d05de (diff)
cld: Delete PMKID from the cache when forget the AP from GUI
Wlan driver still include cached PMK ID in assoc Req after forget AP and connect back.Delete the PMKID from the cache in the driver as part of disconnect from supplicant. Change-Id: I954273d18b121d1a6843a970139488be8f69a5b4 CRs-Fixed: 553806
-rw-r--r--CORE/SME/inc/sme_Api.h1
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c33
-rw-r--r--CORE/SME/src/csr/csrInsideApi.h2
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c19
4 files changed, 55 insertions, 0 deletions
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index b1d30c5e385d..cee18a1df35f 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -2867,4 +2867,5 @@ eHalStatus sme_getChannelInfo(tHalHandle hHal, tANI_U8 chanId,
\return eHalStatus
---------------------------------------------------------------------------*/
eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
+eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId );
#endif //#if !defined( __SME_API_H )
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 9e48627e8061..becbba0a5cd5 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -11339,6 +11339,39 @@ eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
return (status);
}
+eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
+ tANI_U8 *pBSSId )
+{
+ eHalStatus status = eHAL_STATUS_FAILURE;
+ tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
+ tANI_BOOLEAN fMatchFound = FALSE;
+ tANI_U32 Index;
+ if(!pSession)
+ {
+ smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
+ return eHAL_STATUS_FAILURE;
+ }
+ do
+ {
+ for( Index=0; Index < pSession->NumPmkidCache; Index++ )
+ {
+ smsLog(pMac, LOGW, "Delete PMKID for %02X-%02X-%02X-%02X-%02X-%02X ",
+ pBSSId[0], pBSSId[1], pBSSId[2], pBSSId[3], pBSSId[4], pBSSId[5]);
+ if( palEqualMemory( pMac->hHdd, pBSSId, pSession->PmkidCacheInfo[Index].BSSID, sizeof(tCsrBssid) ) )
+ {
+ fMatchFound = TRUE;
+ break;
+ }
+ }
+ if( !fMatchFound ) break;
+ palZeroMemory( pMac->hHdd, pSession->PmkidCacheInfo[Index].BSSID, sizeof(tPmkidCacheInfo));
+ status = eHAL_STATUS_SUCCESS;
+ }
+ while( 0 );
+ smsLog(pMac, LOGW, "csrDelPMKID called return match = %d Status = %d",
+ fMatchFound, status);
+ return status;
+}
tANI_U32 csrRoamGetNumPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId)
{
return (pMac->roam.roamSession[sessionId].NumPmkidCache);
diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h
index 04fe57547ea6..bdfc9cfac5ca 100644
--- a/CORE/SME/src/csr/csrInsideApi.h
+++ b/CORE/SME/src/csr/csrInsideApi.h
@@ -965,5 +965,7 @@ tANI_BOOLEAN csrNeighborRoamConnectedProfileMatch(tpAniSirGlobal pMac, tCsrScanR
eHalStatus csrSetTxPower(tpAniSirGlobal pMac, v_U8_t sessionId, v_U8_t mW);
eHalStatus csrUpdateChannelList(tCsrScanStruct *pScan);
+eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
+ tANI_U8 *pBSSId );
#endif
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index c6a640816d52..76a3958d29c6 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -3272,6 +3272,25 @@ eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCach
return (status);
}
+eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId )
+{
+ eHalStatus status = eHAL_STATUS_FAILURE;
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ status = sme_AcquireGlobalLock( &pMac->sme );
+ if ( HAL_STATUS_SUCCESS( status ) )
+ {
+ if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
+ {
+ status = csrRoamDelPMKIDfromCache( pMac, sessionId, pBSSId );
+ }
+ else
+ {
+ status = eHAL_STATUS_INVALID_PARAMETER;
+ }
+ sme_ReleaseGlobalLock( &pMac->sme );
+ }
+ return (status);
+}
/* ---------------------------------------------------------------------------
\fn sme_RoamGetSecurityReqIE
\brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR