summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsiu-Chang Chen <hsiuchangchen@google.com>2024-02-26 14:59:21 +0530
committerHsiu-Chang Chen <hsiuchangchen@google.com>2024-02-27 20:58:35 +0800
commitf8bf11125abeb93e7aaadb5f06f16482fea9fe1f (patch)
treeb2cc85df6e4544346acf057af4ea3032b7bd0ca0
parent77123c4e833bafb43e7740c5afee3a59c690f04a (diff)
downloadqcacld-android-msm-redbull-4.19-android14-qpr3-beta.tar.gz
qcacld-3.0: Enable PMF for peer based on rsn capandroid-u-qpr3-beta-2.1_r0.6android-msm-redbull-4.19-android14-qpr3-beta
Currently, PMF is enabled for the peer iff the mfp in the connect request is set to required. However, with NL80211_EXT_FEATURE_MFP_OPTIONAL support, the supplicant would send the user configuration in the connect request mfp param. The driver doesn't enable the PMF for the peer if the MFP is not sent as required. Send/Select group management cipher of the connection based on the PMF capability and not based on the user mfp parameter. Enable the PMF, if both, the DUT and AP are PMF capable. Bug: 322941827 Test: Regression Test Change-Id: Iba7fde4aa18c4053c064506b34a7a63e220be5a2 Signed-off-by: Hsiu-Chang Chen <hsiuchangchen@google.com>
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c4
-rw-r--r--core/sme/src/csr/csr_api_roam.c5
-rw-r--r--core/sme/src/csr/csr_util.c9
3 files changed, 12 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 918c381afe..c09ae27e21 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -5588,7 +5588,9 @@ int hdd_set_genie_to_csr(struct hdd_adapter *adapter,
(security_ie[1] + 2)))
hdd_err("Failed to set the crypto params from IE");
#endif
-
+ qdf_trace_hex_dump(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,
+ roam_profile->pRSNReqIE,
+ roam_profile->nRSNReqIELength);
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
if (hdd_ctx->force_rsne_override &&
(security_ie[0] == DOT11F_EID_RSN)) {
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 9b60209d63..b63b2190de 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -15430,7 +15431,7 @@ static void csr_set_mgmt_enc_type(struct csr_roam_profile *profile,
tDot11fBeaconIEs *ies,
struct join_req *csr_join_req)
{
- if (profile->MFPEnabled)
+ if (profile->MFPEnabled || profile->MFPCapable)
csr_join_req->MgmtEncryptionType =
profile->mgmt_encryption_type;
else
@@ -15440,6 +15441,8 @@ static void csr_set_mgmt_enc_type(struct csr_roam_profile *profile,
!(profile->MFPRequired) &&
!csr_is_mfpc_capable(&ies->RSN))
csr_join_req->MgmtEncryptionType = eSIR_ED_NONE;
+
+ sme_debug("Mgmt encryption type %x", csr_join_req->MgmtEncryptionType);
}
#else
static inline void csr_set_mgmt_enc_type(struct csr_roam_profile *profile,
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index 8cc13a916b..f69721de8e 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -4055,6 +4056,8 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
pIesLocal->RSN.RSN_Cap[1] &
rsn_ie.RSN_Cap[1];
}
+ sme_debug("RSN CAP: %x %x", pIesLocal->RSN.RSN_Cap[0],
+ pIesLocal->RSN.RSN_Cap[1]);
}
/* See if the cyphers in the Bss description match with the
* settings in the profile.
@@ -4149,8 +4152,7 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
/* Advertise BIP in group cipher key management only if PMF is
* enabled and AP is capable.
*/
- if (pProfile->MFPEnabled &&
- (RSNCapabilities.MFPCapable && pProfile->MFPCapable)) {
+ if ((RSNCapabilities.MFPCapable && pProfile->MFPCapable)) {
pGroupMgmtCipherSuite =
(uint8_t *) pPMK + sizeof(uint16_t) +
(pPMK->cPMKIDs * PMKID_LEN);
@@ -4176,8 +4178,7 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
(pPMK->cPMKIDs *
PMKID_LEN));
#ifdef WLAN_FEATURE_11W
- if (pProfile->MFPEnabled &&
- (RSNCapabilities.MFPCapable && pProfile->MFPCapable)) {
+ if ((RSNCapabilities.MFPCapable && pProfile->MFPCapable)) {
if (0 == pPMK->cPMKIDs)
pRSNIe->IeHeader.Length += sizeof(uint16_t);
pRSNIe->IeHeader.Length += CSR_WPA_OUI_SIZE;