diff options
author | Hsiu-Chang Chen <hsiuchangchen@google.com> | 2021-11-18 11:47:40 +0530 |
---|---|---|
committer | Hsiu-Chang Chen <hsiuchangchen@google.com> | 2022-06-05 10:30:54 +0000 |
commit | 298d56ed90c98cccc453e3671ae5895115bdd9ee (patch) | |
tree | c5a449666ebaeea96a17c2a6375da7ff0a062ee8 | |
parent | f5e4732af172f8261206050495f71de8f82e7d65 (diff) | |
download | wlan-298d56ed90c98cccc453e3671ae5895115bdd9ee.tar.gz |
wifi_hal: update qca-vendor_copy.h
This commit updates qca-vendor_copy.h to latest qca-vendor.h as
specified on Dec 23, 2021 at
https://w1.fi/cgit/hostap/tree/src/common/qca-vendor.h.
Bug: 232681785
Test: halutil -coex
Change-Id: I7648c4888d5677a32f59b58984b16cf8c16929fe
CRs-Fixed: 3108043
-rw-r--r-- | qcwcn/wifi_hal/qca-vendor_copy.h | 2080 |
1 files changed, 2027 insertions, 53 deletions
diff --git a/qcwcn/wifi_hal/qca-vendor_copy.h b/qcwcn/wifi_hal/qca-vendor_copy.h index 11442ee..24a31a3 100644 --- a/qcwcn/wifi_hal/qca-vendor_copy.h +++ b/qcwcn/wifi_hal/qca-vendor_copy.h @@ -1,10 +1,7 @@ /* * Qualcomm Atheros OUI and vendor specific assignments * Copyright (c) 2014-2017, Qualcomm Atheros, Inc. - * Copyright (c) 2018-2019, The Linux Foundation - * - * This software may be distributed under the terms of the BSD license. - * See README for more details. + * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #ifndef QCA_VENDOR_H @@ -512,7 +509,9 @@ enum qca_radiotap_vendor_ids { * @QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG: This command is used to * configure parameters per peer to capture Channel Frequency Response * (CFR) and enable Periodic CFR capture. The attributes for this command - * are defined in enum qca_wlan_vendor_peer_cfr_capture_attr. + * are defined in enum qca_wlan_vendor_peer_cfr_capture_attr. This command + * can also be used to send CFR data from the driver to userspace when + * netlink events are used to send CFR data. * * @QCA_NL80211_VENDOR_SUBCMD_THROUGHPUT_CHANGE_EVENT: Event to indicate changes * in throughput dynamically. The driver estimates the throughput based on @@ -620,7 +619,14 @@ enum qca_radiotap_vendor_ids { * This new command is alternative to existing command * QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY since existing command/event * is using stream of bytes instead of structured data using vendor - * attributes. + * attributes. User space sends unsafe frequency ranges to the driver using + * a nested attribute %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_RANGE. On + * reception of this command, the driver shall check if an interface is + * operating on an unsafe frequency and the driver shall try to move to a + * safe channel when needed. If the driver is not able to find a safe + * channel the interface can keep operating on an unsafe channel with the + * TX power limit derived based on internal configurations like + * regulatory/SAR rules. * * @QCA_NL80211_VENDOR_SUBCMD_ADD_STA_NODE: This vendor subcommand is used to * add the STA node details in driver/firmware. Attributes for this event @@ -664,36 +670,95 @@ enum qca_radiotap_vendor_ids { * qca_wlan_vendor_attr_driver_disconnect_reason. * * @QCA_NL80211_VENDOR_SUBCMD_CONFIG_TSPEC: This vendor subcommand is used to - * add/delete TSPEC for each AC. One command is for one specific AC only. - * This command can only be used in STA mode and the STA must be - * associated with an AP when the command is issued. Uses attributes - * defined in enum qca_wlan_vendor_attr_config_tspec. + * add/delete TSPEC for each AC. One command is for one specific AC only. + * This command can only be used in STA mode and the STA must be + * associated with an AP when the command is issued. Uses attributes + * defined in enum qca_wlan_vendor_attr_config_tspec. * * @QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT: Vendor subcommand to configure TWT. - * Uses attributes defined in enum qca_wlan_vendor_attr_config_twt. + * Uses attributes defined in enum qca_wlan_vendor_attr_config_twt. * * @QCA_NL80211_VENDOR_SUBCMD_GETBAND: Command to get the enabled band(s) from - * the driver. The band configurations obtained are referred through - * QCA_WLAN_VENDOR_ATTR_SETBAND_MASK. + * the driver. The band configurations obtained are referred through + * QCA_WLAN_VENDOR_ATTR_SETBAND_MASK. * * @QCA_NL80211_VENDOR_SUBCMD_MEDIUM_ASSESS: Vendor subcommand/event for medium - * assessment. - * Uses attributes defined in enum qca_wlan_vendor_attr_medium_assess. + * assessment. + * Uses attributes defined in enum qca_wlan_vendor_attr_medium_assess. * * @QCA_NL80211_VENDOR_SUBCMD_UPDATE_SSID: This acts as a vendor event and is - * used to update SSID information in hostapd when it is updated in the - * driver. Uses the attribute NL80211_ATTR_SSID. + * used to update SSID information in hostapd when it is updated in the + * driver. Uses the attribute NL80211_ATTR_SSID. * * @QCA_NL80211_VENDOR_SUBCMD_WIFI_FW_STATS: This vendor subcommand is used by - * the driver to send opaque data from the firmware to userspace. The - * driver sends an event to userspace whenever such data is received from - * the firmware. - * - * QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA is used as the attribute to - * send this opaque data for this event. - * - * The format of the opaque data is specific to the particular firmware - * version and there is no guarantee of the format remaining same. + * the driver to send opaque data from the firmware to userspace. The + * driver sends an event to userspace whenever such data is received from + * the firmware. + * + * QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA is used as the attribute to + * send this opaque data for this event. + * + * The format of the opaque data is specific to the particular firmware + * version and there is no guarantee of the format remaining same. + * + * @QCA_NL80211_VENDOR_SUBCMD_MBSSID_TX_VDEV_STATUS: This acts as an event. + * The host driver selects Tx VDEV, and notifies user. The attributes + * used with this event are defined in enum + * qca_wlan_vendor_attr_mbssid_tx_vdev_status. + * This event contains Tx VDEV group information, other VDEVs + * interface index, and status information. + * + * @QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_MULTI_STA_POLICY: Vendor command to + * configure the concurrent session policies when multiple STA interfaces + * are (getting) active. The attributes used by this command are defined + * in enum qca_wlan_vendor_attr_concurrent_sta_policy. + * + * @QCA_NL80211_VENDOR_SUBCMD_USABLE_CHANNELS: Userspace can use this command + * to query usable channels for different interface types such as STA, + * AP, P2P GO, P2P Client, NAN, etc. The driver shall report all usable + * channels in the response based on country code, different static + * configurations, concurrency combinations, etc. The attributes used + * with this command are defined in + * enum qca_wlan_vendor_attr_usable_channels. + * + * @QCA_NL80211_VENDOR_SUBCMD_GET_RADAR_HISTORY: This vendor subcommand is used + * to get DFS radar history from the driver to userspace. The driver + * returns QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_ENTRIES attribute with an + * array of nested entries. + * + * @QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD: Userspace can use this command to + * enable/disable mDNS offload to the firmware. The attributes used with + * this command are defined in enum qca_wlan_vendor_attr_mdns_offload. + * + * @QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE: This vendor subcommand is used + * to set packet monitor mode that aims to send the specified set of TX and + * RX frames on the current client interface to an active monitor + * interface. If this monitor mode is set, the driver will send the + * configured frames, from the interface on which the command is issued, to + * an active monitor interface. The attributes used with this command are + * defined in enum qca_wlan_vendor_attr_set_monitor_mode. + * + * Though the monitor mode is configured for the respective + * Data/Management/Control frames, it is up to the respective WLAN + * driver/firmware/hardware designs to consider the possibility of sending + * these frames over the monitor interface. For example, the Control frames + * are handled within the hardware and thus passing such frames over the + * monitor interface is left to the respective designs. + * + * Also, this monitor mode is governed to behave accordingly in + * suspend/resume states. If the firmware handles any of such frames in + * suspend state without waking up the host and if the monitor mode is + * configured to notify all such frames, the firmware is expected to resume + * the host and forward the respective frames to the monitor interface. + * Please note that such a request to get the frames over the monitor + * interface will have a definite power implication. + * + * @QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS: This vendor subcommand is used both + * as a request to set the driver/firmware with the parameters to trigger + * the roaming events, and also used by the driver/firmware to pass on the + * various roam events to userspace. + * Applicable only for the STA mode. The attributes used with this command + * are defined in enum qca_wlan_vendor_attr_roam_events. */ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0, @@ -879,6 +944,14 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_MEDIUM_ASSESS = 193, QCA_NL80211_VENDOR_SUBCMD_UPDATE_SSID = 194, QCA_NL80211_VENDOR_SUBCMD_WIFI_FW_STATS = 195, + QCA_NL80211_VENDOR_SUBCMD_MBSSID_TX_VDEV_STATUS = 196, + QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_MULTI_STA_POLICY = 197, + QCA_NL80211_VENDOR_SUBCMD_USABLE_CHANNELS = 198, + QCA_NL80211_VENDOR_SUBCMD_GET_RADAR_HISTORY = 199, + QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD = 200, + /* 201 - reserved for QCA */ + QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE = 202, + QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS = 203, }; enum qca_wlan_vendor_attr { @@ -1117,7 +1190,7 @@ enum qca_roaming_policy { * @QCA_ROAM_REASON_CONGESTION: Roam triggered considering the connected channel * or environment being very noisy or congested. * - * @QCA_ROAM_REASON_EXPLICIT_REQUEST: Roam triggered due to an explicit request + * @QCA_ROAM_REASON_USER_TRIGGER: Roam triggered due to an explicit request * from the user (user space). * * @QCA_ROAM_REASON_BTM: Roam triggered due to BTM Request frame received from @@ -1125,6 +1198,26 @@ enum qca_roaming_policy { * * @QCA_ROAM_REASON_BSS_LOAD: Roam triggered due to the channel utilization * breaching out the configured threshold. + * + * @QCA_ROAM_REASON_WTC: Roam triggered due to Wireless to Cellular BSS + * transition request. + * + * @QCA_ROAM_REASON_IDLE: Roam triggered when device is suspended, there is no + * data activity with the AP and the current RSSI falls below a certain + * threshold. + * + * @QCA_ROAM_REASON_DISCONNECTION: Roam triggered due to Deauthentication or + * Disassociation frames received from the connected AP. + * + * @QCA_ROAM_REASON_PERIODIC_TIMER: Roam triggered as part of the periodic scan + * that happens when there is no candidate AP found during the poor RSSI scan + * trigger. + * + * @QCA_ROAM_REASON_BACKGROUND_SCAN: Roam triggered based on the scan results + * obtained from an external scan (not aimed at roaming). + * + * @QCA_ROAM_REASON_BT_ACTIVITY: Roam triggered due to Bluetooth connection is + * established when the station is connected in the 2.4 GHz band. */ enum qca_roam_reason { QCA_ROAM_REASON_UNKNOWN, @@ -1136,6 +1229,12 @@ enum qca_roam_reason { QCA_ROAM_REASON_USER_TRIGGER, QCA_ROAM_REASON_BTM, QCA_ROAM_REASON_BSS_LOAD, + QCA_ROAM_REASON_WTC, + QCA_ROAM_REASON_IDLE, + QCA_ROAM_REASON_DISCONNECTION, + QCA_ROAM_REASON_PERIODIC_TIMER, + QCA_ROAM_REASON_BACKGROUND_SCAN, + QCA_ROAM_REASON_BT_ACTIVITY, }; enum qca_wlan_vendor_attr_roam_auth { @@ -1355,6 +1454,11 @@ enum qca_wlan_vendor_attr_p2p_listen_offload { * Used with event to notify the EDMG channel number selected in ACS * operation. * EDMG primary channel is indicated by QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL + * + * @QCA_WLAN_VENDOR_ATTR_ACS_PUNCTURE_BITMAP: Optional (u16). + * Used with event to notify the puncture pattern selected in ACS operation. + * Encoding for this attribute will follow the convention used in the Disabled + * Subchannel Bitmap field of the EHT Operation IE. */ enum qca_wlan_vendor_attr_acs_offload { QCA_WLAN_VENDOR_ATTR_ACS_CHANNEL_INVALID = 0, @@ -1375,6 +1479,7 @@ enum qca_wlan_vendor_attr_acs_offload { QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG1_CENTER_FREQUENCY = 15, QCA_WLAN_VENDOR_ATTR_ACS_EDMG_ENABLED = 16, QCA_WLAN_VENDOR_ATTR_ACS_EDMG_CHANNEL = 17, + QCA_WLAN_VENDOR_ATTR_ACS_PUNCTURE_BITMAP = 18, /* keep last */ QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST, @@ -1438,6 +1543,25 @@ enum qca_wlan_vendor_acs_hw_mode { * %QCA_WLAN_VENDOR_ATTR_THERMAL_LEVEL and * %QCA_WLAN_VENDOR_ATTR_THERMAL_COMPLETION_WINDOW attributes from * userspace. + * @QCA_WLAN_VENDOR_FEATURE_ADAPTIVE_11R: Device supports Adaptive 11r. + * With Adaptive 11r feature, access points advertise the vendor + * specific IEs and MDE but do not include FT AKM in the RSNE. + * The Adaptive 11r supported stations are expected to identify + * such vendor specific IEs and connect to the AP in FT mode though + * the profile is configured in non-FT mode. + * The driver-based SME cases also need to have this support for + * Adaptive 11r to handle the connection and roaming scenarios. + * This flag indicates the support for the same to the user space. + * @QCA_WLAN_VENDOR_FEATURE_CONCURRENT_BAND_SESSIONS: Device supports + * concurrent network sessions on different Wi-Fi bands. This feature + * capability is attributed to the hardware's capability to support + * the same (e.g., DBS). + * @QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT: Flag indicating whether the + * responses for the respective TWT operations are asynchronous (separate + * event message) from the driver. If not specified, the responses are + * synchronous (in vendor command reply) to the request. Each TWT + * operation is specifically mentioned (against its respective + * documentation) to support either of these or both modes. * @NUM_QCA_WLAN_VENDOR_FEATURES: Number of assigned feature bits */ enum qca_wlan_vendor_features { @@ -1453,6 +1577,9 @@ enum qca_wlan_vendor_features { QCA_WLAN_VENDOR_FEATURE_11AX = 9, QCA_WLAN_VENDOR_FEATURE_6GHZ_SUPPORT = 10, QCA_WLAN_VENDOR_FEATURE_THERMAL_CONFIG = 11, + QCA_WLAN_VENDOR_FEATURE_ADAPTIVE_11R = 12, + QCA_WLAN_VENDOR_FEATURE_CONCURRENT_BAND_SESSIONS = 13, + QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT = 14, NUM_QCA_WLAN_VENDOR_FEATURES /* keep last */ }; @@ -1679,11 +1806,22 @@ enum qca_vendor_attr_tsf_cmd { * @QCA_TSF_CAPTURE: Initiate TSF Capture * @QCA_TSF_GET: Get TSF capture value * @QCA_TSF_SYNC_GET: Initiate TSF capture and return with captured value + * @QCA_TSF_AUTO_REPORT_ENABLE: Used in STA mode only. Once set, the target + * will automatically send TSF report to the host. To query + * QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY, this operation needs to be + * initiated first. + * @QCA_TSF_AUTO_REPORT_DISABLE: Used in STA mode only. Once set, the target + * will not automatically send TSF report to the host. If + * QCA_TSF_AUTO_REPORT_ENABLE is initiated and + * QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY is not queried anymore, this + * operation needs to be initiated. */ enum qca_tsf_cmd { QCA_TSF_CAPTURE, QCA_TSF_GET, QCA_TSF_SYNC_GET, + QCA_TSF_AUTO_REPORT_ENABLE, + QCA_TSF_AUTO_REPORT_DISABLE, }; /** @@ -1777,6 +1915,23 @@ enum qca_vendor_element_id { }; /** + * enum qca_wlan_vendor_scan_priority - Specifies the valid values that the + * vendor scan attribute QCA_WLAN_VENDOR_ATTR_SCAN_PRIORITY can take. + * @QCA_WLAN_VENDOR_SCAN_PRIORITY_VERY_LOW: Very low priority + * @QCA_WLAN_VENDOR_SCAN_PRIORITY_LOW: Low priority + * @QCA_WLAN_VENDOR_SCAN_PRIORITY_MEDIUM: Medium priority + * @QCA_WLAN_VENDOR_SCAN_PRIORITY_HIGH: High priority + * @QCA_WLAN_VENDOR_SCAN_PRIORITY_VERY_HIGH: Very high priority + */ +enum qca_wlan_vendor_scan_priority { + QCA_WLAN_VENDOR_SCAN_PRIORITY_VERY_LOW = 0, + QCA_WLAN_VENDOR_SCAN_PRIORITY_LOW = 1, + QCA_WLAN_VENDOR_SCAN_PRIORITY_MEDIUM = 2, + QCA_WLAN_VENDOR_SCAN_PRIORITY_HIGH = 3, + QCA_WLAN_VENDOR_SCAN_PRIORITY_VERY_HIGH = 4, +}; + +/** * enum qca_wlan_vendor_attr_scan - Specifies vendor scan attributes * * @QCA_WLAN_VENDOR_ATTR_SCAN_IE: IEs that should be included as part of scan @@ -1801,6 +1956,11 @@ enum qca_vendor_element_id { * @QCA_WLAN_VENDOR_ATTR_SCAN_DWELL_TIME: Unsigned 64-bit dwell time in * microseconds. This is a common value which applies across all * frequencies specified by QCA_WLAN_VENDOR_ATTR_SCAN_FREQUENCIES. + * @QCA_WLAN_VENDOR_ATTR_SCAN_PRIORITY: Priority of vendor scan relative to + * other scan requests. It is a u32 attribute and takes values from enum + * qca_wlan_vendor_scan_priority. This is an optional attribute. + * If this attribute is not configured, the driver shall use + * QCA_WLAN_VENDOR_SCAN_PRIORITY_HIGH as the priority of vendor scan. */ enum qca_wlan_vendor_attr_scan { QCA_WLAN_VENDOR_ATTR_SCAN_INVALID_PARAM = 0, @@ -1816,6 +1976,7 @@ enum qca_wlan_vendor_attr_scan { QCA_WLAN_VENDOR_ATTR_SCAN_MAC_MASK = 10, QCA_WLAN_VENDOR_ATTR_SCAN_BSSID = 11, QCA_WLAN_VENDOR_ATTR_SCAN_DWELL_TIME = 12, + QCA_WLAN_VENDOR_ATTR_SCAN_PRIORITY = 13, QCA_WLAN_VENDOR_ATTR_SCAN_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_SCAN_MAX = QCA_WLAN_VENDOR_ATTR_SCAN_AFTER_LAST - 1 @@ -2278,6 +2439,10 @@ enum qca_wlan_vendor_attr_config { * frame. The updated NSS value after the connection shall not be * greater than the one negotiated during the connection. Any such * higher value configuration shall be returned with a failure. + * Only symmetric NSS configuration (such as 2X2 or 1X1) can be done + * using this attribute. QCA_WLAN_VENDOR_ATTR_CONFIG_TX_NSS and + * QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS attributes shall be used to + * configure the asymmetric NSS configuration (such as 1X2). */ QCA_WLAN_VENDOR_ATTR_CONFIG_NSS = 70, /* 8-bit unsigned value to trigger Optimized Power Management: @@ -2326,6 +2491,86 @@ enum qca_wlan_vendor_attr_config { */ QCA_WLAN_VENDOR_ATTR_CONFIG_ANI_LEVEL = 76, + /* 8-bit unsigned value. This attribute is used to dynamically configure + * the number of spatial streams used for transmitting the data. When + * configured in the disconnected state, the configured value will + * be considered for the following connection attempt. + * If the NSS is updated after the connection, the updated NSS value + * is notified to the peer using the Operating Mode Notification/Spatial + * Multiplexing Power Save frame. + * The TX NSS value configured after the connection shall not be greater + * than the value negotiated during the connection. Any such higher + * value configuration shall be treated as invalid configuration by + * the driver. This attribute shall be configured along with + * QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS attribute to define the symmetric + * configuration (such as 2X2 or 1X1) or the asymmetric + * configuration (such as 1X2). + * If QCA_WLAN_VENDOR_ATTR_CONFIG_NSS attribute is also provided along + * with this QCA_WLAN_VENDOR_ATTR_CONFIG_TX_NSS attribute the driver + * will update the TX NSS based on QCA_WLAN_VENDOR_ATTR_CONFIG_TX_NSS. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_TX_NSS = 77, + + /* 8-bit unsigned value. This attribute is used to dynamically configure + * the number of spatial streams used for receiving the data. When + * configured in the disconnected state, the configured value will + * be considered for the following connection attempt. + * If the NSS is updated after the connection, the updated NSS value + * is notified to the peer using the Operating Mode Notification/Spatial + * Multiplexing Power Save frame. + * The RX NSS value configured after the connection shall not be greater + * than the value negotiated during the connection. Any such higher + * value configuration shall be treated as invalid configuration by + * the driver. This attribute shall be configured along with + * QCA_WLAN_VENDOR_ATTR_CONFIG_TX_NSS attribute to define the symmetric + * configuration (such as 2X2 or 1X1) or the asymmetric + * configuration (such as 1X2). + * If QCA_WLAN_VENDOR_ATTR_CONFIG_NSS attribute is also provided along + * with this QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS attribute the driver + * will update the RX NSS based on QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS = 78, + + /* + * 8-bit unsigned value. This attribute, when set, indicates whether the + * specified interface is the primary STA interface when there are more + * than one STA interfaces concurrently active. + * + * This configuration helps the firmware/hardware to support certain + * features (e.g., roaming) on this primary interface, if the same + * cannot be supported on the concurrent STA interfaces simultaneously. + * + * This configuration is only applicable for a single STA interface on + * a device and gives the priority for it only over other concurrent STA + * interfaces. + * + * If the device is a multi wiphy/soc, this configuration applies to a + * single STA interface across the wiphys. + * + * 1-Enable (is the primary STA), 0-Disable (is not the primary STA) + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_CONCURRENT_STA_PRIMARY = 79, + + /* + * 8-bit unsigned value. This attribute can be used to configure the + * driver to enable/disable FT-over-DS feature. Possible values for + * this attribute are 1-Enable and 0-Disable. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_FT_OVER_DS = 80, + + /* + * 8-bit unsigned value. This attribute can be used to configure the + * firmware to enable/disable ARP/NS offload feature. Possible values + * for this attribute are 0-Disable and 1-Enable. + * + * This attribute is only applicable for STA/P2P-Client interface, + * and is optional, default behavior is ARP/NS offload enabled. + * + * This attribute can be set in disconnected and connected state, and + * will restore to the default behavior if the interface is closed. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ARP_NS_OFFLOAD = 81, + /* keep last */ QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_CONFIG_MAX = @@ -2421,23 +2666,50 @@ enum qca_wlan_vendor_attr_sap_conditional_chan_switch { * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is * %QCA_WLAN_VENDOR_GPIO_OUTPUT. * - * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE: Required (u32) + * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE: Optional (u32) * value to specify the GPIO pull type. Please refer to enum qca_gpio_pull_type * for the available values. * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is - * %QCA_WLAN_VENDOR_GPIO_CONFIG. + * %QCA_WLAN_VENDOR_GPIO_CONFIG and + * %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG attribute is not present. + * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG + * attribute is present. * - * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE: Required (u32) + * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE: Optional (u32) * value to specify the GPIO interrupt mode. Please refer to enum * qca_gpio_interrupt_mode for the available values. * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is - * %QCA_WLAN_VENDOR_GPIO_CONFIG. + * %QCA_WLAN_VENDOR_GPIO_CONFIG and + * %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG attribute is not present. + * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG + * attribute is present. * - * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR: Required (u32) + * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR: Optional (u32) * value to specify the GPIO direction. Please refer to enum qca_gpio_direction * for the available values. * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is - * %QCA_WLAN_VENDOR_GPIO_CONFIG. + * %QCA_WLAN_VENDOR_GPIO_CONFIG and + * %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG attribute is not present. + * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG + * attribute is present. + * + * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MUX_CONFIG: Optional (u32) + * Value to specify the mux config. Meaning of a given value is dependent + * on the target chipset and GPIO pin. Must be of the range 0-15. + * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is + * %QCA_WLAN_VENDOR_GPIO_CONFIG. Defaults to 0. + * + * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DRIVE: Optional (u32) + * Value to specify the drive, refer to enum qca_gpio_drive. + * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is + * %QCA_WLAN_VENDOR_GPIO_CONFIG. Defaults to QCA_WLAN_GPIO_DRIVE_2MA(0). + * + * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG: Optional (flag) + * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is + * %QCA_WLAN_VENDOR_GPIO_CONFIG. When present this attribute signals that all + * other parameters for the given GPIO will be obtained from internal + * configuration. Only %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM must be + * specified to indicate the GPIO pin being configured. */ enum qca_wlan_gpio_attr { QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INVALID = 0, @@ -2453,6 +2725,12 @@ enum qca_wlan_gpio_attr { QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE = 5, /* Unsigned 32-bit attribute for GPIO direction to configure */ QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR = 6, + /* Unsigned 32-bit attribute for GPIO mux config */ + QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MUX_CONFIG = 7, + /* Unsigned 32-bit attribute for GPIO drive */ + QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DRIVE = 8, + /* Flag attribute for using internal GPIO configuration */ + QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG = 9, /* keep last */ QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST, @@ -2528,6 +2806,30 @@ enum qca_gpio_interrupt_mode { }; /** + * enum qca_gpio_drive - GPIO drive + * @QCA_WLAN_GPIO_DRIVE_2MA: drive 2MA + * @QCA_WLAN_GPIO_DRIVE_4MA: drive 4MA + * @QCA_WLAN_GPIO_DRIVE_6MA: drive 6MA + * @QCA_WLAN_GPIO_DRIVE_8MA: drive 8MA + * @QCA_WLAN_GPIO_DRIVE_10MA: drive 10MA + * @QCA_WLAN_GPIO_DRIVE_12MA: drive 12MA + * @QCA_WLAN_GPIO_DRIVE_14MA: drive 14MA + * @QCA_WLAN_GPIO_DRIVE_16MA: drive 16MA + * @QCA_WLAN_GPIO_DRIVE_MAX: invalid GPIO drive + */ +enum qca_gpio_drive { + QCA_WLAN_GPIO_DRIVE_2MA = 0, + QCA_WLAN_GPIO_DRIVE_4MA = 1, + QCA_WLAN_GPIO_DRIVE_6MA = 2, + QCA_WLAN_GPIO_DRIVE_8MA = 3, + QCA_WLAN_GPIO_DRIVE_10MA = 4, + QCA_WLAN_GPIO_DRIVE_12MA = 5, + QCA_WLAN_GPIO_DRIVE_14MA = 6, + QCA_WLAN_GPIO_DRIVE_16MA = 7, + QCA_WLAN_GPIO_DRIVE_MAX, +}; + +/** * qca_wlan_set_qdepth_thresh_attr - Parameters for setting * MSDUQ depth threshold per peer per tid in the target * @@ -3688,6 +3990,14 @@ enum qca_wlan_vendor_attr_ll_stats_results { * QCA_WLAN_VENDOR_ATTR_LL_STATS_CH_INFO. */ QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_RX_TIME = 85, + /* u8 value representing the channel load percentage. Possible values + * are 0-100. + */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_LOAD_PERCENTAGE = 86, + /* u8 value representing the time slicing duty cycle percentage. + * Possible values are 0-100. + */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_TS_DUTY_CYCLE = 87, /* keep last */ QCA_WLAN_VENDOR_ATTR_LL_STATS_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX = @@ -4035,6 +4345,30 @@ enum qca_vendor_attr_scan_freq_list_scheme { QCA_ATTR_ROAM_CONTROL_SCAN_FREQ_LIST_SCHEME_AFTER_LAST - 1, }; +/** + * enum qca_roam_scan_scheme: Scan scheme + * + * @QCA_ROAM_SCAN_SCHEME_NO_SCAN: No frequencies specified to scan. + * Indicates the driver to not scan on a Roam Trigger scenario, but + * disconnect. E.g., on a BTM request from the AP the driver/firmware shall + * disconnect from the current connected AP by notifying a failure + * code in the BTM response. + * + * @QCA_ROAM_SCAN_SCHEME_PARTIAL_SCAN: Indicates the driver/firmware to + * trigger partial frequency scans. These frequencies are the ones learned + * or maintained by the driver based on the probability of finding the + * BSSIDs in the ESS for which the roaming is triggered. + * + * @QCA_ROAM_SCAN_SCHEME_FULL_SCAN: Indicates the driver/firmware to + * trigger the scan on all the valid frequencies to find better + * candidates to roam. + */ +enum qca_roam_scan_scheme { + QCA_ROAM_SCAN_SCHEME_NO_SCAN = 0, + QCA_ROAM_SCAN_SCHEME_PARTIAL_SCAN = 1, + QCA_ROAM_SCAN_SCHEME_FULL_SCAN = 2, +}; + /* * enum qca_vendor_roam_triggers: Bitmap of roaming triggers * @@ -4055,6 +4389,18 @@ enum qca_vendor_attr_scan_freq_list_scheme { * when BTM Request frame is received from the connected AP. * @QCA_ROAM_TRIGGER_REASON_BSS_LOAD: Set if the roam has to be triggered * when the channel utilization is goes above the configured threshold. + * @QCA_ROAM_TRIGGER_REASON_USER_TRIGGER: Set if the roam has to be triggered + * based on the request from the user (space). + * @QCA_ROAM_TRIGGER_REASON_DEAUTH: Set if the roam has to be triggered when + * device receives Deauthentication/Disassociation frame from connected AP. + * @QCA_ROAM_TRIGGER_REASON_IDLE: Set if the roam has to be triggered when the + * device is in idle state (no TX/RX) and suspend mode, if the current RSSI + * is determined to be a poor one. + * @QCA_ROAM_TRIGGER_REASON_TX_FAILURES: Set if the roam has to be triggered + * based on continuous TX Data frame failures to the connected AP. + * @QCA_ROAM_TRIGGER_REASON_EXTERNAL_SCAN: Set if the roam has to be triggered + * based on the scan results obtained from an external scan (not triggered + * to aim roaming). * * Set the corresponding roam trigger reason bit to consider it for roam * trigger. @@ -4070,6 +4416,144 @@ enum qca_vendor_roam_triggers { QCA_ROAM_TRIGGER_REASON_DENSE = 1 << 5, QCA_ROAM_TRIGGER_REASON_BTM = 1 << 6, QCA_ROAM_TRIGGER_REASON_BSS_LOAD = 1 << 7, + QCA_ROAM_TRIGGER_REASON_USER_TRIGGER = 1 << 8, + QCA_ROAM_TRIGGER_REASON_DEAUTH = 1 << 9, + QCA_ROAM_TRIGGER_REASON_IDLE = 1 << 10, + QCA_ROAM_TRIGGER_REASON_TX_FAILURES = 1 << 11, + QCA_ROAM_TRIGGER_REASON_EXTERNAL_SCAN = 1 << 12, +}; + +/* + * enum qca_vendor_roam_fail_reasons: Defines the various roam + * fail reasons. This enum value is used in + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_FAIL_REASON attribute. + * + * @QCA_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED: Roam module in the firmware is not + * able to trigger the scan. + * @QCA_ROAM_FAIL_REASON_NO_AP_FOUND: No roamable APs found during roam scan. + * @QCA_ROAM_FAIL_REASON_NO_CAND_AP_FOUND: No candidate APs found during roam + * scan. + * @QCA_ROAM_FAIL_REASON_HOST: Roam fail due to disconnect issued from host. + * @QCA_ROAM_FAIL_REASON_AUTH_SEND: Unable to send Authentication frame. + * @QCA_ROAM_FAIL_REASON_AUTH_RECV: Received Authentication frame with error + * status code. + * @QCA_ROAM_FAIL_REASON_NO_AUTH_RESP: Authentication frame not received. + * @QCA_ROAM_FAIL_REASON_REASSOC_SEND: Unable to send Reassociation Request + * frame. + * @QCA_ROAM_FAIL_REASON_REASSOC_RECV: Received Reassociation Response frame + * with error status code. + * @QCA_ROAM_FAIL_REASON_NO_REASSOC_RESP: Reassociation Response frame not + * received. + * @QCA_ROAM_FAIL_REASON_SCAN_FAIL: Scan module not able to start scan. + * @QCA_ROAM_FAIL_REASON_AUTH_NO_ACK: No ACK is received for Authentication + * frame. + * @QCA_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP: Authentication frame is dropped + * internally before transmission. + * @QCA_ROAM_FAIL_REASON_REASSOC_NO_ACK: No ACK is received for Reassociation + * Request frame. + * @QCA_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP: Reassociation Request frame is + * dropped internally. + * @QCA_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT: EAPOL-Key M1 is not received and + * times out. + * @QCA_ROAM_FAIL_REASON_EAPOL_M2_SEND: Unable to send EAPOL-Key M2 frame. + * @QCA_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP: EAPOL-Key M2 frame dropped + * internally. + * @QCA_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK: No ACK is received for EAPOL-Key + * M2 frame. + * @QCA_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT: EAPOL-Key M3 frame is not received. + * @QCA_ROAM_FAIL_REASON_EAPOL_M4_SEND: Unable to send EAPOL-Key M4 frame. + * @QCA_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP: EAPOL-Key M4 frame dropped + * internally. + * @QCA_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK: No ACK is received for EAPOL-Key M4 + * frame. + * @QCA_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BEACON_MISS: Roam scan is not + * started for final beacon miss case. + * @QCA_ROAM_FAIL_REASON_DISCONNECT: Deauthentication or Disassociation frame + * received from the AP during roaming handoff. + * @QCA_ROAM_FAIL_REASON_RESUME_ABORT: Firmware roams to the AP when the Apps + * or host is suspended and gives the indication of the last roamed AP only + * when the Apps is resumed. If the Apps is resumed while the roaming is in + * progress, this ongoing roaming is aborted and the last roamed AP is + * indicated to host. + * @QCA_ROAM_FAIL_REASON_SAE_INVALID_PMKID: WPA3-SAE invalid PMKID. + * @QCA_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT: WPA3-SAE pre-authentication times + * out. + * @QCA_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL: WPA3-SAE pre-authentication fails. + */ +enum qca_vendor_roam_fail_reasons { + QCA_ROAM_FAIL_REASON_NONE = 0, + QCA_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED = 1, + QCA_ROAM_FAIL_REASON_NO_AP_FOUND = 2, + QCA_ROAM_FAIL_REASON_NO_CAND_AP_FOUND = 3, + QCA_ROAM_FAIL_REASON_HOST = 4, + QCA_ROAM_FAIL_REASON_AUTH_SEND = 5, + QCA_ROAM_FAIL_REASON_AUTH_RECV = 6, + QCA_ROAM_FAIL_REASON_NO_AUTH_RESP = 7, + QCA_ROAM_FAIL_REASON_REASSOC_SEND = 8, + QCA_ROAM_FAIL_REASON_REASSOC_RECV = 9, + QCA_ROAM_FAIL_REASON_NO_REASSOC_RESP = 10, + QCA_ROAM_FAIL_REASON_SCAN_FAIL = 11, + QCA_ROAM_FAIL_REASON_AUTH_NO_ACK = 12, + QCA_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP = 13, + QCA_ROAM_FAIL_REASON_REASSOC_NO_ACK = 14, + QCA_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP = 15, + QCA_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT = 16, + QCA_ROAM_FAIL_REASON_EAPOL_M2_SEND = 17, + QCA_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP = 18, + QCA_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK = 19, + QCA_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT = 20, + QCA_ROAM_FAIL_REASON_EAPOL_M4_SEND = 21, + QCA_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP = 22, + QCA_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK = 23, + QCA_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BEACON_MISS = 24, + QCA_ROAM_FAIL_REASON_DISCONNECT = 25, + QCA_ROAM_FAIL_REASON_RESUME_ABORT = 26, + QCA_ROAM_FAIL_REASON_SAE_INVALID_PMKID = 27, + QCA_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT = 28, + QCA_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL = 29, +}; + +/* + * enum qca_vendor_roam_invoke_fail_reasons: Defines the various roam + * invoke fail reasons. This enum value is used in + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_INVOKE_FAIL_REASON attribute. + * + * @QCA_ROAM_INVOKE_STATUS_IFACE_INVALID: Invalid interface ID is passed + * in roam invoke command. + * @QCA_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE: Roam offload in firmware is not + * enabled. + * @QCA_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID: Connected AP profile SSID + * length is invalid. + * @QCA_ROAM_INVOKE_STATUS_ROAM_DISALLOW: Firmware internal roaming is already + * in progress. + * @QCA_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP: Host sends the Beacon/Probe Response + * of the AP in the roam invoke command to firmware. This reason is sent by the + * firmware when the given AP is configured to be ignored or SSID/security + * does not match. + * @QCA_ROAM_INVOKE_STATUS_ROAM_INTERNAL_FAIL: Roam handoff failed because of + * firmware internal reasons. + * @QCA_ROAM_INVOKE_STATUS_DISALLOW: Roam invoke trigger is not enabled. + * @QCA_ROAM_INVOKE_STATUS_SCAN_FAIL: Scan start fail for roam invoke. + * @QCA_ROAM_INVOKE_STATUS_START_ROAM_FAIL: Roam handoff start fail. + * @QCA_ROAM_INVOKE_STATUS_INVALID_PARAMS: Roam invoke parameters are invalid. + * @QCA_ROAM_INVOKE_STATUS_NO_CAND_AP: No candidate AP found to roam to. + * @QCA_ROAM_INVOKE_STATUS_ROAM_FAIL: Roam handoff failed. + */ +enum qca_vendor_roam_invoke_fail_reasons { + QCA_ROAM_INVOKE_STATUS_NONE = 0, + QCA_ROAM_INVOKE_STATUS_IFACE_INVALID = 1, + QCA_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE = 2, + QCA_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID = 3, + QCA_ROAM_INVOKE_STATUS_ROAM_DISALLOW = 4, + QCA_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP = 5, + QCA_ROAM_INVOKE_STATUS_ROAM_INTERNAL_FAIL = 6, + QCA_ROAM_INVOKE_STATUS_DISALLOW = 7, + QCA_ROAM_INVOKE_STATUS_SCAN_FAIL = 8, + QCA_ROAM_INVOKE_STATUS_START_ROAM_FAIL = 9, + QCA_ROAM_INVOKE_STATUS_INVALID_PARAMS = 10, + QCA_ROAM_INVOKE_STATUS_NO_CAND_AP = 11, + QCA_ROAM_INVOKE_STATUS_ROAM_FAIL = 12, + }; /** @@ -4226,6 +4710,109 @@ enum qca_vendor_attr_roam_candidate_selection_criteria { * * Clears the selection criteria configured in the driver when specified * with clear command. + * + * @QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME: Unsigned 32-bit value. + * Represents value of the scan frequency scheme from enum + * qca_roam_scan_scheme. + * It's an optional attribute. If this attribute is not configured, the + * driver shall proceed with default behavior. + * + * @QCA_ATTR_ROAM_CONTROL_CONNECTED_RSSI_THRESHOLD: Signed 32-bit value in dBm, + * signifying the RSSI threshold of the current connected AP, indicating + * the driver to trigger roam only when the current connected AP's RSSI + * is less than this threshold. + * + * @QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD: Signed 32-bit value in dBm, + * signifying the RSSI threshold of the candidate AP, indicating + * the driver to trigger roam only to the candidate AP with RSSI + * better than this threshold. If RSSI thresholds for candidate APs found + * in the 2.4 GHz, 5 GHz, and 6 GHz bands are configured separately using + * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_2P4GHZ, + * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_5GHZ, and/or + * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_6GHZ, those values will + * take precedence over the value configured using the + * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD attribute. + * + * @QCA_ATTR_ROAM_CONTROL_USER_REASON: Unsigned 32-bit value. Represents the + * user defined reason code to be sent to the AP in response to AP's + * request to trigger the roam if the roaming cannot be triggered. + * Applies to all the scenarios of AP assisted roaming (e.g., BTM). + * + * @QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME_TRIGGERS: Unsigned 32-bit value. + * Carries a bitmap of the roam triggers specified in + * enum qca_vendor_roam_triggers. + * Represents the roam triggers for which the specific scan scheme from + * enum qca_roam_scan_scheme has to be applied. + * It's an optional attribute. If this attribute is not configured, but + * QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME is specified, the scan scheme + * specified through QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME is applicable for + * all the roams. + * If both QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME and + * QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME_TRIGGERS are not specified, the + * driver shall proceed with the default behavior. + * + * @QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_2P4GHZ: Signed 32-bit value + * in dBm, signifying the RSSI threshold of the candidate AP found in the + * 2.4 GHz band. The driver/firmware shall trigger roaming to the candidate + * AP found in the 2.4 GHz band only if its RSSI value is better than this + * threshold. Optional attribute. If this attribute is not included, the + * threshold value specified by the + * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD attribute shall be used. + * + * @QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_5GHZ: Signed 32-bit value in + * dBm, signifying the RSSI threshold of the candidate AP found in the 5 + * GHz band. The driver/firmware shall trigger roaming to the candidate AP + * found in the 5 GHz band only if its RSSI value is better than this + * threshold. Optional attribute. If this attribute is not included, the + * threshold value specified by tge + * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD attribute shall be used. + * + * @QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD_6GHZ: Signed 32-bit value in + * dBm, signifying the RSSI threshold of the candidate AP found in the 6 + * GHz band. The driver/firmware shall trigger roaming to the candidate AP + * found in the 6 GHz band only if its RSSI value is better than this + * threshold. Optional attribute. If this attribute is not included, the + * threshold value specified by the + * QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD attribute shall be used. + * + * @QCA_ATTR_ROAM_CONTROL_BAND_MASK: Unsigned 32-bit value. + * Carries bitmask value of bits from &enum qca_set_band and represents + * all the bands in which roaming is allowed. The configuration is valid + * until next disconnection. If this attribute is not present, the + * existing configuration shall be used. By default, roaming is allowed on + * all bands supported by the local device. When the value is set to + * %QCA_SETBAND_AUTO, all supported bands shall be enabled. + * + * @QCA_ATTR_ROAM_CONTROL_ACTIVE_CH_DWELL_TIME: u16 value in milliseconds. + * Optional parameter. Scan dwell time for active channels in the 2.4/5 GHz + * bands. If this attribute is not configured, the driver shall proceed + * with default behavior. + * + * @QCA_ATTR_ROAM_CONTROL_PASSIVE_CH_DWELL_TIME: u16 value in milliseconds. + * Optional parameter. Scan dwell time for passive channels in the 5 GHz + * band. If this attribute is not configured, the driver shall proceed with + * default behavior. + * + * @QCA_ATTR_ROAM_CONTROL_HOME_CHANNEL_TIME: u16 value in milliseconds. + * Optional parameter. The minimum duration to stay on the connected AP + * channel during the channel scanning. If this attribute is not + * configured, the driver shall proceed with default behavior. + * + * @QCA_ATTR_ROAM_CONTROL_MAXIMUM_AWAY_TIME: u16 value in milliseconds. + * Optional parameter. The maximum duration for which the radio can scan + * foreign channels consecutively without coming back to home channel. If + * this attribute is not configured, the driver shall proceed with default + * behavior. + * + * @QCA_ATTR_ROAM_CONTROL_SCAN_6G_PSC_DWELL_TIME: u16 value in milliseconds. + * Optional parameter. Scan dwell time for 6G Preferred Scanning Channels. + * If this attribute is not configured, the driver shall proceed with + * default behavior. + * + * @QCA_ATTR_ROAM_CONTROL_SCAN_6G_NON_PSC_DWELL_TIME: u16 value in milliseconds. + * Optional parameter. Scan dwell time for 6G Non Preferred Scanning + * Channels. If this attribute is not configured, the driver shall proceed + * with default behavior. */ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_ENABLE = 1, @@ -4236,6 +4823,21 @@ enum qca_vendor_attr_roam_control { QCA_ATTR_ROAM_CONTROL_FULL_SCAN_PERIOD = 6, QCA_ATTR_ROAM_CONTROL_TRIGGERS = 7, QCA_ATTR_ROAM_CONTROL_SELECTION_CRITERIA = 8, + QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME = 9, + QCA_ATTR_ROAM_CONTROL_CONNECTED_RSSI_THRESHOLD = 10, + QCA_ATTR_ROAM_CONTROL_CANDIDATE_RSSI_THRESHOLD = 11, + QCA_ATTR_ROAM_CONTROL_USER_REASON = 12, + QCA_ATTR_ROAM_CONTROL_SCAN_SCHEME_TRIGGERS = 13, + 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_BAND_MASK = 17, + QCA_ATTR_ROAM_CONTROL_ACTIVE_CH_DWELL_TIME = 18, + QCA_ATTR_ROAM_CONTROL_PASSIVE_CH_DWELL_TIME = 19, + QCA_ATTR_ROAM_CONTROL_HOME_CHANNEL_TIME = 20, + QCA_ATTR_ROAM_CONTROL_MAXIMUM_AWAY_TIME = 21, + QCA_ATTR_ROAM_CONTROL_SCAN_6G_PSC_DWELL_TIME = 22, + QCA_ATTR_ROAM_CONTROL_SCAN_6G_NON_PSC_DWELL_TIME = 23, /* keep last */ QCA_ATTR_ROAM_CONTROL_AFTER_LAST, @@ -5843,6 +6445,14 @@ enum qca_wlan_vendor_attr_spectral_scan { * u32 attribute. */ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_FREQUENCY_2 = 29, + /* This attribute specifies the bandwidth to be used for spectral scan + * operation. This is an u8 attribute and uses the values in enum + * nl80211_chan_width. This is an optional attribute. + * If this attribute is not populated, the driver should configure the + * spectral scan bandwidth to the maximum value supported by the target + * for the current operating bandwidth. + */ + QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_BANDWIDTH = 30, QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_MAX = @@ -5953,6 +6563,14 @@ enum qca_wlan_vendor_attr_spectral_cap { * u32 attribute. */ QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_NUM_DETECTORS_80P80_MHZ = 18, + /* Flag attribute to indicate agile spectral scan capability + * for 320 MHz mode. + */ + QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_AGILE_SPECTRAL_320 = 19, + /* Number of spectral detectors used for scan in 320 MHz. + * u32 attribute. + */ + QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_NUM_DETECTORS_320_MHZ = 20, QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CAP_MAX = @@ -6135,6 +6753,16 @@ enum qca_wlan_vendor_hang_reason { * the FW on a specific VDEV. */ QCA_WLAN_HANG_VDEV_PEER_DELETE_ALL_RESPONSE_TIMED_OUT = 22, + /* WMI sequence mismatch between WMI command and Tx completion */ + QCA_WLAN_HANG_WMI_BUF_SEQUENCE_MISMATCH = 23, + /* Write to Device HAL register failed */ + QCA_WLAN_HANG_REG_WRITE_FAILURE = 24, + /* No credit left to send the wow_wakeup_from_sleep to firmware */ + QCA_WLAN_HANG_SUSPEND_NO_CREDIT = 25, + /* Bus failure */ + QCA_WLAN_HANG_BUS_FAILURE = 26, + /* tasklet/credit latency found */ + QCA_WLAN_HANG_TASKLET_CREDIT_LATENCY_DETECT = 27, }; /** @@ -6801,8 +7429,9 @@ enum qca_wlan_vendor_attr_wake_stats { /** * enum qca_wlan_vendor_thermal_level - Defines various thermal levels - * configured by userspace to the driver/firmware. The values will be - * encapsulated in QCA_WLAN_VENDOR_ATTR_THERMAL_LEVEL attribute. + * configured by userspace to the driver/firmware. + * The values can be encapsulated in QCA_WLAN_VENDOR_ATTR_THERMAL_LEVEL or + * QCA_WLAN_VENDOR_ATTR_THERMAL_EVENT_LEVEL attribute. * The driver/firmware takes actions requested by userspace such as throttling * wifi TX etc. in order to mitigate high temperature. * @@ -6836,8 +7465,9 @@ enum qca_wlan_vendor_attr_thermal_cmd { */ QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_VALUE = 1, /* Userspace uses this attribute to configure thermal level to the - * driver/firmware. Used in request, u32 attribute, possible values - * are defined in enum qca_wlan_vendor_thermal_level. + * driver/firmware, or get thermal level from the driver/firmware. + * Used in request or response, u32 attribute, + * possible values are defined in enum qca_wlan_vendor_thermal_level. */ QCA_WLAN_VENDOR_ATTR_THERMAL_LEVEL = 2, /* Userspace uses this attribute to configure the time in which the @@ -6850,6 +7480,15 @@ enum qca_wlan_vendor_attr_thermal_cmd { * there is any critical ongoing operation. */ QCA_WLAN_VENDOR_ATTR_THERMAL_COMPLETION_WINDOW = 3, + /* Nested attribute, the driver/firmware uses this attribute to report + * thermal statistics of different thermal levels to userspace when + * requested using the + * QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_THERMAL_STATS command + * type. This attribute contains a nested array of records of thermal + * statistics of multiple levels. The attributes used inside this nested + * attribute are defined in enum qca_wlan_vendor_attr_thermal_stats. + */ + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS = 4, /* keep last */ QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_AFTER_LAST, @@ -6875,6 +7514,16 @@ enum qca_wlan_vendor_attr_thermal_cmd { * resume action. * @QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_SET_LEVEL: Configure thermal level to * the driver/firmware. + * @QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_LEVEL: Request to get the current + * thermal level from the driver/firmware. The driver should respond with a + * thermal level defined in enum qca_wlan_vendor_thermal_level. + * @QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_THERMAL_STATS: Request to get the + * current thermal statistics from the driver/firmware. The driver should + * respond with statistics of all thermal levels encapsulated in the attribute + * QCA_WLAN_VENDOR_ATTR_THERMAL_STATS. + * @QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_CLEAR_THERMAL_STATS: Request to clear + * the current thermal statistics for all thermal levels maintained in the + * driver/firmware and start counting from zero again. */ enum qca_wlan_vendor_attr_thermal_cmd_type { QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_PARAMS, @@ -6882,6 +7531,9 @@ enum qca_wlan_vendor_attr_thermal_cmd_type { QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_SUSPEND, QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_RESUME, QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_SET_LEVEL, + QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_LEVEL, + QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_THERMAL_STATS, + QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_CLEAR_THERMAL_STATS, }; /** @@ -6964,6 +7616,11 @@ enum qca_wlan_vendor_attr_thermal_event { * NLA_FLAG attribute. */ QCA_WLAN_VENDOR_ATTR_THERMAL_EVENT_RESUME_COMPLETE, + /* Thermal level from the driver. + * u32 attribute. Possible values are defined in + * enum qca_wlan_vendor_thermal_level. + */ + QCA_WLAN_VENDOR_ATTR_THERMAL_EVENT_LEVEL = 3, /* keep last */ QCA_WLAN_VENDOR_ATTR_THERMAL_EVENT_AFTER_LAST, @@ -6972,6 +7629,35 @@ enum qca_wlan_vendor_attr_thermal_event { }; /** + * enum qca_wlan_vendor_attr_thermal_stats - vendor subcmd attributes + * to get thermal status from the driver/firmware. + * enum values are used for NL attributes encapsulated inside the + * QCA_WLAN_VENDOR_ATTR_THERMAL_STATS nested attribute. + * + * QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_MIN_TEMPERATURE: Minimum temperature + * of a thermal level in Celsius. u32 size. + * QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_MAX_TEMPERATURE: Maximum temperature + * of a thermal level in Celsius. u32 size. + * QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_DWELL_TIME: The total time spent on each + * thermal level in milliseconds. u32 size. + * QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_TEMP_LEVEL_COUNTER: Indicates the number + * of times the temperature crossed into the temperature range defined by the + * thermal level from both higher and lower directions. u32 size. + */ +enum qca_wlan_vendor_attr_thermal_stats { + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_MIN_TEMPERATURE, + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_MAX_TEMPERATURE, + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_DWELL_TIME, + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_TEMP_LEVEL_COUNTER, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_MAX = + QCA_WLAN_VENDOR_ATTR_THERMAL_STATS_AFTER_LAST - 1, +}; + +/** * enum he_fragmentation_val - HE fragmentation support values * Indicates level of dynamic fragmentation that is supported by * a STA as a recipient. @@ -7130,6 +7816,21 @@ enum qca_wlan_he_om_ctrl_ch_bw { }; /** + * enum qca_wlan_keep_alive_data_type - Keep alive data type configuration + * + * Indicates the frame types to use for keep alive data. + * + * @QCA_WLAN_KEEP_ALIVE_DEFAULT: Driver default type used for keep alive. + * @QCA_WLAN_KEEP_ALIVE_DATA: Data frame type for keep alive. + * @QCA_WLAN_KEEP_ALIVE_MGMT: Management frame type for keep alive. + */ +enum qca_wlan_keep_alive_data_type { + QCA_WLAN_KEEP_ALIVE_DEFAULT = 0, + QCA_WLAN_KEEP_ALIVE_DATA = 1, + QCA_WLAN_KEEP_ALIVE_MGMT = 2, +}; + +/** * enum qca_wlan_vendor_attr_he_omi_tx: Represents attributes for * HE operating mode control transmit request. These attributes are * sent as part of QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_OMI_TX and @@ -7577,6 +8278,128 @@ enum qca_wlan_vendor_attr_wifi_test_config { */ QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_IGNORE_SA_QUERY_TIMEOUT = 43, + /* 8-bit unsigned value to configure the driver/firmware to start or + * stop transmitting FILS discovery frames. + * 0 - Stop transmitting FILS discovery frames + * 1 - Start transmitting FILS discovery frames + * This attribute is used to configure the testbed device. + * This attribute can be configured only in AP mode and the + * configuration is valid until AP restart. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_FILS_DISCOVERY_FRAMES_TX = 44, + + /* 8-bit unsigned value to configure the driver/firmware to enable or + * disable full bandwidth UL MU-MIMO subfield in the HE PHY capabilities + * information field. + * 0 - Disable full bandwidth UL MU-MIMO subfield + * 1 - Enable full bandwidth UL MU-MIMO subfield + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_FULL_BW_UL_MU_MIMO = 45, + + /* 16-bit unsigned value to configure the driver with a specific BSS + * max idle period to advertise in the BSS Max Idle Period element + * (IEEE Std 802.11-2016, 9.4.2.79) in (Re)Association Request frames. + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_BSS_MAX_IDLE_PERIOD = 46, + + /* 8-bit unsigned value to configure the driver to use only RU 242 tone + * for data transmission. + * 0 - Default behavior, 1 - Configure RU 242 tone for data Tx. + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_RU_242_TONE_TX = 47, + + /* 8-bit unsigned value to configure the driver to disable data and + * management response frame transmission to test the BSS max idle + * feature. + * 0 - Default behavior, 1 - Disable data and management response Tx. + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_DISABLE_DATA_MGMT_RSP_TX = 48, + + /* 8-bit unsigned value to configure the driver/firmware to enable or + * disable Punctured Preamble Rx subfield in the HE PHY capabilities + * information field. + * 0 - Disable Punctured Preamble Rx subfield + * 1 - Enable Punctured Preamble Rx subfield + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_PUNCTURED_PREAMBLE_RX = 49, + + /* 8-bit unsigned value to configure the driver to ignore the SAE H2E + * requirement mismatch for 6 GHz connection. + * 0 - Default behavior, 1 - Ignore SAE H2E requirement mismatch. + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_IGNORE_H2E_RSNXE = 50, + + /* 8-bit unsigned value to configure the driver to allow 6 GHz + * connection with all security modes. + * 0 - Default behavior, 1 - Allow 6 GHz connection with all security + * modes. + * This attribute is used for testing purposes. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_6GHZ_SECURITY_TEST_MODE = 51, + + /* 8-bit unsigned value to configure the driver to transmit data with + * ER SU PPDU type. + * + * 0 - Default behavior, 1 - Enable ER SU PPDU type TX. + * This attribute is used for testing purposes. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_ER_SU_PPDU_TYPE = 52, + + /* 8-bit unsigned value to configure the driver to use Data or + * Management frame type for keep alive data. + * Uses enum qca_wlan_keep_alive_data_type values. + * + * This attribute is used for testing purposes. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_KEEP_ALIVE_FRAME_TYPE = 53, + + /* 8-bit unsigned value to configure the driver to use scan request + * BSSID value in Probe Request frame RA(A1) during the scan. The + * driver saves this configuration and applies this setting to all user + * space scan requests until the setting is cleared. If this + * configuration is set, the driver uses the BSSID value from the scan + * request to set the RA(A1) in the Probe Request frames during the + * scan. + * + * 0 - Default behavior uses the broadcast RA in Probe Request frames. + * 1 - Uses the scan request BSSID in RA in Probe Request frames. + * This attribute is used for testing purposes. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_USE_BSSID_IN_PROBE_REQ_RA = 54, + + /* 8-bit unsigned value to configure the driver to enable/disable the + * BSS max idle period support. + * + * 0 - Disable the BSS max idle support. + * 1 - Enable the BSS max idle support. + * This attribute is used for testing purposes. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_BSS_MAX_IDLE_PERIOD_ENABLE = 55, + + /* 8-bit unsigned value to configure the driver/firmware to enable or + * disable Rx control frame to MultiBSS subfield in the HE MAC + * capabilities information field. + * 0 - Disable Rx control frame to MultiBSS subfield + * 1 - Enable Rx control frame to MultiBSS subfield + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_RX_CTRL_FRAME_TO_MBSS = 56, + + /* 8-bit unsigned value to configure the driver/firmware to enable or + * disable Broadcast TWT support subfield in the HE MAC capabilities + * information field. + * 0 - Disable Broadcast TWT support subfield + * 1 - Enable Broadcast TWT support subfield + * This attribute is used to configure the testbed device. + */ + QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_BCAST_TWT_SUPPORT = 57, + /* keep last */ QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_MAX = @@ -7586,26 +8409,73 @@ enum qca_wlan_vendor_attr_wifi_test_config { /** * enum qca_wlan_twt_operation - Operation of the config TWT request * Values for %QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_OPERATION. + * The response for the respective operations can be either synchronous or + * asynchronous (wherever specified). If synchronous, the response to this + * operation is obtained in the corresponding vendor command reply to the user + * space. For the asynchronous case the response is obtained as an event with + * the same operation type. + * + * Drivers shall support either of these modes but not both simultaneously. + * This support for asynchronous mode is advertised through the flag + * QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT. If this flag is not advertised, + * the driver shall support synchronous mode. * * @QCA_WLAN_TWT_SET: Setup a TWT session. Required parameters are configured * through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refers the enum - * qca_wlan_vendor_attr_twt_setup. + * qca_wlan_vendor_attr_twt_setup. Depending upon the + * @QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT capability, this is either a + * synchronous or asynchronous operation. * * @QCA_WLAN_TWT_GET: Get the configured TWT parameters. Required parameters are * obtained through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refers the enum - * qca_wlan_vendor_attr_twt_setup. + * qca_wlan_vendor_attr_twt_setup. This is a synchronous operation. * * @QCA_WLAN_TWT_TERMINATE: Terminate the TWT session. Required parameters are * obtained through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refers the enum * qca_wlan_vendor_attr_twt_setup. Valid only after the TWT session is setup. + * This terminate can either get triggered by the user space or can as well be + * a notification from the firmware if it initiates a terminate. + * Depending upon the @QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT capability, + * the request from user space can either be a synchronous or asynchronous + * operation. * * @QCA_WLAN_TWT_SUSPEND: Suspend the TWT session. Required parameters are * obtained through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refers the enum * qca_wlan_vendor_attr_twt_setup. Valid only after the TWT session is setup. + * Depending upon the @QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT capability, + * this is either a synchronous or asynchronous operation. * * @QCA_WLAN_TWT_RESUME: Resume the TWT session. Required parameters are * configured through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refers the enum * qca_wlan_vendor_attr_twt_resume. Valid only after the TWT session is setup. + * This can as well be a notification from the firmware on a QCA_WLAN_TWT_NUDGE + * request. Depending upon the @QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT + * capability, this is either a synchronous or asynchronous operation. + * + * @QCA_WLAN_TWT_NUDGE: Suspend and resume the TWT session. TWT nudge is a + * combination of suspend and resume in a single request. Required parameters + * are configured through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refers the + * enum qca_wlan_vendor_attr_twt_nudge. Valid only after the TWT session is + * setup. Depending upon the @QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT + * capability, this is either a synchronous or asynchronous operation. + * + * @QCA_WLAN_TWT_GET_STATS: Get the TWT session traffic statistics information. + * Refers the enum qca_wlan_vendor_attr_twt_stats. Valid only after the TWT + * session is setup. It's a synchronous operation. + * + * @QCA_WLAN_TWT_CLEAR_STATS: Clear TWT session traffic statistics information. + * Valid only after the TWT session is setup. It's a synchronous operation. + * + * @QCA_WLAN_TWT_GET_CAPABILITIES: Get TWT capabilities of this device and its + * peer. Refers the enum qca_wlan_vendor_attr_twt_capability. It's a synchronous + * operation. + * + * @QCA_WLAN_TWT_SETUP_READY_NOTIFY: Notify userspace that the firmare is + * ready for a new TWT session setup after it issued a TWT teardown. + * + * @QCA_WLAN_TWT_SET_PARAM: Configure TWT related parameters. Required + * parameters are obtained through QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS. Refer + * the enum qca_wlan_vendor_attr_twt_set_param. */ enum qca_wlan_twt_operation { QCA_WLAN_TWT_SET = 0, @@ -7613,6 +8483,12 @@ enum qca_wlan_twt_operation { QCA_WLAN_TWT_TERMINATE = 2, QCA_WLAN_TWT_SUSPEND = 3, QCA_WLAN_TWT_RESUME = 4, + QCA_WLAN_TWT_NUDGE = 5, + QCA_WLAN_TWT_GET_STATS = 6, + QCA_WLAN_TWT_CLEAR_STATS = 7, + QCA_WLAN_TWT_GET_CAPABILITIES = 8, + QCA_WLAN_TWT_SETUP_READY_NOTIFY = 9, + QCA_WLAN_TWT_SET_PARAM = 10, }; /** @@ -7626,8 +8502,9 @@ enum qca_wlan_twt_operation { * * @QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS: Nested attribute representing the * parameters configured for TWT. These parameters are represented by - * enum qca_wlan_vendor_attr_twt_setup or enum qca_wlan_vendor_attr_twt_resume - * based on the operation. + * enum qca_wlan_vendor_attr_twt_setup, enum qca_wlan_vendor_attr_twt_resume, + * enum qca_wlan_vendor_attr_twt_set_param, or + * enum qca_wlan_vendor_attr_twt_stats based on the operation. */ enum qca_wlan_vendor_attr_config_twt { QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_INVALID = 0, @@ -7788,6 +8665,19 @@ enum qca_wlan_vendor_attr_nan_params { }; /** + * qca_wlan_twt_setup_state: Represents the TWT session states. + * + * QCA_WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED: TWT session not established. + * QCA_WLAN_TWT_SETUP_STATE_ACTIVE: TWT session is active. + * QCA_WLAN_TWT_SETUP_STATE_SUSPEND: TWT session is in suspended state. + */ +enum qca_wlan_twt_setup_state { + QCA_WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED = 0, + QCA_WLAN_TWT_SETUP_STATE_ACTIVE = 1, + QCA_WLAN_TWT_SETUP_STATE_SUSPEND = 2, +}; + +/** * enum qca_wlan_vendor_attr_twt_setup: Represents attributes for * TWT (Target Wake Time) setup request. These attributes are sent as part of * %QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_TWT_SETUP and @@ -7837,6 +8727,14 @@ enum qca_wlan_vendor_attr_nan_params { * 2. TWT GET Request and Response * 3. TWT TERMINATE Request and Response * 4. TWT SUSPEND Request and Response + * Flow ID values from 0 to 254 represent a single TWT session + * Flow ID value of 255 represents all TWT sessions for the following + * 1. TWT TERMINATE Request and Response + * 2. TWT SUSPEND Request and Response + * 4. TWT CLEAR STATISTICS request + * 5. TWT GET STATISTICS request and response + * If an invalid dialog ID is provided, status + * QCA_WLAN_VENDOR_TWT_STATUS_SESSION_NOT_EXIST will be returned. * * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL_EXP: Required (u8) * This attribute (exp) is used along with the mantissa to derive the @@ -7887,6 +8785,7 @@ enum qca_wlan_vendor_attr_nan_params { * 2. TWT TERMINATE Response * 3. TWT SUSPEND Response * 4. TWT RESUME Response + * 5. TWT NUDGE Response * * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_RESP_TYPE: Required (u8) * This field is applicable for TWT response only. @@ -7896,9 +8795,13 @@ enum qca_wlan_vendor_attr_nan_params { * response. * * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_TIME_TSF: Required (u64) - * This field is applicable for TWT response only. - * This field contains absolute TSF value of the wake time received - * from the TWT responder and is passed to the userspace. + * In TWT setup command this field contains absolute TSF that will + * be used by TWT requester during setup. + * In TWT response this field contains absolute TSF value of the + * wake time received from the TWT responder and is passed to + * the userspace. + * This is an optional parameter for + * 1. TWT SET Request * This is a required parameter for * 1. TWT SET Response * 2. TWT GET Response @@ -7915,14 +8818,87 @@ enum qca_wlan_vendor_attr_nan_params { * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAC_ADDR: 6-byte MAC address * Represents the MAC address of the peer for which the TWT session * is being configured. This is used in AP mode to represent the respective - * client. In AP mode, this is an optional parameter for response and is - * a required parameter for - * 1. TWT SET Request - * 2. TWT GET Request - * 3. TWT TERMINATE Request - * 4. TWT SUSPEND Request + * client. + * In AP mode, this is a required parameter in response for + * 1. TWT SET + * 2. TWT GET + * 3. TWT TERMINATE + * 4. TWT SUSPEND * In STA mode, this is an optional parameter in request and response for * the above four TWT operations. + * In AP mode, this is a required parameter in request for + * 1. TWT GET + * 2. TWT TERMINATE + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MIN_WAKE_INTVL: Optional (u32) + * Minimum tolerance limit of wake interval parameter in microseconds. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX_WAKE_INTVL: Optional (u32) + * Maximum tolerance limit of wake interval parameter in microseconds. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MIN_WAKE_DURATION: Optional (u32) + * Minimum tolerance limit of wake duration parameter in microseconds. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX_WAKE_DURATION: Optional (u32) + * Maximum tolerance limit of wake duration parameter in microseconds. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_STATE: Optional (u32) + * TWT state for the given dialog id. The values for this are represented + * by enum qca_wlan_twt_setup_state. + * This is obtained through TWT GET operation. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL2_MANTISSA: Optional (u32) + * This attribute is used to configure wake interval mantissa. + * The unit is microseconds. This attribute, when specified, takes + * precedence over QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL_MANTISSA. + * This parameter is used for + * 1. TWT SET Request and Response + * 2. TWT GET Response + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_ID: Optional (u8) + * This attribute is used to configure Broadcast TWT ID. + * The Broadcast TWT ID indicates a specific Broadcast TWT for which the + * transmitting STA is providing TWT parameters. The allowed values are 0 to 31. + * This parameter is used for + * 1. TWT SET Request + * 2. TWT TERMINATE Request + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_RECOMMENDATION: Optional (u8) + * This attribute is used to configure Broadcast TWT recommendation. + * The Broadcast TWT Recommendation subfield contains a value that indicates + * recommendations on the types of frames that are transmitted by TWT + * scheduled STAs and scheduling AP during the broadcast TWT SP. + * The allowed values are 0 - 3. + * This parameter is used for + * 1. TWT SET Request + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_PERSISTENCE: Optional (u8) + * This attribute is used to configure Broadcast TWT Persistence. + * The Broadcast TWT Persistence subfield indicates the number of + * TBTTs during which the Broadcast TWT SPs corresponding to this + * broadcast TWT Parameter set are present. The number of beacon intervals + * during which the Broadcast TWT SPs are present is equal to the value in the + * Broadcast TWT Persistence subfield plus 1 except that the value 255 + * indicates that the Broadcast TWT SPs are present until explicitly terminated. + * This parameter is used for + * 1. TWT SET Request + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_RESPONDER_PM_MODE: Optional (u8) + * This attribute contains the value of the Responder PM Mode subfield (0 or 1) + * from TWT response frame. + * This parameter is used for + * 1. TWT SET Response + * 2. TWT GET Response + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT: Optional (u32) + * This attribute is used to configure the announce timeout value (in us) in + * the firmware. This timeout value is only applicable for the announced TWT. If + * the timeout value is non-zero the firmware waits up to the timeout value to + * use Data frame as an announcement frame. If the timeout value is 0 the + * firmware sends an explicit QoS NULL frame as the announcement frame on SP + * start. The default value in the firmware is 0. + * This parameter is used for + * 1. TWT SET Request */ enum qca_wlan_vendor_attr_twt_setup { QCA_WLAN_VENDOR_ATTR_TWT_SETUP_INVALID = 0, @@ -7944,6 +8920,20 @@ enum qca_wlan_vendor_attr_twt_setup { QCA_WLAN_VENDOR_ATTR_TWT_SETUP_TWT_INFO_ENABLED = 14, QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAC_ADDR = 15, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MIN_WAKE_INTVL = 16, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX_WAKE_INTVL = 17, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MIN_WAKE_DURATION = 18, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX_WAKE_DURATION = 19, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_STATE = 20, + + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL2_MANTISSA = 21, + + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_ID = 22, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_RECOMMENDATION = 23, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_PERSISTENCE = 24, + + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_RESPONDER_PM_MODE = 25, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT = 26, /* keep last */ QCA_WLAN_VENDOR_ATTR_TWT_SETUP_AFTER_LAST, @@ -7971,6 +8961,30 @@ enum qca_wlan_vendor_attr_twt_setup { * @QCA_WLAN_VENDOR_TWT_STATUS_DENIED: AP did not accept the request * @QCA_WLAN_VENDOR_TWT_STATUS_UNKNOWN_ERROR: Adding TWT dialog failed due to an * unknown reason + * @QCA_WLAN_VENDOR_TWT_STATUS_ALREADY_SUSPENDED: TWT session already in + * suspend state + * @QCA_WLAN_VENDOR_TWT_STATUS_IE_INVALID: FW has dropped the frame due to + * invalid IE in the received TWT frame + * @QCA_WLAN_VENDOR_TWT_STATUS_PARAMS_NOT_IN_RANGE: Parameters received from + * the responder are not in the specified range + * @QCA_WLAN_VENDOR_TWT_STATUS_PEER_INITIATED_TERMINATE: FW terminated the TWT + * session due to request from the responder. Used on the TWT_TERMINATE + * notification from the firmware. + * @QCA_WLAN_VENDOR_TWT_STATUS_ROAM_INITIATED_TERMINATE: FW terminated the TWT + * session due to roaming. Used on the TWT_TERMINATE notification from the + * firmware. + * @QCA_WLAN_VENDOR_TWT_STATUS_SCC_MCC_CONCURRENCY_TERMINATE: FW terminated the + * TWT session due to SCC (Single Channel Concurrency) and MCC (Multi Channel + * Concurrency). Used on the TWT_TERMINATE notification from the firmware. + * @QCA_WLAN_VENDOR_TWT_STATUS_ROAMING_IN_PROGRESS: FW rejected the TWT setup + * request due to roaming in progress. + * @QCA_WLAN_VENDOR_TWT_STATUS_CHANNEL_SWITCH_IN_PROGRESS: FW rejected the TWT + * setup request due to channel switch in progress. + * @QCA_WLAN_VENDOR_TWT_STATUS_SCAN_IN_PROGRESS: FW rejected the TWT setup + * request due to scan in progress. + * QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE: The driver requested to + * terminate an existing TWT session on power save exit request from userspace. + * Used on the TWT_TERMINATE notification from the driver/firmware. */ enum qca_wlan_vendor_twt_status { QCA_WLAN_VENDOR_TWT_STATUS_OK = 0, @@ -7986,6 +9000,16 @@ enum qca_wlan_vendor_twt_status { QCA_WLAN_VENDOR_TWT_STATUS_NO_RESPONSE = 10, QCA_WLAN_VENDOR_TWT_STATUS_DENIED = 11, QCA_WLAN_VENDOR_TWT_STATUS_UNKNOWN_ERROR = 12, + QCA_WLAN_VENDOR_TWT_STATUS_ALREADY_SUSPENDED = 13, + QCA_WLAN_VENDOR_TWT_STATUS_IE_INVALID = 14, + QCA_WLAN_VENDOR_TWT_STATUS_PARAMS_NOT_IN_RANGE = 15, + QCA_WLAN_VENDOR_TWT_STATUS_PEER_INITIATED_TERMINATE = 16, + QCA_WLAN_VENDOR_TWT_STATUS_ROAM_INITIATED_TERMINATE = 17, + QCA_WLAN_VENDOR_TWT_STATUS_SCC_MCC_CONCURRENCY_TERMINATE = 18, + QCA_WLAN_VENDOR_TWT_STATUS_ROAMING_IN_PROGRESS = 19, + QCA_WLAN_VENDOR_TWT_STATUS_CHANNEL_SWITCH_IN_PROGRESS = 20, + QCA_WLAN_VENDOR_TWT_STATUS_SCAN_IN_PROGRESS = 21, + QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE = 22, }; /** @@ -8012,6 +9036,10 @@ enum qca_wlan_vendor_twt_status { * @QCA_WLAN_VENDOR_ATTR_TWT_RESUME_FLOW_ID: Required (u8). * Flow ID is the unique identifier for each TWT session. This attribute * represents the respective TWT session to resume. + * Flow ID values from 0 to 254 represent a single TWT session + * Flow ID value of 255 represents all TWT sessions. + * If an invalid dialog id is provided, status + * QCA_WLAN_VENDOR_TWT_STATUS_SESSION_NOT_EXIST will be returned. * * @QCA_WLAN_VENDOR_ATTR_TWT_RESUME_MAC_ADDR: 6-byte MAC address * Represents the MAC address of the peer to which TWT Resume is @@ -8034,6 +9062,231 @@ enum qca_wlan_vendor_attr_twt_resume { }; /** + * enum qca_wlan_vendor_attr_twt_nudge - Represents attributes for + * TWT (Target Wake Time) nudge request. TWT nudge is a combination of suspend + * and resume in a single request. These attributes are sent as part of + * %QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_FLOW_ID: Required (u8) + * Flow ID is the unique identifier for each TWT session. This attribute + * represents the respective TWT session to suspend and resume. + * Flow ID values from 0 to 254 represent a single TWT session + * Flow ID value of 255 represents all TWT sessions in TWT NUDGE request + * and response. + * If an invalid dialog id is provided, status + * QCA_WLAN_VENDOR_TWT_STATUS_SESSION_NOT_EXIST will be returned. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME: Required (u32) + * This attribute is used as the SP offset which is the offset from + * TSF after which the wake happens. The units are in microseconds. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_NEXT_TWT_SIZE: Required (u32) + * This attribute represents the next TWT subfield size. + * Value 0 represents 0 bits, 1 represents 32 bits, 2 for 48 bits, + * and 4 for 64 bits. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_MAC_ADDR: 6-byte MAC address + * Represents the MAC address of the peer to which TWT Suspend and Resume is + * being sent. This is used in AP mode to represent the respective + * client and is a required parameter. In STA mode, this is an optional + * parameter. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME_TSF: Optional (u64) + * This field contains absolute TSF value of the time at which the TWT + * session will be resumed. + */ +enum qca_wlan_vendor_attr_twt_nudge { + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_FLOW_ID = 1, + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME = 2, + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_NEXT_TWT_SIZE = 3, + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_MAC_ADDR = 4, + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME_TSF = 5, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_MAX = + QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_attr_twt_stats: Represents attributes for + * TWT (Target Wake Time) get statistics and clear statistics request. + * These attributes are sent as part of + * %QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_FLOW_ID: Required (u8) + * Flow ID is the unique identifier for each TWT session. This attribute + * represents the respective TWT session for get and clear TWT statistics. + * Flow ID values from 0 to 254 represent a single TWT session + * Flow ID value of 255 represents all TWT sessions in + * 1) TWT GET STATISTICS request and response + * 2) TWT CLEAR STATISTICS request + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_MAC_ADDR: 6-byte MAC address + * Represents the MAC address of the peer for which TWT Statistics + * is required. + * In AP mode this is used to represent the respective + * client and is a required parameter for + * 1) TWT GET STATISTICS request and response + * 2) TWT CLEAR STATISTICS request and response + * In STA mode, this is an optional parameter. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_SESSION_WAKE_DURATION: Required (u32) + * This is the duration of the service period in microseconds. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVG_WAKE_DURATION: Required (u32) + * Average of the actual wake duration observed so far. Unit is microseconds. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS: Required (u32) + * The number of TWT service periods elapsed so far. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_MIN_WAKE_DURATION: Required (u32) + * This is the minimum value of the wake duration observed across + * QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS. Unit is + * microseconds. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_MAX_WAKE_DURATION: Required (u32) + * This is the maximum value of wake duration observed across + * QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS. Unit is + * microseconds. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_TX_MPDU: Required (u32) + * Average number of MPDUs transmitted successfully across + * QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_RX_MPDU: Required (u32) + * Average number of MPDUs received successfully across + * QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_TX_PACKET_SIZE: Required (u32) + * Average number of bytes transmitted successfully across + * QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_RX_PACKET_SIZE: Required (u32) + * Average number of bytes received successfully across + * QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS. + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_STATS_STATUS: Required (u32) + * Status of the TWT GET STATISTICS request. + * This contains status values in enum qca_wlan_vendor_twt_status + * Obtained in the QCA_WLAN_TWT_GET_STATS response from the firmware. + */ +enum qca_wlan_vendor_attr_twt_stats { + QCA_WLAN_VENDOR_ATTR_TWT_STATS_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_FLOW_ID = 1, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_MAC_ADDR = 2, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_SESSION_WAKE_DURATION = 3, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVG_WAKE_DURATION = 4, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_NUM_SP_ITERATIONS = 5, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_MIN_WAKE_DURATION = 6, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_MAX_WAKE_DURATION = 7, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_TX_MPDU = 8, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_RX_MPDU = 9, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_TX_PACKET_SIZE = 10, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVERAGE_RX_PACKET_SIZE = 11, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_STATUS = 12, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_TWT_STATS_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_TWT_STATS_MAX = + QCA_WLAN_VENDOR_ATTR_TWT_STATS_AFTER_LAST - 1, +}; + +/** + * qca_wlan_twt_get_capa - Represents the bitmap of TWT capabilities + * supported by the device and the peer. + * Values for %QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_GET_CAPABILITIES + * + * @QCA_WLAN_TWT_CAPA_REQUESTOR: TWT requestor support is advertised by + * TWT non-scheduling STA. This capability is advertised in the HE + * Capability/Extended Capabilities information element in the + * Association Request frame by the device. + * + * @QCA_WLAN_TWT_CAPA_RESPONDER: TWT responder support is advertised by + * the TWT scheduling AP. This capability is advertised in the Extended + * Capabilities/HE Capabilities information element. + * + * @QCA_WLAN_TWT_CAPA_BROADCAST: On the requestor side, this indicates support + * for the broadcast TWT functionality. On the responder side, this indicates + * support for the role of broadcast TWT scheduling functionality. This + * capability is advertised in the HE Capabilities information element. + * + * @QCA_WLAN_TWT_CAPA_TWT_FLEXIBLE: The device supports flexible TWT schedule. + * This capability is advertised in the HE Capabilities information element. + * + * @QCA_WLAN_TWT_CAPA_REQUIRED: The TWT Required is advertised by AP to indicate + * that it mandates the associated HE STAs to support TWT. This capability is + * advertised by AP in the HE Operation Parameters field of the HE Operation + * information element. + */ +enum qca_wlan_twt_capa { + QCA_WLAN_TWT_CAPA_REQUESTOR = BIT(0), + QCA_WLAN_TWT_CAPA_RESPONDER = BIT(1), + QCA_WLAN_TWT_CAPA_BROADCAST = BIT(2), + QCA_WLAN_TWT_CAPA_FLEXIBLE = BIT(3), + QCA_WLAN_TWT_CAPA_REQUIRED = BIT(4), +}; + +/** + * enum qca_wlan_vendor_attr_twt_capability - Represents attributes for TWT + * get capabilities request type. Used by QCA_WLAN_TWT_GET_CAPABILITIES TWT + * operation. + * @QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_MAC_ADDR: 6-byte MAC address + * Represents the MAC address of the peer for which the TWT capabilities + * are being queried. This is used in AP mode to represent the respective + * client. In STA mode, this is an optional parameter. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_SELF: (u16). + * Self TWT capabilities. Carries a bitmap of TWT capabilities specified in + * enum qca_wlan_twt_capa. + * @QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_PEER: (u16). + * Peer TWT capabilities. Carries a bitmap of TWT capabilities specified in + * enum qca_wlan_twt_capa. + */ +enum qca_wlan_vendor_attr_twt_capability { + QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_MAC_ADDR = 1, + QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_SELF = 2, + QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_PEER = 3, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_MAX = + QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_attr_twt_set_param: Represents attributes for + * TWT (Target Wake Time) related parameters. It is used when + * %QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_OPERATION is set to %QCA_WLAN_TWT_SET_PARAM. + * These attributes are sent as part of %QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT. + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SET_PARAM_AP_AC_VALUE: Optional (u8) + * This attribute configures AC parameters to be used for all TWT + * sessions in AP mode. + * Uses the enum qca_wlan_ac_type values. + */ +enum qca_wlan_vendor_attr_twt_set_param { + QCA_WLAN_VENDOR_ATTR_TWT_SET_PARAM_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_TWT_SET_PARAM_AP_AC_VALUE = 1, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_TWT_SET_PARAM_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_TWT_SET_PARAM_MAX = + QCA_WLAN_VENDOR_ATTR_TWT_SET_PARAM_AFTER_LAST - 1, +}; + +/** * enum qca_wlan_vendor_twt_setup_resp_type - Represents the response type by * the TWT responder * @@ -8124,6 +9377,22 @@ enum qca_wlan_vendor_attr_roam_scan { }; /** + * enum qca_wlan_vendor_cfr_data_transport_modes - Defines QCA vendor CFR data + * transport modes and is used by the attribute + * QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_TRANSPORT_MODE as a part of the vendor + * command QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG. + * @QCA_WLAN_VENDOR_CFR_DATA_RELAY_FS: Use relayfs to send CFR data. + * @QCA_WLAN_VENDOR_CFR_DATA_NETLINK_EVENTS: Use netlink events to send CFR + * data. The data shall be encapsulated within + * QCA_WLAN_VENDOR_ATTR_PEER_CFR_RESP_DATA along with the vendor sub command + * QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG as an asynchronous event. + */ +enum qca_wlan_vendor_cfr_data_transport_modes { + QCA_WLAN_VENDOR_CFR_DATA_RELAY_FS = 0, + QCA_WLAN_VENDOR_CFR_DATA_NETLINK_EVENTS = 1, +}; + +/** * enum qca_wlan_vendor_cfr_method - QCA vendor CFR methods used by * attribute QCA_WLAN_VENDOR_ATTR_PEER_CFR_METHOD as part of vendor * command QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG. @@ -8313,6 +9582,27 @@ enum qca_wlan_vendor_cfr_capture_type { * MAC for CFR capture. This is a bitmask in which each bit represents the * corresponding Data frame subtype value per IEEE Std 802.11-2016, * 9.2.4.1.3 Type and Subtype subfields. This is for CFR version 2 only. + * + * @QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_TRANSPORT_MODE: Optional (u8) + * Userspace can use this attribute to specify the driver about which transport + * mode shall be used by the driver to send CFR data to userspace. Uses values + * from enum qca_wlan_vendor_cfr_data_transport_modes. When this attribute is + * not present, the driver shall use the default transport mechanism which is + * QCA_WLAN_VENDOR_CFR_DATA_RELAY_FS. + * + * @QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_RECEIVER_PID: Optional (u32) + * Userspace can use this attribute to specify the nl port id of the application + * which receives the CFR data and processes it further so that the drivers can + * unicast the netlink events to a specific application. Optionally included + * when QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_TRANSPORT_MODE is set to + * QCA_WLAN_VENDOR_CFR_DATA_NETLINK_EVENTS, not required otherwise. The drivers + * shall multicast the netlink events when this attribute is not included. + * + * @QCA_WLAN_VENDOR_ATTR_PEER_CFR_RESP_DATA: Required (NLA_BINARY). + * This attribute will be used by the driver to encapsulate and send CFR data + * to userspace along with QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG as an + * asynchronous event when the driver is configured to send CFR data using + * netlink events with %QCA_WLAN_VENDOR_CFR_DATA_NETLINK_EVENTS. */ enum qca_wlan_vendor_peer_cfr_capture_attr { QCA_WLAN_VENDOR_ATTR_PEER_CFR_CAPTURE_INVALID = 0, @@ -8341,6 +9631,9 @@ enum qca_wlan_vendor_peer_cfr_capture_attr { QCA_WLAN_VENDOR_ATTR_PEER_CFR_GROUP_MGMT_FILTER = 23, QCA_WLAN_VENDOR_ATTR_PEER_CFR_GROUP_CTRL_FILTER = 24, QCA_WLAN_VENDOR_ATTR_PEER_CFR_GROUP_DATA_FILTER = 25, + QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_TRANSPORT_MODE = 26, + QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_RECEIVER_PID = 27, + QCA_WLAN_VENDOR_ATTR_PEER_CFR_RESP_DATA = 28, /* Keep last */ QCA_WLAN_VENDOR_ATTR_PEER_CFR_AFTER_LAST, @@ -9027,20 +10320,48 @@ enum qca_wlan_vendor_attr_oem_data_params { * * @QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_RANGE: Required * Nested attribute containing multiple ranges with following attributes: - * QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_START and - * QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_END. + * QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_START, + * QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_END, and + * QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM. * * @QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_START: Required (u32) * Starting center frequency in MHz. * * @QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_END: Required (u32) * Ending center frequency in MHz. + * + * @QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM: + * s32 attribute, optional. It is a per frequency range attribute. + * The maximum TX power limit from user space is to be applied on an + * unrestricted interface for corresponding frequency range. It is also + * possible that the actual TX power may be even lower than this cap due to + * other considerations such as regulatory compliance, SAR, etc. In absence of + * this attribute the driver shall follow current behavior which means + * interface (SAP/P2P) function can keep operating on an unsafe channel with TX + * power derived by the driver based on regulatory/SAR during interface up. + * + * @QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFACES_BITMASK: + * u32 attribute, optional. Indicates all the interface types which are + * restricted for all frequency ranges provided in + * %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_START and + * %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_END. + * This attribute encapsulates bitmasks of interface types defined in + * enum nl80211_iftype. If an interface is marked as restricted the driver must + * move to a safe channel and if no safe channel is available the driver shall + * terminate that interface functionality. In absence of this attribute, + * interface (SAP/P2P) can still continue operating on an unsafe channel with + * TX power limit derived from either + * %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM or based on + * regulatory/SAE limits if %QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM + * is not provided. */ enum qca_wlan_vendor_attr_avoid_frequency_ext { QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_INVALID = 0, QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_RANGE = 1, QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_START = 2, QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_END = 3, + QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_POWER_CAP_DBM = 4, + QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFACES_BITMASK = 5, QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_MAX = @@ -9366,7 +10687,56 @@ enum qca_vendor_wlan_sta_guard_interval { * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_BEACON_REPLAY_COUNT: u32, used in STA mode * only. This represents number of Beacon frames received from this station with * the packet number less than or equal to the last received packet number when - * beacon protection is enabled. + * beacon protection is enabled. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_CONNECT_FAIL_REASON_CODE: u32, used in + * STA mode only. The driver uses this attribute to populate the connection + * failure reason codes and the values are defined in + * enum qca_sta_connect_fail_reason_codes. Userspace applications can send + * QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO vendor command after receiving + * a connection failure indication from the driver. The driver shall not + * include this attribute in response to the + * QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO command if there is no connection + * failure observed in the last attempted connection. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_LATEST_TX_RATE: u32, latest TX rate (Kbps) + * used by the station in its last TX frame while communicating to the AP in the + * connected state. When queried in the disconnected state, this represents the + * rate used by the STA in the last TX frame to the AP when it was connected. + * This attribute is used for STA mode only. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_LATEST_RIX: u32, used in STA mode only. + * This represents the rate index used by the STA for the last TX frame to the + * AP. When queried in the disconnected state, this gives the last RIX used by + * the STA in the last TX frame to the AP when it was connected. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_TSF_OUT_OF_SYNC_COUNT: u32, used in STA + * mode only. This represents the number of times the STA TSF goes out of sync + * from the AP after the connection. If queried in the disconnected state, this + * gives the count of TSF out of sync for the last connection. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_TRIGGER_REASON: u32, used in STA + * mode only. This represents the roam trigger reason for the last roaming + * attempted by the firmware. This can be queried either in connected state or + * disconnected state. Each bit of this attribute represents the different + * roam trigger reason code which are defined in enum qca_vendor_roam_triggers. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_FAIL_REASON: u32, used in STA mode + * only. This represents the roam fail reason for the last failed roaming + * attempt by the firmware. Different roam failure reason codes are specified + * in enum qca_vendor_roam_fail_reasons. This can be queried either in + * connected state or disconnected state. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_INVOKE_FAIL_REASON: u32, used in + * STA mode only. This represents the roam invoke fail reason for the last + * failed roam invoke. Different roam invoke failure reason codes + * are specified in enum qca_vendor_roam_invoke_fail_reasons. This can be + * queried either in connected state or disconnected state. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY: u32, used in STA mode only. + * This represents the average congestion duration of uplink frames in MAC + * queue in unit of ms. This can be queried either in connected state or + * disconnected state. */ enum qca_wlan_vendor_attr_get_sta_info { QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_INVALID = 0, @@ -9412,6 +10782,14 @@ enum qca_wlan_vendor_attr_get_sta_info { QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_BIP_REPLAY_COUNT = 40, QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_BEACON_MIC_ERROR_COUNT = 41, QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_BEACON_REPLAY_COUNT = 42, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_CONNECT_FAIL_REASON_CODE = 43, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_LATEST_TX_RATE = 44, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_LATEST_RIX = 45, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_TSF_OUT_OF_SYNC_COUNT = 46, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_TRIGGER_REASON = 47, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_FAIL_REASON = 48, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_INVOKE_FAIL_REASON = 49, + QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY = 50, /* keep last */ QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_AFTER_LAST, @@ -9842,4 +11220,600 @@ enum qca_wlan_vendor_attr_medium_assess { QCA_WLAN_VENDOR_ATTR_MEDIUM_ASSESS_AFTER_LAST - 1, }; +/** + * enum qca_wlan_vendor_attr_mbssid_tx_vdev_status - Defines attributes + * used by QCA_NL80211_VENDOR_SUBCMD_MBSSID_TX_VDEV_STATUS vendor command. + * + * @QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_STATUS_VAL: + * u8 attribute. Notify the TX VDEV status. Possible values 0, 1 + * belonging to MBSSID/EMA_AP configuration. 0 means Non-Tx VDEV, + * 1 means Tx VDEV. Mandatory attribute for all MBSSID VDEV status events. + * + * @QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_EVENT: + * u8 attribute, required. 1 means Tx VDEV up event. 0 means Tx VDEV down event. + * + * @QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_ID: + * u8 attribute, required. Indicates group id of Tx VDEV. + * + * @QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO: + * Nested attribute. This attribute shall be used by the driver to send + * group information. The attributes defined in enum + * qca_wlan_vendor_attr_mbssid_tx_vdev_group_info + * are nested in this attribute. + */ +enum qca_wlan_vendor_attr_mbssid_tx_vdev_status { + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_STATUS_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_STATUS_VAL = 1, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_EVENT = 2, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_ID = 3, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO = 4, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_STATUS_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_STATUS_MAX = + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_STATUS_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_attr_mbssid_tx_vdev_group_info - Attributes used + * inside %QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO nested attribute. + * + * @QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO_IF_INDEX: + * u32 attribute, required. Contains interface index. + * + * @QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO_STATUS: + * u8 attribute, required. 0 - means vdev is in down state. + * 1 - means vdev is in up state. + */ +enum qca_wlan_vendor_attr_mbssid_tx_vdev_group_info { + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO_IF_INDEX = 1, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO_STATUS = 2, + + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO_MAX = + QCA_WLAN_VENDOR_ATTR_MBSSID_TX_VDEV_GROUP_INFO - 1, +}; + +/** + * enum qca_wlan_concurrent_sta_policy_config - Concurrent STA policies + * + * @QCA_WLAN_CONCURRENT_STA_POLICY_PREFER_PRIMARY: Preference to the primary + * STA interface has to be given while selecting the connection policies + * (e.g., BSSID, band, TX/RX chains, etc.) for the subsequent STA interface. + * An interface is set as primary through the attribute + * QCA_WLAN_VENDOR_ATTR_CONFIG_CONCURRENT_STA_PRIMARY. This policy is not + * applicable if the primary interface has not been set earlier. + * + * The intention is not to downgrade the primary STA performance, such as: + * - Do not reduce the number of TX/RX chains of primary connection. + * - Do not optimize DBS vs. MCC/SCC, if DBS ends up reducing the number of + * chains. + * - If using MCC, should set the MCC duty cycle of the primary connection to + * be higher than the secondary connection. + * + * @QCA_WLAN_CONCURRENT_STA_POLICY_UNBIASED: The connection policies for the + * subsequent STA connection shall be chosen to balance with the existing + * concurrent STA's performance. + * Such as + * - Can choose MCC or DBS mode depending on the MCC efficiency and hardware + * capability. + * - If using MCC, set the MCC duty cycle of the primary connection to be equal + * to the secondary. + * - Prefer BSSID candidates which will help provide the best "overall" + * performance for all the STA connections. + */ +enum qca_wlan_concurrent_sta_policy_config { + QCA_WLAN_CONCURRENT_STA_POLICY_PREFER_PRIMARY = 0, + QCA_WLAN_CONCURRENT_STA_POLICY_UNBIASED = 1, +}; + +/** + * enum qca_wlan_vendor_attr_concurrent_sta_policy - Defines attributes + * used by QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_MULTI_STA_POLICY vendor command. + * + * @QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_CONFIG: + * u8 attribute. Configures the concurrent STA policy configuration. + * Possible values are defined in enum qca_wlan_concurrent_sta_policy_config. + */ +enum qca_wlan_vendor_attr_concurrent_sta_policy { + QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_CONFIG = 1, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_MAX = + QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_AFTER_LAST - 1, + +}; + +/** + * enum qca_sta_connect_fail_reason_codes - Defines values carried + * by QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_CONNECT_FAIL_REASON_CODE vendor + * attribute. + * @QCA_STA_CONNECT_FAIL_REASON_NO_BSS_FOUND: No Probe Response frame received + * for unicast Probe Request frame. + * @QCA_STA_CONNECT_FAIL_REASON_AUTH_TX_FAIL: STA failed to send auth request. + * @QCA_STA_CONNECT_FAIL_REASON_AUTH_NO_ACK_RECEIVED: AP didn't send ACK for + * auth request. + * @QCA_STA_CONNECT_FAIL_REASON_AUTH_NO_RESP_RECEIVED: Auth response is not + * received from AP. + * @QCA_STA_CONNECT_FAIL_REASON_ASSOC_REQ_TX_FAIL: STA failed to send + * Association Request frame. + * @QCA_STA_CONNECT_FAIL_REASON_ASSOC_NO_ACK_RECEIVED: AP didn't send ACK for + * Association Request frame. + * @QCA_STA_CONNECT_FAIL_REASON_ASSOC_NO_RESP_RECEIVED: Association Response + * frame is not received from AP. + */ +enum qca_sta_connect_fail_reason_codes { + QCA_STA_CONNECT_FAIL_REASON_NO_BSS_FOUND = 1, + QCA_STA_CONNECT_FAIL_REASON_AUTH_TX_FAIL = 2, + QCA_STA_CONNECT_FAIL_REASON_AUTH_NO_ACK_RECEIVED = 3, + QCA_STA_CONNECT_FAIL_REASON_AUTH_NO_RESP_RECEIVED = 4, + QCA_STA_CONNECT_FAIL_REASON_ASSOC_REQ_TX_FAIL = 5, + QCA_STA_CONNECT_FAIL_REASON_ASSOC_NO_ACK_RECEIVED = 6, + QCA_STA_CONNECT_FAIL_REASON_ASSOC_NO_RESP_RECEIVED = 7, +}; + +/** + * enum qca_wlan_vendor_usable_channels_filter - Bitmask of different + * filters defined in this enum are used in attribute + * %QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_FILTER_MASK. + * + * @QCA_WLAN_VENDOR_FILTER_CELLULAR_COEX: When this bit is set, the driver + * shall filter the channels which are not usable because of coexistence with + * cellular radio. + * @QCA_WLAN_VENDOR_FILTER_WLAN_CONCURRENCY: When this bit is set, the driver + * shall filter the channels which are not usable because of existing active + * interfaces in the driver and will result in Multi Channel Concurrency, etc. + * + */ +enum qca_wlan_vendor_usable_channels_filter { + QCA_WLAN_VENDOR_FILTER_CELLULAR_COEX = 0, + QCA_WLAN_VENDOR_FILTER_WLAN_CONCURRENCY = 1, +}; + +/** + * enum qca_wlan_vendor_attr_chan_info - Attributes used inside + * %QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_CHAN_INFO nested attribute. + * + * @QCA_WLAN_VENDOR_ATTR_CHAN_INFO_PRIMARY_FREQ: + * u32 attribute, required. Indicates the center frequency of the primary + * channel in MHz. + * + * @QCA_WLAN_VENDOR_ATTR_CHAN_INFO_SEG0_FREQ: + * u32 attribute. Indicates the center frequency of the primary segment of the + * channel in MHz. This attribute is required when reporting 40 MHz, 80 MHz, + * 160 MHz, and 320 MHz channels. + * + * @QCA_WLAN_VENDOR_ATTR_CHAN_INFO_SEG1_FREQ: + * u32 attribute. Indicates the center frequency of the secondary segment of + * 80+80 channel in MHz. This attribute is required only when + * QCA_WLAN_VENDOR_ATTR_CHAN_INFO_BANDWIDTH is set to NL80211_CHAN_WIDTH_80P80. + * + * @QCA_WLAN_VENDOR_ATTR_CHAN_INFO_BANDWIDTH: + * u32 attribute, required. Indicates the bandwidth of the channel, possible + * values are defined in enum nl80211_chan_width. + * + * @QCA_WLAN_VENDOR_ATTR_CHAN_INFO_IFACE_MODE_MASK: + * u32 attribute, required. Indicates all the interface types for which this + * channel is usable. This attribute encapsulates bitmasks of interface types + * defined in enum nl80211_iftype. + * + */ +enum qca_wlan_vendor_attr_chan_info { + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_PRIMARY_FREQ = 1, + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_SEG0_FREQ = 2, + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_SEG1_FREQ = 3, + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_BANDWIDTH = 4, + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_IFACE_MODE_MASK = 5, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_MAX = + QCA_WLAN_VENDOR_ATTR_CHAN_INFO_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_attr_usable_channels - Attributes used by + * %QCA_NL80211_VENDOR_SUBCMD_USABLE_CHANNELS vendor command. + * + * @QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_BAND_MASK: + * u32 attribute. Indicates the bands from which the channels should be reported + * in response. This attribute encapsulates bit masks of bands defined in enum + * nl80211_band. Optional attribute, if not present in the request the driver + * shall return channels from all supported bands. + * + * @QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_IFACE_MODE_MASK: + * u32 attribute. Indicates all the interface types for which the usable + * channels information is requested. This attribute encapsulates bitmasks of + * interface types defined in enum nl80211_iftype. Optional attribute, if not + * present in the request the driver shall send information of all supported + * interface modes. + * + * @QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_FILTER_MASK: + * u32 attribute. This attribute carries information of all filters that shall + * be applied while populating usable channels information by the driver. This + * attribute carries bit masks of different filters defined in enum + * qca_wlan_vendor_usable_channels_filter. Optional attribute, if not present + * in the request the driver shall send information of channels without applying + * any of the filters that can be configured through this attribute. + * + * @QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_CHAN_INFO: + * Nested attribute. This attribute shall be used by the driver to send + * usability information of each channel. The attributes defined in enum + * qca_wlan_vendor_attr_chan_info are used inside this attribute. + */ +enum qca_wlan_vendor_attr_usable_channels { + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_BAND_MASK = 1, + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_IFACE_MODE_MASK = 2, + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_FILTER_MASK = 3, + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_CHAN_INFO = 4, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_MAX = + QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_attr_radar_history: Used by the vendor command + * QCA_NL80211_VENDOR_SUBCMD_GET_RADAR_HISTORY to get DFS radar history. + * + * @QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_ENTRIES: Nested attribute to carry + * the list of radar history entries. + * Each entry contains freq, timestamp, and radar signal detect flag. + * The driver shall add an entry when CAC has finished, or radar signal + * has been detected post AP beaconing. The driver shall maintain at least + * 8 entries in order to save CAC result for a 160 MHz channel. + * @QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_FREQ: u32 attribute. + * Channel frequency in MHz. + * @QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_TIMESTAMP: u64 nanoseconds. + * CLOCK_BOOTTIME timestamp when this entry is updated due to CAC + * or radar detection. + * @QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_DETECTED: NLA_FLAG attribute. + * This flag indicates radar signal has been detected. + */ +enum qca_wlan_vendor_attr_radar_history { + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_INVALID = 0, + + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_ENTRIES = 1, + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_FREQ = 2, + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_TIMESTAMP = 3, + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_DETECTED = 4, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_LAST, + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_MAX = + QCA_WLAN_VENDOR_ATTR_RADAR_HISTORY_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_attr_mdns_offload - Attributes used by + * %QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD vendor command. + * + * @QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ENABLE: Required (flag) + * Enable mDNS offload. This attribute is mandatory to enable + * mDNS offload feature. If this attribute is not present, mDNS offload + * is disabled. + * + * @QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_TABLE: Nested attribute containing + * one or more %QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ENTRY attributes. This + * attribute is mandatory when enabling the feature, and not required when + * disabling the feature. + * + * @QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ENTRY: Nested attribute containing + * the following attributes: + * %QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_FQDN + * %QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_RESOURCE_RECORDS_COUNT + * %QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_PAYLOAD + * + * @QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_FQDN: Required string attribute. + * It consists of a hostname and ".local" as the domain name. The character + * set is limited to UTF-8 encoding. The maximum allowed size is 63 bytes. + * It is used to compare the domain in the "QU" query. Only 1 FQDN is + * supported per vdev. + * For example: myphone.local + * + * @QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_RESOURCE_RECORDS_COUNT: Required + * u16 attribute. It specifies the total number of resource records present + * in the answer section of the answer payload. This attribute is needed by the + * firmware to populate the mDNS response frame for mDNS queries without having + * to parse the answer payload. + * + * @QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_PAYLOAD: Required binary blob + * attribute sent by the mdnsResponder from userspace. It contains resource + * records of various types (e.g., A, AAAA, PTR, TXT) and service list. This + * payload is passed down to the firmware and is transmitted in response to + * mDNS queries. + * The maximum supported size of the answer payload is 512 bytes. + */ +enum qca_wlan_vendor_attr_mdns_offload { + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ENABLE = 1, + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_TABLE = 2, + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ENTRY = 3, + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_FQDN = 4, + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_RESOURCE_RECORDS_COUNT = 5, + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_ANSWER_PAYLOAD = 6, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_MAX = + QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_AFTER_LAST - 1, +}; + +/** + * qca_wlan_vendor_monitor_data_frame_type - Represent the various + * Data frame types to be sent over the monitor interface. + */ +enum qca_wlan_vendor_monitor_data_frame_type { + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ALL = BIT(0), + /* valid only if QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ALL is not set + */ + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ARP = BIT(1), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DHCPV4 = BIT(2), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DHCPV6 = BIT(3), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_EAPOL = BIT(4), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DNSV4 = BIT(5), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DNSV6 = BIT(6), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_SYN = BIT(7), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_SYNACK = BIT(8), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_FIN = BIT(9), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_FINACK = BIT(10), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_ACK = BIT(11), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_RST = BIT(12), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ICMPV4 = BIT(13), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ICMPV6 = BIT(14), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_RTP = BIT(15), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_SIP = BIT(16), + QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_QOS_NULL = BIT(17), +}; + +/** + * qca_wlan_vendor_monitor_mgmt_frame_type - Represent the various + * Management frame types to be sent over the monitor interface. + * @QCA_WLAN_VENDOR_MONITOR_MGMT_FRAME_TYPE_ALL: All the Management Frames. + * @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_NO_BEACON: All the Management frames + * except the Beacon frame. + * @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_BEACON: Only the connected + * BSSID Beacon frames. Valid only in the connected state. + * @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_SCAN_BEACON: Represents + * the Beacon frames obtained during the scan (off channel and connected + * channel), when in connected state. + */ + +enum qca_wlan_vendor_monitor_mgmt_frame_type { + QCA_WLAN_VENDOR_MONITOR_MGMT_FRAME_TYPE_ALL = BIT(0), + /* valid only if QCA_WLAN_VENDOR_MONITOR_MGMT_FRAME_TYPE_ALL is not set + */ + QCA_WLAN_VENDOR_MONITOR_MGMT_NO_BEACON = BIT(1), + QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_BEACON = BIT(2), + QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_SCAN_BEACON = BIT(3), +}; + +/** + * qca_wlan_vendor_monitor_ctrl_frame_type - Represent the various + * Control frame types to be sent over the monitor interface. + * @QCA_WLAN_VENDOR_MONITOR_CTRL_FRAME_TYPE_ALL: All the Control frames + * @QCA_WLAN_VENDOR_MONITOR_CTRL_TRIGGER_FRAME: Trigger frame + */ +enum qca_wlan_vendor_monitor_ctrl_frame_type { + QCA_WLAN_VENDOR_MONITOR_CTRL_FRAME_TYPE_ALL = BIT(0), + /* valid only if QCA_WLAN_VENDOR_MONITOR_CTRL_FRAME_TYPE_ALL is not set + */ + QCA_WLAN_VENDOR_MONITOR_CTRL_TRIGGER_FRAME = BIT(1), +}; + +/** + * enum qca_wlan_vendor_attr_set_monitor_mode - Used by the + * vendor command QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE to set the + * monitor mode. + * + * @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_TX_FRAME_TYPE: u32 attribute. + * Represents the TX Data frame types to be monitored (u32). These Data frames + * are represented by enum qca_wlan_vendor_monitor_data_frame_type. + * + * @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_RX_FRAME_TYPE: u32 attribute. + * Represents the RX Data frame types to be monitored (u32). These Data frames + * are represented by enum qca_wlan_vendor_monitor_data_frame_type. + * + * @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_TX_FRAME_TYPE: u32 attribute. + * Represents the TX Management frame types to be monitored (u32). These + * Management frames are represented by + * enum qca_wlan_vendor_monitor_mgmt_frame_type. + * + * @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_RX_FRAME_TYPE: u32 attribute. + * Represents the RX Management frame types to be monitored (u32). These + * Management frames are represented by + * enum qca_wlan_vendor_monitor_mgmt_frame_type. + * + * @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_TX_FRAME_TYPE: u32 attribute. + * Represents the TX Control frame types to be monitored (u32). These Control + * frames are represented by enum qca_wlan_vendor_monitor_ctrl_frame_type. + * + * @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_RX_FRAME_TYPE: u32 attribute. + * Represents the RX Control frame types to be monitored (u32). These Control + * frames are represented by enum qca_wlan_vendor_monitor_ctrl_frame_type. + * + * @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CONNECTED_BEACON_INTERVAL: u32 + * attribute. + * Represents the interval in milliseconds only for the connected Beacon frames, + * expecting the connected BSS's Beacon frames to be sent on the monitor + * interface at this specific interval. + */ +enum qca_wlan_vendor_attr_set_monitor_mode +{ + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_TX_FRAME_TYPE = 1, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_RX_FRAME_TYPE = 2, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_TX_FRAME_TYPE = 3, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_RX_FRAME_TYPE = 4, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_TX_FRAME_TYPE = 5, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_RX_FRAME_TYPE = 6, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CONNECTED_BEACON_INTERVAL = 7, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MAX = + QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_roam_scan_state - Roam scan state flags. + * Bits will be set to 1 if the corresponding state is enabled. + * + * @QCA_VENDOR_WLAN_ROAM_SCAN_STATE_START: Scan Start. + * @QCA_VENDOR_WLAN_ROAM_SCAN_STATE_END: Scan end. + */ +enum qca_wlan_vendor_roam_scan_state { + QCA_WLAN_VENDOR_ROAM_SCAN_STATE_START = BIT(0), + QCA_WLAN_VENDOR_ROAM_SCAN_STATE_END = BIT(1), +}; + +/** + * enum qca_wlan_vendor_roam_event_type - Roam event type flags. + * Bits will be set to 1 if the corresponding event is notified. + * + * @QCA_WLAN_VENDOR_ROAM_EVENT_TRIGGER_REASON: Represents that the roam event + * carries the trigger reason. When set, it is expected that the roam event + * carries the respective reason via the attribute + * QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_TRIGGER_REASON. This event also carries + * the BSSID, RSSI, frequency info of the AP to which the roam is attempted. + * + * @QCA_WLAN_VENDOR_ROAM_EVENT_FAIL_REASON: Represents that the roam event + * carries the roam fail reason. When set, it is expected that the roam event + * carries the respective reason via the attribute + * QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_FAIL_REASON. This event also carries the + * BSSID, RSSI, frequency info of the AP to which the roam was attempted. + * + * @QCA_WLAN_VENDOR_ROAM_EVENT_INVOKE_FAIL_REASON: Represents that the roam + * event carries the roam invoke fail reason. When set, it is expected that + * the roam event carries the respective reason via the attribute + * QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_INVOKE_FAIL_REASON. + * + * @QCA_WLAN_VENDOR_ROAM_EVENT_SCAN_STATE: Represents that the roam event + * carries the roam scan state. When set, it is expected that the roam event + * carries the respective scan state via the attribute + * QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_ROAM_SCAN_STATE and the corresponding + * frequency info via QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_ROAM_SCAN_FREQ_LIST. + */ +enum qca_wlan_vendor_roam_event_type { + QCA_WLAN_VENDOR_ROAM_EVENT_TRIGGER_REASON = BIT(0), + QCA_WLAN_VENDOR_ROAM_EVENT_FAIL_REASON = BIT(1), + QCA_WLAN_VENDOR_ROAM_EVENT_INVOKE_FAIL_REASON = BIT(2), + QCA_WLAN_VENDOR_ROAM_EVENT_ROAM_SCAN_STATE = BIT(3), +}; + +/** + * enum qca_wlan_vendor_attr_roam_events_candidate_info: Roam candidate info. + * Referred by QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_BSSID: 6-byte MAC address + * representing the BSSID of the AP to which the roam is attempted. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_RSSI: Signed 32-bit value + * in dBm, signifying the RSSI of the candidate BSSID to which the Roaming is + * attempted. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_FREQ: u32, frequency in MHz + * on which the roam is attempted. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_FAIL_REASON: u32, used in + * STA mode only. This represents the roam fail reason for the last failed + * roaming attempt by the firmware for the specific BSSID. Different roam + * failure reason codes are specified in enum qca_vendor_roam_fail_reasons. + */ +enum qca_wlan_vendor_attr_roam_events_candidate_info { + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_BSSID = 1, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_RSSI = 2, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_FREQ = 3, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_FAIL_REASON = 4, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_MAX = + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_vendor_attr_roam_events - Used by the + * vendor command QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS to either configure the + * roam events to the driver or notify these events from the driver. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CONFIGURE: u8 attribute. Configures the + * driver/firmware to enable/disable the notification of roam events. It's a + * mandatory attribute and used only in the request from the userspace to the + * host driver. 1-Enable, 0-Disable. + * If the roaming is totally offloaded to the firmware, this request when + * enabled shall mandate the firmware to notify all the relevant roam events + * represented by the below attributes. If the host is in the suspend mode, + * the behavior of the firmware to notify these events is guided by + * QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_DEVICE_STATE, and if the request is to get + * these events in the suspend state, the firmware is expected to wake up the + * host before the respective events are notified. Please note that such a + * request to get the events in the suspend state will have a definite power + * implication. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_SUSPEND_STATE: flag attribute. Represents + * that the roam events need to be notified in the suspend state too. By + * default, these roam events are notified in the resume state. With this flag, + * the roam events are notified in both resume and suspend states. + * This attribute is used in the request from the userspace to the host driver. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_TYPE: u32, used in STA mode only. + * Represents the different roam event types, signified by the enum + * qca_wlan_vendor_roam_event_type. + * Each bit of this attribute represents the different roam even types reported + * through QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS. + * This is sent as an event through QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_TRIGGER_REASON: u32, used in STA + * mode only. This represents the roam trigger reason for the last roaming + * attempted by the firmware. Each bit of this attribute represents the + * different roam trigger reason code which are defined in enum + * qca_vendor_roam_triggers. + * This is sent as an event through QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_INVOKE_FAIL_REASON: u32, used in + * STA mode only. This represents the roam invoke fail reason for the last + * failed roam invoke. Different roam invoke failure reason codes + * are specified in enum qca_vendor_roam_invoke_fail_reasons. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO: Array of candidates info + * for which the roam is attempted. Each entry is a nested attribute defined + * by enum qca_wlan_vendor_attr_roam_events_candidate_info. + * This is sent as an event through QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_ROAM_SCAN_STATE: u8 attribute. Represents + * the scan state on which the roam events need to be notified. The values for + * this attribute are referred from enum qca_wlan_vendor_roam_scan_state. + * This is sent as an event through QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS. + * + * @QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_ROAM_SCAN_FREQ_LIST: Nested attribute of + * u32 values. List of frequencies in MHz considered for a roam scan. + * This is sent as an event through QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS. + */ + +enum qca_wlan_vendor_attr_roam_events +{ + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CONFIGURE = 1, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_SUSPEND_STATE = 2, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_TYPE = 3, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_TRIGGER_REASON = 4, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_INVOKE_FAIL_REASON = 5, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_CANDIDATE_INFO = 6, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_ROAM_SCAN_STATE = 7, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_ROAM_SCAN_FREQ_LIST = 8, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_MAX = + QCA_WLAN_VENDOR_ATTR_ROAM_EVENTS_AFTER_LAST -1, +}; + #endif /* QCA_VENDOR_H */ |