diff options
| -rw-r--r-- | core/sme/src/csr/csr_util.c | 26 |
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; |
