18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */ 28c2ecf20Sopenharmony_ci/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef _QTN_QLINK_H_ 58c2ecf20Sopenharmony_ci#define _QTN_QLINK_H_ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/ieee80211.h> 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#define QLINK_PROTO_VER_MAJOR_M 0xFFFF 108c2ecf20Sopenharmony_ci#define QLINK_PROTO_VER_MAJOR_S 16 118c2ecf20Sopenharmony_ci#define QLINK_PROTO_VER_MINOR_M 0xFFFF 128c2ecf20Sopenharmony_ci#define QLINK_VER_MINOR(_ver) ((_ver) & QLINK_PROTO_VER_MINOR_M) 138c2ecf20Sopenharmony_ci#define QLINK_VER_MAJOR(_ver) \ 148c2ecf20Sopenharmony_ci (((_ver) >> QLINK_PROTO_VER_MAJOR_S) & QLINK_PROTO_VER_MAJOR_M) 158c2ecf20Sopenharmony_ci#define QLINK_VER(_maj, _min) (((_maj) << QLINK_PROTO_VER_MAJOR_S) | (_min)) 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define QLINK_PROTO_VER_MAJOR 18 188c2ecf20Sopenharmony_ci#define QLINK_PROTO_VER_MINOR 1 198c2ecf20Sopenharmony_ci#define QLINK_PROTO_VER \ 208c2ecf20Sopenharmony_ci QLINK_VER(QLINK_PROTO_VER_MAJOR, QLINK_PROTO_VER_MINOR) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define QLINK_ALIGN 4 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define QLINK_MACID_RSVD 0xFF 258c2ecf20Sopenharmony_ci#define QLINK_VIFID_RSVD 0xFF 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* Common QLINK protocol messages definitions. 288c2ecf20Sopenharmony_ci */ 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/** 318c2ecf20Sopenharmony_ci * enum qlink_msg_type - QLINK message types 328c2ecf20Sopenharmony_ci * 338c2ecf20Sopenharmony_ci * Used to distinguish between message types of QLINK protocol. 348c2ecf20Sopenharmony_ci * 358c2ecf20Sopenharmony_ci * @QLINK_MSG_TYPE_CMD: Message is carrying data of a command sent from 368c2ecf20Sopenharmony_ci * driver to wireless hardware. 378c2ecf20Sopenharmony_ci * @QLINK_MSG_TYPE_CMDRSP: Message is carrying data of a response to a command. 388c2ecf20Sopenharmony_ci * Sent from wireless HW to driver in reply to previously issued command. 398c2ecf20Sopenharmony_ci * @QLINK_MSG_TYPE_EVENT: Data for an event originated in wireless hardware and 408c2ecf20Sopenharmony_ci * sent asynchronously to driver. 418c2ecf20Sopenharmony_ci */ 428c2ecf20Sopenharmony_cienum qlink_msg_type { 438c2ecf20Sopenharmony_ci QLINK_MSG_TYPE_CMD = 1, 448c2ecf20Sopenharmony_ci QLINK_MSG_TYPE_CMDRSP = 2, 458c2ecf20Sopenharmony_ci QLINK_MSG_TYPE_EVENT = 3 468c2ecf20Sopenharmony_ci}; 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/** 498c2ecf20Sopenharmony_ci * struct qlink_msg_header - common QLINK protocol message header 508c2ecf20Sopenharmony_ci * 518c2ecf20Sopenharmony_ci * Portion of QLINK protocol header common for all message types. 528c2ecf20Sopenharmony_ci * 538c2ecf20Sopenharmony_ci * @type: Message type, one of &enum qlink_msg_type. 548c2ecf20Sopenharmony_ci * @len: Total length of message including all headers. 558c2ecf20Sopenharmony_ci */ 568c2ecf20Sopenharmony_cistruct qlink_msg_header { 578c2ecf20Sopenharmony_ci __le16 type; 588c2ecf20Sopenharmony_ci __le16 len; 598c2ecf20Sopenharmony_ci} __packed; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci/* Generic definitions of data and information carried in QLINK messages 628c2ecf20Sopenharmony_ci */ 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci/** 658c2ecf20Sopenharmony_ci * enum qlink_hw_capab - device capabilities. 668c2ecf20Sopenharmony_ci * 678c2ecf20Sopenharmony_ci * @QLINK_HW_CAPAB_REG_UPDATE: device can update it's regulatory region. 688c2ecf20Sopenharmony_ci * @QLINK_HW_CAPAB_STA_INACT_TIMEOUT: device implements a logic to kick-out 698c2ecf20Sopenharmony_ci * associated STAs due to inactivity. Inactivity timeout period is taken 708c2ecf20Sopenharmony_ci * from QLINK_CMD_START_AP parameters. 718c2ecf20Sopenharmony_ci * @QLINK_HW_CAPAB_DFS_OFFLOAD: device implements DFS offload functionality 728c2ecf20Sopenharmony_ci * @QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR: device supports MAC Address 738c2ecf20Sopenharmony_ci * Randomization in probe requests. 748c2ecf20Sopenharmony_ci * @QLINK_HW_CAPAB_OBSS_SCAN: device can perform OBSS scanning. 758c2ecf20Sopenharmony_ci * @QLINK_HW_CAPAB_HW_BRIDGE: device has hardware switch capabilities. 768c2ecf20Sopenharmony_ci */ 778c2ecf20Sopenharmony_cienum qlink_hw_capab { 788c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_REG_UPDATE = 0, 798c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_STA_INACT_TIMEOUT, 808c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_DFS_OFFLOAD, 818c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR, 828c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_PWR_MGMT, 838c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_OBSS_SCAN, 848c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_SCAN_DWELL, 858c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_SAE, 868c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_HW_BRIDGE, 878c2ecf20Sopenharmony_ci QLINK_HW_CAPAB_NUM 888c2ecf20Sopenharmony_ci}; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci/** 918c2ecf20Sopenharmony_ci * enum qlink_driver_capab - host driver capabilities. 928c2ecf20Sopenharmony_ci * 938c2ecf20Sopenharmony_ci */ 948c2ecf20Sopenharmony_cienum qlink_driver_capab { 958c2ecf20Sopenharmony_ci QLINK_DRV_CAPAB_NUM = 0 968c2ecf20Sopenharmony_ci}; 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_cienum qlink_iface_type { 998c2ecf20Sopenharmony_ci QLINK_IFTYPE_AP = 1, 1008c2ecf20Sopenharmony_ci QLINK_IFTYPE_STATION = 2, 1018c2ecf20Sopenharmony_ci QLINK_IFTYPE_ADHOC = 3, 1028c2ecf20Sopenharmony_ci QLINK_IFTYPE_MONITOR = 4, 1038c2ecf20Sopenharmony_ci QLINK_IFTYPE_WDS = 5, 1048c2ecf20Sopenharmony_ci QLINK_IFTYPE_AP_VLAN = 6, 1058c2ecf20Sopenharmony_ci}; 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci/** 1088c2ecf20Sopenharmony_ci * struct qlink_intf_info - information on virtual interface. 1098c2ecf20Sopenharmony_ci * 1108c2ecf20Sopenharmony_ci * Data describing a single virtual interface. 1118c2ecf20Sopenharmony_ci * 1128c2ecf20Sopenharmony_ci * @if_type: Mode of interface operation, one of &enum qlink_iface_type 1138c2ecf20Sopenharmony_ci * @vlanid: VLAN ID for AP_VLAN interface type 1148c2ecf20Sopenharmony_ci * @mac_addr: MAC address of virtual interface. 1158c2ecf20Sopenharmony_ci */ 1168c2ecf20Sopenharmony_cistruct qlink_intf_info { 1178c2ecf20Sopenharmony_ci __le16 if_type; 1188c2ecf20Sopenharmony_ci __le16 vlanid; 1198c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 1208c2ecf20Sopenharmony_ci u8 use4addr; 1218c2ecf20Sopenharmony_ci u8 rsvd[1]; 1228c2ecf20Sopenharmony_ci} __packed; 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_cienum qlink_sta_flags { 1258c2ecf20Sopenharmony_ci QLINK_STA_FLAG_INVALID = 0, 1268c2ecf20Sopenharmony_ci QLINK_STA_FLAG_AUTHORIZED = BIT(0), 1278c2ecf20Sopenharmony_ci QLINK_STA_FLAG_SHORT_PREAMBLE = BIT(1), 1288c2ecf20Sopenharmony_ci QLINK_STA_FLAG_WME = BIT(2), 1298c2ecf20Sopenharmony_ci QLINK_STA_FLAG_MFP = BIT(3), 1308c2ecf20Sopenharmony_ci QLINK_STA_FLAG_AUTHENTICATED = BIT(4), 1318c2ecf20Sopenharmony_ci QLINK_STA_FLAG_TDLS_PEER = BIT(5), 1328c2ecf20Sopenharmony_ci QLINK_STA_FLAG_ASSOCIATED = BIT(6), 1338c2ecf20Sopenharmony_ci}; 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_cienum qlink_channel_width { 1368c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_5 = 0, 1378c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_10, 1388c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_20_NOHT, 1398c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_20, 1408c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_40, 1418c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_80, 1428c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_80P80, 1438c2ecf20Sopenharmony_ci QLINK_CHAN_WIDTH_160, 1448c2ecf20Sopenharmony_ci}; 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci/** 1478c2ecf20Sopenharmony_ci * struct qlink_channel - qlink control channel definition 1488c2ecf20Sopenharmony_ci * 1498c2ecf20Sopenharmony_ci * @hw_value: hardware-specific value for the channel 1508c2ecf20Sopenharmony_ci * @center_freq: center frequency in MHz 1518c2ecf20Sopenharmony_ci * @flags: channel flags from &enum qlink_channel_flags 1528c2ecf20Sopenharmony_ci * @band: band this channel belongs to 1538c2ecf20Sopenharmony_ci * @max_antenna_gain: maximum antenna gain in dBi 1548c2ecf20Sopenharmony_ci * @max_power: maximum transmission power (in dBm) 1558c2ecf20Sopenharmony_ci * @max_reg_power: maximum regulatory transmission power (in dBm) 1568c2ecf20Sopenharmony_ci * @dfs_state: current state of this channel. 1578c2ecf20Sopenharmony_ci * Only relevant if radar is required on this channel. 1588c2ecf20Sopenharmony_ci * @beacon_found: helper to regulatory code to indicate when a beacon 1598c2ecf20Sopenharmony_ci * has been found on this channel. Use regulatory_hint_found_beacon() 1608c2ecf20Sopenharmony_ci * to enable this, this is useful only on 5 GHz band. 1618c2ecf20Sopenharmony_ci */ 1628c2ecf20Sopenharmony_cistruct qlink_channel { 1638c2ecf20Sopenharmony_ci __le16 hw_value; 1648c2ecf20Sopenharmony_ci __le16 center_freq; 1658c2ecf20Sopenharmony_ci __le32 flags; 1668c2ecf20Sopenharmony_ci u8 band; 1678c2ecf20Sopenharmony_ci u8 max_antenna_gain; 1688c2ecf20Sopenharmony_ci u8 max_power; 1698c2ecf20Sopenharmony_ci u8 max_reg_power; 1708c2ecf20Sopenharmony_ci __le32 dfs_cac_ms; 1718c2ecf20Sopenharmony_ci u8 dfs_state; 1728c2ecf20Sopenharmony_ci u8 beacon_found; 1738c2ecf20Sopenharmony_ci u8 rsvd[2]; 1748c2ecf20Sopenharmony_ci} __packed; 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci/** 1778c2ecf20Sopenharmony_ci * struct qlink_chandef - qlink channel definition 1788c2ecf20Sopenharmony_ci * 1798c2ecf20Sopenharmony_ci * @chan: primary channel definition 1808c2ecf20Sopenharmony_ci * @center_freq1: center frequency of first segment 1818c2ecf20Sopenharmony_ci * @center_freq2: center frequency of second segment (80+80 only) 1828c2ecf20Sopenharmony_ci * @width: channel width, one of @enum qlink_channel_width 1838c2ecf20Sopenharmony_ci */ 1848c2ecf20Sopenharmony_cistruct qlink_chandef { 1858c2ecf20Sopenharmony_ci struct qlink_channel chan; 1868c2ecf20Sopenharmony_ci __le16 center_freq1; 1878c2ecf20Sopenharmony_ci __le16 center_freq2; 1888c2ecf20Sopenharmony_ci u8 width; 1898c2ecf20Sopenharmony_ci u8 rsvd[3]; 1908c2ecf20Sopenharmony_ci} __packed; 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ci#define QLINK_MAX_NR_CIPHER_SUITES 5 1938c2ecf20Sopenharmony_ci#define QLINK_MAX_NR_AKM_SUITES 2 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_cistruct qlink_auth_encr { 1968c2ecf20Sopenharmony_ci __le32 wpa_versions; 1978c2ecf20Sopenharmony_ci __le32 cipher_group; 1988c2ecf20Sopenharmony_ci __le32 n_ciphers_pairwise; 1998c2ecf20Sopenharmony_ci __le32 ciphers_pairwise[QLINK_MAX_NR_CIPHER_SUITES]; 2008c2ecf20Sopenharmony_ci __le32 n_akm_suites; 2018c2ecf20Sopenharmony_ci __le32 akm_suites[QLINK_MAX_NR_AKM_SUITES]; 2028c2ecf20Sopenharmony_ci __le16 control_port_ethertype; 2038c2ecf20Sopenharmony_ci u8 auth_type; 2048c2ecf20Sopenharmony_ci u8 privacy; 2058c2ecf20Sopenharmony_ci u8 control_port; 2068c2ecf20Sopenharmony_ci u8 control_port_no_encrypt; 2078c2ecf20Sopenharmony_ci u8 rsvd[2]; 2088c2ecf20Sopenharmony_ci} __packed; 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci/** 2118c2ecf20Sopenharmony_ci * struct qlink_sta_info_state - station flags mask/value 2128c2ecf20Sopenharmony_ci * 2138c2ecf20Sopenharmony_ci * @mask: STA flags mask, bitmap of &enum qlink_sta_flags 2148c2ecf20Sopenharmony_ci * @value: STA flags values, bitmap of &enum qlink_sta_flags 2158c2ecf20Sopenharmony_ci */ 2168c2ecf20Sopenharmony_cistruct qlink_sta_info_state { 2178c2ecf20Sopenharmony_ci __le32 mask; 2188c2ecf20Sopenharmony_ci __le32 value; 2198c2ecf20Sopenharmony_ci} __packed; 2208c2ecf20Sopenharmony_ci 2218c2ecf20Sopenharmony_ci/** 2228c2ecf20Sopenharmony_ci * enum qlink_sr_ctrl_flags - control flags for spatial reuse parameter set 2238c2ecf20Sopenharmony_ci * 2248c2ecf20Sopenharmony_ci * @QLINK_SR_PSR_DISALLOWED: indicates whether or not PSR-based spatial reuse 2258c2ecf20Sopenharmony_ci * transmissions are allowed for STAs associated with the AP 2268c2ecf20Sopenharmony_ci * @QLINK_SR_NON_SRG_OBSS_PD_SR_DISALLOWED: indicates whether or not 2278c2ecf20Sopenharmony_ci * Non-SRG OBSS PD spatial reuse transmissions are allowed for STAs associated 2288c2ecf20Sopenharmony_ci * with the AP 2298c2ecf20Sopenharmony_ci * @NON_SRG_OFFSET_PRESENT: indicates whether or not Non-SRG OBSS PD Max offset 2308c2ecf20Sopenharmony_ci * field is valid in the element 2318c2ecf20Sopenharmony_ci * @QLINK_SR_SRG_INFORMATION_PRESENT: indicates whether or not SRG OBSS PD 2328c2ecf20Sopenharmony_ci * Min/Max offset fields ore valid in the element 2338c2ecf20Sopenharmony_ci */ 2348c2ecf20Sopenharmony_cienum qlink_sr_ctrl_flags { 2358c2ecf20Sopenharmony_ci QLINK_SR_PSR_DISALLOWED = BIT(0), 2368c2ecf20Sopenharmony_ci QLINK_SR_NON_SRG_OBSS_PD_SR_DISALLOWED = BIT(1), 2378c2ecf20Sopenharmony_ci QLINK_SR_NON_SRG_OFFSET_PRESENT = BIT(2), 2388c2ecf20Sopenharmony_ci QLINK_SR_SRG_INFORMATION_PRESENT = BIT(3), 2398c2ecf20Sopenharmony_ci}; 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci/** 2428c2ecf20Sopenharmony_ci * struct qlink_sr_params - spatial reuse parameters 2438c2ecf20Sopenharmony_ci * 2448c2ecf20Sopenharmony_ci * @sr_control: spatial reuse control field; flags contained in this field are 2458c2ecf20Sopenharmony_ci * defined in @qlink_sr_ctrl_flags 2468c2ecf20Sopenharmony_ci * @non_srg_obss_pd_max: added to -82 dBm to generate the value of the 2478c2ecf20Sopenharmony_ci * Non-SRG OBSS PD Max parameter 2488c2ecf20Sopenharmony_ci * @srg_obss_pd_min_offset: added to -82 dBm to generate the value of the 2498c2ecf20Sopenharmony_ci * SRG OBSS PD Min parameter 2508c2ecf20Sopenharmony_ci * @srg_obss_pd_max_offset: added to -82 dBm to generate the value of the 2518c2ecf20Sopenharmony_ci * SRG PBSS PD Max parameter 2528c2ecf20Sopenharmony_ci */ 2538c2ecf20Sopenharmony_cistruct qlink_sr_params { 2548c2ecf20Sopenharmony_ci u8 sr_control; 2558c2ecf20Sopenharmony_ci u8 non_srg_obss_pd_max; 2568c2ecf20Sopenharmony_ci u8 srg_obss_pd_min_offset; 2578c2ecf20Sopenharmony_ci u8 srg_obss_pd_max_offset; 2588c2ecf20Sopenharmony_ci} __packed; 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci/* QLINK Command messages related definitions 2618c2ecf20Sopenharmony_ci */ 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci/** 2648c2ecf20Sopenharmony_ci * enum qlink_cmd_type - list of supported commands 2658c2ecf20Sopenharmony_ci * 2668c2ecf20Sopenharmony_ci * Commands are QLINK messages of type @QLINK_MSG_TYPE_CMD, sent by driver to 2678c2ecf20Sopenharmony_ci * wireless network device for processing. Device is expected to send back a 2688c2ecf20Sopenharmony_ci * reply message of type &QLINK_MSG_TYPE_CMDRSP, containing at least command 2698c2ecf20Sopenharmony_ci * execution status (one of &enum qlink_cmd_result). Reply message 2708c2ecf20Sopenharmony_ci * may also contain data payload specific to the command type. 2718c2ecf20Sopenharmony_ci * 2728c2ecf20Sopenharmony_ci * @QLINK_CMD_SEND_FRAME: send specified frame over the air; firmware will 2738c2ecf20Sopenharmony_ci * encapsulate 802.3 packet into 802.11 frame automatically. 2748c2ecf20Sopenharmony_ci * @QLINK_CMD_BAND_INFO_GET: for the specified MAC and specified band, get 2758c2ecf20Sopenharmony_ci * the band's description including number of operational channels and 2768c2ecf20Sopenharmony_ci * info on each channel, HT/VHT capabilities, supported rates etc. 2778c2ecf20Sopenharmony_ci * This command is generic to a specified MAC, interface index must be set 2788c2ecf20Sopenharmony_ci * to QLINK_VIFID_RSVD in command header. 2798c2ecf20Sopenharmony_ci * @QLINK_CMD_REG_NOTIFY: notify device about regulatory domain change. This 2808c2ecf20Sopenharmony_ci * command is supported only if device reports QLINK_HW_SUPPORTS_REG_UPDATE 2818c2ecf20Sopenharmony_ci * capability. 2828c2ecf20Sopenharmony_ci * @QLINK_CMD_START_CAC: start radar detection procedure on a specified channel. 2838c2ecf20Sopenharmony_ci * @QLINK_CMD_TXPWR: get or set current channel transmit power for 2848c2ecf20Sopenharmony_ci * the specified MAC. 2858c2ecf20Sopenharmony_ci * @QLINK_CMD_NDEV_EVENT: signalizes changes made with a corresponding network 2868c2ecf20Sopenharmony_ci * device. 2878c2ecf20Sopenharmony_ci */ 2888c2ecf20Sopenharmony_cienum qlink_cmd_type { 2898c2ecf20Sopenharmony_ci QLINK_CMD_FW_INIT = 0x0001, 2908c2ecf20Sopenharmony_ci QLINK_CMD_FW_DEINIT = 0x0002, 2918c2ecf20Sopenharmony_ci QLINK_CMD_REGISTER_MGMT = 0x0003, 2928c2ecf20Sopenharmony_ci QLINK_CMD_SEND_FRAME = 0x0004, 2938c2ecf20Sopenharmony_ci QLINK_CMD_MGMT_SET_APPIE = 0x0005, 2948c2ecf20Sopenharmony_ci QLINK_CMD_PHY_PARAMS_SET = 0x0012, 2958c2ecf20Sopenharmony_ci QLINK_CMD_GET_HW_INFO = 0x0013, 2968c2ecf20Sopenharmony_ci QLINK_CMD_MAC_INFO = 0x0014, 2978c2ecf20Sopenharmony_ci QLINK_CMD_ADD_INTF = 0x0015, 2988c2ecf20Sopenharmony_ci QLINK_CMD_DEL_INTF = 0x0016, 2998c2ecf20Sopenharmony_ci QLINK_CMD_CHANGE_INTF = 0x0017, 3008c2ecf20Sopenharmony_ci QLINK_CMD_UPDOWN_INTF = 0x0018, 3018c2ecf20Sopenharmony_ci QLINK_CMD_REG_NOTIFY = 0x0019, 3028c2ecf20Sopenharmony_ci QLINK_CMD_BAND_INFO_GET = 0x001A, 3038c2ecf20Sopenharmony_ci QLINK_CMD_CHAN_SWITCH = 0x001B, 3048c2ecf20Sopenharmony_ci QLINK_CMD_CHAN_GET = 0x001C, 3058c2ecf20Sopenharmony_ci QLINK_CMD_START_CAC = 0x001D, 3068c2ecf20Sopenharmony_ci QLINK_CMD_START_AP = 0x0021, 3078c2ecf20Sopenharmony_ci QLINK_CMD_STOP_AP = 0x0022, 3088c2ecf20Sopenharmony_ci QLINK_CMD_SET_MAC_ACL = 0x0023, 3098c2ecf20Sopenharmony_ci QLINK_CMD_GET_STA_INFO = 0x0030, 3108c2ecf20Sopenharmony_ci QLINK_CMD_ADD_KEY = 0x0040, 3118c2ecf20Sopenharmony_ci QLINK_CMD_DEL_KEY = 0x0041, 3128c2ecf20Sopenharmony_ci QLINK_CMD_SET_DEFAULT_KEY = 0x0042, 3138c2ecf20Sopenharmony_ci QLINK_CMD_SET_DEFAULT_MGMT_KEY = 0x0043, 3148c2ecf20Sopenharmony_ci QLINK_CMD_CHANGE_STA = 0x0051, 3158c2ecf20Sopenharmony_ci QLINK_CMD_DEL_STA = 0x0052, 3168c2ecf20Sopenharmony_ci QLINK_CMD_SCAN = 0x0053, 3178c2ecf20Sopenharmony_ci QLINK_CMD_CHAN_STATS = 0x0054, 3188c2ecf20Sopenharmony_ci QLINK_CMD_NDEV_EVENT = 0x0055, 3198c2ecf20Sopenharmony_ci QLINK_CMD_CONNECT = 0x0060, 3208c2ecf20Sopenharmony_ci QLINK_CMD_DISCONNECT = 0x0061, 3218c2ecf20Sopenharmony_ci QLINK_CMD_PM_SET = 0x0062, 3228c2ecf20Sopenharmony_ci QLINK_CMD_WOWLAN_SET = 0x0063, 3238c2ecf20Sopenharmony_ci QLINK_CMD_EXTERNAL_AUTH = 0x0066, 3248c2ecf20Sopenharmony_ci QLINK_CMD_TXPWR = 0x0067, 3258c2ecf20Sopenharmony_ci QLINK_CMD_UPDATE_OWE = 0x0068, 3268c2ecf20Sopenharmony_ci}; 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ci/** 3298c2ecf20Sopenharmony_ci * struct qlink_cmd - QLINK command message header 3308c2ecf20Sopenharmony_ci * 3318c2ecf20Sopenharmony_ci * Header used for QLINK messages of QLINK_MSG_TYPE_CMD type. 3328c2ecf20Sopenharmony_ci * 3338c2ecf20Sopenharmony_ci * @mhdr: Common QLINK message header. 3348c2ecf20Sopenharmony_ci * @cmd_id: command id, one of &enum qlink_cmd_type. 3358c2ecf20Sopenharmony_ci * @seq_num: sequence number of command message, used for matching with 3368c2ecf20Sopenharmony_ci * response message. 3378c2ecf20Sopenharmony_ci * @macid: index of physical radio device the command is destined to or 3388c2ecf20Sopenharmony_ci * QLINK_MACID_RSVD if not applicable. 3398c2ecf20Sopenharmony_ci * @vifid: index of virtual wireless interface on specified @macid the command 3408c2ecf20Sopenharmony_ci * is destined to or QLINK_VIFID_RSVD if not applicable. 3418c2ecf20Sopenharmony_ci */ 3428c2ecf20Sopenharmony_cistruct qlink_cmd { 3438c2ecf20Sopenharmony_ci struct qlink_msg_header mhdr; 3448c2ecf20Sopenharmony_ci __le16 cmd_id; 3458c2ecf20Sopenharmony_ci __le16 seq_num; 3468c2ecf20Sopenharmony_ci u8 macid; 3478c2ecf20Sopenharmony_ci u8 vifid; 3488c2ecf20Sopenharmony_ci u8 rsvd[2]; 3498c2ecf20Sopenharmony_ci} __packed; 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_ci/** 3528c2ecf20Sopenharmony_ci * struct qlink_cmd_init_fw - data for QLINK_CMD_FW_INIT 3538c2ecf20Sopenharmony_ci * 3548c2ecf20Sopenharmony_ci * Initialize firmware based on specified host configuration. This is the first 3558c2ecf20Sopenharmony_ci * command sent to wifi card and it's fixed part should never be changed, any 3568c2ecf20Sopenharmony_ci * additions must be done by appending TLVs. 3578c2ecf20Sopenharmony_ci * If wifi card can not operate with a specified parameters it will return 3588c2ecf20Sopenharmony_ci * error. 3598c2ecf20Sopenharmony_ci * 3608c2ecf20Sopenharmony_ci * @qlink_proto_ver: QLINK protocol version used by host driver. 3618c2ecf20Sopenharmony_ci */ 3628c2ecf20Sopenharmony_cistruct qlink_cmd_init_fw { 3638c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 3648c2ecf20Sopenharmony_ci __le32 qlink_proto_ver; 3658c2ecf20Sopenharmony_ci u8 var_info[]; 3668c2ecf20Sopenharmony_ci} __packed; 3678c2ecf20Sopenharmony_ci 3688c2ecf20Sopenharmony_ci/** 3698c2ecf20Sopenharmony_ci * struct qlink_cmd_manage_intf - interface management command 3708c2ecf20Sopenharmony_ci * 3718c2ecf20Sopenharmony_ci * Data for interface management commands QLINK_CMD_ADD_INTF, QLINK_CMD_DEL_INTF 3728c2ecf20Sopenharmony_ci * and QLINK_CMD_CHANGE_INTF. 3738c2ecf20Sopenharmony_ci * 3748c2ecf20Sopenharmony_ci * @intf_info: interface description. 3758c2ecf20Sopenharmony_ci */ 3768c2ecf20Sopenharmony_cistruct qlink_cmd_manage_intf { 3778c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 3788c2ecf20Sopenharmony_ci struct qlink_intf_info intf_info; 3798c2ecf20Sopenharmony_ci} __packed; 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_cienum qlink_mgmt_frame_type { 3828c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_ASSOC_REQ = 0x00, 3838c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_ASSOC_RESP = 0x01, 3848c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_REASSOC_REQ = 0x02, 3858c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_REASSOC_RESP = 0x03, 3868c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_PROBE_REQ = 0x04, 3878c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_PROBE_RESP = 0x05, 3888c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_BEACON = 0x06, 3898c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_ATIM = 0x07, 3908c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_DISASSOC = 0x08, 3918c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_AUTH = 0x09, 3928c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_DEAUTH = 0x0A, 3938c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_ACTION = 0x0B, 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ci QLINK_MGMT_FRAME_TYPE_COUNT 3968c2ecf20Sopenharmony_ci}; 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_ci/** 3998c2ecf20Sopenharmony_ci * struct qlink_cmd_mgmt_frame_register - data for QLINK_CMD_REGISTER_MGMT 4008c2ecf20Sopenharmony_ci * 4018c2ecf20Sopenharmony_ci * @frame_type: MGMT frame type the registration request describes, one of 4028c2ecf20Sopenharmony_ci * &enum qlink_mgmt_frame_type. 4038c2ecf20Sopenharmony_ci * @do_register: 0 - unregister, otherwise register for reception of specified 4048c2ecf20Sopenharmony_ci * MGMT frame type. 4058c2ecf20Sopenharmony_ci */ 4068c2ecf20Sopenharmony_cistruct qlink_cmd_mgmt_frame_register { 4078c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 4088c2ecf20Sopenharmony_ci __le16 frame_type; 4098c2ecf20Sopenharmony_ci u8 do_register; 4108c2ecf20Sopenharmony_ci u8 rsvd[1]; 4118c2ecf20Sopenharmony_ci} __packed; 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci/** 4148c2ecf20Sopenharmony_ci * @QLINK_FRAME_TX_FLAG_8023: frame has a 802.3 header; if not set, frame 4158c2ecf20Sopenharmony_ci * is a 802.11 encapsulated. 4168c2ecf20Sopenharmony_ci */ 4178c2ecf20Sopenharmony_cienum qlink_frame_tx_flags { 4188c2ecf20Sopenharmony_ci QLINK_FRAME_TX_FLAG_OFFCHAN = BIT(0), 4198c2ecf20Sopenharmony_ci QLINK_FRAME_TX_FLAG_NO_CCK = BIT(1), 4208c2ecf20Sopenharmony_ci QLINK_FRAME_TX_FLAG_ACK_NOWAIT = BIT(2), 4218c2ecf20Sopenharmony_ci QLINK_FRAME_TX_FLAG_8023 = BIT(3), 4228c2ecf20Sopenharmony_ci}; 4238c2ecf20Sopenharmony_ci 4248c2ecf20Sopenharmony_ci/** 4258c2ecf20Sopenharmony_ci * struct qlink_cmd_frame_tx - data for QLINK_CMD_SEND_FRAME command 4268c2ecf20Sopenharmony_ci * 4278c2ecf20Sopenharmony_ci * @cookie: opaque request identifier. 4288c2ecf20Sopenharmony_ci * @freq: Frequency to use for frame transmission. 4298c2ecf20Sopenharmony_ci * @flags: Transmission flags, one of &enum qlink_frame_tx_flags. 4308c2ecf20Sopenharmony_ci * @frame_data: frame to transmit. 4318c2ecf20Sopenharmony_ci */ 4328c2ecf20Sopenharmony_cistruct qlink_cmd_frame_tx { 4338c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 4348c2ecf20Sopenharmony_ci __le32 cookie; 4358c2ecf20Sopenharmony_ci __le16 freq; 4368c2ecf20Sopenharmony_ci __le16 flags; 4378c2ecf20Sopenharmony_ci u8 frame_data[]; 4388c2ecf20Sopenharmony_ci} __packed; 4398c2ecf20Sopenharmony_ci 4408c2ecf20Sopenharmony_ci/** 4418c2ecf20Sopenharmony_ci * struct qlink_cmd_get_sta_info - data for QLINK_CMD_GET_STA_INFO command 4428c2ecf20Sopenharmony_ci * 4438c2ecf20Sopenharmony_ci * @sta_addr: MAC address of the STA statistics is requested for. 4448c2ecf20Sopenharmony_ci */ 4458c2ecf20Sopenharmony_cistruct qlink_cmd_get_sta_info { 4468c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 4478c2ecf20Sopenharmony_ci u8 sta_addr[ETH_ALEN]; 4488c2ecf20Sopenharmony_ci u8 rsvd[2]; 4498c2ecf20Sopenharmony_ci} __packed; 4508c2ecf20Sopenharmony_ci 4518c2ecf20Sopenharmony_ci/** 4528c2ecf20Sopenharmony_ci * struct qlink_cmd_add_key - data for QLINK_CMD_ADD_KEY command. 4538c2ecf20Sopenharmony_ci * 4548c2ecf20Sopenharmony_ci * @key_index: index of the key being installed. 4558c2ecf20Sopenharmony_ci * @pairwise: whether to use pairwise key. 4568c2ecf20Sopenharmony_ci * @addr: MAC address of a STA key is being installed to. 4578c2ecf20Sopenharmony_ci * @cipher: cipher suite. 4588c2ecf20Sopenharmony_ci * @vlanid: VLAN ID for AP_VLAN interface type 4598c2ecf20Sopenharmony_ci * @key_data: key data itself. 4608c2ecf20Sopenharmony_ci */ 4618c2ecf20Sopenharmony_cistruct qlink_cmd_add_key { 4628c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 4638c2ecf20Sopenharmony_ci u8 key_index; 4648c2ecf20Sopenharmony_ci u8 pairwise; 4658c2ecf20Sopenharmony_ci u8 addr[ETH_ALEN]; 4668c2ecf20Sopenharmony_ci __le32 cipher; 4678c2ecf20Sopenharmony_ci __le16 vlanid; 4688c2ecf20Sopenharmony_ci u8 rsvd[2]; 4698c2ecf20Sopenharmony_ci u8 key_data[]; 4708c2ecf20Sopenharmony_ci} __packed; 4718c2ecf20Sopenharmony_ci 4728c2ecf20Sopenharmony_ci/** 4738c2ecf20Sopenharmony_ci * struct qlink_cmd_del_key_req - data for QLINK_CMD_DEL_KEY command 4748c2ecf20Sopenharmony_ci * 4758c2ecf20Sopenharmony_ci * @key_index: index of the key being removed. 4768c2ecf20Sopenharmony_ci * @pairwise: whether to use pairwise key. 4778c2ecf20Sopenharmony_ci * @addr: MAC address of a STA for which a key is removed. 4788c2ecf20Sopenharmony_ci */ 4798c2ecf20Sopenharmony_cistruct qlink_cmd_del_key { 4808c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 4818c2ecf20Sopenharmony_ci u8 key_index; 4828c2ecf20Sopenharmony_ci u8 pairwise; 4838c2ecf20Sopenharmony_ci u8 addr[ETH_ALEN]; 4848c2ecf20Sopenharmony_ci} __packed; 4858c2ecf20Sopenharmony_ci 4868c2ecf20Sopenharmony_ci/** 4878c2ecf20Sopenharmony_ci * struct qlink_cmd_set_def_key - data for QLINK_CMD_SET_DEFAULT_KEY command 4888c2ecf20Sopenharmony_ci * 4898c2ecf20Sopenharmony_ci * @key_index: index of the key to be set as default one. 4908c2ecf20Sopenharmony_ci * @unicast: key is unicast. 4918c2ecf20Sopenharmony_ci * @multicast: key is multicast. 4928c2ecf20Sopenharmony_ci */ 4938c2ecf20Sopenharmony_cistruct qlink_cmd_set_def_key { 4948c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 4958c2ecf20Sopenharmony_ci u8 key_index; 4968c2ecf20Sopenharmony_ci u8 unicast; 4978c2ecf20Sopenharmony_ci u8 multicast; 4988c2ecf20Sopenharmony_ci u8 rsvd[1]; 4998c2ecf20Sopenharmony_ci} __packed; 5008c2ecf20Sopenharmony_ci 5018c2ecf20Sopenharmony_ci/** 5028c2ecf20Sopenharmony_ci * struct qlink_cmd_set_def_mgmt_key - data for QLINK_CMD_SET_DEFAULT_MGMT_KEY 5038c2ecf20Sopenharmony_ci * 5048c2ecf20Sopenharmony_ci * @key_index: index of the key to be set as default MGMT key. 5058c2ecf20Sopenharmony_ci */ 5068c2ecf20Sopenharmony_cistruct qlink_cmd_set_def_mgmt_key { 5078c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 5088c2ecf20Sopenharmony_ci u8 key_index; 5098c2ecf20Sopenharmony_ci u8 rsvd[3]; 5108c2ecf20Sopenharmony_ci} __packed; 5118c2ecf20Sopenharmony_ci 5128c2ecf20Sopenharmony_ci/** 5138c2ecf20Sopenharmony_ci * struct qlink_cmd_change_sta - data for QLINK_CMD_CHANGE_STA command 5148c2ecf20Sopenharmony_ci * 5158c2ecf20Sopenharmony_ci * @flag_update: STA flags to update 5168c2ecf20Sopenharmony_ci * @if_type: Mode of interface operation, one of &enum qlink_iface_type 5178c2ecf20Sopenharmony_ci * @vlanid: VLAN ID to assign to specific STA 5188c2ecf20Sopenharmony_ci * @sta_addr: address of the STA for which parameters are set. 5198c2ecf20Sopenharmony_ci */ 5208c2ecf20Sopenharmony_cistruct qlink_cmd_change_sta { 5218c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 5228c2ecf20Sopenharmony_ci struct qlink_sta_info_state flag_update; 5238c2ecf20Sopenharmony_ci __le16 if_type; 5248c2ecf20Sopenharmony_ci __le16 vlanid; 5258c2ecf20Sopenharmony_ci u8 sta_addr[ETH_ALEN]; 5268c2ecf20Sopenharmony_ci u8 rsvd[2]; 5278c2ecf20Sopenharmony_ci} __packed; 5288c2ecf20Sopenharmony_ci 5298c2ecf20Sopenharmony_ci/** 5308c2ecf20Sopenharmony_ci * struct qlink_cmd_del_sta - data for QLINK_CMD_DEL_STA command. 5318c2ecf20Sopenharmony_ci * 5328c2ecf20Sopenharmony_ci * See &struct station_del_parameters 5338c2ecf20Sopenharmony_ci */ 5348c2ecf20Sopenharmony_cistruct qlink_cmd_del_sta { 5358c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 5368c2ecf20Sopenharmony_ci __le16 reason_code; 5378c2ecf20Sopenharmony_ci u8 sta_addr[ETH_ALEN]; 5388c2ecf20Sopenharmony_ci u8 subtype; 5398c2ecf20Sopenharmony_ci u8 rsvd[3]; 5408c2ecf20Sopenharmony_ci} __packed; 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_cienum qlink_sta_connect_flags { 5438c2ecf20Sopenharmony_ci QLINK_STA_CONNECT_DISABLE_HT = BIT(0), 5448c2ecf20Sopenharmony_ci QLINK_STA_CONNECT_DISABLE_VHT = BIT(1), 5458c2ecf20Sopenharmony_ci QLINK_STA_CONNECT_USE_RRM = BIT(2), 5468c2ecf20Sopenharmony_ci}; 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_ci/** 5498c2ecf20Sopenharmony_ci * struct qlink_cmd_connect - data for QLINK_CMD_CONNECT command 5508c2ecf20Sopenharmony_ci * 5518c2ecf20Sopenharmony_ci * @bssid: BSSID of the BSS to connect to. 5528c2ecf20Sopenharmony_ci * @bssid_hint: recommended AP BSSID for initial connection to the BSS or 5538c2ecf20Sopenharmony_ci * 00:00:00:00:00:00 if not specified. 5548c2ecf20Sopenharmony_ci * @prev_bssid: previous BSSID, if specified (not 00:00:00:00:00:00) indicates 5558c2ecf20Sopenharmony_ci * a request to reassociate. 5568c2ecf20Sopenharmony_ci * @bg_scan_period: period of background scan. 5578c2ecf20Sopenharmony_ci * @flags: one of &enum qlink_sta_connect_flags. 5588c2ecf20Sopenharmony_ci * @ht_capa: HT Capabilities overrides. 5598c2ecf20Sopenharmony_ci * @ht_capa_mask: The bits of ht_capa which are to be used. 5608c2ecf20Sopenharmony_ci * @vht_capa: VHT Capability overrides 5618c2ecf20Sopenharmony_ci * @vht_capa_mask: The bits of vht_capa which are to be used. 5628c2ecf20Sopenharmony_ci * @aen: authentication information. 5638c2ecf20Sopenharmony_ci * @mfp: whether to use management frame protection. 5648c2ecf20Sopenharmony_ci * @payload: variable portion of connection request. 5658c2ecf20Sopenharmony_ci */ 5668c2ecf20Sopenharmony_cistruct qlink_cmd_connect { 5678c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 5688c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 5698c2ecf20Sopenharmony_ci u8 bssid_hint[ETH_ALEN]; 5708c2ecf20Sopenharmony_ci u8 prev_bssid[ETH_ALEN]; 5718c2ecf20Sopenharmony_ci __le16 bg_scan_period; 5728c2ecf20Sopenharmony_ci __le32 flags; 5738c2ecf20Sopenharmony_ci struct ieee80211_ht_cap ht_capa; 5748c2ecf20Sopenharmony_ci struct ieee80211_ht_cap ht_capa_mask; 5758c2ecf20Sopenharmony_ci struct ieee80211_vht_cap vht_capa; 5768c2ecf20Sopenharmony_ci struct ieee80211_vht_cap vht_capa_mask; 5778c2ecf20Sopenharmony_ci struct qlink_auth_encr aen; 5788c2ecf20Sopenharmony_ci u8 mfp; 5798c2ecf20Sopenharmony_ci u8 pbss; 5808c2ecf20Sopenharmony_ci u8 rsvd[2]; 5818c2ecf20Sopenharmony_ci u8 payload[]; 5828c2ecf20Sopenharmony_ci} __packed; 5838c2ecf20Sopenharmony_ci 5848c2ecf20Sopenharmony_ci/** 5858c2ecf20Sopenharmony_ci * struct qlink_cmd_external_auth - data for QLINK_CMD_EXTERNAL_AUTH command 5868c2ecf20Sopenharmony_ci * 5878c2ecf20Sopenharmony_ci * @bssid: BSSID of the BSS to connect to 5888c2ecf20Sopenharmony_ci * @status: authentication status code 5898c2ecf20Sopenharmony_ci * @payload: variable portion of connection request. 5908c2ecf20Sopenharmony_ci */ 5918c2ecf20Sopenharmony_cistruct qlink_cmd_external_auth { 5928c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 5938c2ecf20Sopenharmony_ci u8 peer[ETH_ALEN]; 5948c2ecf20Sopenharmony_ci __le16 status; 5958c2ecf20Sopenharmony_ci u8 payload[]; 5968c2ecf20Sopenharmony_ci} __packed; 5978c2ecf20Sopenharmony_ci 5988c2ecf20Sopenharmony_ci/** 5998c2ecf20Sopenharmony_ci * struct qlink_cmd_disconnect - data for QLINK_CMD_DISCONNECT command 6008c2ecf20Sopenharmony_ci * 6018c2ecf20Sopenharmony_ci * @reason: code of the reason of disconnect, see &enum ieee80211_reasoncode. 6028c2ecf20Sopenharmony_ci */ 6038c2ecf20Sopenharmony_cistruct qlink_cmd_disconnect { 6048c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 6058c2ecf20Sopenharmony_ci __le16 reason; 6068c2ecf20Sopenharmony_ci u8 rsvd[2]; 6078c2ecf20Sopenharmony_ci} __packed; 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci/** 6108c2ecf20Sopenharmony_ci * struct qlink_cmd_updown - data for QLINK_CMD_UPDOWN_INTF command 6118c2ecf20Sopenharmony_ci * 6128c2ecf20Sopenharmony_ci * @if_up: bring specified interface DOWN (if_up==0) or UP (otherwise). 6138c2ecf20Sopenharmony_ci * Interface is specified in common command header @chdr. 6148c2ecf20Sopenharmony_ci */ 6158c2ecf20Sopenharmony_cistruct qlink_cmd_updown { 6168c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 6178c2ecf20Sopenharmony_ci u8 if_up; 6188c2ecf20Sopenharmony_ci u8 rsvd[3]; 6198c2ecf20Sopenharmony_ci} __packed; 6208c2ecf20Sopenharmony_ci 6218c2ecf20Sopenharmony_ci/** 6228c2ecf20Sopenharmony_ci * enum qlink_band - a list of frequency bands 6238c2ecf20Sopenharmony_ci * 6248c2ecf20Sopenharmony_ci * @QLINK_BAND_2GHZ: 2.4GHz band 6258c2ecf20Sopenharmony_ci * @QLINK_BAND_5GHZ: 5GHz band 6268c2ecf20Sopenharmony_ci * @QLINK_BAND_60GHZ: 60GHz band 6278c2ecf20Sopenharmony_ci */ 6288c2ecf20Sopenharmony_cienum qlink_band { 6298c2ecf20Sopenharmony_ci QLINK_BAND_2GHZ = BIT(0), 6308c2ecf20Sopenharmony_ci QLINK_BAND_5GHZ = BIT(1), 6318c2ecf20Sopenharmony_ci QLINK_BAND_60GHZ = BIT(2), 6328c2ecf20Sopenharmony_ci}; 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_ci/** 6358c2ecf20Sopenharmony_ci * struct qlink_cmd_band_info_get - data for QLINK_CMD_BAND_INFO_GET command 6368c2ecf20Sopenharmony_ci * 6378c2ecf20Sopenharmony_ci * @band: a PHY band for which information is queried, one of @enum qlink_band 6388c2ecf20Sopenharmony_ci */ 6398c2ecf20Sopenharmony_cistruct qlink_cmd_band_info_get { 6408c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 6418c2ecf20Sopenharmony_ci u8 band; 6428c2ecf20Sopenharmony_ci u8 rsvd[3]; 6438c2ecf20Sopenharmony_ci} __packed; 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_ci/** 6468c2ecf20Sopenharmony_ci * struct qlink_cmd_get_chan_stats - data for QLINK_CMD_CHAN_STATS command 6478c2ecf20Sopenharmony_ci * 6488c2ecf20Sopenharmony_ci * @channel_freq: channel center frequency 6498c2ecf20Sopenharmony_ci */ 6508c2ecf20Sopenharmony_cistruct qlink_cmd_get_chan_stats { 6518c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 6528c2ecf20Sopenharmony_ci __le32 channel_freq; 6538c2ecf20Sopenharmony_ci} __packed; 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ci/** 6568c2ecf20Sopenharmony_ci * enum qlink_reg_initiator - Indicates the initiator of a reg domain request 6578c2ecf20Sopenharmony_ci * 6588c2ecf20Sopenharmony_ci * See &enum nl80211_reg_initiator for more info. 6598c2ecf20Sopenharmony_ci */ 6608c2ecf20Sopenharmony_cienum qlink_reg_initiator { 6618c2ecf20Sopenharmony_ci QLINK_REGDOM_SET_BY_CORE, 6628c2ecf20Sopenharmony_ci QLINK_REGDOM_SET_BY_USER, 6638c2ecf20Sopenharmony_ci QLINK_REGDOM_SET_BY_DRIVER, 6648c2ecf20Sopenharmony_ci QLINK_REGDOM_SET_BY_COUNTRY_IE, 6658c2ecf20Sopenharmony_ci}; 6668c2ecf20Sopenharmony_ci 6678c2ecf20Sopenharmony_ci/** 6688c2ecf20Sopenharmony_ci * enum qlink_user_reg_hint_type - type of user regulatory hint 6698c2ecf20Sopenharmony_ci * 6708c2ecf20Sopenharmony_ci * See &enum nl80211_user_reg_hint_type for more info. 6718c2ecf20Sopenharmony_ci */ 6728c2ecf20Sopenharmony_cienum qlink_user_reg_hint_type { 6738c2ecf20Sopenharmony_ci QLINK_USER_REG_HINT_USER = 0, 6748c2ecf20Sopenharmony_ci QLINK_USER_REG_HINT_CELL_BASE = 1, 6758c2ecf20Sopenharmony_ci QLINK_USER_REG_HINT_INDOOR = 2, 6768c2ecf20Sopenharmony_ci}; 6778c2ecf20Sopenharmony_ci 6788c2ecf20Sopenharmony_ci/** 6798c2ecf20Sopenharmony_ci * struct qlink_cmd_reg_notify - data for QLINK_CMD_REG_NOTIFY command 6808c2ecf20Sopenharmony_ci * 6818c2ecf20Sopenharmony_ci * @alpha2: the ISO / IEC 3166 alpha2 country code. 6828c2ecf20Sopenharmony_ci * @initiator: which entity sent the request, one of &enum qlink_reg_initiator. 6838c2ecf20Sopenharmony_ci * @user_reg_hint_type: type of hint for QLINK_REGDOM_SET_BY_USER request, one 6848c2ecf20Sopenharmony_ci * of &enum qlink_user_reg_hint_type. 6858c2ecf20Sopenharmony_ci * @num_channels: number of &struct qlink_tlv_channel in a variable portion of a 6868c2ecf20Sopenharmony_ci * payload. 6878c2ecf20Sopenharmony_ci * @dfs_region: one of &enum qlink_dfs_regions. 6888c2ecf20Sopenharmony_ci * @slave_radar: whether slave device should enable radar detection. 6898c2ecf20Sopenharmony_ci * @dfs_offload: enable or disable DFS offload to firmware. 6908c2ecf20Sopenharmony_ci * @info: variable portion of regulatory notifier callback. 6918c2ecf20Sopenharmony_ci */ 6928c2ecf20Sopenharmony_cistruct qlink_cmd_reg_notify { 6938c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 6948c2ecf20Sopenharmony_ci u8 alpha2[2]; 6958c2ecf20Sopenharmony_ci u8 initiator; 6968c2ecf20Sopenharmony_ci u8 user_reg_hint_type; 6978c2ecf20Sopenharmony_ci u8 num_channels; 6988c2ecf20Sopenharmony_ci u8 dfs_region; 6998c2ecf20Sopenharmony_ci u8 slave_radar; 7008c2ecf20Sopenharmony_ci u8 dfs_offload; 7018c2ecf20Sopenharmony_ci u8 info[]; 7028c2ecf20Sopenharmony_ci} __packed; 7038c2ecf20Sopenharmony_ci 7048c2ecf20Sopenharmony_ci/** 7058c2ecf20Sopenharmony_ci * enum qlink_chan_sw_flags - channel switch control flags 7068c2ecf20Sopenharmony_ci * 7078c2ecf20Sopenharmony_ci * @QLINK_CHAN_SW_RADAR_REQUIRED: whether radar detection is required on a new 7088c2ecf20Sopenharmony_ci * channel. 7098c2ecf20Sopenharmony_ci * @QLINK_CHAN_SW_BLOCK_TX: whether transmissions should be blocked while 7108c2ecf20Sopenharmony_ci * changing a channel. 7118c2ecf20Sopenharmony_ci */ 7128c2ecf20Sopenharmony_cienum qlink_chan_sw_flags { 7138c2ecf20Sopenharmony_ci QLINK_CHAN_SW_RADAR_REQUIRED = BIT(0), 7148c2ecf20Sopenharmony_ci QLINK_CHAN_SW_BLOCK_TX = BIT(1), 7158c2ecf20Sopenharmony_ci}; 7168c2ecf20Sopenharmony_ci 7178c2ecf20Sopenharmony_ci/** 7188c2ecf20Sopenharmony_ci * struct qlink_cmd_chan_switch - data for QLINK_CMD_CHAN_SWITCH command 7198c2ecf20Sopenharmony_ci * 7208c2ecf20Sopenharmony_ci * @channel: channel to switch to. 7218c2ecf20Sopenharmony_ci * @flags: flags to control channel switch, bitmap of &enum qlink_chan_sw_flags. 7228c2ecf20Sopenharmony_ci * @beacon_count: number of beacons until switch 7238c2ecf20Sopenharmony_ci */ 7248c2ecf20Sopenharmony_cistruct qlink_cmd_chan_switch { 7258c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 7268c2ecf20Sopenharmony_ci struct qlink_chandef channel; 7278c2ecf20Sopenharmony_ci __le64 flags; 7288c2ecf20Sopenharmony_ci __le32 n_counter_offsets_beacon; 7298c2ecf20Sopenharmony_ci __le32 n_counter_offsets_presp; 7308c2ecf20Sopenharmony_ci u8 beacon_count; 7318c2ecf20Sopenharmony_ci u8 rsvd[3]; 7328c2ecf20Sopenharmony_ci} __packed; 7338c2ecf20Sopenharmony_ci 7348c2ecf20Sopenharmony_ci/** 7358c2ecf20Sopenharmony_ci * enum qlink_hidden_ssid - values for %NL80211_ATTR_HIDDEN_SSID 7368c2ecf20Sopenharmony_ci * 7378c2ecf20Sopenharmony_ci * Refer to &enum nl80211_hidden_ssid 7388c2ecf20Sopenharmony_ci */ 7398c2ecf20Sopenharmony_cienum qlink_hidden_ssid { 7408c2ecf20Sopenharmony_ci QLINK_HIDDEN_SSID_NOT_IN_USE, 7418c2ecf20Sopenharmony_ci QLINK_HIDDEN_SSID_ZERO_LEN, 7428c2ecf20Sopenharmony_ci QLINK_HIDDEN_SSID_ZERO_CONTENTS 7438c2ecf20Sopenharmony_ci}; 7448c2ecf20Sopenharmony_ci 7458c2ecf20Sopenharmony_ci/** 7468c2ecf20Sopenharmony_ci * struct qlink_cmd_start_ap - data for QLINK_CMD_START_AP command 7478c2ecf20Sopenharmony_ci * 7488c2ecf20Sopenharmony_ci * @beacon_interval: beacon interval 7498c2ecf20Sopenharmony_ci * @inactivity_timeout: station's inactivity period in seconds 7508c2ecf20Sopenharmony_ci * @dtim_period: DTIM period 7518c2ecf20Sopenharmony_ci * @hidden_ssid: whether to hide the SSID, one of &enum qlink_hidden_ssid 7528c2ecf20Sopenharmony_ci * @smps_mode: SMPS mode 7538c2ecf20Sopenharmony_ci * @ht_required: stations must support HT 7548c2ecf20Sopenharmony_ci * @vht_required: stations must support VHT 7558c2ecf20Sopenharmony_ci * @aen: encryption info 7568c2ecf20Sopenharmony_ci * @sr_params: spatial reuse parameters 7578c2ecf20Sopenharmony_ci * @twt_responder: enable Target Wake Time 7588c2ecf20Sopenharmony_ci * @info: variable configurations 7598c2ecf20Sopenharmony_ci */ 7608c2ecf20Sopenharmony_cistruct qlink_cmd_start_ap { 7618c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 7628c2ecf20Sopenharmony_ci __le16 beacon_interval; 7638c2ecf20Sopenharmony_ci __le16 inactivity_timeout; 7648c2ecf20Sopenharmony_ci u8 dtim_period; 7658c2ecf20Sopenharmony_ci u8 hidden_ssid; 7668c2ecf20Sopenharmony_ci u8 smps_mode; 7678c2ecf20Sopenharmony_ci u8 p2p_ctwindow; 7688c2ecf20Sopenharmony_ci u8 p2p_opp_ps; 7698c2ecf20Sopenharmony_ci u8 pbss; 7708c2ecf20Sopenharmony_ci u8 ht_required; 7718c2ecf20Sopenharmony_ci u8 vht_required; 7728c2ecf20Sopenharmony_ci struct qlink_auth_encr aen; 7738c2ecf20Sopenharmony_ci struct qlink_sr_params sr_params; 7748c2ecf20Sopenharmony_ci u8 twt_responder; 7758c2ecf20Sopenharmony_ci u8 rsvd[3]; 7768c2ecf20Sopenharmony_ci u8 info[]; 7778c2ecf20Sopenharmony_ci} __packed; 7788c2ecf20Sopenharmony_ci 7798c2ecf20Sopenharmony_ci/** 7808c2ecf20Sopenharmony_ci * struct qlink_cmd_start_cac - data for QLINK_CMD_START_CAC command 7818c2ecf20Sopenharmony_ci * 7828c2ecf20Sopenharmony_ci * @chan: a channel to start a radar detection procedure on. 7838c2ecf20Sopenharmony_ci * @cac_time_ms: CAC time. 7848c2ecf20Sopenharmony_ci */ 7858c2ecf20Sopenharmony_cistruct qlink_cmd_start_cac { 7868c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 7878c2ecf20Sopenharmony_ci struct qlink_chandef chan; 7888c2ecf20Sopenharmony_ci __le32 cac_time_ms; 7898c2ecf20Sopenharmony_ci} __packed; 7908c2ecf20Sopenharmony_ci 7918c2ecf20Sopenharmony_cienum qlink_acl_policy { 7928c2ecf20Sopenharmony_ci QLINK_ACL_POLICY_ACCEPT_UNLESS_LISTED, 7938c2ecf20Sopenharmony_ci QLINK_ACL_POLICY_DENY_UNLESS_LISTED, 7948c2ecf20Sopenharmony_ci}; 7958c2ecf20Sopenharmony_ci 7968c2ecf20Sopenharmony_cistruct qlink_mac_address { 7978c2ecf20Sopenharmony_ci u8 addr[ETH_ALEN]; 7988c2ecf20Sopenharmony_ci} __packed; 7998c2ecf20Sopenharmony_ci 8008c2ecf20Sopenharmony_ci/** 8018c2ecf20Sopenharmony_ci * struct qlink_acl_data - ACL data 8028c2ecf20Sopenharmony_ci * 8038c2ecf20Sopenharmony_ci * @policy: filter policy, one of &enum qlink_acl_policy. 8048c2ecf20Sopenharmony_ci * @num_entries: number of MAC addresses in array. 8058c2ecf20Sopenharmony_ci * @mac_address: MAC addresses array. 8068c2ecf20Sopenharmony_ci */ 8078c2ecf20Sopenharmony_cistruct qlink_acl_data { 8088c2ecf20Sopenharmony_ci __le32 policy; 8098c2ecf20Sopenharmony_ci __le32 num_entries; 8108c2ecf20Sopenharmony_ci struct qlink_mac_address mac_addrs[]; 8118c2ecf20Sopenharmony_ci} __packed; 8128c2ecf20Sopenharmony_ci 8138c2ecf20Sopenharmony_ci/** 8148c2ecf20Sopenharmony_ci * enum qlink_pm_mode - Power Management mode 8158c2ecf20Sopenharmony_ci * 8168c2ecf20Sopenharmony_ci * @QLINK_PM_OFF: normal mode, no power saving enabled 8178c2ecf20Sopenharmony_ci * @QLINK_PM_AUTO_STANDBY: enable auto power save mode 8188c2ecf20Sopenharmony_ci */ 8198c2ecf20Sopenharmony_cienum qlink_pm_mode { 8208c2ecf20Sopenharmony_ci QLINK_PM_OFF = 0, 8218c2ecf20Sopenharmony_ci QLINK_PM_AUTO_STANDBY = 1, 8228c2ecf20Sopenharmony_ci}; 8238c2ecf20Sopenharmony_ci 8248c2ecf20Sopenharmony_ci/** 8258c2ecf20Sopenharmony_ci * struct qlink_cmd_pm_set - data for QLINK_CMD_PM_SET command 8268c2ecf20Sopenharmony_ci * 8278c2ecf20Sopenharmony_ci * @pm_standby timer: period of network inactivity in seconds before 8288c2ecf20Sopenharmony_ci * putting a radio in power save mode 8298c2ecf20Sopenharmony_ci * @pm_mode: power management mode 8308c2ecf20Sopenharmony_ci */ 8318c2ecf20Sopenharmony_cistruct qlink_cmd_pm_set { 8328c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 8338c2ecf20Sopenharmony_ci __le32 pm_standby_timer; 8348c2ecf20Sopenharmony_ci u8 pm_mode; 8358c2ecf20Sopenharmony_ci u8 rsvd[3]; 8368c2ecf20Sopenharmony_ci} __packed; 8378c2ecf20Sopenharmony_ci 8388c2ecf20Sopenharmony_ci/** 8398c2ecf20Sopenharmony_ci * enum qlink_txpwr_op - transmit power operation type 8408c2ecf20Sopenharmony_ci * @QLINK_TXPWR_SET: set tx power 8418c2ecf20Sopenharmony_ci * @QLINK_TXPWR_GET: get current tx power setting 8428c2ecf20Sopenharmony_ci */ 8438c2ecf20Sopenharmony_cienum qlink_txpwr_op { 8448c2ecf20Sopenharmony_ci QLINK_TXPWR_SET, 8458c2ecf20Sopenharmony_ci QLINK_TXPWR_GET 8468c2ecf20Sopenharmony_ci}; 8478c2ecf20Sopenharmony_ci 8488c2ecf20Sopenharmony_ci/** 8498c2ecf20Sopenharmony_ci * struct qlink_cmd_txpwr - get or set current transmit power 8508c2ecf20Sopenharmony_ci * 8518c2ecf20Sopenharmony_ci * @txpwr: new transmit power setting, in mBm 8528c2ecf20Sopenharmony_ci * @txpwr_setting: transmit power setting type, one of 8538c2ecf20Sopenharmony_ci * &enum nl80211_tx_power_setting 8548c2ecf20Sopenharmony_ci * @op_type: type of operation, one of &enum qlink_txpwr_op 8558c2ecf20Sopenharmony_ci */ 8568c2ecf20Sopenharmony_cistruct qlink_cmd_txpwr { 8578c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 8588c2ecf20Sopenharmony_ci __le32 txpwr; 8598c2ecf20Sopenharmony_ci u8 txpwr_setting; 8608c2ecf20Sopenharmony_ci u8 op_type; 8618c2ecf20Sopenharmony_ci u8 rsvd[2]; 8628c2ecf20Sopenharmony_ci} __packed; 8638c2ecf20Sopenharmony_ci 8648c2ecf20Sopenharmony_ci/** 8658c2ecf20Sopenharmony_ci * enum qlink_wowlan_trigger 8668c2ecf20Sopenharmony_ci * 8678c2ecf20Sopenharmony_ci * @QLINK_WOWLAN_TRIG_DISCONNECT: wakeup on disconnect 8688c2ecf20Sopenharmony_ci * @QLINK_WOWLAN_TRIG_MAGIC_PKT: wakeup on magic packet 8698c2ecf20Sopenharmony_ci * @QLINK_WOWLAN_TRIG_PATTERN_PKT: wakeup on user-defined packet 8708c2ecf20Sopenharmony_ci */ 8718c2ecf20Sopenharmony_cienum qlink_wowlan_trigger { 8728c2ecf20Sopenharmony_ci QLINK_WOWLAN_TRIG_DISCONNECT = BIT(0), 8738c2ecf20Sopenharmony_ci QLINK_WOWLAN_TRIG_MAGIC_PKT = BIT(1), 8748c2ecf20Sopenharmony_ci QLINK_WOWLAN_TRIG_PATTERN_PKT = BIT(2), 8758c2ecf20Sopenharmony_ci}; 8768c2ecf20Sopenharmony_ci 8778c2ecf20Sopenharmony_ci/** 8788c2ecf20Sopenharmony_ci * struct qlink_cmd_wowlan_set - data for QLINK_CMD_WOWLAN_SET command 8798c2ecf20Sopenharmony_ci * 8808c2ecf20Sopenharmony_ci * @triggers: requested bitmask of WoWLAN triggers 8818c2ecf20Sopenharmony_ci */ 8828c2ecf20Sopenharmony_cistruct qlink_cmd_wowlan_set { 8838c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 8848c2ecf20Sopenharmony_ci __le32 triggers; 8858c2ecf20Sopenharmony_ci u8 data[]; 8868c2ecf20Sopenharmony_ci} __packed; 8878c2ecf20Sopenharmony_ci 8888c2ecf20Sopenharmony_cienum qlink_ndev_event_type { 8898c2ecf20Sopenharmony_ci QLINK_NDEV_EVENT_CHANGEUPPER, 8908c2ecf20Sopenharmony_ci}; 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_ci/** 8938c2ecf20Sopenharmony_ci * struct qlink_cmd_ndev_event - data for QLINK_CMD_NDEV_EVENT command 8948c2ecf20Sopenharmony_ci * 8958c2ecf20Sopenharmony_ci * @event: type of event, one of &enum qlink_ndev_event_type 8968c2ecf20Sopenharmony_ci */ 8978c2ecf20Sopenharmony_cistruct qlink_cmd_ndev_event { 8988c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 8998c2ecf20Sopenharmony_ci __le16 event; 9008c2ecf20Sopenharmony_ci u8 rsvd[2]; 9018c2ecf20Sopenharmony_ci} __packed; 9028c2ecf20Sopenharmony_ci 9038c2ecf20Sopenharmony_cienum qlink_ndev_upper_type { 9048c2ecf20Sopenharmony_ci QLINK_NDEV_UPPER_TYPE_NONE, 9058c2ecf20Sopenharmony_ci QLINK_NDEV_UPPER_TYPE_BRIDGE, 9068c2ecf20Sopenharmony_ci}; 9078c2ecf20Sopenharmony_ci 9088c2ecf20Sopenharmony_ci/** 9098c2ecf20Sopenharmony_ci * struct qlink_cmd_ndev_changeupper - data for QLINK_NDEV_EVENT_CHANGEUPPER 9108c2ecf20Sopenharmony_ci * 9118c2ecf20Sopenharmony_ci * @br_domain: layer 2 broadcast domain ID that ndev is a member of 9128c2ecf20Sopenharmony_ci * @upper_type: type of upper device, one of &enum qlink_ndev_upper_type 9138c2ecf20Sopenharmony_ci */ 9148c2ecf20Sopenharmony_cistruct qlink_cmd_ndev_changeupper { 9158c2ecf20Sopenharmony_ci struct qlink_cmd_ndev_event nehdr; 9168c2ecf20Sopenharmony_ci __le64 flags; 9178c2ecf20Sopenharmony_ci __le32 br_domain; 9188c2ecf20Sopenharmony_ci __le32 netspace_id; 9198c2ecf20Sopenharmony_ci __le16 vlanid; 9208c2ecf20Sopenharmony_ci u8 upper_type; 9218c2ecf20Sopenharmony_ci u8 rsvd[1]; 9228c2ecf20Sopenharmony_ci} __packed; 9238c2ecf20Sopenharmony_ci 9248c2ecf20Sopenharmony_ci/** 9258c2ecf20Sopenharmony_ci * enum qlink_scan_flags - scan request control flags 9268c2ecf20Sopenharmony_ci * 9278c2ecf20Sopenharmony_ci * Scan flags are used to control QLINK_CMD_SCAN behavior. 9288c2ecf20Sopenharmony_ci * 9298c2ecf20Sopenharmony_ci * @QLINK_SCAN_FLAG_FLUSH: flush cache before scanning. 9308c2ecf20Sopenharmony_ci */ 9318c2ecf20Sopenharmony_cienum qlink_scan_flags { 9328c2ecf20Sopenharmony_ci QLINK_SCAN_FLAG_FLUSH = BIT(0), 9338c2ecf20Sopenharmony_ci QLINK_SCAN_FLAG_DURATION_MANDATORY = BIT(1), 9348c2ecf20Sopenharmony_ci}; 9358c2ecf20Sopenharmony_ci 9368c2ecf20Sopenharmony_ci/** 9378c2ecf20Sopenharmony_ci * struct qlink_cmd_scan - data for QLINK_CMD_SCAN command 9388c2ecf20Sopenharmony_ci * 9398c2ecf20Sopenharmony_ci * @flags: scan flags, a bitmap of &enum qlink_scan_flags. 9408c2ecf20Sopenharmony_ci * @n_ssids: number of WLAN_EID_SSID TLVs expected in variable portion of the 9418c2ecf20Sopenharmony_ci * command. 9428c2ecf20Sopenharmony_ci * @n_channels: number of QTN_TLV_ID_CHANNEL TLVs expected in variable payload. 9438c2ecf20Sopenharmony_ci * @active_dwell: time spent on a single channel for an active scan. 9448c2ecf20Sopenharmony_ci * @passive_dwell: time spent on a single channel for a passive scan. 9458c2ecf20Sopenharmony_ci * @sample_duration: total duration of sampling a single channel during a scan 9468c2ecf20Sopenharmony_ci * including off-channel dwell time and operating channel time. 9478c2ecf20Sopenharmony_ci * @bssid: specific BSSID to scan for or a broadcast BSSID. 9488c2ecf20Sopenharmony_ci * @scan_width: channel width to use, one of &enum qlink_channel_width. 9498c2ecf20Sopenharmony_ci */ 9508c2ecf20Sopenharmony_cistruct qlink_cmd_scan { 9518c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 9528c2ecf20Sopenharmony_ci __le64 flags; 9538c2ecf20Sopenharmony_ci __le16 n_ssids; 9548c2ecf20Sopenharmony_ci __le16 n_channels; 9558c2ecf20Sopenharmony_ci __le16 active_dwell; 9568c2ecf20Sopenharmony_ci __le16 passive_dwell; 9578c2ecf20Sopenharmony_ci __le16 sample_duration; 9588c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 9598c2ecf20Sopenharmony_ci u8 scan_width; 9608c2ecf20Sopenharmony_ci u8 rsvd[3]; 9618c2ecf20Sopenharmony_ci u8 var_info[]; 9628c2ecf20Sopenharmony_ci} __packed; 9638c2ecf20Sopenharmony_ci 9648c2ecf20Sopenharmony_ci/** 9658c2ecf20Sopenharmony_ci * struct qlink_cmd_update_owe - data for QLINK_CMD_UPDATE_OWE_INFO command 9668c2ecf20Sopenharmony_ci * 9678c2ecf20Sopenharmony_ci * @peer: MAC of the peer device for which OWE processing has been completed 9688c2ecf20Sopenharmony_ci * @status: OWE external processing status code 9698c2ecf20Sopenharmony_ci * @ies: IEs for the peer constructed by the user space 9708c2ecf20Sopenharmony_ci */ 9718c2ecf20Sopenharmony_cistruct qlink_cmd_update_owe { 9728c2ecf20Sopenharmony_ci struct qlink_cmd chdr; 9738c2ecf20Sopenharmony_ci u8 peer[ETH_ALEN]; 9748c2ecf20Sopenharmony_ci __le16 status; 9758c2ecf20Sopenharmony_ci u8 ies[]; 9768c2ecf20Sopenharmony_ci} __packed; 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_ci/* QLINK Command Responses messages related definitions 9798c2ecf20Sopenharmony_ci */ 9808c2ecf20Sopenharmony_ci 9818c2ecf20Sopenharmony_cienum qlink_cmd_result { 9828c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_OK = 0, 9838c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_INVALID, 9848c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_ENOTSUPP, 9858c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_ENOTFOUND, 9868c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_EALREADY, 9878c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_EADDRINUSE, 9888c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_EADDRNOTAVAIL, 9898c2ecf20Sopenharmony_ci QLINK_CMD_RESULT_EBUSY, 9908c2ecf20Sopenharmony_ci}; 9918c2ecf20Sopenharmony_ci 9928c2ecf20Sopenharmony_ci/** 9938c2ecf20Sopenharmony_ci * struct qlink_resp - QLINK command response message header 9948c2ecf20Sopenharmony_ci * 9958c2ecf20Sopenharmony_ci * Header used for QLINK messages of QLINK_MSG_TYPE_CMDRSP type. 9968c2ecf20Sopenharmony_ci * 9978c2ecf20Sopenharmony_ci * @mhdr: see &struct qlink_msg_header. 9988c2ecf20Sopenharmony_ci * @cmd_id: command ID the response corresponds to, one of &enum qlink_cmd_type. 9998c2ecf20Sopenharmony_ci * @seq_num: sequence number of command message, used for matching with 10008c2ecf20Sopenharmony_ci * response message. 10018c2ecf20Sopenharmony_ci * @result: result of the command execution, one of &enum qlink_cmd_result. 10028c2ecf20Sopenharmony_ci * @macid: index of physical radio device the response is sent from or 10038c2ecf20Sopenharmony_ci * QLINK_MACID_RSVD if not applicable. 10048c2ecf20Sopenharmony_ci * @vifid: index of virtual wireless interface on specified @macid the response 10058c2ecf20Sopenharmony_ci * is sent from or QLINK_VIFID_RSVD if not applicable. 10068c2ecf20Sopenharmony_ci */ 10078c2ecf20Sopenharmony_cistruct qlink_resp { 10088c2ecf20Sopenharmony_ci struct qlink_msg_header mhdr; 10098c2ecf20Sopenharmony_ci __le16 cmd_id; 10108c2ecf20Sopenharmony_ci __le16 seq_num; 10118c2ecf20Sopenharmony_ci __le16 result; 10128c2ecf20Sopenharmony_ci u8 macid; 10138c2ecf20Sopenharmony_ci u8 vifid; 10148c2ecf20Sopenharmony_ci} __packed; 10158c2ecf20Sopenharmony_ci 10168c2ecf20Sopenharmony_ci/** 10178c2ecf20Sopenharmony_ci * struct qlink_resp_init_fw - response for QLINK_CMD_FW_INIT 10188c2ecf20Sopenharmony_ci * 10198c2ecf20Sopenharmony_ci * @qlink_proto_ver: QLINK protocol version used by wifi card firmware. 10208c2ecf20Sopenharmony_ci */ 10218c2ecf20Sopenharmony_cistruct qlink_resp_init_fw { 10228c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 10238c2ecf20Sopenharmony_ci __le32 qlink_proto_ver; 10248c2ecf20Sopenharmony_ci} __packed; 10258c2ecf20Sopenharmony_ci 10268c2ecf20Sopenharmony_ci/** 10278c2ecf20Sopenharmony_ci * enum qlink_dfs_regions - regulatory DFS regions 10288c2ecf20Sopenharmony_ci * 10298c2ecf20Sopenharmony_ci * Corresponds to &enum nl80211_dfs_regions. 10308c2ecf20Sopenharmony_ci */ 10318c2ecf20Sopenharmony_cienum qlink_dfs_regions { 10328c2ecf20Sopenharmony_ci QLINK_DFS_UNSET = 0, 10338c2ecf20Sopenharmony_ci QLINK_DFS_FCC = 1, 10348c2ecf20Sopenharmony_ci QLINK_DFS_ETSI = 2, 10358c2ecf20Sopenharmony_ci QLINK_DFS_JP = 3, 10368c2ecf20Sopenharmony_ci}; 10378c2ecf20Sopenharmony_ci 10388c2ecf20Sopenharmony_ci/** 10398c2ecf20Sopenharmony_ci * struct qlink_resp_get_mac_info - response for QLINK_CMD_MAC_INFO command 10408c2ecf20Sopenharmony_ci * 10418c2ecf20Sopenharmony_ci * Data describing specific physical device providing wireless MAC 10428c2ecf20Sopenharmony_ci * functionality. 10438c2ecf20Sopenharmony_ci * 10448c2ecf20Sopenharmony_ci * @dev_mac: MAC address of physical WMAC device (used for first BSS on 10458c2ecf20Sopenharmony_ci * specified WMAC). 10468c2ecf20Sopenharmony_ci * @num_tx_chain: Number of transmit chains used by WMAC. 10478c2ecf20Sopenharmony_ci * @num_rx_chain: Number of receive chains used by WMAC. 10488c2ecf20Sopenharmony_ci * @vht_cap_mod_mask: mask specifying which VHT capabilities can be altered. 10498c2ecf20Sopenharmony_ci * @ht_cap_mod_mask: mask specifying which HT capabilities can be altered. 10508c2ecf20Sopenharmony_ci * @max_scan_ssids: maximum number of SSIDs the device can scan for in any scan. 10518c2ecf20Sopenharmony_ci * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band. 10528c2ecf20Sopenharmony_ci * @max_ap_assoc_sta: Maximum number of associations supported by WMAC. 10538c2ecf20Sopenharmony_ci * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar. 10548c2ecf20Sopenharmony_ci * @alpha2: country code ID firmware is configured to. 10558c2ecf20Sopenharmony_ci * @n_reg_rules: number of regulatory rules TLVs in variable portion of the 10568c2ecf20Sopenharmony_ci * message. 10578c2ecf20Sopenharmony_ci * @dfs_region: regulatory DFS region, one of &enum qlink_dfs_regions. 10588c2ecf20Sopenharmony_ci * @var_info: variable-length WMAC info data. 10598c2ecf20Sopenharmony_ci */ 10608c2ecf20Sopenharmony_cistruct qlink_resp_get_mac_info { 10618c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 10628c2ecf20Sopenharmony_ci u8 dev_mac[ETH_ALEN]; 10638c2ecf20Sopenharmony_ci u8 num_tx_chain; 10648c2ecf20Sopenharmony_ci u8 num_rx_chain; 10658c2ecf20Sopenharmony_ci struct ieee80211_vht_cap vht_cap_mod_mask; 10668c2ecf20Sopenharmony_ci struct ieee80211_ht_cap ht_cap_mod_mask; 10678c2ecf20Sopenharmony_ci 10688c2ecf20Sopenharmony_ci __le16 max_ap_assoc_sta; 10698c2ecf20Sopenharmony_ci __le32 hw_version; 10708c2ecf20Sopenharmony_ci __le32 probe_resp_offload; 10718c2ecf20Sopenharmony_ci __le32 bss_select_support; 10728c2ecf20Sopenharmony_ci __le16 n_addresses; 10738c2ecf20Sopenharmony_ci __le16 radar_detect_widths; 10748c2ecf20Sopenharmony_ci __le16 max_remain_on_channel_duration; 10758c2ecf20Sopenharmony_ci __le16 max_acl_mac_addrs; 10768c2ecf20Sopenharmony_ci 10778c2ecf20Sopenharmony_ci __le32 frag_threshold; 10788c2ecf20Sopenharmony_ci __le32 rts_threshold; 10798c2ecf20Sopenharmony_ci u8 retry_short; 10808c2ecf20Sopenharmony_ci u8 retry_long; 10818c2ecf20Sopenharmony_ci u8 coverage_class; 10828c2ecf20Sopenharmony_ci 10838c2ecf20Sopenharmony_ci u8 max_scan_ssids; 10848c2ecf20Sopenharmony_ci u8 max_sched_scan_reqs; 10858c2ecf20Sopenharmony_ci u8 max_sched_scan_ssids; 10868c2ecf20Sopenharmony_ci u8 max_match_sets; 10878c2ecf20Sopenharmony_ci u8 max_adj_channel_rssi_comp; 10888c2ecf20Sopenharmony_ci 10898c2ecf20Sopenharmony_ci __le16 max_scan_ie_len; 10908c2ecf20Sopenharmony_ci __le16 max_sched_scan_ie_len; 10918c2ecf20Sopenharmony_ci __le32 max_sched_scan_plans; 10928c2ecf20Sopenharmony_ci __le32 max_sched_scan_plan_interval; 10938c2ecf20Sopenharmony_ci __le32 max_sched_scan_plan_iterations; 10948c2ecf20Sopenharmony_ci 10958c2ecf20Sopenharmony_ci u8 n_cipher_suites; 10968c2ecf20Sopenharmony_ci u8 n_akm_suites; 10978c2ecf20Sopenharmony_ci u8 max_num_pmkids; 10988c2ecf20Sopenharmony_ci u8 num_iftype_ext_capab; 10998c2ecf20Sopenharmony_ci u8 extended_capabilities_len; 11008c2ecf20Sopenharmony_ci u8 max_data_retry_count; 11018c2ecf20Sopenharmony_ci u8 n_iface_combinations; 11028c2ecf20Sopenharmony_ci u8 max_num_csa_counters; 11038c2ecf20Sopenharmony_ci 11048c2ecf20Sopenharmony_ci u8 bands_cap; 11058c2ecf20Sopenharmony_ci u8 alpha2[2]; 11068c2ecf20Sopenharmony_ci u8 n_reg_rules; 11078c2ecf20Sopenharmony_ci u8 dfs_region; 11088c2ecf20Sopenharmony_ci u8 rsvd[3]; 11098c2ecf20Sopenharmony_ci u8 var_info[]; 11108c2ecf20Sopenharmony_ci} __packed; 11118c2ecf20Sopenharmony_ci 11128c2ecf20Sopenharmony_ci/** 11138c2ecf20Sopenharmony_ci * struct qlink_resp_get_hw_info - response for QLINK_CMD_GET_HW_INFO command 11148c2ecf20Sopenharmony_ci * 11158c2ecf20Sopenharmony_ci * Description of wireless hardware capabilities and features. 11168c2ecf20Sopenharmony_ci * 11178c2ecf20Sopenharmony_ci * @fw_ver: wireless hardware firmware version. 11188c2ecf20Sopenharmony_ci * @num_mac: Number of separate physical radio devices provided by hardware. 11198c2ecf20Sopenharmony_ci * @mac_bitmap: Bitmap of MAC IDs that are active and can be used in firmware. 11208c2ecf20Sopenharmony_ci * @total_tx_chains: total number of transmit chains used by device. 11218c2ecf20Sopenharmony_ci * @total_rx_chains: total number of receive chains. 11228c2ecf20Sopenharmony_ci * @info: variable-length HW info. 11238c2ecf20Sopenharmony_ci */ 11248c2ecf20Sopenharmony_cistruct qlink_resp_get_hw_info { 11258c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 11268c2ecf20Sopenharmony_ci __le32 fw_ver; 11278c2ecf20Sopenharmony_ci __le32 bld_tmstamp; 11288c2ecf20Sopenharmony_ci __le32 plat_id; 11298c2ecf20Sopenharmony_ci __le32 hw_ver; 11308c2ecf20Sopenharmony_ci u8 num_mac; 11318c2ecf20Sopenharmony_ci u8 mac_bitmap; 11328c2ecf20Sopenharmony_ci u8 total_tx_chain; 11338c2ecf20Sopenharmony_ci u8 total_rx_chain; 11348c2ecf20Sopenharmony_ci u8 info[]; 11358c2ecf20Sopenharmony_ci} __packed; 11368c2ecf20Sopenharmony_ci 11378c2ecf20Sopenharmony_ci/** 11388c2ecf20Sopenharmony_ci * struct qlink_resp_manage_intf - response for interface management commands 11398c2ecf20Sopenharmony_ci * 11408c2ecf20Sopenharmony_ci * Response data for QLINK_CMD_ADD_INTF and QLINK_CMD_CHANGE_INTF commands. 11418c2ecf20Sopenharmony_ci * 11428c2ecf20Sopenharmony_ci * @rhdr: Common Command Response message header. 11438c2ecf20Sopenharmony_ci * @intf_info: interface description. 11448c2ecf20Sopenharmony_ci */ 11458c2ecf20Sopenharmony_cistruct qlink_resp_manage_intf { 11468c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 11478c2ecf20Sopenharmony_ci struct qlink_intf_info intf_info; 11488c2ecf20Sopenharmony_ci} __packed; 11498c2ecf20Sopenharmony_ci 11508c2ecf20Sopenharmony_cienum qlink_sta_info_rate_flags { 11518c2ecf20Sopenharmony_ci QLINK_STA_INFO_RATE_FLAG_HT_MCS = BIT(0), 11528c2ecf20Sopenharmony_ci QLINK_STA_INFO_RATE_FLAG_VHT_MCS = BIT(1), 11538c2ecf20Sopenharmony_ci QLINK_STA_INFO_RATE_FLAG_SHORT_GI = BIT(2), 11548c2ecf20Sopenharmony_ci QLINK_STA_INFO_RATE_FLAG_60G = BIT(3), 11558c2ecf20Sopenharmony_ci QLINK_STA_INFO_RATE_FLAG_HE_MCS = BIT(4), 11568c2ecf20Sopenharmony_ci}; 11578c2ecf20Sopenharmony_ci 11588c2ecf20Sopenharmony_ci/** 11598c2ecf20Sopenharmony_ci * struct qlink_resp_get_sta_info - response for QLINK_CMD_GET_STA_INFO command 11608c2ecf20Sopenharmony_ci * 11618c2ecf20Sopenharmony_ci * Response data containing statistics for specified STA. 11628c2ecf20Sopenharmony_ci * 11638c2ecf20Sopenharmony_ci * @sta_addr: MAC address of STA the response carries statistic for. 11648c2ecf20Sopenharmony_ci * @info: variable statistics for specified STA. 11658c2ecf20Sopenharmony_ci */ 11668c2ecf20Sopenharmony_cistruct qlink_resp_get_sta_info { 11678c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 11688c2ecf20Sopenharmony_ci u8 sta_addr[ETH_ALEN]; 11698c2ecf20Sopenharmony_ci u8 rsvd[2]; 11708c2ecf20Sopenharmony_ci u8 info[]; 11718c2ecf20Sopenharmony_ci} __packed; 11728c2ecf20Sopenharmony_ci 11738c2ecf20Sopenharmony_ci/** 11748c2ecf20Sopenharmony_ci * struct qlink_resp_band_info_get - response for QLINK_CMD_BAND_INFO_GET cmd 11758c2ecf20Sopenharmony_ci * 11768c2ecf20Sopenharmony_ci * @band: frequency band that the response describes, one of @enum qlink_band. 11778c2ecf20Sopenharmony_ci * @num_chans: total number of channels info TLVs contained in reply. 11788c2ecf20Sopenharmony_ci * @num_bitrates: total number of bitrate TLVs contained in reply. 11798c2ecf20Sopenharmony_ci * @info: variable-length info portion. 11808c2ecf20Sopenharmony_ci */ 11818c2ecf20Sopenharmony_cistruct qlink_resp_band_info_get { 11828c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 11838c2ecf20Sopenharmony_ci u8 band; 11848c2ecf20Sopenharmony_ci u8 num_chans; 11858c2ecf20Sopenharmony_ci u8 num_bitrates; 11868c2ecf20Sopenharmony_ci u8 rsvd[1]; 11878c2ecf20Sopenharmony_ci u8 info[]; 11888c2ecf20Sopenharmony_ci} __packed; 11898c2ecf20Sopenharmony_ci 11908c2ecf20Sopenharmony_ci/** 11918c2ecf20Sopenharmony_ci * struct qlink_resp_get_chan_stats - response for QLINK_CMD_CHAN_STATS cmd 11928c2ecf20Sopenharmony_ci * 11938c2ecf20Sopenharmony_ci * @chan_freq: center frequency for a channel the report is sent for. 11948c2ecf20Sopenharmony_ci * @info: variable-length channel info. 11958c2ecf20Sopenharmony_ci */ 11968c2ecf20Sopenharmony_cistruct qlink_resp_get_chan_stats { 11978c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 11988c2ecf20Sopenharmony_ci __le32 chan_freq; 11998c2ecf20Sopenharmony_ci u8 info[]; 12008c2ecf20Sopenharmony_ci} __packed; 12018c2ecf20Sopenharmony_ci 12028c2ecf20Sopenharmony_ci/** 12038c2ecf20Sopenharmony_ci * struct qlink_resp_channel_get - response for QLINK_CMD_CHAN_GET command 12048c2ecf20Sopenharmony_ci * 12058c2ecf20Sopenharmony_ci * @chan: definition of current operating channel. 12068c2ecf20Sopenharmony_ci */ 12078c2ecf20Sopenharmony_cistruct qlink_resp_channel_get { 12088c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 12098c2ecf20Sopenharmony_ci struct qlink_chandef chan; 12108c2ecf20Sopenharmony_ci} __packed; 12118c2ecf20Sopenharmony_ci 12128c2ecf20Sopenharmony_ci/** 12138c2ecf20Sopenharmony_ci * struct qlink_resp_txpwr - response for QLINK_CMD_TXPWR command 12148c2ecf20Sopenharmony_ci * 12158c2ecf20Sopenharmony_ci * This response is intended for QLINK_TXPWR_GET operation and does not 12168c2ecf20Sopenharmony_ci * contain any meaningful information in case of QLINK_TXPWR_SET operation. 12178c2ecf20Sopenharmony_ci * 12188c2ecf20Sopenharmony_ci * @txpwr: current transmit power setting, in mBm 12198c2ecf20Sopenharmony_ci */ 12208c2ecf20Sopenharmony_cistruct qlink_resp_txpwr { 12218c2ecf20Sopenharmony_ci struct qlink_resp rhdr; 12228c2ecf20Sopenharmony_ci __le32 txpwr; 12238c2ecf20Sopenharmony_ci} __packed; 12248c2ecf20Sopenharmony_ci 12258c2ecf20Sopenharmony_ci/* QLINK Events messages related definitions 12268c2ecf20Sopenharmony_ci */ 12278c2ecf20Sopenharmony_ci 12288c2ecf20Sopenharmony_cienum qlink_event_type { 12298c2ecf20Sopenharmony_ci QLINK_EVENT_STA_ASSOCIATED = 0x0021, 12308c2ecf20Sopenharmony_ci QLINK_EVENT_STA_DEAUTH = 0x0022, 12318c2ecf20Sopenharmony_ci QLINK_EVENT_MGMT_RECEIVED = 0x0023, 12328c2ecf20Sopenharmony_ci QLINK_EVENT_SCAN_RESULTS = 0x0024, 12338c2ecf20Sopenharmony_ci QLINK_EVENT_SCAN_COMPLETE = 0x0025, 12348c2ecf20Sopenharmony_ci QLINK_EVENT_BSS_JOIN = 0x0026, 12358c2ecf20Sopenharmony_ci QLINK_EVENT_BSS_LEAVE = 0x0027, 12368c2ecf20Sopenharmony_ci QLINK_EVENT_FREQ_CHANGE = 0x0028, 12378c2ecf20Sopenharmony_ci QLINK_EVENT_RADAR = 0x0029, 12388c2ecf20Sopenharmony_ci QLINK_EVENT_EXTERNAL_AUTH = 0x0030, 12398c2ecf20Sopenharmony_ci QLINK_EVENT_MIC_FAILURE = 0x0031, 12408c2ecf20Sopenharmony_ci QLINK_EVENT_UPDATE_OWE = 0x0032, 12418c2ecf20Sopenharmony_ci}; 12428c2ecf20Sopenharmony_ci 12438c2ecf20Sopenharmony_ci/** 12448c2ecf20Sopenharmony_ci * struct qlink_event - QLINK event message header 12458c2ecf20Sopenharmony_ci * 12468c2ecf20Sopenharmony_ci * Header used for QLINK messages of QLINK_MSG_TYPE_EVENT type. 12478c2ecf20Sopenharmony_ci * 12488c2ecf20Sopenharmony_ci * @mhdr: Common QLINK message header. 12498c2ecf20Sopenharmony_ci * @event_id: Specifies specific event ID, one of &enum qlink_event_type. 12508c2ecf20Sopenharmony_ci * @macid: index of physical radio device the event was generated on or 12518c2ecf20Sopenharmony_ci * QLINK_MACID_RSVD if not applicable. 12528c2ecf20Sopenharmony_ci * @vifid: index of virtual wireless interface on specified @macid the event 12538c2ecf20Sopenharmony_ci * was generated on or QLINK_VIFID_RSVD if not applicable. 12548c2ecf20Sopenharmony_ci */ 12558c2ecf20Sopenharmony_cistruct qlink_event { 12568c2ecf20Sopenharmony_ci struct qlink_msg_header mhdr; 12578c2ecf20Sopenharmony_ci __le16 event_id; 12588c2ecf20Sopenharmony_ci u8 macid; 12598c2ecf20Sopenharmony_ci u8 vifid; 12608c2ecf20Sopenharmony_ci} __packed; 12618c2ecf20Sopenharmony_ci 12628c2ecf20Sopenharmony_ci/** 12638c2ecf20Sopenharmony_ci * struct qlink_event_sta_assoc - data for QLINK_EVENT_STA_ASSOCIATED event 12648c2ecf20Sopenharmony_ci * 12658c2ecf20Sopenharmony_ci * @sta_addr: Address of a STA for which new association event was generated 12668c2ecf20Sopenharmony_ci * @frame_control: control bits from 802.11 ASSOC_REQUEST header. 12678c2ecf20Sopenharmony_ci * @payload: IEs from association request. 12688c2ecf20Sopenharmony_ci */ 12698c2ecf20Sopenharmony_cistruct qlink_event_sta_assoc { 12708c2ecf20Sopenharmony_ci struct qlink_event ehdr; 12718c2ecf20Sopenharmony_ci u8 sta_addr[ETH_ALEN]; 12728c2ecf20Sopenharmony_ci __le16 frame_control; 12738c2ecf20Sopenharmony_ci u8 ies[]; 12748c2ecf20Sopenharmony_ci} __packed; 12758c2ecf20Sopenharmony_ci 12768c2ecf20Sopenharmony_ci/** 12778c2ecf20Sopenharmony_ci * struct qlink_event_sta_deauth - data for QLINK_EVENT_STA_DEAUTH event 12788c2ecf20Sopenharmony_ci * 12798c2ecf20Sopenharmony_ci * @sta_addr: Address of a deauthenticated STA. 12808c2ecf20Sopenharmony_ci * @reason: reason for deauthentication. 12818c2ecf20Sopenharmony_ci */ 12828c2ecf20Sopenharmony_cistruct qlink_event_sta_deauth { 12838c2ecf20Sopenharmony_ci struct qlink_event ehdr; 12848c2ecf20Sopenharmony_ci u8 sta_addr[ETH_ALEN]; 12858c2ecf20Sopenharmony_ci __le16 reason; 12868c2ecf20Sopenharmony_ci} __packed; 12878c2ecf20Sopenharmony_ci 12888c2ecf20Sopenharmony_ci/** 12898c2ecf20Sopenharmony_ci * struct qlink_event_bss_join - data for QLINK_EVENT_BSS_JOIN event 12908c2ecf20Sopenharmony_ci * 12918c2ecf20Sopenharmony_ci * @chan: new operating channel definition 12928c2ecf20Sopenharmony_ci * @bssid: BSSID of a BSS which interface tried to joined. 12938c2ecf20Sopenharmony_ci * @status: status of joining attempt, see &enum ieee80211_statuscode. 12948c2ecf20Sopenharmony_ci */ 12958c2ecf20Sopenharmony_cistruct qlink_event_bss_join { 12968c2ecf20Sopenharmony_ci struct qlink_event ehdr; 12978c2ecf20Sopenharmony_ci struct qlink_chandef chan; 12988c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 12998c2ecf20Sopenharmony_ci __le16 status; 13008c2ecf20Sopenharmony_ci u8 ies[]; 13018c2ecf20Sopenharmony_ci} __packed; 13028c2ecf20Sopenharmony_ci 13038c2ecf20Sopenharmony_ci/** 13048c2ecf20Sopenharmony_ci * struct qlink_event_bss_leave - data for QLINK_EVENT_BSS_LEAVE event 13058c2ecf20Sopenharmony_ci * 13068c2ecf20Sopenharmony_ci * @reason: reason of disconnecting from BSS. 13078c2ecf20Sopenharmony_ci */ 13088c2ecf20Sopenharmony_cistruct qlink_event_bss_leave { 13098c2ecf20Sopenharmony_ci struct qlink_event ehdr; 13108c2ecf20Sopenharmony_ci __le16 reason; 13118c2ecf20Sopenharmony_ci u8 rsvd[2]; 13128c2ecf20Sopenharmony_ci} __packed; 13138c2ecf20Sopenharmony_ci 13148c2ecf20Sopenharmony_ci/** 13158c2ecf20Sopenharmony_ci * struct qlink_event_freq_change - data for QLINK_EVENT_FREQ_CHANGE event 13168c2ecf20Sopenharmony_ci * 13178c2ecf20Sopenharmony_ci * @chan: new operating channel definition 13188c2ecf20Sopenharmony_ci */ 13198c2ecf20Sopenharmony_cistruct qlink_event_freq_change { 13208c2ecf20Sopenharmony_ci struct qlink_event ehdr; 13218c2ecf20Sopenharmony_ci struct qlink_chandef chan; 13228c2ecf20Sopenharmony_ci} __packed; 13238c2ecf20Sopenharmony_ci 13248c2ecf20Sopenharmony_cienum qlink_rxmgmt_flags { 13258c2ecf20Sopenharmony_ci QLINK_RXMGMT_FLAG_ANSWERED = 1 << 0, 13268c2ecf20Sopenharmony_ci}; 13278c2ecf20Sopenharmony_ci 13288c2ecf20Sopenharmony_ci/** 13298c2ecf20Sopenharmony_ci * struct qlink_event_rxmgmt - data for QLINK_EVENT_MGMT_RECEIVED event 13308c2ecf20Sopenharmony_ci * 13318c2ecf20Sopenharmony_ci * @freq: Frequency on which the frame was received in MHz. 13328c2ecf20Sopenharmony_ci * @flags: bitmap of &enum qlink_rxmgmt_flags. 13338c2ecf20Sopenharmony_ci * @sig_dbm: signal strength in dBm. 13348c2ecf20Sopenharmony_ci * @frame_data: data of Rx'd frame itself. 13358c2ecf20Sopenharmony_ci */ 13368c2ecf20Sopenharmony_cistruct qlink_event_rxmgmt { 13378c2ecf20Sopenharmony_ci struct qlink_event ehdr; 13388c2ecf20Sopenharmony_ci __le32 freq; 13398c2ecf20Sopenharmony_ci __le32 flags; 13408c2ecf20Sopenharmony_ci s8 sig_dbm; 13418c2ecf20Sopenharmony_ci u8 rsvd[3]; 13428c2ecf20Sopenharmony_ci u8 frame_data[]; 13438c2ecf20Sopenharmony_ci} __packed; 13448c2ecf20Sopenharmony_ci 13458c2ecf20Sopenharmony_ci/** 13468c2ecf20Sopenharmony_ci * struct qlink_event_scan_result - data for QLINK_EVENT_SCAN_RESULTS event 13478c2ecf20Sopenharmony_ci * 13488c2ecf20Sopenharmony_ci * @tsf: TSF timestamp indicating when scan results were generated. 13498c2ecf20Sopenharmony_ci * @freq: Center frequency of the channel where BSS for which the scan result 13508c2ecf20Sopenharmony_ci * event was generated was discovered. 13518c2ecf20Sopenharmony_ci * @capab: capabilities field. 13528c2ecf20Sopenharmony_ci * @bintval: beacon interval announced by discovered BSS. 13538c2ecf20Sopenharmony_ci * @sig_dbm: signal strength in dBm. 13548c2ecf20Sopenharmony_ci * @bssid: BSSID announced by discovered BSS. 13558c2ecf20Sopenharmony_ci * @ssid_len: length of SSID announced by BSS. 13568c2ecf20Sopenharmony_ci * @ssid: SSID announced by discovered BSS. 13578c2ecf20Sopenharmony_ci * @payload: IEs that are announced by discovered BSS in its MGMt frames. 13588c2ecf20Sopenharmony_ci */ 13598c2ecf20Sopenharmony_cistruct qlink_event_scan_result { 13608c2ecf20Sopenharmony_ci struct qlink_event ehdr; 13618c2ecf20Sopenharmony_ci __le64 tsf; 13628c2ecf20Sopenharmony_ci __le16 freq; 13638c2ecf20Sopenharmony_ci __le16 capab; 13648c2ecf20Sopenharmony_ci __le16 bintval; 13658c2ecf20Sopenharmony_ci s8 sig_dbm; 13668c2ecf20Sopenharmony_ci u8 ssid_len; 13678c2ecf20Sopenharmony_ci u8 ssid[IEEE80211_MAX_SSID_LEN]; 13688c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 13698c2ecf20Sopenharmony_ci u8 rsvd[2]; 13708c2ecf20Sopenharmony_ci u8 payload[]; 13718c2ecf20Sopenharmony_ci} __packed; 13728c2ecf20Sopenharmony_ci 13738c2ecf20Sopenharmony_ci/** 13748c2ecf20Sopenharmony_ci * enum qlink_scan_complete_flags - indicates result of scan request. 13758c2ecf20Sopenharmony_ci * 13768c2ecf20Sopenharmony_ci * @QLINK_SCAN_NONE: Scan request was processed. 13778c2ecf20Sopenharmony_ci * @QLINK_SCAN_ABORTED: Scan was aborted. 13788c2ecf20Sopenharmony_ci */ 13798c2ecf20Sopenharmony_cienum qlink_scan_complete_flags { 13808c2ecf20Sopenharmony_ci QLINK_SCAN_NONE = 0, 13818c2ecf20Sopenharmony_ci QLINK_SCAN_ABORTED = BIT(0), 13828c2ecf20Sopenharmony_ci}; 13838c2ecf20Sopenharmony_ci 13848c2ecf20Sopenharmony_ci/** 13858c2ecf20Sopenharmony_ci * struct qlink_event_scan_complete - data for QLINK_EVENT_SCAN_COMPLETE event 13868c2ecf20Sopenharmony_ci * 13878c2ecf20Sopenharmony_ci * @flags: flags indicating the status of pending scan request, 13888c2ecf20Sopenharmony_ci * see &enum qlink_scan_complete_flags. 13898c2ecf20Sopenharmony_ci */ 13908c2ecf20Sopenharmony_cistruct qlink_event_scan_complete { 13918c2ecf20Sopenharmony_ci struct qlink_event ehdr; 13928c2ecf20Sopenharmony_ci __le32 flags; 13938c2ecf20Sopenharmony_ci} __packed; 13948c2ecf20Sopenharmony_ci 13958c2ecf20Sopenharmony_cienum qlink_radar_event { 13968c2ecf20Sopenharmony_ci QLINK_RADAR_DETECTED, 13978c2ecf20Sopenharmony_ci QLINK_RADAR_CAC_FINISHED, 13988c2ecf20Sopenharmony_ci QLINK_RADAR_CAC_ABORTED, 13998c2ecf20Sopenharmony_ci QLINK_RADAR_NOP_FINISHED, 14008c2ecf20Sopenharmony_ci QLINK_RADAR_PRE_CAC_EXPIRED, 14018c2ecf20Sopenharmony_ci QLINK_RADAR_CAC_STARTED, 14028c2ecf20Sopenharmony_ci}; 14038c2ecf20Sopenharmony_ci 14048c2ecf20Sopenharmony_ci/** 14058c2ecf20Sopenharmony_ci * struct qlink_event_radar - data for QLINK_EVENT_RADAR event 14068c2ecf20Sopenharmony_ci * 14078c2ecf20Sopenharmony_ci * @chan: channel on which radar event happened. 14088c2ecf20Sopenharmony_ci * @event: radar event type, one of &enum qlink_radar_event. 14098c2ecf20Sopenharmony_ci */ 14108c2ecf20Sopenharmony_cistruct qlink_event_radar { 14118c2ecf20Sopenharmony_ci struct qlink_event ehdr; 14128c2ecf20Sopenharmony_ci struct qlink_chandef chan; 14138c2ecf20Sopenharmony_ci u8 event; 14148c2ecf20Sopenharmony_ci u8 rsvd[3]; 14158c2ecf20Sopenharmony_ci} __packed; 14168c2ecf20Sopenharmony_ci 14178c2ecf20Sopenharmony_ci/** 14188c2ecf20Sopenharmony_ci * struct qlink_event_external_auth - data for QLINK_EVENT_EXTERNAL_AUTH event 14198c2ecf20Sopenharmony_ci * 14208c2ecf20Sopenharmony_ci * @ssid: SSID announced by BSS 14218c2ecf20Sopenharmony_ci * @ssid_len: SSID length 14228c2ecf20Sopenharmony_ci * @bssid: BSSID of the BSS to connect to 14238c2ecf20Sopenharmony_ci * @akm_suite: AKM suite for external authentication 14248c2ecf20Sopenharmony_ci * @action: action type/trigger for external authentication 14258c2ecf20Sopenharmony_ci */ 14268c2ecf20Sopenharmony_cistruct qlink_event_external_auth { 14278c2ecf20Sopenharmony_ci struct qlink_event ehdr; 14288c2ecf20Sopenharmony_ci __le32 akm_suite; 14298c2ecf20Sopenharmony_ci u8 ssid[IEEE80211_MAX_SSID_LEN]; 14308c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 14318c2ecf20Sopenharmony_ci u8 ssid_len; 14328c2ecf20Sopenharmony_ci u8 action; 14338c2ecf20Sopenharmony_ci} __packed; 14348c2ecf20Sopenharmony_ci 14358c2ecf20Sopenharmony_ci/** 14368c2ecf20Sopenharmony_ci * struct qlink_event_mic_failure - data for QLINK_EVENT_MIC_FAILURE event 14378c2ecf20Sopenharmony_ci * 14388c2ecf20Sopenharmony_ci * @src: source MAC address of the frame 14398c2ecf20Sopenharmony_ci * @key_index: index of the key being reported 14408c2ecf20Sopenharmony_ci * @pairwise: whether the key is pairwise or group 14418c2ecf20Sopenharmony_ci */ 14428c2ecf20Sopenharmony_cistruct qlink_event_mic_failure { 14438c2ecf20Sopenharmony_ci struct qlink_event ehdr; 14448c2ecf20Sopenharmony_ci u8 src[ETH_ALEN]; 14458c2ecf20Sopenharmony_ci u8 key_index; 14468c2ecf20Sopenharmony_ci u8 pairwise; 14478c2ecf20Sopenharmony_ci} __packed; 14488c2ecf20Sopenharmony_ci 14498c2ecf20Sopenharmony_ci/** 14508c2ecf20Sopenharmony_ci * struct qlink_event_update_owe - data for QLINK_EVENT_UPDATE_OWE event 14518c2ecf20Sopenharmony_ci * 14528c2ecf20Sopenharmony_ci * @peer: MAC addr of the peer device for which OWE processing needs to be done 14538c2ecf20Sopenharmony_ci * @ies: IEs from the peer 14548c2ecf20Sopenharmony_ci */ 14558c2ecf20Sopenharmony_cistruct qlink_event_update_owe { 14568c2ecf20Sopenharmony_ci struct qlink_event ehdr; 14578c2ecf20Sopenharmony_ci u8 peer[ETH_ALEN]; 14588c2ecf20Sopenharmony_ci u8 rsvd[2]; 14598c2ecf20Sopenharmony_ci u8 ies[]; 14608c2ecf20Sopenharmony_ci} __packed; 14618c2ecf20Sopenharmony_ci 14628c2ecf20Sopenharmony_ci/* QLINK TLVs (Type-Length Values) definitions 14638c2ecf20Sopenharmony_ci */ 14648c2ecf20Sopenharmony_ci 14658c2ecf20Sopenharmony_ci/** 14668c2ecf20Sopenharmony_ci * enum qlink_tlv_id - list of TLVs that Qlink messages can carry 14678c2ecf20Sopenharmony_ci * 14688c2ecf20Sopenharmony_ci * @QTN_TLV_ID_BITMAP: a data representing a bitmap that is used together with 14698c2ecf20Sopenharmony_ci * other TLVs: 14708c2ecf20Sopenharmony_ci * &enum qlink_sta_info used to indicate which statistic carried in 14718c2ecf20Sopenharmony_ci * QTN_TLV_ID_STA_STATS is valid. 14728c2ecf20Sopenharmony_ci * &enum qlink_hw_capab listing wireless card capabilities. 14738c2ecf20Sopenharmony_ci * &enum qlink_driver_capab listing driver/host system capabilities. 14748c2ecf20Sopenharmony_ci * &enum qlink_chan_stat used to indicate which statistic carried in 14758c2ecf20Sopenharmony_ci * QTN_TLV_ID_CHANNEL_STATS is valid. 14768c2ecf20Sopenharmony_ci * @QTN_TLV_ID_STA_STATS: per-STA statistics as defined by 14778c2ecf20Sopenharmony_ci * &struct qlink_sta_stats. Valid values are marked as such in a bitmap 14788c2ecf20Sopenharmony_ci * carried by QTN_TLV_ID_BITMAP. 14798c2ecf20Sopenharmony_ci * @QTN_TLV_ID_IFTYPE_DATA: supported band data. 14808c2ecf20Sopenharmony_ci */ 14818c2ecf20Sopenharmony_cienum qlink_tlv_id { 14828c2ecf20Sopenharmony_ci QTN_TLV_ID_FRAG_THRESH = 0x0201, 14838c2ecf20Sopenharmony_ci QTN_TLV_ID_RTS_THRESH = 0x0202, 14848c2ecf20Sopenharmony_ci QTN_TLV_ID_SRETRY_LIMIT = 0x0203, 14858c2ecf20Sopenharmony_ci QTN_TLV_ID_LRETRY_LIMIT = 0x0204, 14868c2ecf20Sopenharmony_ci QTN_TLV_ID_REG_RULE = 0x0207, 14878c2ecf20Sopenharmony_ci QTN_TLV_ID_CHANNEL = 0x020F, 14888c2ecf20Sopenharmony_ci QTN_TLV_ID_CHANDEF = 0x0210, 14898c2ecf20Sopenharmony_ci QTN_TLV_ID_BITMAP = 0x0211, 14908c2ecf20Sopenharmony_ci QTN_TLV_ID_STA_STATS = 0x0212, 14918c2ecf20Sopenharmony_ci QTN_TLV_ID_COVERAGE_CLASS = 0x0213, 14928c2ecf20Sopenharmony_ci QTN_TLV_ID_IFACE_LIMIT = 0x0214, 14938c2ecf20Sopenharmony_ci QTN_TLV_ID_CHANNEL_STATS = 0x0216, 14948c2ecf20Sopenharmony_ci QTN_TLV_ID_KEY = 0x0302, 14958c2ecf20Sopenharmony_ci QTN_TLV_ID_SEQ = 0x0303, 14968c2ecf20Sopenharmony_ci QTN_TLV_ID_IE_SET = 0x0305, 14978c2ecf20Sopenharmony_ci QTN_TLV_ID_EXT_CAPABILITY_MASK = 0x0306, 14988c2ecf20Sopenharmony_ci QTN_TLV_ID_ACL_DATA = 0x0307, 14998c2ecf20Sopenharmony_ci QTN_TLV_ID_BUILD_NAME = 0x0401, 15008c2ecf20Sopenharmony_ci QTN_TLV_ID_BUILD_REV = 0x0402, 15018c2ecf20Sopenharmony_ci QTN_TLV_ID_BUILD_TYPE = 0x0403, 15028c2ecf20Sopenharmony_ci QTN_TLV_ID_BUILD_LABEL = 0x0404, 15038c2ecf20Sopenharmony_ci QTN_TLV_ID_HW_ID = 0x0405, 15048c2ecf20Sopenharmony_ci QTN_TLV_ID_CALIBRATION_VER = 0x0406, 15058c2ecf20Sopenharmony_ci QTN_TLV_ID_UBOOT_VER = 0x0407, 15068c2ecf20Sopenharmony_ci QTN_TLV_ID_RANDOM_MAC_ADDR = 0x0408, 15078c2ecf20Sopenharmony_ci QTN_TLV_ID_WOWLAN_CAPAB = 0x0410, 15088c2ecf20Sopenharmony_ci QTN_TLV_ID_WOWLAN_PATTERN = 0x0411, 15098c2ecf20Sopenharmony_ci QTN_TLV_ID_IFTYPE_DATA = 0x0418, 15108c2ecf20Sopenharmony_ci}; 15118c2ecf20Sopenharmony_ci 15128c2ecf20Sopenharmony_cistruct qlink_tlv_hdr { 15138c2ecf20Sopenharmony_ci __le16 type; 15148c2ecf20Sopenharmony_ci __le16 len; 15158c2ecf20Sopenharmony_ci u8 val[]; 15168c2ecf20Sopenharmony_ci} __packed; 15178c2ecf20Sopenharmony_ci 15188c2ecf20Sopenharmony_cistruct qlink_iface_limit { 15198c2ecf20Sopenharmony_ci __le16 max_num; 15208c2ecf20Sopenharmony_ci __le16 type; 15218c2ecf20Sopenharmony_ci} __packed; 15228c2ecf20Sopenharmony_ci 15238c2ecf20Sopenharmony_cistruct qlink_iface_limit_record { 15248c2ecf20Sopenharmony_ci __le16 max_interfaces; 15258c2ecf20Sopenharmony_ci u8 num_different_channels; 15268c2ecf20Sopenharmony_ci u8 n_limits; 15278c2ecf20Sopenharmony_ci struct qlink_iface_limit limits[]; 15288c2ecf20Sopenharmony_ci} __packed; 15298c2ecf20Sopenharmony_ci 15308c2ecf20Sopenharmony_ci#define QLINK_RSSI_OFFSET 120 15318c2ecf20Sopenharmony_ci 15328c2ecf20Sopenharmony_ci/** 15338c2ecf20Sopenharmony_ci * enum qlink_reg_rule_flags - regulatory rule flags 15348c2ecf20Sopenharmony_ci * 15358c2ecf20Sopenharmony_ci * See description of &enum nl80211_reg_rule_flags 15368c2ecf20Sopenharmony_ci */ 15378c2ecf20Sopenharmony_cienum qlink_reg_rule_flags { 15388c2ecf20Sopenharmony_ci QLINK_RRF_NO_OFDM = BIT(0), 15398c2ecf20Sopenharmony_ci QLINK_RRF_NO_CCK = BIT(1), 15408c2ecf20Sopenharmony_ci QLINK_RRF_NO_INDOOR = BIT(2), 15418c2ecf20Sopenharmony_ci QLINK_RRF_NO_OUTDOOR = BIT(3), 15428c2ecf20Sopenharmony_ci QLINK_RRF_DFS = BIT(4), 15438c2ecf20Sopenharmony_ci QLINK_RRF_PTP_ONLY = BIT(5), 15448c2ecf20Sopenharmony_ci QLINK_RRF_PTMP_ONLY = BIT(6), 15458c2ecf20Sopenharmony_ci QLINK_RRF_NO_IR = BIT(7), 15468c2ecf20Sopenharmony_ci QLINK_RRF_AUTO_BW = BIT(8), 15478c2ecf20Sopenharmony_ci QLINK_RRF_IR_CONCURRENT = BIT(9), 15488c2ecf20Sopenharmony_ci QLINK_RRF_NO_HT40MINUS = BIT(10), 15498c2ecf20Sopenharmony_ci QLINK_RRF_NO_HT40PLUS = BIT(11), 15508c2ecf20Sopenharmony_ci QLINK_RRF_NO_80MHZ = BIT(12), 15518c2ecf20Sopenharmony_ci QLINK_RRF_NO_160MHZ = BIT(13), 15528c2ecf20Sopenharmony_ci}; 15538c2ecf20Sopenharmony_ci 15548c2ecf20Sopenharmony_ci/** 15558c2ecf20Sopenharmony_ci * struct qlink_tlv_reg_rule - data for QTN_TLV_ID_REG_RULE TLV 15568c2ecf20Sopenharmony_ci * 15578c2ecf20Sopenharmony_ci * Regulatory rule description. 15588c2ecf20Sopenharmony_ci * 15598c2ecf20Sopenharmony_ci * @start_freq_khz: start frequency of the range the rule is attributed to. 15608c2ecf20Sopenharmony_ci * @end_freq_khz: end frequency of the range the rule is attributed to. 15618c2ecf20Sopenharmony_ci * @max_bandwidth_khz: max bandwidth that channels in specified range can be 15628c2ecf20Sopenharmony_ci * configured to. 15638c2ecf20Sopenharmony_ci * @max_antenna_gain: max antenna gain that can be used in the specified 15648c2ecf20Sopenharmony_ci * frequency range, dBi. 15658c2ecf20Sopenharmony_ci * @max_eirp: maximum EIRP. 15668c2ecf20Sopenharmony_ci * @flags: regulatory rule flags in &enum qlink_reg_rule_flags. 15678c2ecf20Sopenharmony_ci * @dfs_cac_ms: DFS CAC period. 15688c2ecf20Sopenharmony_ci */ 15698c2ecf20Sopenharmony_cistruct qlink_tlv_reg_rule { 15708c2ecf20Sopenharmony_ci struct qlink_tlv_hdr hdr; 15718c2ecf20Sopenharmony_ci __le32 start_freq_khz; 15728c2ecf20Sopenharmony_ci __le32 end_freq_khz; 15738c2ecf20Sopenharmony_ci __le32 max_bandwidth_khz; 15748c2ecf20Sopenharmony_ci __le32 max_antenna_gain; 15758c2ecf20Sopenharmony_ci __le32 max_eirp; 15768c2ecf20Sopenharmony_ci __le32 flags; 15778c2ecf20Sopenharmony_ci __le32 dfs_cac_ms; 15788c2ecf20Sopenharmony_ci} __packed; 15798c2ecf20Sopenharmony_ci 15808c2ecf20Sopenharmony_cienum qlink_channel_flags { 15818c2ecf20Sopenharmony_ci QLINK_CHAN_DISABLED = BIT(0), 15828c2ecf20Sopenharmony_ci QLINK_CHAN_NO_IR = BIT(1), 15838c2ecf20Sopenharmony_ci QLINK_CHAN_RADAR = BIT(3), 15848c2ecf20Sopenharmony_ci QLINK_CHAN_NO_HT40PLUS = BIT(4), 15858c2ecf20Sopenharmony_ci QLINK_CHAN_NO_HT40MINUS = BIT(5), 15868c2ecf20Sopenharmony_ci QLINK_CHAN_NO_OFDM = BIT(6), 15878c2ecf20Sopenharmony_ci QLINK_CHAN_NO_80MHZ = BIT(7), 15888c2ecf20Sopenharmony_ci QLINK_CHAN_NO_160MHZ = BIT(8), 15898c2ecf20Sopenharmony_ci QLINK_CHAN_INDOOR_ONLY = BIT(9), 15908c2ecf20Sopenharmony_ci QLINK_CHAN_IR_CONCURRENT = BIT(10), 15918c2ecf20Sopenharmony_ci QLINK_CHAN_NO_20MHZ = BIT(11), 15928c2ecf20Sopenharmony_ci QLINK_CHAN_NO_10MHZ = BIT(12), 15938c2ecf20Sopenharmony_ci}; 15948c2ecf20Sopenharmony_ci 15958c2ecf20Sopenharmony_cienum qlink_dfs_state { 15968c2ecf20Sopenharmony_ci QLINK_DFS_USABLE, 15978c2ecf20Sopenharmony_ci QLINK_DFS_UNAVAILABLE, 15988c2ecf20Sopenharmony_ci QLINK_DFS_AVAILABLE, 15998c2ecf20Sopenharmony_ci}; 16008c2ecf20Sopenharmony_ci 16018c2ecf20Sopenharmony_ci/** 16028c2ecf20Sopenharmony_ci * struct qlink_tlv_channel - data for QTN_TLV_ID_CHANNEL TLV 16038c2ecf20Sopenharmony_ci * 16048c2ecf20Sopenharmony_ci * Channel settings. 16058c2ecf20Sopenharmony_ci * 16068c2ecf20Sopenharmony_ci * @channel: ieee80211 channel settings. 16078c2ecf20Sopenharmony_ci */ 16088c2ecf20Sopenharmony_cistruct qlink_tlv_channel { 16098c2ecf20Sopenharmony_ci struct qlink_tlv_hdr hdr; 16108c2ecf20Sopenharmony_ci struct qlink_channel chan; 16118c2ecf20Sopenharmony_ci} __packed; 16128c2ecf20Sopenharmony_ci 16138c2ecf20Sopenharmony_ci/** 16148c2ecf20Sopenharmony_ci * struct qlink_tlv_chandef - data for QTN_TLV_ID_CHANDEF TLV 16158c2ecf20Sopenharmony_ci * 16168c2ecf20Sopenharmony_ci * Channel definition. 16178c2ecf20Sopenharmony_ci * 16188c2ecf20Sopenharmony_ci * @chan: channel definition data. 16198c2ecf20Sopenharmony_ci */ 16208c2ecf20Sopenharmony_cistruct qlink_tlv_chandef { 16218c2ecf20Sopenharmony_ci struct qlink_tlv_hdr hdr; 16228c2ecf20Sopenharmony_ci struct qlink_chandef chdef; 16238c2ecf20Sopenharmony_ci} __packed; 16248c2ecf20Sopenharmony_ci 16258c2ecf20Sopenharmony_cienum qlink_ie_set_type { 16268c2ecf20Sopenharmony_ci QLINK_IE_SET_UNKNOWN, 16278c2ecf20Sopenharmony_ci QLINK_IE_SET_ASSOC_REQ, 16288c2ecf20Sopenharmony_ci QLINK_IE_SET_ASSOC_RESP, 16298c2ecf20Sopenharmony_ci QLINK_IE_SET_PROBE_REQ, 16308c2ecf20Sopenharmony_ci QLINK_IE_SET_SCAN, 16318c2ecf20Sopenharmony_ci QLINK_IE_SET_BEACON_HEAD, 16328c2ecf20Sopenharmony_ci QLINK_IE_SET_BEACON_TAIL, 16338c2ecf20Sopenharmony_ci QLINK_IE_SET_BEACON_IES, 16348c2ecf20Sopenharmony_ci QLINK_IE_SET_PROBE_RESP, 16358c2ecf20Sopenharmony_ci QLINK_IE_SET_PROBE_RESP_IES, 16368c2ecf20Sopenharmony_ci}; 16378c2ecf20Sopenharmony_ci 16388c2ecf20Sopenharmony_ci/** 16398c2ecf20Sopenharmony_ci * struct qlink_tlv_ie_set - data for QTN_TLV_ID_IE_SET 16408c2ecf20Sopenharmony_ci * 16418c2ecf20Sopenharmony_ci * @type: type of MGMT frame IEs belong to, one of &enum qlink_ie_set_type. 16428c2ecf20Sopenharmony_ci * @flags: for future use. 16438c2ecf20Sopenharmony_ci * @ie_data: IEs data. 16448c2ecf20Sopenharmony_ci */ 16458c2ecf20Sopenharmony_cistruct qlink_tlv_ie_set { 16468c2ecf20Sopenharmony_ci struct qlink_tlv_hdr hdr; 16478c2ecf20Sopenharmony_ci u8 type; 16488c2ecf20Sopenharmony_ci u8 flags; 16498c2ecf20Sopenharmony_ci u8 rsvd[2]; 16508c2ecf20Sopenharmony_ci u8 ie_data[]; 16518c2ecf20Sopenharmony_ci} __packed; 16528c2ecf20Sopenharmony_ci 16538c2ecf20Sopenharmony_ci/** 16548c2ecf20Sopenharmony_ci * struct qlink_tlv_ext_ie - extension IE 16558c2ecf20Sopenharmony_ci * 16568c2ecf20Sopenharmony_ci * @eid_ext: element ID extension, one of &enum ieee80211_eid_ext. 16578c2ecf20Sopenharmony_ci * @ie_data: IEs data. 16588c2ecf20Sopenharmony_ci */ 16598c2ecf20Sopenharmony_cistruct qlink_tlv_ext_ie { 16608c2ecf20Sopenharmony_ci struct qlink_tlv_hdr hdr; 16618c2ecf20Sopenharmony_ci u8 eid_ext; 16628c2ecf20Sopenharmony_ci u8 rsvd[3]; 16638c2ecf20Sopenharmony_ci u8 ie_data[]; 16648c2ecf20Sopenharmony_ci} __packed; 16658c2ecf20Sopenharmony_ci 16668c2ecf20Sopenharmony_ci#define IEEE80211_HE_PPE_THRES_MAX_LEN 25 16678c2ecf20Sopenharmony_cistruct qlink_sband_iftype_data { 16688c2ecf20Sopenharmony_ci __le16 types_mask; 16698c2ecf20Sopenharmony_ci struct ieee80211_he_cap_elem he_cap_elem; 16708c2ecf20Sopenharmony_ci struct ieee80211_he_mcs_nss_supp he_mcs_nss_supp; 16718c2ecf20Sopenharmony_ci u8 ppe_thres[IEEE80211_HE_PPE_THRES_MAX_LEN]; 16728c2ecf20Sopenharmony_ci} __packed; 16738c2ecf20Sopenharmony_ci 16748c2ecf20Sopenharmony_ci/** 16758c2ecf20Sopenharmony_ci * struct qlink_tlv_iftype_data - data for QTN_TLV_ID_IFTYPE_DATA 16768c2ecf20Sopenharmony_ci * 16778c2ecf20Sopenharmony_ci * @n_iftype_data: number of entries in iftype_data. 16788c2ecf20Sopenharmony_ci * @iftype_data: interface type data entries. 16798c2ecf20Sopenharmony_ci */ 16808c2ecf20Sopenharmony_cistruct qlink_tlv_iftype_data { 16818c2ecf20Sopenharmony_ci struct qlink_tlv_hdr hdr; 16828c2ecf20Sopenharmony_ci u8 n_iftype_data; 16838c2ecf20Sopenharmony_ci u8 rsvd[3]; 16848c2ecf20Sopenharmony_ci struct qlink_sband_iftype_data iftype_data[]; 16858c2ecf20Sopenharmony_ci} __packed; 16868c2ecf20Sopenharmony_ci 16878c2ecf20Sopenharmony_ci/** 16888c2ecf20Sopenharmony_ci * enum qlink_chan_stat - channel statistics bitmap 16898c2ecf20Sopenharmony_ci * 16908c2ecf20Sopenharmony_ci * Used to indicate which statistics values in &struct qlink_chan_stats 16918c2ecf20Sopenharmony_ci * are valid. Individual values are used to fill a bitmap carried in a 16928c2ecf20Sopenharmony_ci * payload of QTN_TLV_ID_BITMAP. 16938c2ecf20Sopenharmony_ci * 16948c2ecf20Sopenharmony_ci * @QLINK_CHAN_STAT_TIME_ON: time_on value is valid. 16958c2ecf20Sopenharmony_ci * @QLINK_CHAN_STAT_TIME_TX: time_tx value is valid. 16968c2ecf20Sopenharmony_ci * @QLINK_CHAN_STAT_TIME_RX: time_rx value is valid. 16978c2ecf20Sopenharmony_ci * @QLINK_CHAN_STAT_CCA_BUSY: cca_busy value is valid. 16988c2ecf20Sopenharmony_ci * @QLINK_CHAN_STAT_CCA_BUSY_EXT: cca_busy_ext value is valid. 16998c2ecf20Sopenharmony_ci * @QLINK_CHAN_STAT_TIME_SCAN: time_scan value is valid. 17008c2ecf20Sopenharmony_ci * @QLINK_CHAN_STAT_CHAN_NOISE: chan_noise value is valid. 17018c2ecf20Sopenharmony_ci */ 17028c2ecf20Sopenharmony_cienum qlink_chan_stat { 17038c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_TIME_ON, 17048c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_TIME_TX, 17058c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_TIME_RX, 17068c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_CCA_BUSY, 17078c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_CCA_BUSY_EXT, 17088c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_TIME_SCAN, 17098c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_CHAN_NOISE, 17108c2ecf20Sopenharmony_ci QLINK_CHAN_STAT_NUM, 17118c2ecf20Sopenharmony_ci}; 17128c2ecf20Sopenharmony_ci 17138c2ecf20Sopenharmony_ci/** 17148c2ecf20Sopenharmony_ci * struct qlink_chan_stats - data for QTN_TLV_ID_CHANNEL_STATS 17158c2ecf20Sopenharmony_ci * 17168c2ecf20Sopenharmony_ci * Carries a per-channel statistics. Not all fields may be filled with 17178c2ecf20Sopenharmony_ci * valid values. Valid fields should be indicated as such using a bitmap of 17188c2ecf20Sopenharmony_ci * &enum qlink_chan_stat. Bitmap is carried separately in a payload of 17198c2ecf20Sopenharmony_ci * QTN_TLV_ID_BITMAP. 17208c2ecf20Sopenharmony_ci * 17218c2ecf20Sopenharmony_ci * @time_on: amount of time radio operated on that channel. 17228c2ecf20Sopenharmony_ci * @time_tx: amount of time radio spent transmitting on the channel. 17238c2ecf20Sopenharmony_ci * @time_rx: amount of time radio spent receiving on the channel. 17248c2ecf20Sopenharmony_ci * @cca_busy: amount of time the the primary channel was busy. 17258c2ecf20Sopenharmony_ci * @cca_busy_ext: amount of time the the secondary channel was busy. 17268c2ecf20Sopenharmony_ci * @time_scan: amount of radio spent scanning on the channel. 17278c2ecf20Sopenharmony_ci * @chan_noise: channel noise. 17288c2ecf20Sopenharmony_ci */ 17298c2ecf20Sopenharmony_cistruct qlink_chan_stats { 17308c2ecf20Sopenharmony_ci __le64 time_on; 17318c2ecf20Sopenharmony_ci __le64 time_tx; 17328c2ecf20Sopenharmony_ci __le64 time_rx; 17338c2ecf20Sopenharmony_ci __le64 cca_busy; 17348c2ecf20Sopenharmony_ci __le64 cca_busy_ext; 17358c2ecf20Sopenharmony_ci __le64 time_scan; 17368c2ecf20Sopenharmony_ci s8 chan_noise; 17378c2ecf20Sopenharmony_ci u8 rsvd[3]; 17388c2ecf20Sopenharmony_ci} __packed; 17398c2ecf20Sopenharmony_ci 17408c2ecf20Sopenharmony_ci/** 17418c2ecf20Sopenharmony_ci * enum qlink_sta_info - station information bitmap 17428c2ecf20Sopenharmony_ci * 17438c2ecf20Sopenharmony_ci * Used to indicate which statistics values in &struct qlink_sta_stats 17448c2ecf20Sopenharmony_ci * are valid. Individual values are used to fill a bitmap carried in a 17458c2ecf20Sopenharmony_ci * payload of QTN_TLV_ID_BITMAP. 17468c2ecf20Sopenharmony_ci * 17478c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_CONNECTED_TIME: connected_time value is valid. 17488c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_INACTIVE_TIME: inactive_time value is valid. 17498c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_RX_BYTES: lower 32 bits of rx_bytes value are valid. 17508c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_TX_BYTES: lower 32 bits of tx_bytes value are valid. 17518c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_RX_BYTES64: rx_bytes value is valid. 17528c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_TX_BYTES64: tx_bytes value is valid. 17538c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_RX_DROP_MISC: rx_dropped_misc value is valid. 17548c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_BEACON_RX: rx_beacon value is valid. 17558c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_SIGNAL: signal value is valid. 17568c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_SIGNAL_AVG: signal_avg value is valid. 17578c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_RX_BITRATE: rxrate value is valid. 17588c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_TX_BITRATE: txrate value is valid. 17598c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_RX_PACKETS: rx_packets value is valid. 17608c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_TX_PACKETS: tx_packets value is valid. 17618c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_TX_RETRIES: tx_retries value is valid. 17628c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_TX_FAILED: tx_failed value is valid. 17638c2ecf20Sopenharmony_ci * @QLINK_STA_INFO_STA_FLAGS: sta_flags value is valid. 17648c2ecf20Sopenharmony_ci */ 17658c2ecf20Sopenharmony_cienum qlink_sta_info { 17668c2ecf20Sopenharmony_ci QLINK_STA_INFO_CONNECTED_TIME, 17678c2ecf20Sopenharmony_ci QLINK_STA_INFO_INACTIVE_TIME, 17688c2ecf20Sopenharmony_ci QLINK_STA_INFO_RX_BYTES, 17698c2ecf20Sopenharmony_ci QLINK_STA_INFO_TX_BYTES, 17708c2ecf20Sopenharmony_ci QLINK_STA_INFO_RX_BYTES64, 17718c2ecf20Sopenharmony_ci QLINK_STA_INFO_TX_BYTES64, 17728c2ecf20Sopenharmony_ci QLINK_STA_INFO_RX_DROP_MISC, 17738c2ecf20Sopenharmony_ci QLINK_STA_INFO_BEACON_RX, 17748c2ecf20Sopenharmony_ci QLINK_STA_INFO_SIGNAL, 17758c2ecf20Sopenharmony_ci QLINK_STA_INFO_SIGNAL_AVG, 17768c2ecf20Sopenharmony_ci QLINK_STA_INFO_RX_BITRATE, 17778c2ecf20Sopenharmony_ci QLINK_STA_INFO_TX_BITRATE, 17788c2ecf20Sopenharmony_ci QLINK_STA_INFO_RX_PACKETS, 17798c2ecf20Sopenharmony_ci QLINK_STA_INFO_TX_PACKETS, 17808c2ecf20Sopenharmony_ci QLINK_STA_INFO_TX_RETRIES, 17818c2ecf20Sopenharmony_ci QLINK_STA_INFO_TX_FAILED, 17828c2ecf20Sopenharmony_ci QLINK_STA_INFO_STA_FLAGS, 17838c2ecf20Sopenharmony_ci QLINK_STA_INFO_NUM, 17848c2ecf20Sopenharmony_ci}; 17858c2ecf20Sopenharmony_ci 17868c2ecf20Sopenharmony_ci/** 17878c2ecf20Sopenharmony_ci * struct qlink_sta_info_rate - STA rate statistics 17888c2ecf20Sopenharmony_ci * 17898c2ecf20Sopenharmony_ci * @rate: data rate in Mbps. 17908c2ecf20Sopenharmony_ci * @flags: bitmap of &enum qlink_sta_info_rate_flags. 17918c2ecf20Sopenharmony_ci * @mcs: 802.11-defined MCS index. 17928c2ecf20Sopenharmony_ci * nss: Number of Spatial Streams. 17938c2ecf20Sopenharmony_ci * @bw: bandwidth, one of &enum qlink_channel_width. 17948c2ecf20Sopenharmony_ci */ 17958c2ecf20Sopenharmony_cistruct qlink_sta_info_rate { 17968c2ecf20Sopenharmony_ci __le16 rate; 17978c2ecf20Sopenharmony_ci u8 flags; 17988c2ecf20Sopenharmony_ci u8 mcs; 17998c2ecf20Sopenharmony_ci u8 nss; 18008c2ecf20Sopenharmony_ci u8 bw; 18018c2ecf20Sopenharmony_ci} __packed; 18028c2ecf20Sopenharmony_ci 18038c2ecf20Sopenharmony_ci/** 18048c2ecf20Sopenharmony_ci * struct qlink_sta_stats - data for QTN_TLV_ID_STA_STATS 18058c2ecf20Sopenharmony_ci * 18068c2ecf20Sopenharmony_ci * Carries statistics of a STA. Not all fields may be filled with 18078c2ecf20Sopenharmony_ci * valid values. Valid fields should be indicated as such using a bitmap of 18088c2ecf20Sopenharmony_ci * &enum qlink_sta_info. Bitmap is carried separately in a payload of 18098c2ecf20Sopenharmony_ci * QTN_TLV_ID_BITMAP. 18108c2ecf20Sopenharmony_ci */ 18118c2ecf20Sopenharmony_cistruct qlink_sta_stats { 18128c2ecf20Sopenharmony_ci __le64 rx_bytes; 18138c2ecf20Sopenharmony_ci __le64 tx_bytes; 18148c2ecf20Sopenharmony_ci __le64 rx_beacon; 18158c2ecf20Sopenharmony_ci __le64 rx_duration; 18168c2ecf20Sopenharmony_ci __le64 t_offset; 18178c2ecf20Sopenharmony_ci __le32 connected_time; 18188c2ecf20Sopenharmony_ci __le32 inactive_time; 18198c2ecf20Sopenharmony_ci __le32 rx_packets; 18208c2ecf20Sopenharmony_ci __le32 tx_packets; 18218c2ecf20Sopenharmony_ci __le32 tx_retries; 18228c2ecf20Sopenharmony_ci __le32 tx_failed; 18238c2ecf20Sopenharmony_ci __le32 rx_dropped_misc; 18248c2ecf20Sopenharmony_ci __le32 beacon_loss_count; 18258c2ecf20Sopenharmony_ci __le32 expected_throughput; 18268c2ecf20Sopenharmony_ci struct qlink_sta_info_state sta_flags; 18278c2ecf20Sopenharmony_ci struct qlink_sta_info_rate txrate; 18288c2ecf20Sopenharmony_ci struct qlink_sta_info_rate rxrate; 18298c2ecf20Sopenharmony_ci __le16 llid; 18308c2ecf20Sopenharmony_ci __le16 plid; 18318c2ecf20Sopenharmony_ci u8 local_pm; 18328c2ecf20Sopenharmony_ci u8 peer_pm; 18338c2ecf20Sopenharmony_ci u8 nonpeer_pm; 18348c2ecf20Sopenharmony_ci u8 rx_beacon_signal_avg; 18358c2ecf20Sopenharmony_ci u8 plink_state; 18368c2ecf20Sopenharmony_ci u8 signal; 18378c2ecf20Sopenharmony_ci u8 signal_avg; 18388c2ecf20Sopenharmony_ci u8 rsvd[1]; 18398c2ecf20Sopenharmony_ci}; 18408c2ecf20Sopenharmony_ci 18418c2ecf20Sopenharmony_ci/** 18428c2ecf20Sopenharmony_ci * struct qlink_random_mac_addr - data for QTN_TLV_ID_RANDOM_MAC_ADDR TLV 18438c2ecf20Sopenharmony_ci * 18448c2ecf20Sopenharmony_ci * Specifies MAC address mask/value for generation random MAC address 18458c2ecf20Sopenharmony_ci * during scan. 18468c2ecf20Sopenharmony_ci * 18478c2ecf20Sopenharmony_ci * @mac_addr: MAC address used with randomisation 18488c2ecf20Sopenharmony_ci * @mac_addr_mask: MAC address mask used with randomisation, bits that 18498c2ecf20Sopenharmony_ci * are 0 in the mask should be randomised, bits that are 1 should 18508c2ecf20Sopenharmony_ci * be taken from the @mac_addr 18518c2ecf20Sopenharmony_ci */ 18528c2ecf20Sopenharmony_cistruct qlink_random_mac_addr { 18538c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 18548c2ecf20Sopenharmony_ci u8 mac_addr_mask[ETH_ALEN]; 18558c2ecf20Sopenharmony_ci} __packed; 18568c2ecf20Sopenharmony_ci 18578c2ecf20Sopenharmony_ci/** 18588c2ecf20Sopenharmony_ci * struct qlink_wowlan_capab_data - data for QTN_TLV_ID_WOWLAN_CAPAB TLV 18598c2ecf20Sopenharmony_ci * 18608c2ecf20Sopenharmony_ci * WoWLAN capabilities supported by cards. 18618c2ecf20Sopenharmony_ci * 18628c2ecf20Sopenharmony_ci * @version: version of WoWLAN data structure, to ensure backward 18638c2ecf20Sopenharmony_ci * compatibility for firmwares with limited WoWLAN support 18648c2ecf20Sopenharmony_ci * @len: Total length of WoWLAN data 18658c2ecf20Sopenharmony_ci * @data: supported WoWLAN features 18668c2ecf20Sopenharmony_ci */ 18678c2ecf20Sopenharmony_cistruct qlink_wowlan_capab_data { 18688c2ecf20Sopenharmony_ci __le16 version; 18698c2ecf20Sopenharmony_ci __le16 len; 18708c2ecf20Sopenharmony_ci u8 data[]; 18718c2ecf20Sopenharmony_ci} __packed; 18728c2ecf20Sopenharmony_ci 18738c2ecf20Sopenharmony_ci/** 18748c2ecf20Sopenharmony_ci * struct qlink_wowlan_support - supported WoWLAN capabilities 18758c2ecf20Sopenharmony_ci * 18768c2ecf20Sopenharmony_ci * @n_patterns: number of supported wakeup patterns 18778c2ecf20Sopenharmony_ci * @pattern_max_len: maximum length of each pattern 18788c2ecf20Sopenharmony_ci * @pattern_min_len: minimum length of each pattern 18798c2ecf20Sopenharmony_ci */ 18808c2ecf20Sopenharmony_cistruct qlink_wowlan_support { 18818c2ecf20Sopenharmony_ci __le32 n_patterns; 18828c2ecf20Sopenharmony_ci __le32 pattern_max_len; 18838c2ecf20Sopenharmony_ci __le32 pattern_min_len; 18848c2ecf20Sopenharmony_ci} __packed; 18858c2ecf20Sopenharmony_ci 18868c2ecf20Sopenharmony_ci#endif /* _QTN_QLINK_H_ */ 1887