|
@@ -3755,12 +3755,25 @@ static inline void csr_update_pmksa_to_profile(struct csr_roam_profile *profile,
|
|
|
uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
|
|
|
struct csr_roam_profile *pProfile,
|
|
|
tSirBssDescription *pSirBssDesc,
|
|
|
- tDot11fBeaconIEs *pIes, tCsrRSNIe *pRSNIe)
|
|
|
+ tDot11fBeaconIEs *ap_ie, tCsrRSNIe *pRSNIe)
|
|
|
{
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
uint8_t *rsn_ie_end = NULL;
|
|
|
uint8_t *rsn_ie = (uint8_t *)pRSNIe;
|
|
|
uint8_t ie_len = 0;
|
|
|
+ tDot11fBeaconIEs *local_ap_ie = ap_ie;
|
|
|
+ uint16_t rsn_cap = 0;
|
|
|
+
|
|
|
+ if (!local_ap_ie &&
|
|
|
+ (!QDF_IS_STATUS_SUCCESS(csr_get_parsed_bss_description_ies
|
|
|
+ (mac, pSirBssDesc, &local_ap_ie))))
|
|
|
+ return ie_len;
|
|
|
+
|
|
|
+ /* get AP RSN cap */
|
|
|
+ qdf_mem_copy(&rsn_cap, local_ap_ie->RSN.RSN_Cap, sizeof(rsn_cap));
|
|
|
+ if (!ap_ie && local_ap_ie)
|
|
|
+ /* locally allocated */
|
|
|
+ qdf_mem_free(local_ap_ie);
|
|
|
|
|
|
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc, sessionId,
|
|
|
WLAN_LEGACY_SME_ID);
|
|
@@ -3768,6 +3781,13 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
|
|
|
sme_err("Invalid vdev");
|
|
|
return ie_len;
|
|
|
}
|
|
|
+ /*
|
|
|
+ * Use intersection of the RSN cap sent by user space and
|
|
|
+ * the AP, so that only common capability are enabled.
|
|
|
+ */
|
|
|
+ rsn_cap &= (uint16_t)wlan_crypto_get_param(vdev,
|
|
|
+ WLAN_CRYPTO_PARAM_RSN_CAP);
|
|
|
+ wlan_crypto_set_vdev_param(vdev, WLAN_CRYPTO_PARAM_RSN_CAP, rsn_cap);
|
|
|
rsn_ie_end = wlan_crypto_build_rsnie(vdev, rsn_ie);
|
|
|
if (rsn_ie_end)
|
|
|
ie_len = rsn_ie_end - rsn_ie;
|