From bb50ad7900b7bc2a4a0b3435ebfc47c0b6259eb8 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Thu, 11 Mar 2021 12:29:49 +0530 Subject: [PATCH 1/9] qcacmn: Add support to handle vendor specific protected action frame Host add support to handle action frames with category field ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED(vendor specific protected action frames). Change-Id: Iae105fe7c5c37438b29d9b2bc135961f795c5ab8 CRs-Fixed: 3262366 --- .../mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h | 5 ++++- .../mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h index 84b5b5285cbc..a21b81dc1ea1 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h +++ b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h @@ -530,7 +530,9 @@ struct action_frm_hdr { * @MGMT_ACTION_BA_ADDBA_RESPONSE: ADDBA response action frame * @MGMT_ACTION_BA_DELBA: DELBA action frame * @MGMT_ACTION_2040_BSS_COEXISTENCE: 20-40 bss coex action frame - * @MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC: category vendor spcific action frame + * @MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC: category vendor specific action frame + * @MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED: category vendor specific + * protected action frame * @MGMT_ACTION_EXT_CHANNEL_SWITCH_ID: ext channel switch id action frame * @MGMT_ACTION_VENDOR_SPECIFIC: vendor specific action frame * @MGMT_ACTION_TDLS_DISCRESP: TDLS discovery response frame @@ -657,6 +659,7 @@ enum mgmt_frame_type { MGMT_ACTION_BA_DELBA, MGMT_ACTION_2040_BSS_COEXISTENCE, MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC, + MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED, MGMT_ACTION_EXT_CHANNEL_SWITCH_ID, MGMT_ACTION_VENDOR_SPECIFIC, MGMT_ACTION_TDLS_DISCRESP, diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c index 19e2cc3b5a26..da099001d44e 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c +++ b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c @@ -871,6 +871,9 @@ mgmt_txrx_get_action_frm_subtype(uint8_t *mpdu_data_ptr) case ACTION_CATEGORY_VENDOR_SPECIFIC: frm_type = MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC; break; + case ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED: + frm_type = MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED; + break; case ACTION_CATEGORY_FST: frm_type = mgmt_get_fst_action_subtype(action_hdr->action_code); break; From aa5072728480790d33ab5f6bccfd032a6d8febf2 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Tue, 6 Apr 2021 14:36:37 +0530 Subject: [PATCH 2/9] qcacmn: Update mgmt action category Host updates newly added action categories in enum mgmt_action_category. Change-Id: I86048f59a6a3917685c18f07b6cb103fc809837f CRs-Fixed: 3262361 --- .../dispatcher/inc/wlan_mgmt_txrx_utils_api.h | 22 ++++++++++++ .../dispatcher/src/wlan_mgmt_txrx_utils_api.c | 34 +++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h index a21b81dc1ea1..abf95dbc1ea0 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h +++ b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h @@ -116,6 +116,14 @@ enum mgmt_subtype { * @ACTION_CATEGORY_RVS: robust av streaming action category * @ACTION_CATEGORY_UNPROT_DMG: dmg action category * @ACTION_CATEGORY_VHT: vht action category + * @ACTION_CATEGORY_USIG: Unprotected S1G Action frame + * @ACTION_CATEGORY_SIG: S1G Action frame + * @ACTION_CATEGORY_FLOW_CONTROL: Flow Control Action frame + * @ACTION_CATEGORY_CONTROL_RSP_MCS_NEGO: Control Response MCS Negotiation frame + * @ACTION_CATEGORY_FIL: FILS Action frame + * @ACTION_CATEGORY_CDMG: CDMG Action frame + * @ACTION_CATEGORY_CMMG: CMMG Action frame + * @ACTION_CATEGORY_GLK: GLK Action frame * @ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED: vendor specific protected * action category * @ACTION_CATEGORY_VENDOR_SPECIFIC: vendor specific action category @@ -144,6 +152,13 @@ enum mgmt_action_category { ACTION_CATEGORY_UNPROT_DMG = 20, ACTION_CATEGORY_VHT = 21, ACTION_CATEGORY_USIG = 22, + ACTION_CATEGORY_SIG = 23, + ACTION_CATEGORY_FLOW_CONTROL = 24, + ACTION_CATEGORY_CONTROL_RSP_MCS_NEGO = 25, + ACTION_CATEGORY_FILS = 26, + ACTION_CATEGORY_CDMG = 27, + ACTION_CATEGORY_CMMG = 28, + ACTION_CATEGORY_GLK = 29, ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, ACTION_CATEGORY_VENDOR_SPECIFIC = 127, }; @@ -912,6 +927,13 @@ QDF_STATUS wlan_mgmt_txrx_mgmt_frame_tx(struct wlan_objmgr_peer *peer, mgmt_ota_comp_cb tx_ota_comp_cb, enum wlan_umac_comp_id comp_id, void *mgmt_tx_params); +/** + * wlan_mgmt_is_rmf_mgmt_action_frame() - API to check action category is rmf + * @action_category: action category to check + * + * Return: true if action category is rmf else false + */ +bool wlan_mgmt_is_rmf_mgmt_action_frame(uint8_t action_category); /** * wlan_mgmt_txrx_beacon_frame_tx() - transmits mgmt. beacon diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_utils_api.c b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_utils_api.c index efb9e0a97700..c4775f3ac523 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_utils_api.c +++ b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_utils_api.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 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 @@ -505,6 +506,39 @@ QDF_STATUS wlan_mgmt_txrx_beacon_frame_tx(struct wlan_objmgr_peer *peer, return QDF_STATUS_SUCCESS; } +bool wlan_mgmt_is_rmf_mgmt_action_frame(uint8_t action_category) +{ + switch (action_category) { + case ACTION_CATEGORY_SPECTRUM_MGMT: + case ACTION_CATEGORY_QOS: + case ACTION_CATEGORY_DLS: + case ACTION_CATEGORY_BACK: + case ACTION_CATEGORY_RRM: + case ACTION_FAST_BSS_TRNST: + case ACTION_CATEGORY_SA_QUERY: + case ACTION_CATEGORY_PROTECTED_DUAL_OF_PUBLIC_ACTION: + case ACTION_CATEGORY_WNM: + case ACTION_CATEGORY_MESH_ACTION: + case ACTION_CATEGORY_MULTIHOP_ACTION: + case ACTION_CATEGORY_DMG: + case ACTION_CATEGORY_FST: + case ACTION_CATEGORY_RVS: + case ACTION_CATEGORY_SIG: + case ACTION_CATEGORY_FLOW_CONTROL: + case ACTION_CATEGORY_CONTROL_RSP_MCS_NEGO: + case ACTION_CATEGORY_FILS: + case ACTION_CATEGORY_CDMG: + case ACTION_CATEGORY_CMMG: + case ACTION_CATEGORY_GLK: + case ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED: + return true; + default: + break; + } + + return false; +} + #ifdef WLAN_SUPPORT_FILS QDF_STATUS wlan_mgmt_txrx_fd_action_frame_tx(struct wlan_objmgr_vdev *vdev, From d1bea0a4f9d4ca3917511d94876d9034735d99f2 Mon Sep 17 00:00:00 2001 From: Srikanth Marepalli Date: Tue, 22 Nov 2022 20:32:10 +0530 Subject: [PATCH 3/9] qcacmn: A vendor roam control configuration for delaying hand off for RX Introduce a run time roam configuration for "hand off delay for RX". This value, in milliseconds, will delay the hand off for the specified time to receive pending RX frames from the current BSS. Change-Id: I961109a2f9287a611ae8f4b38e2ea824ecf9c559 CRs-Fixed: 3329952 --- os_if/linux/qca_vendor.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h index 5474aa81b2fa..72ad0ddc2d01 100644 --- a/os_if/linux/qca_vendor.h +++ b/os_if/linux/qca_vendor.h @@ -3241,6 +3241,10 @@ enum qca_vendor_attr_roam_candidate_selection_criteria { * threshold value specified by the * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD attribute shall be used. * + * @QCA_ATTR_ROAM_CONTROL_HO_DELAY_FOR_RX: u16 value in milliseconds. + * Optional parameter. This configuration delays hand-off (in msec) by the + * specified duration to receive pending rx frames from current BSS. + * */ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_ENABLE = 1, @@ -3259,6 +3263,7 @@ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_2P4GHZ = 14, QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_5GHZ = 15, QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_6GHZ = 16, + QCA_ATTR_ROAM_CONTROL_HO_DELAY_FOR_RX = 25, /* keep last */ QCA_ATTR_ROAM_CONTROL_AFTER_LAST, From dee1030535cd88b4442139f609bee75234f225e8 Mon Sep 17 00:00:00 2001 From: Srikanth Marepalli Date: Tue, 22 Nov 2022 20:37:12 +0530 Subject: [PATCH 4/9] qcacmn: Add a vendor attribute for roam control configuration for full scan During the roam scan, if there are no desired APs found in the partial frequency list, an immediate full scan on all the supported frequencies is initiated as a fallback. This flag controls the frequency list creation for full scan on the following lines. 1 - Full scan to exclude the frequencies that were already scanned by the previous partial scan. 0 - Full scan to include all the supported frequencies irrespective of the ones already scanned by partial scan. Change-Id: Id48ae28e6d0e719b9db9b2e73bd76f9be1ea0b3e CRs-Fixed: 3343567 --- os_if/linux/qca_vendor.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h index 72ad0ddc2d01..f91b3883a940 100644 --- a/os_if/linux/qca_vendor.h +++ b/os_if/linux/qca_vendor.h @@ -3245,6 +3245,19 @@ enum qca_vendor_attr_roam_candidate_selection_criteria { * Optional parameter. This configuration delays hand-off (in msec) by the * specified duration to receive pending rx frames from current BSS. * + * @QCA_ATTR_ROAM_CONTROL_FULL_SCAN_NO_REUSE_PARTIAL_SCAN_FREQ: Unsigned 8-bit + * value. + * During the roam scan, if there are no desired APs found in the partial + * frequency list, an immediate full scan on all the supported frequencies + * is initiated as a fallback. This flag controls the frequency list + * creation for the full scan on the following lines. + * 1 - Full scan to exclude the frequencies that were already scanned by + * the previous partial scan. + * 0 - Full scan to include all the supported frequencies irrespective of + * the ones part of the earlier partial scan. + * If this flag is not specified, a full scan shall include all the + * supported frequencies irrespective of the ones part of an earlier + * partial scan. */ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_ENABLE = 1, @@ -3264,6 +3277,7 @@ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_5GHZ = 15, QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_6GHZ = 16, QCA_ATTR_ROAM_CONTROL_HO_DELAY_FOR_RX = 25, + QCA_ATTR_ROAM_CONTROL_FULL_SCAN_NO_REUSE_PARTIAL_SCAN_FREQ = 26, /* keep last */ QCA_ATTR_ROAM_CONTROL_AFTER_LAST, From 89ac6b73045ffb11e9e42272504f1088354abba7 Mon Sep 17 00:00:00 2001 From: Rahul Gusain Date: Thu, 13 Jan 2022 20:54:14 +0530 Subject: [PATCH 5/9] qcacmn: Send fils discovery template to wmi layer Add support to send Fils discovery template via target if Add func to compute shortssid with the help of shortssid table Change-Id: I78fa50641ee5ae0c338719c4cec91573a212f396 CRs-Fixed: 3114903 --- .../vdev_mgr/inc/target_if_vdev_mgr_tx_ops.h | 12 +++++ .../vdev_mgr/src/target_if_vdev_mgr_tx_ops.c | 25 ++++++++- .../cmn_defs/inc/wlan_cmn_ieee80211.h | 52 +++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/target_if/mlme/vdev_mgr/inc/target_if_vdev_mgr_tx_ops.h b/target_if/mlme/vdev_mgr/inc/target_if_vdev_mgr_tx_ops.h index ea9bae8f80d9..9029b456b9e4 100644 --- a/target_if/mlme/vdev_mgr/inc/target_if_vdev_mgr_tx_ops.h +++ b/target_if/mlme/vdev_mgr/inc/target_if_vdev_mgr_tx_ops.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 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 @@ -69,6 +70,17 @@ target_if_vdev_mgr_get_tx_ops(struct wlan_objmgr_psoc *psoc) QDF_STATUS target_if_vdev_mgr_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); +/** + * target_if_vdev_mgr_send_fd_tmpl() - sends fils discovery template + * to wmi layer. + * @vdev: pointer to wlan objmgr vdev. + * @param: pointer to fils discovery template parameter + * + * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error + */ +QDF_STATUS target_if_vdev_mgr_send_fd_tmpl(struct wlan_objmgr_vdev *vdev, + struct fils_discovery_tmpl_params *param); + /** * target_if_vdev_mgr_assert_mgmt() - vdev assert mgmt api * @PSOC: pointer to objmgr psoc diff --git a/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c b/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c index 9a11d133f947..251b713ceb26 100644 --- a/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c +++ b/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 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 @@ -363,11 +364,11 @@ static QDF_STATUS target_if_vdev_mgr_set_param_send( mlme_err("Failed to get WMI handle!"); return QDF_STATUS_E_INVAL; } + param_id = target_if_vdev_mlme_id_2_wmi(param->param_id); param->param_id = param_id; if (param->param_id == wmi_vdev_param_txbf) param->param_value = target_if_vdev_mlme_build_txbf_caps(vdev); - status = wmi_unified_vdev_set_param_send(wmi_handle, param); return status; @@ -717,6 +718,28 @@ static QDF_STATUS target_if_vdev_mgr_beacon_tmpl_send( return status; } +QDF_STATUS target_if_vdev_mgr_send_fd_tmpl(struct wlan_objmgr_vdev *vdev, + struct fils_discovery_tmpl_params *param) +{ + QDF_STATUS status; + struct wmi_unified *wmi_handle; + + if (!vdev || !param) { + mlme_err("Invalid input"); + return QDF_STATUS_E_INVAL; + } + + wmi_handle = target_if_vdev_mgr_wmi_handle_get(vdev); + if (!wmi_handle) { + mlme_err("Failed to get WMI handle!"); + return QDF_STATUS_E_INVAL; + } + + status = wmi_unified_fd_tmpl_send_cmd(wmi_handle, param); + + return status; +} + static QDF_STATUS target_if_vdev_mgr_set_nac_rssi_send( struct wlan_objmgr_vdev *vdev, struct vdev_scan_nac_rssi_params *param) diff --git a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h index 24e7466ce7ef..e0c794255ee6 100644 --- a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h +++ b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h @@ -151,9 +151,14 @@ */ #define WLAN_TPE_IE_MAX_LEN 9 +#define WLAN_TPE_IE_MIN_LEN 2 +#define WLAN_MAX_NUM_TPE_IE 8 /* Max channel switch time IE length */ #define WLAN_MAX_CHAN_SWITCH_TIME_IE_LEN 4 +/* Length of Timestamp field */ +#define WLAN_TIMESTAMP_LEN 8 + /* HT capability flags */ #define WLAN_HTCAP_C_ADVCODING 0x0001 #define WLAN_HTCAP_C_CHWIDTH40 0x0002 @@ -912,6 +917,53 @@ enum wlan_status_code { #define RSN_CAP_MFP_CAPABLE 0x80 #define RSN_CAP_MFP_REQUIRED 0x40 +/* FILS Discovery */ +#define WLAN_ACTION_FILS_DISCOVERY 34 +#define WLAN_FD_FRAMECNTL_CAP 0x0020 +#define WLAN_FD_FRAMECNTL_SHORTSSID 0x0040 +#define WLAN_FD_FRAMECNTL_CH_CENTERFREQ 0x0200 +#define WLAN_FD_FRAMECNTL_LEN_PRES 0x1000 +#define WLAN_FD_FRAMECNTL_SHORTSSID_LEN 0x0003 + +#define WLAN_FD_SSID_LEN_PRES(_v) ((_v) & 0x1F) +#define WLAN_FD_IS_CAP_PRESENT(_v) ((_v) & WLAN_FD_FRAMECNTL_CAP) +#define WLAN_FD_IS_LEN_PRESENT(_v) ((_v) & WLAN_FD_FRAMECNTL_LEN_PRES) +#define WLAN_FD_IS_FRAMECNTL_CH_CENTERFREQ(_v)\ + ((_v) & WLAN_FD_FRAMECNTL_CH_CENTERFREQ) + +#define WLAN_FD_CAP_LEN 2 +#define WLAN_FD_CAP_ESS_S 0 +#define WLAN_FD_CAP_PRIVACY_S 1 +#define WLAN_FD_CAP_BSS_CHWIDTH_S 2 +#define WLAN_FD_CAP_NSS_S 5 +#define WLAN_FD_CAP_PHY_INDEX_S 2 +#define WLAN_FD_CAP_MIN_RATE_S 5 + +#define WLAN_FD_CHWIDTH_20 0 +#define WLAN_FD_CHWIDTH_40 1 +#define WLAN_FD_CHWIDTH_80 2 +#define WLAN_FD_CHWIDTH_160_80_80 3 +#define WLAN_FD_CHWIDTH_320 4 + +#define WLAN_FD_CAP_NSS_GTE_5 4 +#define WLAN_FD_CAP_NSS_MODE_1 1 +#define WLAN_FD_CAP_NSS_MODE_2 2 +#define WLAN_FD_CAP_NSS_MODE_3 3 +#define WLAN_FD_CAP_NSS_MODE_4 4 +#define WLAN_FD_CAP_NSS_MODE_5 5 +#define WLAN_FD_CAP_NSS_MODE_6 6 +#define WLAN_FD_CAP_NSS_MODE_7 7 +#define WLAN_FD_CAP_NSS_MODE_8 8 + +#define WLAN_FD_CAP_ESS_ENABLE 1 + +#define WLAN_FD_CAP_PHY_INDEX_NON_HT_OFDM 1 +#define WLAN_FD_CAP_PHY_INDEX_HT 2 +#define WLAN_FD_CAP_PHY_INDEX_VHT 3 +#define WLAN_FD_CAP_PHY_INDEX_HE 4 + +#define WLAN_FD_CAP_MIN_RATE 0 + /** * struct element_info - defines length of a memory block and memory block * @len: length of memory block From 85175c4313a9c2861327c373e54f969dd119af4b Mon Sep 17 00:00:00 2001 From: Srikanth Marepalli Date: Wed, 30 Nov 2022 14:55:19 +0530 Subject: [PATCH 6/9] qcacmn: Roam control configuration for 6 GHz in full scan only on prior discovery During the roam scan, if there are no desired APs found in the partial frequency list, an immediate full scan on all the supported frequencies is initiated as a fallback. This would include the 6 GHz PSC frequencies. Define an attribute to allow that behavior to be modified to include PSCs only if 6 GHz use has been detected. Change-Id: I81eb9b20c2953e6b0dbf4138b31547db82d7397f CRs-Fixed: 3351706 --- os_if/linux/qca_vendor.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h index f91b3883a940..0b785ab44324 100644 --- a/os_if/linux/qca_vendor.h +++ b/os_if/linux/qca_vendor.h @@ -3258,6 +3258,24 @@ enum qca_vendor_attr_roam_candidate_selection_criteria { * If this flag is not specified, a full scan shall include all the * supported frequencies irrespective of the ones part of an earlier * partial scan. + * + * @QCA_ATTR_ROAM_CONTROL_FULL_SCAN_6GHZ_ONLY_ON_PRIOR_DISCOVERY: Unsigned 8-bit + * value. + * During the roam scan, if there are no desired APs found in the partial + * frequency list, an immediate full scan on all the supported frequencies + * is initiated as a fallback. This full scan would add the 2.4/5/6 GHz + * frequencies, including all PSC frequencies by default. This attribute + * controls the inclusion of the 6 GHz PSC frequencies for the full scan + * as following. + * 1 - Full scan to include the supported 6 GHz PSC frequencies only on the + * prior discovery of any 6 GHz frequency support in the environment. + * This discovery can happen through a prior RNR, 11k neighbor + * request, 11v BTM request, host scan, etc. + * 0 - Default behavior. Full scan to include all the supported 6 GHz + * PSC frequencies regardless of whether 6 GHz BSSs have been + * discovered. + * The default behavior if this flag is not specified is to include all + * the supported 6 GHz PSC frequencies in the roam full scan. */ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_ENABLE = 1, @@ -3278,6 +3296,7 @@ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_6GHZ = 16, QCA_ATTR_ROAM_CONTROL_HO_DELAY_FOR_RX = 25, QCA_ATTR_ROAM_CONTROL_FULL_SCAN_NO_REUSE_PARTIAL_SCAN_FREQ = 26, + QCA_ATTR_ROAM_CONTROL_FULL_SCAN_6GHZ_ONLY_ON_PRIOR_DISCOVERY = 27, /* keep last */ QCA_ATTR_ROAM_CONTROL_AFTER_LAST, From f69cbbc2e7e5630fb82cd72cad33f4fe7c8cf2e9 Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Fri, 25 Nov 2022 11:51:27 +0530 Subject: [PATCH 7/9] qcacmn: Fix FILS Discovery rx frames capture in packet capture mode Currently the FILS Discovery rx frames are dropped in tgt_mgmt_txrx_rx_frame_handler considering them as unspecified packets as action category for FILS Discovery is not defined. Define FILS Discovery action category so that the FILS Discovery will not be considered as unspecified frames and dropped while processing. Change-Id: I72398caf3cbb1f7d53d5f97da9d1997af2b33595 CRs-Fixed: 3346195 --- .../dispatcher/inc/wlan_mgmt_txrx_utils_api.h | 21 ++++++++++++++----- .../dispatcher/src/wlan_mgmt_txrx_tgt_api.c | 5 ++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h index abf95dbc1ea0..3d800b2ada4b 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h +++ b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-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 @@ -120,7 +120,7 @@ enum mgmt_subtype { * @ACTION_CATEGORY_SIG: S1G Action frame * @ACTION_CATEGORY_FLOW_CONTROL: Flow Control Action frame * @ACTION_CATEGORY_CONTROL_RSP_MCS_NEGO: Control Response MCS Negotiation frame - * @ACTION_CATEGORY_FIL: FILS Action frame + * @ACTION_CATEGORY_FILS: FILS Action frame * @ACTION_CATEGORY_CDMG: CDMG Action frame * @ACTION_CATEGORY_CMMG: CMMG Action frame * @ACTION_CATEGORY_GLK: GLK Action frame @@ -231,7 +231,8 @@ enum block_ack_actioncode { * @PUB_ACTION_GAS_COMEBACK_RESPONSE: GAS comeback respose action frame * @PUB_ACTION_TDLS_DISCRESP: tdls discovery response public action frame * @PUB_ACTION_FTM_REQUEST: FTM request action frame - * @PUB_ACTION_FTM_RESPONSE: FTM respose action frame + * @PUB_ACTION_FTM_RESPONSE: FTM response action frame + * @PUB_ACTION_FILS_DISCOVERY: FILS Discovery action frame */ enum pub_actioncode { PUB_ACTION_2040_BSS_COEXISTENCE = 0, @@ -244,6 +245,7 @@ enum pub_actioncode { PUB_ACTION_TDLS_DISCRESP = 14, PUB_ACTION_FTM_REQUEST = 32, PUB_ACTION_FTM_RESPONSE = 33, + PUB_ACTION_FILS_DISCOVERY = 34, }; /** @@ -371,6 +373,7 @@ enum wnm_actioncode { * @TDLS_PEER_PSM_RESPONSE: tdls peer psm response frame * @TDLS_PEER_TRAFFIC_RESPONSE: tdls peer traffic response frame * @TDLS_DISCOVERY_REQUEST: tdls discovery request frame + * @TDLS_DISCOVERY_RESPONSE: tdls discovery response frame */ enum tdls_actioncode { TDLS_SETUP_REQUEST = 0, @@ -496,6 +499,7 @@ enum vht_actioncode { /** * enum twt_actioncode - twt action frames * @TWT_SETUP: twt set up action frame + * @TWT_TEARDOWN: twt teardown action frame * @TWT_INFORMATION: twt information action frame */ enum twt_actioncode { @@ -557,6 +561,10 @@ struct action_frm_hdr { * @MGMT_ACTION_RRM_LINK_MEASUREMENT_RPT: rrm link meas. report action frame * @MGMT_ACTION_RRM_NEIGHBOR_REQ: rrm neighbor request action frame * @MGMT_ACTION_RRM_NEIGHBOR_RPT: rrm neighbor response action frame + * @MGMT_ACTION_FT_REQUEST: ft request action frame + * @MGMT_ACTION_FT_RESPONSE: ft response action frame + * @MGMT_ACTION_FT_CONFIRM: ft confirm action frame + * @MGMT_ACTION_FT_ACK: ft ack action frame * @MGMT_ACTION_HT_NOTIFY_CHANWIDTH: notify channel width action frame * @MGMT_ACTION_HT_SMPS: spatial multiplexing power save action frame * @MGMT_ACTION_HT_PSMP: psmp action frame @@ -623,7 +631,7 @@ struct action_frm_hdr { * @MGMT_ACTION_GAS_COMEBACK_REQUEST: GAS Comeback request action frame * @MGMT_ACTION_GAS_COMEBACK_RESPONSE: GAS Comeback response action frame * @MGMT_ACTION_FST_SETUP_REQ: FST setup request frame - * @MGMT_ACTION_FST_SETUP_RSPA: FST setup response frame + * @MGMT_ACTION_FST_SETUP_RSP: FST setup response frame * @MGMT_ACTION_FST_TEAR_DOWN: FST qos teardown frame * @MGMT_ACTION_FST_ACK_REQ: FST ack frame for request * @MGMT_ACTION_FST_ACK_RSP: FST ack frame for response @@ -641,6 +649,7 @@ struct action_frm_hdr { * @MGMT_ACTION_TWT_INFORMATION: TWT information frame * @MGMT_ACTION_FTM_REQUEST: FTM request frame * @MGMT_ACTION_FTM_RESPONSE: FTM response frame + * @MGMT_ACTION_FILS_DISCOVERY: FILS Discovery frame * @MGMT_MAX_FRAME_TYPE: max. mgmt frame types */ enum mgmt_frame_type { @@ -772,6 +781,7 @@ enum mgmt_frame_type { MGMT_ACTION_TWT_INFORMATION, MGMT_ACTION_FTM_REQUEST, MGMT_ACTION_FTM_RESPONSE, + MGMT_ACTION_FILS_DISCOVERY, MGMT_MAX_FRAME_TYPE, }; @@ -784,7 +794,7 @@ enum mgmt_frame_type { * @chan_freq: channel frequency on which this frame is received * @channel: channel on which this frame is received * @snr: snr information used to call rssi - * @rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain + * @rssi_ctl: RSSI of PRI 20MHz for each chain * @rate: Rate kbps * @phy_mode: rx phy mode * @buf_len: length of the frame @@ -793,6 +803,7 @@ enum mgmt_frame_type { * scan source for a scan result mgmt frame * @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units) * @tsf_delta: tsf delta + * @tsf_l32: tsf value * @pdev_id: pdev id * @rx_params: pointer to other rx params * (win specific, will be removed in phase 4) diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c index da099001d44e..6c16f2aaa632 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c +++ b/umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_tgt_api.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-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 @@ -216,6 +216,9 @@ mgmt_get_public_action_subtype(uint8_t action_code) case PUB_ACTION_FTM_RESPONSE: frm_type = MGMT_ACTION_FTM_RESPONSE; break; + case PUB_ACTION_FILS_DISCOVERY: + frm_type = MGMT_ACTION_FILS_DISCOVERY; + break; default: frm_type = MGMT_FRM_UNSPECIFIED; break; From 2a7bc9c287ba50e7dd21e7c4e2fd8fe9099ff035 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Tue, 28 Sep 2021 14:31:41 -0700 Subject: [PATCH 8/9] qcacmn: Remove logic to enable/disable wake msi for drv systems Remove logic to enable/disable wake msi for drv systems. Today, during WoW suspend sequence, between hif pci bus suspend and hif pci bus suspend no irq, wake msi is getting disable temporarily. In case fw toggles wake msi during this period, then the wake msi is lost, which can lead to device not waking up for fw triggered wakeup. Add the fix to remove enable/disable wake msi from suspend/resume path and keep wake msi always enabled. Change-Id: Idad0805f66ead4079d67577fa1151f73567511a3 CRs-Fixed: 3042261 --- hif/src/dispatcher/multibus.c | 3 +-- hif/src/hif_main.c | 6 ++---- hif/src/pcie/if_pci.c | 5 +---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/hif/src/dispatcher/multibus.c b/hif/src/dispatcher/multibus.c index 49e880bf23f3..210d41d40b31 100644 --- a/hif/src/dispatcher/multibus.c +++ b/hif/src/dispatcher/multibus.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2018, 2020-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 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 @@ -477,7 +478,6 @@ int hif_apps_irqs_disable(struct hif_opaque_softc *hif_ctx) return -EINVAL; /* if the wake_irq is shared, don't disable it twice */ - disable_irq(scn->wake_irq); for (i = 0; i < scn->ce_count; ++i) { int irq = scn->bus_ops.hif_map_ce_to_irq(scn, i); @@ -499,7 +499,6 @@ int hif_apps_irqs_enable(struct hif_opaque_softc *hif_ctx) return -EINVAL; /* if the wake_irq is shared, don't enable it twice */ - enable_irq(scn->wake_irq); for (i = 0; i < scn->ce_count; ++i) { int irq = scn->bus_ops.hif_map_ce_to_irq(scn, i); diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 83ac8f2f749c..5ef1f3beafad 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -2047,10 +2047,8 @@ irqreturn_t hif_wake_interrupt_handler(int irq, void *context) hif_info("wake interrupt received on irq %d", irq); - if (hif_pm_runtime_get_monitor_wake_intr(hif_ctx)) { - hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0); - hif_pm_runtime_request_resume(hif_ctx); - } + hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0); + hif_pm_runtime_request_resume(hif_ctx); if (scn->initial_wakeup_cb) scn->initial_wakeup_cb(scn->initial_wakeup_priv); diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 4ad1e7ad3777..ee5f297e9789 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 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 @@ -2403,8 +2404,6 @@ int hif_pci_bus_suspend_noirq(struct hif_softc *scn) if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn))) qdf_atomic_set(&scn->link_suspended, 1); - hif_apps_wake_irq_enable(GET_HIF_OPAQUE_HDL(scn)); - return 0; } @@ -2419,8 +2418,6 @@ int hif_pci_bus_suspend_noirq(struct hif_softc *scn) */ int hif_pci_bus_resume_noirq(struct hif_softc *scn) { - hif_apps_wake_irq_disable(GET_HIF_OPAQUE_HDL(scn)); - /* a vote for link up can come in the middle of the ongoing resume * process. hence, clear the link suspend flag once * hif_bus_resume_noirq() succeeds since PCIe link is already resumed From 6bffceddfc20920d97914808011ad7c544fbe2c2 Mon Sep 17 00:00:00 2001 From: chunquan Date: Sun, 4 Dec 2022 12:32:26 +0800 Subject: [PATCH 9/9] qcacmn: Realloc memory for wmi_service_ext_bitmap Realloc memory for wmi_service_ext_bitmap when WMI_SERVICE_AVAILABLE_EVENTID event come, and the num of wmi_service_ext_bitmap large then previous num. Change-Id: I2800fe3274e5516369486ef065ce03ba121bd5b3 CRs-Fixed: 3346739 --- wmi/inc/wmi_unified_priv.h | 2 ++ wmi/src/wmi_unified_tlv.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index ba47388218c6..c4e30c9bacd2 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 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 @@ -2653,6 +2654,7 @@ struct wmi_soc { /* WMI service bitmap received from target */ uint32_t *wmi_service_bitmap; uint32_t *wmi_ext_service_bitmap; + uint32_t wmi_ext2_service_bitmap_len; uint32_t *wmi_ext2_service_bitmap; uint32_t services[wmi_services_max]; uint16_t wmi_max_cmds; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index fb8e13a9fa61..87970b76af27 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-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 @@ -9685,12 +9685,21 @@ QDF_STATUS save_ext_service_bitmap_tlv(wmi_unified_t wmi_handle, void *evt_buf, return QDF_STATUS_SUCCESS; } - if (!soc->wmi_ext2_service_bitmap) { + if (!soc->wmi_ext2_service_bitmap || + (param_buf->num_wmi_service_ext_bitmap > + soc->wmi_ext2_service_bitmap_len)) { + if (soc->wmi_ext2_service_bitmap) { + qdf_mem_free(soc->wmi_ext2_service_bitmap); + soc->wmi_ext2_service_bitmap = NULL; + } soc->wmi_ext2_service_bitmap = qdf_mem_malloc(param_buf->num_wmi_service_ext_bitmap * sizeof(uint32_t)); if (!soc->wmi_ext2_service_bitmap) return QDF_STATUS_E_NOMEM; + + soc->wmi_ext2_service_bitmap_len = + param_buf->num_wmi_service_ext_bitmap; } qdf_mem_copy(soc->wmi_ext2_service_bitmap,