From db7294ed01fb5da9b2be713697ba33ebf9e7e8f2 Mon Sep 17 00:00:00 2001 From: Krupali Dhanvijay Date: Tue, 27 Dec 2022 22:49:59 +0530 Subject: [PATCH 01/11] qcacld-3.0: Send driver disconnect internal reason code to user space Send the driver disconnect internal reason code as an event to user space using QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON vendor command. Change-Id: I19959e097c5709d63fbd941583b934e291c3af1c CRs-Fixed: 3371396 --- core/hdd/src/wlan_hdd_cfg80211.c | 30 +++++++++++++++++++++++++++- core/hdd/src/wlan_hdd_sta_info.h | 4 ++++ core/hdd/src/wlan_hdd_station_info.c | 4 +--- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 1bc03e75936e..e7ec3a87528c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -169,7 +169,8 @@ #define g_mode_rates_size (12) #define a_mode_rates_size (8) - +#define DRIVER_DISCONNECT_REASON_INDEX \ + QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX /** * rtt_is_initiator - Macro to check if the bitmap has any RTT roles set * @bitmap: The bitmap to be checked @@ -1700,6 +1701,10 @@ static const struct nl80211_vendor_cmd_info wlan_hdd_cfg80211_vendor_events[] = .vendor_id = QCA_NL80211_VENDOR_ID, .subcmd = QCA_NL80211_VENDOR_SUBCMD_UPDATE_STA_INFO, }, + [QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX] = { + .vendor_id = QCA_NL80211_VENDOR_ID, + .subcmd = QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON, + }, #ifdef WLAN_SUPPORT_TWT FEATURE_TWT_VENDOR_EVENTS #endif @@ -22146,6 +22151,9 @@ wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter, uint16_t disconnect_ies_len) { enum ieee80211_reasoncode ieee80211_reason; + struct sk_buff *vendor_event; + int flags; + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); ieee80211_reason = wlan_hdd_get_cfg80211_disconnect_reason(adapter, reason); @@ -22155,6 +22163,26 @@ wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter, adapter->last_disconnect_reason, hdd_qca_reason_to_str(adapter->last_disconnect_reason), locally_generated); + + flags = cds_get_gfp_flags(); + vendor_event = + cfg80211_vendor_event_alloc( + hdd_ctx->wiphy, &(adapter->wdev), NLMSG_HDRLEN + + sizeof(adapter->last_disconnect_reason) + + NLMSG_HDRLEN, DRIVER_DISCONNECT_REASON_INDEX, flags); + if (!vendor_event) { + hdd_err("cfg80211_vendor_event_alloc failed"); + return; + } + + if (nla_put_u32(vendor_event, DISCONNECT_REASON, + adapter->last_disconnect_reason)) { + hdd_err("DISCONNECT_REASON put fail"); + kfree_skb(vendor_event); + goto send_disconnect; + } + cfg80211_vendor_event(vendor_event, flags); +send_disconnect: cfg80211_disconnected(adapter->dev, ieee80211_reason, disconnect_ies, disconnect_ies_len, locally_generated, GFP_KERNEL); diff --git a/core/hdd/src/wlan_hdd_sta_info.h b/core/hdd/src/wlan_hdd_sta_info.h index 20d0152e89b0..1412688a5b73 100644 --- a/core/hdd/src/wlan_hdd_sta_info.h +++ b/core/hdd/src/wlan_hdd_sta_info.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -38,6 +39,9 @@ /* Opaque handle for abstraction */ #define hdd_sta_info_entry qdf_list_node_t +#define DISCONNECT_REASON \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_DRIVER_DISCONNECT_REASON + /** * struct dhcp_phase - Per Peer DHCP Phases * @DHCP_PHASE_ACK: upon receiving DHCP_ACK/NAK message in REQUEST phase or diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index b948e7ad2b45..ca95b647404b 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -135,8 +135,6 @@ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_RX_RETRY_COUNT #define REMOTE_RX_BC_MC_COUNT \ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_REMOTE_RX_BC_MC_COUNT -#define DISCONNECT_REASON \ - QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_DRIVER_DISCONNECT_REASON #define BEACON_IES \ QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_BEACON_IES #define ASSOC_REQ_IES \ From 40cea3db7e6602cf61e4118e28ae0826b48570cd Mon Sep 17 00:00:00 2001 From: Asutosh Mohapatra Date: Tue, 3 Jan 2023 22:26:32 -0800 Subject: [PATCH 02/11] qcacld-3.0: Add new INI to separate scan policy for rest of world users Currently host drops an AP from scan list if host country is set to US and AP country is non-US. This implementation violates our standard regulatory scan policy. To address this issue, introduce a new INI to differentiate between our standard regulatory policy with others. Change-Id: Ie6bd2d1925048aef427136b34d00d361955f40b2 CRs-Fixed: 3377242 --- components/mlme/core/src/wlan_mlme_main.c | 25 ++++++++++++++++- .../mlme/dispatcher/inc/cfg_mlme_generic.h | 28 +++++++++++++++++-- .../mlme/dispatcher/inc/wlan_mlme_api.h | 23 +++++++++++++++ .../dispatcher/inc/wlan_mlme_public_struct.h | 6 +++- .../mlme/dispatcher/inc/wlan_mlme_ucfg_api.h | 19 ++++++++++++- .../mlme/dispatcher/src/wlan_mlme_api.c | 17 +++++++++++ core/hdd/src/wlan_hdd_main.c | 12 ++++++++ 7 files changed, 125 insertions(+), 5 deletions(-) diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index a283dfd3c622..66f4ef140432 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -382,6 +382,28 @@ mlme_init_lpass_support_cfg(struct wlan_objmgr_psoc *psoc, } #endif +#ifdef CONFIG_BAND_6GHZ +/** + * mlme_init_standard_6ghz_conn_policy() - initialize standard 6GHz + * policy connection flag + * @psoc: Pointer to PSOC + * @gen: pointer to generic CFG items + * + * Return: None + */ +static void mlme_init_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, + struct wlan_mlme_generic *gen) +{ + gen->std_6ghz_conn_policy = + cfg_get(psoc, CFG_6GHZ_STANDARD_CONNECTION_POLICY); +} +#else +static void mlme_init_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, + struct wlan_mlme_generic *gen) +{ +} +#endif + /** * mlme_init_mgmt_hw_tx_retry_count_cfg() - initialize mgmt hw tx retry count * @psoc: Pointer to PSOC @@ -490,6 +512,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_MONITOR_MODE_CONCURRENCY); gen->tx_retry_multiplier = cfg_get(psoc, CFG_TX_RETRY_MULTIPLIER); mlme_init_mgmt_hw_tx_retry_count_cfg(psoc, gen); + mlme_init_standard_6ghz_conn_policy(psoc, gen); } static void mlme_init_edca_ani_cfg(struct wlan_objmgr_psoc *psoc, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_generic.h b/components/mlme/dispatcher/inc/cfg_mlme_generic.h index 4e2d58d26744..c255039a09be 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_generic.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_generic.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -167,6 +167,29 @@ enum monitor_mode_concurrency { 1, \ "rf test mode Enable Flag") +#ifdef CONFIG_BAND_6GHZ +/* + * standard_6ghz_connection_policy - Enable 6 GHz standard connection policy + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to set standard 6 GHz policies where STA will be + * allowed to scan and connect to any 6 GHz AP. + * + * Related: None + * + * Supported Feature: STA + */ +#define CFG_6GHZ_STANDARD_CONNECTION_POLICY CFG_INI_BOOL( \ + "standard_6ghz_connection_policy", \ + 1, \ + "6ghz standard 6 GHZ connection policy") +#define CFG_6GHZ_STD_CONN_POLICY CFG(CFG_6GHZ_STANDARD_CONNECTION_POLICY) +#else +#define CFG_6GHZ_STD_CONN_POLICY +#endif + /* * * BandCapability - Preferred band (0: 2.4G, 5G, and 6G, @@ -949,5 +972,6 @@ enum monitor_mode_concurrency { CFG(CFG_WLS_6GHZ_CAPABLE) \ CFG(CFG_MONITOR_MODE_CONCURRENCY)\ CFG(CFG_TX_RETRY_MULTIPLIER) \ - CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT) + CFG(CFG_MGMT_FRAME_HW_TX_RETRY_COUNT) \ + CFG_6GHZ_STD_CONN_POLICY #endif /* __CFG_MLME_GENERIC_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 1bf5978842d5..a5587a1a3845 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -2194,6 +2194,29 @@ wlan_mlme_get_sta_miracast_mcc_rest_time(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_sap_mcc_chnl_avoid(struct wlan_objmgr_psoc *psoc, uint8_t *value); + +#ifdef CONFIG_BAND_6GHZ +/** + * wlan_mlme_is_standard_6ghz_conn_policy_enabled() - Get the 6 GHz standard + * connection policy flag + * @psoc: psoc context + * @value: Enable/Disable value ptr. + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value); +#else +static inline QDF_STATUS +wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + *value = false; + return QDF_STATUS_SUCCESS; +} +#endif + /** * wlan_mlme_get_mcc_bcast_prob_resp() - Get broadcast probe rsp in MCC * diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 19ce7447dad7..12d2f7de3c15 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 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 @@ -1252,6 +1252,7 @@ enum mlme_cfg_frame_type { * @ocv_support: FW supports OCV or not * @tx_retry_multiplier: TX xretry extension parameter * @mgmt_hw_tx_retry_count: MGMT HW tx retry count for frames + * @std_6ghz_conn_policy: 6GHz standard connection policy */ struct wlan_mlme_generic { uint32_t band_capability; @@ -1298,6 +1299,9 @@ struct wlan_mlme_generic { bool ocv_support; uint32_t tx_retry_multiplier; uint8_t mgmt_hw_tx_retry_count[CFG_FRAME_TYPE_MAX]; +#ifdef CONFIG_BAND_6GHZ + bool std_6ghz_conn_policy; +#endif }; /* diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 8a6e74c896cb..bbf3c454e0c1 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -2694,6 +2694,23 @@ ucfg_mlme_set_rf_test_mode_enabled(struct wlan_objmgr_psoc *psoc, bool value) return wlan_mlme_set_rf_test_mode_enabled(psoc, value); } +/** + * ucfg_mlme_is_standard_6ghz_conn_policy_enabled() - Get 6ghz standard + * connection policy flag + * @psoc: pointer to psoc object + * @value: pointer to hold the value of flag + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_is_standard_6ghz_conn_policy_enabled(psoc, value); +} + /** * ucfg_mlme_get_opr_rate() - Get operational rate set * @psoc: pointer to vdev object diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 2dc3b418de18..ca69d7cfd051 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -2775,6 +2775,23 @@ wlan_mlme_set_rf_test_mode_enabled(struct wlan_objmgr_psoc *psoc, bool value) return QDF_STATUS_SUCCESS; } +#ifdef CONFIG_BAND_6GHZ +QDF_STATUS +wlan_mlme_is_standard_6ghz_conn_policy_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) + return QDF_STATUS_E_FAILURE; + + *value = mlme_obj->cfg.gen.std_6ghz_conn_policy; + + return QDF_STATUS_SUCCESS; +} +#endif + QDF_STATUS wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value) { diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 69500ce5819f..68cdfec4e54a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -14304,6 +14304,7 @@ static int hdd_features_init(struct hdd_context *hdd_ctx) mac_handle_t mac_handle; bool b_cts2self, is_imps_enabled; bool rf_test_mode; + bool std_6ghz_conn_policy; hdd_enter(); @@ -14402,6 +14403,17 @@ static int hdd_features_init(struct hdd_context *hdd_ctx) wlan_cm_set_6ghz_key_mgmt_mask(hdd_ctx->psoc, ALLOWED_KEYMGMT_6G_MASK); } + + status = ucfg_mlme_is_standard_6ghz_conn_policy_enabled(hdd_ctx->psoc, + &std_6ghz_conn_policy); + + if (!QDF_IS_STATUS_SUCCESS(status)) { + hdd_err("Get 6ghz standard connection policy failed"); + return QDF_STATUS_E_FAILURE; + } + if (std_6ghz_conn_policy) + wlan_cm_set_standard_6ghz_conn_policy(hdd_ctx->psoc, true); + hdd_thermal_stats_cmd_init(hdd_ctx); sme_set_cal_failure_event_cb(hdd_ctx->mac_handle, hdd_cal_fail_send_event); From 86ed461595399e297410d3ef76588dba7340d3a4 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Wed, 5 Apr 2023 01:15:37 -0700 Subject: [PATCH 03/11] Release 2.0.8.32V Release 2.0.8.32V Change-Id: I7b034714a6b5295472491f66dd36a4c4679090e9 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 80ef94507c93..676c01ed532a 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "U" +#define QWLAN_VERSION_EXTRA "V" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32U" +#define QWLAN_VERSIONSTR "2.0.8.32V" #endif /* QWLAN_VERSION_H */ From 0ef14e0f0b08202b6890a41b76b31b9a7b948d1f Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Thu, 30 Mar 2023 17:06:32 +0530 Subject: [PATCH 04/11] qcacld-3.0: Do not drop retry assoc req if RMF enabled Upon reception of assoc request from an already associated PMF-enabled STA, the SAP is expected to start SA-Query mechanism. On the other hand, host driver drops all the retried assoc request frames if the STA is already in connected state. This is valid as long as the original assoc request is currently under processing(to prevent duplicate processing). However, for reassoc attempt cases, this assoc request with retry bit set could be the first assoc request under processing. Therefore, change the logic to drop only retry-bit set assoc requests in non-PMF STA cases. For PMF-enabled STA, drop the assoc requests only if key installation is pending. Otherwise, send SA query. Change-Id: I1f3a564864e70f4e11994698389be427ac202fa3 CRs-Fixed: 3446033 --- .../src/pe/lim/lim_process_assoc_req_frame.c | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index d39211873c14..dca2042b2874 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -2298,14 +2298,20 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in */ sta_ds = dph_lookup_hash_entry(mac_ctx, hdr->sa, &assoc_id, &session->dph.dphHashTable); - if (sta_ds) { + if (sta_ds && !sta_ds->rmfEnabled) { + /** + * Drop only retries for non-PMF assoc requests. + * For PMF case: + * a) Before key installation - Drop assoc request + * b) After key installation - Send SA query + */ if (hdr->fc.retry > 0) { pe_err("STA is initiating Assoc Req after ACK lost. Do not process sessionid: %d sys sub_type=%d for role=%d from: " QDF_MAC_ADDR_FMT, session->peSessionId, sub_type, GET_LIM_SYSTEM_ROLE(session), QDF_MAC_ADDR_REF(hdr->sa)); return; - } else if (!sta_ds->rmfEnabled && (sub_type == LIM_REASSOC)) { + } else if (sub_type == LIM_REASSOC) { /* * SAP should send reassoc response with reject code * to avoid IOT issues. as per the specification SAP @@ -2319,7 +2325,7 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in sub_type, sta_ds, session, false); pe_err("Rejecting reassoc req from STA"); return; - } else if (!sta_ds->rmfEnabled) { + } else { /* * Do this only for non PMF case. * STA might have missed the assoc response, so it is @@ -2336,16 +2342,16 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in session->limSystemRole, QDF_MAC_ADDR_REF(hdr->sa)); return; - } else if (sta_ds->rmfEnabled && !sta_ds->is_key_installed) { - /* When PMF enabled, SA Query will be triggered - * unexpectly if duplicated assoc_req received - - * 1) after pre_auth node deleted and - * 2) before key installed. - * Here drop such duplicated assoc_req frame. - */ - pe_err("Drop duplicate assoc_req before 4-way HS"); - return; } + } else if (sta_ds && sta_ds->rmfEnabled && !sta_ds->is_key_installed) { + /* When PMF enabled, SA Query will be triggered + * unexpectly if duplicated assoc_req received - + * 1) after pre_auth node deleted and + * 2) before key installed. + * Here drop such duplicated assoc_req frame. + */ + pe_err("Drop duplicate assoc_req before 4-way HS"); + return; } status = lim_check_sta_in_pe_entries(mac_ctx, hdr, session->peSessionId, From 386d0eb5fcebc7ff076638221ce76541089d917f Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Wed, 12 Apr 2023 07:20:15 -0700 Subject: [PATCH 05/11] Release 2.0.8.32W Release 2.0.8.32W Change-Id: Ib9f2ce4009627be4005d19ff6f8c9072622399fd CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 676c01ed532a..b9dda3c54bf7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "V" +#define QWLAN_VERSION_EXTRA "W" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32V" +#define QWLAN_VERSIONSTR "2.0.8.32W" #endif /* QWLAN_VERSION_H */ From 4e4c2377e870d2a4ae0b7c1a48095ead0c116d01 Mon Sep 17 00:00:00 2001 From: Srikanth Marepalli Date: Fri, 3 Mar 2023 18:03:58 +0530 Subject: [PATCH 06/11] qcacld-3.0: Allow roaming to configured roaming band only Here upper layer configures roam band via the SETROAMBAND NCHO command. This means DUT should be restricted to roam to the configured band only but as per current PCL filtration logic, DUT is allowed to roam beyond the configured band AP also. Roam Band definition is: 0: auto (all supported bands) 1: 2.4 only 2: 5 only 3: 2.4 + 5 4: 6 only 5: 2.4 + 6 6: 5 + 6 7: 2.4 + 5 + 6 Fix is to update the PCL filtration logic in wma_send_set_pcl_cmd and make sure DUT doesn't roam beyond the configured band AP. Change-Id: Ia2353e8ff982609a4ab5a35715886648f140cd22 CRs-Fixed: 3158456 --- core/wma/src/wma_main.c | 84 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 9 deletions(-) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index dbe8e0275ca2..b48b2729e9ae 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -9323,27 +9323,97 @@ QDF_STATUS wma_send_set_pcl_cmd(tp_wma_handle wma_handle, } msg->chan_weights.saved_num_chan = wma_handle->saved_chan.num_channels; + status = policy_mgr_get_valid_chan_weights(wma_handle->psoc, (struct policy_mgr_pcl_chan_weights *)&msg->chan_weights, PM_STA_MODE); + if (QDF_IS_STATUS_ERROR(status)) { + wma_err("Error in creating weighed pcl"); + return status; + } for (i = 0; i < msg->chan_weights.saved_num_chan; i++) { msg->chan_weights.weighed_valid_list[i] = wma_map_pcl_weights( msg->chan_weights.weighed_valid_list[i]); - /* Dont allow roaming on 2G when 5G_ONLY configured */ + + if (msg->band_mask == + (BIT(REG_BAND_2G) | BIT(REG_BAND_5G) | BIT(REG_BAND_6G))) + continue; + + /* + * Dont allow roaming on 5G/6G band if only 2G band configured + * as supported roam band mask + */ + if (((wma_handle->bandcapability == BAND_2G) || + (msg->band_mask == BIT(REG_BAND_2G))) && + !WLAN_REG_IS_24GHZ_CH_FREQ( + msg->chan_weights.saved_chan_list[i])) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 2G/6G band if only 5G band configured + * as supported roam band mask + */ if (((wma_handle->bandcapability == BAND_5G) || (msg->band_mask == BIT(REG_BAND_5G))) && + !WLAN_REG_IS_5GHZ_CH_FREQ( + msg->chan_weights.saved_chan_list[i])) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 2G/5G band if only 6G band configured + * as supported roam band mask + */ + if (msg->band_mask == BIT(REG_BAND_6G) && + !WLAN_REG_IS_6GHZ_CHAN_FREQ( + msg->chan_weights.saved_chan_list[i])) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 6G band if only 2G + 5G band configured + * as supported roam band mask. + */ + if (msg->band_mask == (BIT(REG_BAND_2G) | BIT(REG_BAND_5G)) && + (WLAN_REG_IS_6GHZ_CHAN_FREQ( + msg->chan_weights.saved_chan_list[i]))) { + msg->chan_weights.weighed_valid_list[i] = + WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } + + /* + * Dont allow roaming on 2G band if only 5G + 6G band configured + * as supported roam band mask. + */ + if (msg->band_mask == (BIT(REG_BAND_5G) | BIT(REG_BAND_6G)) && (WLAN_REG_IS_24GHZ_CH_FREQ( msg->chan_weights.saved_chan_list[i]))) { msg->chan_weights.weighed_valid_list[i] = WEIGHT_OF_DISALLOWED_CHANNELS; + continue; } - if (msg->band_mask == BIT(REG_BAND_2G) && - !WLAN_REG_IS_24GHZ_CH_FREQ( - msg->chan_weights.saved_chan_list[i])) + + /* + * Dont allow roaming on 5G band if only 2G + 6G band configured + * as supported roam band mask. + */ + if (msg->band_mask == (BIT(REG_BAND_2G) | BIT(REG_BAND_6G)) && + (WLAN_REG_IS_5GHZ_CH_FREQ( + msg->chan_weights.saved_chan_list[i]))) { msg->chan_weights.weighed_valid_list[i] = WEIGHT_OF_DISALLOWED_CHANNELS; + continue; + } is_channel_allowed = policy_mgr_is_sta_chan_valid_for_connect_and_roam( @@ -9354,10 +9424,6 @@ QDF_STATUS wma_send_set_pcl_cmd(tp_wma_handle wma_handle, WEIGHT_OF_DISALLOWED_CHANNELS; } - if (!QDF_IS_STATUS_SUCCESS(status)) { - wma_err("Error in creating weighed pcl"); - return status; - } wma_debug("Dump channel list send to wmi"); policy_mgr_dump_channel_list(msg->chan_weights.saved_num_chan, msg->chan_weights.saved_chan_list, From 08405a88075b7d6b5129a5539581166afce4e769 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Mon, 17 Apr 2023 05:42:37 -0700 Subject: [PATCH 07/11] Release 2.0.8.32X Release 2.0.8.32X Change-Id: I8100322f3d86ac08b426674be01deb801bdd9b51 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index b9dda3c54bf7..63f733f4ccf7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "W" +#define QWLAN_VERSION_EXTRA "X" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32W" +#define QWLAN_VERSIONSTR "2.0.8.32X" #endif /* QWLAN_VERSION_H */ From 3a53872fb4d533a7c2f4cbad21ab6aface641de3 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Mon, 5 Dec 2022 18:03:07 +0530 Subject: [PATCH 08/11] qcacld-3.0: Update dot11 mode correctly for Getbssinfo Currently host driver does not update dot11 mode info correctly for getbssinfo command if the dot11 mode is 11AX or 11BE. With this fix add a logic to update the dot11 mode info correctly in response to the getbssinfo command. Change-Id: I9ebec3ab43fe4cff1cab5f646bcc93a8c6654fd0 CRs-Fixed: 3353630 --- core/hdd/src/wlan_hdd_station_info.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index ca95b647404b..06debdd2027c 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -363,6 +363,9 @@ static int hdd_convert_dot11mode(uint32_t dot11mode) case eCSR_CFG_DOT11_MODE_11AC: ret_val = QCA_WLAN_802_11_MODE_11AC; break; + case eCSR_CFG_DOT11_MODE_11AX: + ret_val = QCA_WLAN_802_11_MODE_11AX; + break; case eCSR_CFG_DOT11_MODE_AUTO: case eCSR_CFG_DOT11_MODE_ABG: default: From 5363d93c4bcaf16219f9f184f36fff87eba6d6de Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Tue, 18 Apr 2023 05:27:13 -0700 Subject: [PATCH 09/11] Release 2.0.8.32Y Release 2.0.8.32Y Change-Id: I8e3aa000b9c148a244993e27812913cb01b48cf1 CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 63f733f4ccf7..4b5c0eea84fc 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "X" +#define QWLAN_VERSION_EXTRA "Y" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32X" +#define QWLAN_VERSIONSTR "2.0.8.32Y" #endif /* QWLAN_VERSION_H */ From bc1baf6cb36d563fad19d99a9d3c5e5ae0a09b8b Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatnagar Date: Mon, 9 Jan 2023 14:16:11 +0530 Subject: [PATCH 10/11] qcacld-3.0: Don't fill CCK rates for SAE Pre Auth frame If while roaming from 2.4 GHz to 5 GHz band with SAE encryption, rates shouldn't be filled from the current session/AP as this may lead to incorrectly filling rates for instance this may lead to incorrectly filling CCk rates for SAE Pre-Auth while roaming from 2.4 GHz to 5 GHz. As even though with roaming offloaded, sae pre_auth due to crypto limitations of fw has to be triggered by the driver. Change-Id: I2293563db047e10ec8a2ade9f3b2a602cf3e3edf CRs-Fixed: 3336853 --- .../src/pe/lim/lim_send_management_frames.c | 28 ++++++++++++++++--- core/mac/src/pe/lim/lim_utils.c | 18 ++++++++++-- core/mac/src/pe/lim/lim_utils.h | 6 ++-- core/sme/inc/csr_api.h | 9 ++++++ core/sme/src/csr/csr_api_roam.c | 2 +- 5 files changed, 53 insertions(+), 10 deletions(-) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index d505e6704d02..ea07afe0a7cb 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -2646,7 +2646,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx, QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG, frame, (uint16_t)(sizeof(tSirMacMgmtHdr) + payload)); - min_rid = lim_get_min_session_txrate(pe_session); + min_rid = lim_get_min_session_txrate(pe_session, NULL); lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_ASSOC_START_EVENT, pe_session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS); lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr, @@ -3133,7 +3133,7 @@ alloc_packet: session->peSessionId, mac_hdr->fc.subType)); mac_ctx->auth_ack_status = LIM_ACK_NOT_RCD; - min_rid = lim_get_min_session_txrate(session); + min_rid = lim_get_min_session_txrate(session, NULL); peer_rssi = mac_ctx->lim.bss_rssi; lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr, session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS); @@ -5700,6 +5700,9 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id, struct pe_session *session; uint16_t auth_ack_status; enum rateid min_rid = RATEID_DEFAULT; + qdf_freq_t *pre_auth_freq = NULL; + qdf_freq_t channel_freq = 0; + enum QDF_OPMODE opmode; session = pe_find_session_by_vdev_id(mac_ctx, vdev_id); if (!session) { @@ -5712,7 +5715,24 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id, qdf_mtrace(QDF_MODULE_ID_PE, QDF_MODULE_ID_WMA, TRACE_CODE_TX_MGMT, session->peSessionId, 0); - min_rid = lim_get_min_session_txrate(session); + opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, vdev_id); + if (opmode != QDF_NAN_DISC_MODE && fc->subType == SIR_MAC_MGMT_AUTH) { + tpSirFTPreAuthReq pre_auth_req; + uint16_t auth_algo = *(uint16_t *)(frame + + sizeof(tSirMacMgmtHdr)); + + if (auth_algo == eSIR_AUTH_TYPE_SAE) { + if (session->ftPEContext.pFTPreAuthReq) { + pre_auth_req = + session->ftPEContext.pFTPreAuthReq; + channel_freq = + pre_auth_req->pre_auth_channel_freq; + } + pre_auth_freq = &channel_freq; + } + pe_debug("TX SAE pre-auth frame on freq %d", channel_freq); + } + min_rid = lim_get_min_session_txrate(session, pre_auth_freq); qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet, (uint16_t)msg_len, diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 6e85825a8c3f..1922b487c16a 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -8248,15 +8248,27 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type, return QDF_STATUS_SUCCESS; } -enum rateid lim_get_min_session_txrate(struct pe_session *session) +enum rateid lim_get_min_session_txrate(struct pe_session *session, + qdf_freq_t *pre_auth_freq) { enum rateid rid = RATEID_DEFAULT; uint8_t min_rate = SIR_MAC_RATE_54, curr_rate, i; - tSirMacRateSet *rateset = &session->rateSet; + tSirMacRateSet *rateset; if (!session) return rid; + rateset = &session->rateSet; + + if (pre_auth_freq) { + pe_debug("updated rateset to pre auth freq %d", + *pre_auth_freq); + if ((*pre_auth_freq)) + csr_get_basic_rates(rateset, *pre_auth_freq); + else + return rid; + } + for (i = 0; i < rateset->numRates; i++) { /* Ignore MSB - set to indicate basic rate */ curr_rate = rateset->rate[i] & 0x7F; diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index 6b2e0103741b..eaa7d7585adc 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 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 @@ -1687,13 +1687,15 @@ QDF_STATUS lim_util_get_type_subtype(void *pkt, uint8_t *type, /** * lim_get_min_session_txrate() - Get the minimum rate supported in the session * @session: Pointer to PE session + * @pre_auth_freq: Pointer to pre_auth_freq * * This API will find the minimum rate supported by the given PE session and * return the enum rateid corresponding to the rate. * * Return: enum rateid */ -enum rateid lim_get_min_session_txrate(struct pe_session *session); +enum rateid lim_get_min_session_txrate(struct pe_session *session, + qdf_freq_t *pre_auth_freq); /** * lim_send_dfs_chan_sw_ie_update() - updates the channel switch IE in beacon diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index d2b522974b6b..72da90d303ef 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1485,6 +1485,15 @@ QDF_STATUS csr_mlme_vdev_disconnect_all_p2p_client_event(uint8_t vdev_id); */ QDF_STATUS csr_mlme_vdev_stop_bss(uint8_t vdev_id); +/* + * csr_get_basic_rates() - Get basic rate for a band + * @b_rates: Basic rate + * @chan_freq: frequency for which basic rate is required + * + * Return: void + */ +void csr_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq); + /* * csr_mlme_get_concurrent_operation_freq() - Callback for MLME module to * get the concurrent operation frequency diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 0b75b2e3a1e8..aea7767b52b8 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -14951,7 +14951,7 @@ csr_update_sae_single_pmk_ap_cap(struct mac_context *mac, } #endif -static void csr_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq) +void csr_get_basic_rates(tSirMacRateSet *b_rates, uint32_t chan_freq) { /* * Some IOT APs don't send supported rates in From 2a716221fb8396421b41b07c424f36224eeb8439 Mon Sep 17 00:00:00 2001 From: Madan Koyyalamudi Date: Wed, 26 Apr 2023 09:22:25 -0700 Subject: [PATCH 11/11] Release 2.0.8.32Z Release 2.0.8.32Z Change-Id: Ia2dce684b4511bdd943a5827f4619ae390ac7dea CRs-Fixed: 774533 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 4b5c0eea84fc..7f2770d52ba7 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 2 #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 8 -#define QWLAN_VERSION_EXTRA "Y" +#define QWLAN_VERSION_EXTRA "Z" #define QWLAN_VERSION_BUILD 32 -#define QWLAN_VERSIONSTR "2.0.8.32Y" +#define QWLAN_VERSIONSTR "2.0.8.32Z" #endif /* QWLAN_VERSION_H */