From 821f09c3fc9795b5d679bb9c0b8afa9990aeb737 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Mon, 26 Feb 2018 15:18:40 +0530 Subject: [PATCH] qcacld-3.0: Add logic to negotiate the auth and enc type depending on AP In testbed sta mode the RSNE enc type and auth type may not match the AP's enc type and auth type and thus the scan filter is unable to match and find the AP. Introduce auth and enc type as "ANY" in scan filter. With the auth and enc type set as ANY, all the AP's matching the BSSID and SSID will be filtered and the negotiated auth and enc type will be dependent on AP's auth and enc type. Change-Id: Ia7d573b393f7883f4c92188133734795be1781aa CRs-Fixed: 2197223 --- core/sme/src/csr/csr_api_scan.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index a2a931203eb8..76f8f082bb39 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -3484,26 +3484,16 @@ static QDF_STATUS csr_prepare_scan_filter(tpAniSirGlobal mac_ctx, } if (pFilter->force_rsne_override) { - int idx; - sme_debug("force_rsne_override enabled fill all auth type and enctype"); - filter->num_of_auth = WLAN_NUM_OF_SUPPORT_AUTH_TYPE; - for (i = 0; i < filter->num_of_auth; i++) - filter->auth_type[i] = i; + sme_debug("force_rsne_override set auth type and enctype to any and ignore pmf cap"); + + filter->num_of_auth = 1; + filter->auth_type[0] = WLAN_AUTH_TYPE_ANY; + filter->num_of_enc_type = 1; + filter->enc_type[0] = WLAN_ENCRYPT_TYPE_ANY; + filter->num_of_mc_enc_type = 1; + filter->mc_enc_type[0] = WLAN_ENCRYPT_TYPE_ANY; - idx = 0; - for (i = 0; i < WLAN_NUM_OF_ENCRYPT_TYPE; i++) { - if (i == WLAN_ENCRYPT_TYPE_TKIP || - i == WLAN_ENCRYPT_TYPE_AES || - i == WLAN_ENCRYPT_TYPE_AES_GCMP || - i == WLAN_ENCRYPT_TYPE_AES_GCMP_256) { - filter->enc_type[idx] = i; - filter->mc_enc_type[idx] = i; - idx++; - } - } - filter->num_of_enc_type = idx; - filter->num_of_mc_enc_type = idx; filter->ignore_pmf_cap = true; } else { filter->num_of_auth =