wlan: Add PMF (802.11w) support for station mode
These changes add Protected Management Frames (802.11w) support for
the device in station mode.
Change-Id: I2cdc60c4a9ed3ab40303de11ca3b679a9fe1d455
CRs-Fixed: 452422, 452831, 455139, 450564, 452558
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index f19da09..d2d10ff 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -118,6 +118,11 @@
tANI_BOOLEAN csrIsScanAllowed(tpAniSirGlobal pMac);
#endif
+#ifdef WLAN_FEATURE_11W
+eHalStatus sme_UnprotectedMgmtFrmInd( tHalHandle hHal,
+ tpSirSmeUnprotMgmtFrameInd pSmeMgmtFrm );
+#endif
+
//Internal SME APIs
eHalStatus sme_AcquireGlobalLock( tSmeStruct *psSme)
{
@@ -1400,6 +1405,34 @@
#endif // WLAN_FEATURE_PACKET_FILTERING
+#ifdef WLAN_FEATURE_11W
+/*------------------------------------------------------------------
+ *
+ * Handle the unprotected management frame indication from LIM and
+ * forward it to HDD.
+ *
+ *------------------------------------------------------------------*/
+
+eHalStatus sme_UnprotectedMgmtFrmInd( tHalHandle hHal,
+ tpSirSmeUnprotMgmtFrameInd pSmeMgmtFrm)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+ tCsrRoamInfo pRoamInfo = {0};
+ tANI_U32 SessionId = pSmeMgmtFrm->sessionId;
+
+ pRoamInfo.nFrameLength = pSmeMgmtFrm->frameLen;
+ pRoamInfo.pbFrames = pSmeMgmtFrm->frameBuf;
+ pRoamInfo.frameType = pSmeMgmtFrm->frameType;
+
+ /* forward the mgmt frame to HDD */
+ csrRoamCallCallback(pMac, SessionId, &pRoamInfo, 0, eCSR_ROAM_UNPROT_MGMT_FRAME_IND, 0);
+
+ return status;
+}
+#endif
+
+
/*--------------------------------------------------------------------------
\brief sme_ProcessMsg() - The main message processor for SME.
@@ -1708,6 +1741,20 @@
}
#endif
+#ifdef WLAN_FEATURE_11W
+ case eWNI_SME_UNPROT_MGMT_FRM_IND:
+ if (pMsg->bodyptr)
+ {
+ sme_UnprotectedMgmtFrmInd(pMac, pMsg->bodyptr);
+ vos_mem_free(pMsg->bodyptr);
+ }
+ else
+ {
+ smsLog(pMac, LOGE, "Empty rsp message for meas (eWNI_SME_UNPROT_MGMT_FRM_IND), nothing to process");
+ }
+ break;
+#endif
+
default:
if ( ( pMsg->type >= eWNI_SME_MSG_TYPES_BEGIN )