wlan: Match all encryption type in case of testbed STA

If force rsne is set i.e testbed STA mode, the auth type and
encryption type set in RSNE provided, may not match with the AP.
In this case driver will not find the AP in filtered scan result
using the encryption and auth type provided in RSNE.
Thus no Assoc req is sent to AP and the test case fails.

As part of the fix set all authtype and RSN encryptions in filter
so that driver is able to find the AP and send Assoc request.

Change-Id: If99df221b10c5276f902df2f0a52b87e4df1be2c
CRs-Fixed: 2263295
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 8dae43a..2acd939 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -406,6 +406,7 @@
     tANI_BOOLEAN isPERRoamScan;
 #endif
     tCsrBssid bssid_hint;
+    bool ignore_pmf_cap;
 }tCsrScanResultFilter;
 
 
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index ed18727..0125f9a 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -9536,6 +9536,7 @@
     eHalStatus status = eHAL_STATUS_SUCCESS;
     tANI_U32 size = 0;
     tANI_U8  index = 0;
+    uint8_t i;
     
     do
     {
@@ -9623,9 +9624,31 @@
             break;
         }
         pScanFilter->uapsd_mask = pProfile->uapsd_mask;
-        pScanFilter->authType = pProfile->AuthType;
-        pScanFilter->EncryptionType = pProfile->EncryptionType;
-        pScanFilter->mcEncryptionType = pProfile->mcEncryptionType;
+        if (pProfile->force_rsne_override) {
+                smsLog(pMac, LOG1, FL("force_rsne_override enabled fill all auth type and enctype"));
+
+                pScanFilter->authType.numEntries = eCSR_NUM_OF_SUPPORT_AUTH_TYPE;
+                for (i = 0; i < pScanFilter->authType.numEntries; i++)
+                        pScanFilter->authType.authType[i] = i;
+                index = 0;
+                for (i = 0; i < eCSR_NUM_OF_ENCRYPT_TYPE; i++) {
+                        if (i == eCSR_ENCRYPT_TYPE_TKIP ||
+                            i == eCSR_ENCRYPT_TYPE_AES) {
+                                pScanFilter->
+                                   EncryptionType.encryptionType[index] = i;
+                                pScanFilter->
+                                   mcEncryptionType.encryptionType[index] = i;
+                                index++;
+                        }
+                }
+                pScanFilter->EncryptionType.numEntries = index;
+                pScanFilter->mcEncryptionType.numEntries = index;
+                pScanFilter->ignore_pmf_cap = true;
+        } else {
+                pScanFilter->authType = pProfile->AuthType;
+                pScanFilter->EncryptionType = pProfile->EncryptionType;
+                pScanFilter->mcEncryptionType = pProfile->mcEncryptionType;
+        }
         pScanFilter->BSSType = pProfile->BSSType;
         pScanFilter->phyMode = pProfile->phyMode;
 #ifdef FEATURE_WLAN_WAPI