wlan: Fix for roaming failure with pmf required

Roaming fails with pmf Ap due to capabilities mismatch,
as the initial connection pmf capabilities are not saved
in the connected profile.save the pmf capabilities in the
connected profile so that they can be used to prepare
filter while roaming.

Change-Id: I5c7c0a37813122b79fdc0a2510afa16dcf4c5e10
CRs-fixed: 760113
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index e18a30c..6ab987e 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -982,6 +982,14 @@
     tANI_BOOLEAN    isESEAssoc;
 #endif
     tANI_U32 dot11Mode;
+
+#ifdef WLAN_FEATURE_11W
+    /* Management Frame Protection */
+    tANI_BOOLEAN MFPEnabled;
+    tANI_U8 MFPRequired;
+    tANI_U8 MFPCapable;
+#endif
+
 }tCsrRoamConnectedProfile;
 
 
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 129e133..c5a1b05 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -6418,6 +6418,12 @@
         pDstProfile->CBMode = pSrcProfile->CBMode;
         vos_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys,
                      sizeof(pDstProfile->Keys));
+#ifdef WLAN_FEATURE_11W
+        pDstProfile->MFPEnabled = pSrcProfile->MFPEnabled;
+        pDstProfile->MFPRequired = pSrcProfile->MFPRequired;
+        pDstProfile->MFPCapable = pSrcProfile->MFPCapable;
+#endif
+
 #ifdef WLAN_FEATURE_VOWIFI_11R
         if (pSrcProfile->MDID.mdiePresent)
         {
@@ -7357,6 +7363,12 @@
         vos_mem_copy(pConnectProfile->pAddIEAssoc, pProfile->pAddIEAssoc,
                      pProfile->nAddIEAssocLength);
     }
+
+#ifdef WLAN_FEATURE_11W
+    pConnectProfile->MFPEnabled = pProfile->MFPEnabled;
+    pConnectProfile->MFPRequired = pProfile->MFPRequired;
+    pConnectProfile->MFPCapable = pProfile->MFPCapable;
+#endif
     
     //Save bssid
     csrGetBssIdBssDesc(pMac, pSirBssDesc, &pConnectProfile->bssid);
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index a21607d..6542807 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -1369,6 +1369,12 @@
     }
 #endif
 
+#ifdef WLAN_FEATURE_11W
+    pScanFilter->MFPEnabled = pCurProfile->MFPEnabled;
+    pScanFilter->MFPRequired = pCurProfile->MFPRequired;
+    pScanFilter->MFPCapable = pCurProfile->MFPCapable;
+#endif
+
     return eHAL_STATUS_SUCCESS;
 }