summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2017-12-20 11:02:34 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-01-16 07:54:07 -0800
commit18693ef953b8f5fc3bc1d7052064f0d680397fa2 (patch)
treee5c39ebcf94c7c964077a97dc4ef9cbafeee516f
parent1d5a05eb09df20c726b9f34de696f9c14c4c28c6 (diff)
qcacld-3.0: Use intersection of AP's and user's RSN cap in assoc req
While preparing the RSNIE caps only AP capability are considered. The capability should be intersection of user provided capability and AP's capability. So use intersection of AP's and user's RSN cap in assoc request. Change-Id: I585d84953767c217239eedc284d6b413cf7af5e4 CRs-Fixed: 2164525
-rw-r--r--core/sme/src/csr/csr_util.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index 14ef6a1ff31e..b97da4f8276b 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -3340,6 +3340,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
#endif
tDot11fBeaconIEs *pIesLocal = pIes;
eCsrAuthType negAuthType = eCSR_AUTH_TYPE_UNKNOWN;
+ tDot11fIERSN rsn_ie;
qdf_mem_zero(&pmkid_cache, sizeof(pmkid_cache));
do {
@@ -3353,6 +3354,19 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
(pMac, pSirBssDesc, &pIesLocal)))) {
break;
}
+
+ /*
+ * Use intersection of the RSN cap sent by user space and
+ * the AP, so that only common capability are enabled.
+ */
+ if (pProfile->pRSNReqIE && pProfile->nRSNReqIELength) {
+ dot11f_unpack_ie_rsn(pMac, pProfile->pRSNReqIE + 2,
+ pProfile->nRSNReqIELength -2, &rsn_ie, false);
+ pIesLocal->RSN.RSN_Cap[0] = pIesLocal->RSN.RSN_Cap[0] &
+ rsn_ie.RSN_Cap[0];
+ pIesLocal->RSN.RSN_Cap[1] = pIesLocal->RSN.RSN_Cap[1] &
+ rsn_ie.RSN_Cap[1];
+ }
/* See if the cyphers in the Bss description match with the
* settings in the profile.
*/
@@ -3385,14 +3399,12 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId,
qdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite,
sizeof(AuthSuite));
- /* RSN capabilities follows the Auth Suite (two octects)
- * !!REVIEW - What should STA put in RSN capabilities, currently
- * just putting back APs capabilities For one, we shouldn't
- * EVER be sending out "pre-auth supported". It is an AP only
- * capability For another, we should use the Management Frame
- * Protection values given by the supplicant
- */
+ /* PreAuthSupported is an AP only capability */
RSNCapabilities.PreAuthSupported = 0;
+ /*
+ * Use the Management Frame Protection values given by the
+ * supplicant, if AP and STA both are MFP capable.
+ */
#ifdef WLAN_FEATURE_11W
if (RSNCapabilities.MFPCapable && pProfile->MFPCapable) {
RSNCapabilities.MFPCapable = pProfile->MFPCapable;