summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaveen Rawat <nrawat@qca.qualcomm.com>2014-10-06 16:59:19 -0700
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2014-10-08 14:53:58 +0530
commita42889e7d63f826264daca772c19ab1de570de90 (patch)
tree616b7d9fca309c67c9a530cdd1f918c31824bdee
parent40787dc79f1249add6d8c0cda393b2960d510781 (diff)
qcacld: Fix for VOS_ASSERT in Handling of Action frame
In handle Action frame code path, hardcoded session ID: 0 was being passed while sending Mgmt frame indication to SME. This was causing VOS_ASSERT when the session validity was being checked later. To fix this, use sme session ID from psessionEntry. Change-Id: I7be68b828d5ce8c56b527c73be7373562bd96242 CRs-Fixed: 734750
-rw-r--r--CORE/MAC/src/pe/lim/limProcessActionFrame.c17
-rw-r--r--CORE/SME/src/p2p/p2p_Api.c6
2 files changed, 16 insertions, 7 deletions
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index b2aedde0efed..4bc1e2fd8a3a 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -2415,7 +2415,8 @@ limProcessActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
/* Forward to the SME to HDD to wpa_supplicant */
limSendSmeMgmtFrameInd(pMac, pHdr->fc.subType, (tANI_U8*)pHdr,
- frameLen + sizeof(tSirMacMgmtHdr), 0,
+ frameLen + sizeof(tSirMacMgmtHdr),
+ psessionEntry->smeSessionId,
WDA_GET_RX_CH( pRxPacketInfo ),
psessionEntry, rssi);
break;
@@ -2482,7 +2483,8 @@ limProcessActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
/* Forward to the SME to HDD to wpa_supplicant */
// type is ACTION
limSendSmeMgmtFrameInd(pMac, pHdr->fc.subType,
- (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr), 0,
+ (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr),
+ psessionEntry->smeSessionId,
WDA_GET_RX_CH( pRxPacketInfo ), psessionEntry, 0);
}
else
@@ -2517,7 +2519,8 @@ limProcessActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
/* Forward to the SME to HDD to wpa_supplicant */
// type is ACTION
limSendSmeMgmtFrameInd(pMac, pHdr->fc.subType,
- (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr), 0,
+ (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr),
+ psessionEntry->smeSessionId,
WDA_GET_RX_CH( pRxPacketInfo ), psessionEntry, 0);
}
else
@@ -2537,10 +2540,11 @@ limProcessActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
frameLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
limSendSmeMgmtFrameInd(pMac, pHdr->fc.subType,
- (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr), 0,
+ (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr),
+ psessionEntry->smeSessionId,
WDA_GET_RX_CH( pRxPacketInfo ), psessionEntry, 0);
}
-
+ break;
#ifdef FEATURE_WLAN_TDLS
case SIR_MAC_TDLS_DIS_RSP:
{
@@ -2554,7 +2558,8 @@ limProcessActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
("Public Action TDLS Discovery RSP ..")) ;
limSendSmeMgmtFrameInd(pMac, pHdr->fc.subType,
- (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr), 0,
+ (tANI_U8*)pHdr, frameLen + sizeof(tSirMacMgmtHdr),
+ psessionEntry->smeSessionId,
WDA_GET_RX_CH( pRxPacketInfo ), psessionEntry, rssi);
}
break;
diff --git a/CORE/SME/src/p2p/p2p_Api.c b/CORE/SME/src/p2p/p2p_Api.c
index 44282c08d3c2..e2a1bbba33c2 100644
--- a/CORE/SME/src/p2p/p2p_Api.c
+++ b/CORE/SME/src/p2p/p2p_Api.c
@@ -160,7 +160,7 @@ eHalStatus sme_mgmtFrmInd( tHalHandle hHal, tpSirSmeMgmtFrameInd pSmeMgmtFrm)
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_SUCCESS;
tCsrRoamInfo pRoamInfo = {0};
- tANI_U8 i;
+ tANI_U8 i = 0;
tANI_U32 SessionId = pSmeMgmtFrm->sessionId;
pRoamInfo.nFrameLength = pSmeMgmtFrm->mesgLen - sizeof(tSirSmeMgmtFrameInd);
@@ -180,6 +180,10 @@ eHalStatus sme_mgmtFrmInd( tHalHandle hHal, tpSirSmeMgmtFrameInd pSmeMgmtFrm)
}
}
+ if (i == CSR_ROAM_SESSION_MAX) {
+ smsLog(pMac, LOGE, FL("No valid sessions found."));
+ return eHAL_STATUS_FAILURE;
+ }
/* forward the mgmt frame to HDD */
csrRoamCallCallback(pMac, SessionId, &pRoamInfo, 0, eCSR_ROAM_INDICATE_MGMT_FRAME, 0);