From 083fef0100139b29bebe69b4b76c87671f04344e Mon Sep 17 00:00:00 2001 From: Ajit Vaishya Date: Tue, 20 Jan 2026 14:40:42 +0530 Subject: [PATCH] qcacld-3.0: Self rsn cap intersect with AP rsn cap currently self rsn cap intersect with AP rsn cap IE which is filed in bss desc, but while reading rsn cap IE from bss desc is getting all Zero's, due to which self cap also become Zero's. Fix is read AP rsn cap from negotiated rsn cap of bss desc which is populate properly and self rsn cap is filled correctly. Change-Id: Ia1d9c27e1f3a7528636ab78ebe973090a9ae6f1d CRs-Fixed: 4423830 --- core/mac/inc/sir_api.h | 1 + core/sme/src/csr/csr_api_scan.c | 1 + core/sme/src/csr/csr_util.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index f13d7eda15bc..1f1ff23d47b4 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -786,6 +786,7 @@ struct bss_description { #if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD) uint32_t is_single_pmk; #endif + uint16_t neg_rsn_caps; /* Please keep the structure 4 bytes aligned above the ieFields */ uint32_t ieFields[1]; }; diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 8ba4ef61b6a1..5ce7d5345138 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -2256,6 +2256,7 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(struct mac_context *mac_ctx, bss_desc->beaconInterval = scan_entry->bcn_int; bss_desc->capabilityInfo = scan_entry->cap_info.value; + bss_desc->neg_rsn_caps = scan_entry->neg_sec_info.rsn_caps; if (WLAN_REG_IS_5GHZ_CH_FREQ(scan_entry->channel.chan_freq) || WLAN_REG_IS_6GHZ_CHAN_FREQ(scan_entry->channel.chan_freq)) diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index ecd857bcd604..a92dee201977 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -2603,8 +2603,6 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId, (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); @@ -2624,6 +2622,8 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId, } self_rsn_cap = (uint16_t)rsn_val; + /* get AP RSN cap */ + rsn_cap = pSirBssDesc->neg_rsn_caps; /* If AP is capable then use self capability else set PMF as 0 */ if (rsn_cap & WLAN_CRYPTO_RSN_CAP_MFP_ENABLED && pProfile->MFPCapable) {