linux/drivers/net/wireless/quantenna/qtnfmac/qlink.h

/* SPDX-License-Identifier: GPL-2.0+ */
/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */

#ifndef _QTN_QLINK_H_
#define _QTN_QLINK_H_

#include <linux/ieee80211.h>

#define QLINK_PROTO_VER_MAJOR_M
#define QLINK_PROTO_VER_MAJOR_S
#define QLINK_PROTO_VER_MINOR_M
#define QLINK_VER_MINOR(_ver)
#define QLINK_VER_MAJOR(_ver)
#define QLINK_VER(_maj, _min)

#define QLINK_PROTO_VER_MAJOR
#define QLINK_PROTO_VER_MINOR
#define QLINK_PROTO_VER

#define QLINK_ALIGN

#define QLINK_MACID_RSVD
#define QLINK_VIFID_RSVD

/* Common QLINK protocol messages definitions.
 */

/**
 * enum qlink_msg_type - QLINK message types
 *
 * Used to distinguish between message types of QLINK protocol.
 *
 * @QLINK_MSG_TYPE_CMD: Message is carrying data of a command sent from
 *	driver to wireless hardware.
 * @QLINK_MSG_TYPE_CMDRSP: Message is carrying data of a response to a command.
 *	Sent from wireless HW to driver in reply to previously issued command.
 * @QLINK_MSG_TYPE_EVENT: Data for an event originated in wireless hardware and
 *	sent asynchronously to driver.
 */
enum qlink_msg_type {};

/**
 * struct qlink_msg_header - common QLINK protocol message header
 *
 * Portion of QLINK protocol header common for all message types.
 *
 * @type: Message type, one of &enum qlink_msg_type.
 * @len: Total length of message including all headers.
 */
struct qlink_msg_header {} __packed;

/* Generic definitions of data and information carried in QLINK messages
 */

/**
 * enum qlink_hw_capab - device capabilities.
 *
 * @QLINK_HW_CAPAB_REG_UPDATE: device can update it's regulatory region.
 * @QLINK_HW_CAPAB_STA_INACT_TIMEOUT: device implements a logic to kick-out
 *	associated STAs due to inactivity. Inactivity timeout period is taken
 *	from QLINK_CMD_START_AP parameters.
 * @QLINK_HW_CAPAB_DFS_OFFLOAD: device implements DFS offload functionality
 * @QLINK_HW_CAPAB_SCAN_RANDOM_MAC_ADDR: device supports MAC Address
 *	Randomization in probe requests.
 * @QLINK_HW_CAPAB_OBSS_SCAN: device can perform OBSS scanning.
 * @QLINK_HW_CAPAB_HW_BRIDGE: device has hardware switch capabilities.
 */
enum qlink_hw_capab {};

/**
 * enum qlink_driver_capab - host driver capabilities.
 *
 */
enum qlink_driver_capab {};

enum qlink_iface_type {};

/**
 * struct qlink_intf_info - information on virtual interface.
 *
 * Data describing a single virtual interface.
 *
 * @if_type: Mode of interface operation, one of &enum qlink_iface_type
 * @vlanid: VLAN ID for AP_VLAN interface type
 * @mac_addr: MAC address of virtual interface.
 */
struct qlink_intf_info {} __packed;

enum qlink_sta_flags {};

enum qlink_channel_width {};

/**
 * struct qlink_channel - qlink control channel definition
 *
 * @hw_value: hardware-specific value for the channel
 * @center_freq: center frequency in MHz
 * @flags: channel flags from &enum qlink_channel_flags
 * @band: band this channel belongs to
 * @max_antenna_gain: maximum antenna gain in dBi
 * @max_power: maximum transmission power (in dBm)
 * @max_reg_power: maximum regulatory transmission power (in dBm)
 * @dfs_state: current state of this channel.
 *      Only relevant if radar is required on this channel.
 * @beacon_found: helper to regulatory code to indicate when a beacon
 *	has been found on this channel. Use regulatory_hint_found_beacon()
 *	to enable this, this is useful only on 5 GHz band.
 */
struct qlink_channel {} __packed;

/**
 * struct qlink_chandef - qlink channel definition
 *
 * @chan: primary channel definition
 * @center_freq1: center frequency of first segment
 * @center_freq2: center frequency of second segment (80+80 only)
 * @width: channel width, one of @enum qlink_channel_width
 */
struct qlink_chandef {} __packed;

#define QLINK_MAX_NR_CIPHER_SUITES
#define QLINK_MAX_NR_AKM_SUITES

struct qlink_auth_encr {} __packed;

/**
 * struct qlink_sta_info_state - station flags mask/value
 *
 * @mask: STA flags mask, bitmap of &enum qlink_sta_flags
 * @value: STA flags values, bitmap of &enum qlink_sta_flags
 */
struct qlink_sta_info_state {} __packed;

/**
 * enum qlink_sr_ctrl_flags - control flags for spatial reuse parameter set
 *
 * @QLINK_SR_PSR_DISALLOWED: indicates whether or not PSR-based spatial reuse
 * transmissions are allowed for STAs associated with the AP
 * @QLINK_SR_NON_SRG_OBSS_PD_SR_DISALLOWED: indicates whether or not
 * Non-SRG OBSS PD spatial reuse transmissions are allowed for STAs associated
 * with the AP
 * @NON_SRG_OFFSET_PRESENT: indicates whether or not Non-SRG OBSS PD Max offset
 * field is valid in the element
 * @QLINK_SR_SRG_INFORMATION_PRESENT: indicates whether or not SRG OBSS PD
 * Min/Max offset fields ore valid in the element
 */
enum qlink_sr_ctrl_flags {};

/**
 * struct qlink_sr_params - spatial reuse parameters
 *
 * @sr_control: spatial reuse control field; flags contained in this field are
 * defined in @qlink_sr_ctrl_flags
 * @non_srg_obss_pd_max: added to -82 dBm to generate the value of the
 * Non-SRG OBSS PD Max parameter
 * @srg_obss_pd_min_offset: added to -82 dBm to generate the value of the
 * SRG OBSS PD Min parameter
 * @srg_obss_pd_max_offset: added to -82 dBm to generate the value of the
 * SRG PBSS PD Max parameter
 */
struct qlink_sr_params {} __packed;

/* QLINK Command messages related definitions
 */

/**
 * enum qlink_cmd_type - list of supported commands
 *
 * Commands are QLINK messages of type @QLINK_MSG_TYPE_CMD, sent by driver to
 * wireless network device for processing. Device is expected to send back a
 * reply message of type &QLINK_MSG_TYPE_CMDRSP, containing at least command
 * execution status (one of &enum qlink_cmd_result). Reply message
 * may also contain data payload specific to the command type.
 *
 * @QLINK_CMD_SEND_FRAME: send specified frame over the air; firmware will
 *	encapsulate 802.3 packet into 802.11 frame automatically.
 * @QLINK_CMD_BAND_INFO_GET: for the specified MAC and specified band, get
 *	the band's description including number of operational channels and
 *	info on each channel, HT/VHT capabilities, supported rates etc.
 *	This command is generic to a specified MAC, interface index must be set
 *	to QLINK_VIFID_RSVD in command header.
 * @QLINK_CMD_REG_NOTIFY: notify device about regulatory domain change. This
 *	command is supported only if device reports QLINK_HW_SUPPORTS_REG_UPDATE
 *	capability.
 * @QLINK_CMD_START_CAC: start radar detection procedure on a specified channel.
 * @QLINK_CMD_TXPWR: get or set current channel transmit power for
 *	the specified MAC.
 * @QLINK_CMD_NDEV_EVENT: signalizes changes made with a corresponding network
 *	device.
 */
enum qlink_cmd_type {};

/**
 * struct qlink_cmd - QLINK command message header
 *
 * Header used for QLINK messages of QLINK_MSG_TYPE_CMD type.
 *
 * @mhdr: Common QLINK message header.
 * @cmd_id: command id, one of &enum qlink_cmd_type.
 * @seq_num: sequence number of command message, used for matching with
 *	response message.
 * @macid: index of physical radio device the command is destined to or
 *	QLINK_MACID_RSVD if not applicable.
 * @vifid: index of virtual wireless interface on specified @macid the command
 *	is destined to or QLINK_VIFID_RSVD if not applicable.
 */
struct qlink_cmd {} __packed;

/**
 * struct qlink_cmd_init_fw - data for QLINK_CMD_FW_INIT
 *
 * Initialize firmware based on specified host configuration. This is the first
 * command sent to wifi card and it's fixed part should never be changed, any
 * additions must be done by appending TLVs.
 * If wifi card can not operate with a specified parameters it will return
 * error.
 *
 * @qlink_proto_ver: QLINK protocol version used by host driver.
 */
struct qlink_cmd_init_fw {} __packed;

/**
 * struct qlink_cmd_manage_intf - interface management command
 *
 * Data for interface management commands QLINK_CMD_ADD_INTF, QLINK_CMD_DEL_INTF
 * and QLINK_CMD_CHANGE_INTF.
 *
 * @intf_info: interface description.
 */
struct qlink_cmd_manage_intf {} __packed;

enum qlink_mgmt_frame_type {};

/**
 * struct qlink_cmd_mgmt_frame_register - data for QLINK_CMD_REGISTER_MGMT
 *
 * @frame_type: MGMT frame type the registration request describes, one of
 *	&enum qlink_mgmt_frame_type.
 * @do_register: 0 - unregister, otherwise register for reception of specified
 *	MGMT frame type.
 */
struct qlink_cmd_mgmt_frame_register {} __packed;

/**
 * @QLINK_FRAME_TX_FLAG_8023: frame has a 802.3 header; if not set, frame
 *	is a 802.11 encapsulated.
 */
enum qlink_frame_tx_flags {};

/**
 * struct qlink_cmd_frame_tx - data for QLINK_CMD_SEND_FRAME command
 *
 * @cookie: opaque request identifier.
 * @freq: Frequency to use for frame transmission.
 * @flags: Transmission flags, one of &enum qlink_frame_tx_flags.
 * @frame_data: frame to transmit.
 */
struct qlink_cmd_frame_tx {} __packed;

/**
 * struct qlink_cmd_get_sta_info - data for QLINK_CMD_GET_STA_INFO command
 *
 * @sta_addr: MAC address of the STA statistics is requested for.
 */
struct qlink_cmd_get_sta_info {} __packed;

/**
 * struct qlink_cmd_add_key - data for QLINK_CMD_ADD_KEY command.
 *
 * @key_index: index of the key being installed.
 * @pairwise: whether to use pairwise key.
 * @addr: MAC address of a STA key is being installed to.
 * @cipher: cipher suite.
 * @vlanid: VLAN ID for AP_VLAN interface type
 * @key_data: key data itself.
 */
struct qlink_cmd_add_key {} __packed;

/**
 * struct qlink_cmd_del_key_req - data for QLINK_CMD_DEL_KEY command
 *
 * @key_index: index of the key being removed.
 * @pairwise: whether to use pairwise key.
 * @addr: MAC address of a STA for which a key is removed.
 */
struct qlink_cmd_del_key {} __packed;

/**
 * struct qlink_cmd_set_def_key - data for QLINK_CMD_SET_DEFAULT_KEY command
 *
 * @key_index: index of the key to be set as default one.
 * @unicast: key is unicast.
 * @multicast: key is multicast.
 */
struct qlink_cmd_set_def_key {} __packed;

/**
 * struct qlink_cmd_set_def_mgmt_key - data for QLINK_CMD_SET_DEFAULT_MGMT_KEY
 *
 * @key_index: index of the key to be set as default MGMT key.
 */
struct qlink_cmd_set_def_mgmt_key {} __packed;

/**
 * struct qlink_cmd_change_sta - data for QLINK_CMD_CHANGE_STA command
 *
 * @flag_update: STA flags to update
 * @if_type: Mode of interface operation, one of &enum qlink_iface_type
 * @vlanid: VLAN ID to assign to specific STA
 * @sta_addr: address of the STA for which parameters are set.
 */
struct qlink_cmd_change_sta {} __packed;

/**
 * struct qlink_cmd_del_sta - data for QLINK_CMD_DEL_STA command.
 *
 * See &struct station_del_parameters
 */
struct qlink_cmd_del_sta {} __packed;

enum qlink_sta_connect_flags {};

/**
 * struct qlink_cmd_connect - data for QLINK_CMD_CONNECT command
 *
 * @bssid: BSSID of the BSS to connect to.
 * @bssid_hint: recommended AP BSSID for initial connection to the BSS or
 *	00:00:00:00:00:00 if not specified.
 * @prev_bssid: previous BSSID, if specified (not 00:00:00:00:00:00) indicates
 *	a request to reassociate.
 * @bg_scan_period: period of background scan.
 * @flags: one of &enum qlink_sta_connect_flags.
 * @ht_capa: HT Capabilities overrides.
 * @ht_capa_mask: The bits of ht_capa which are to be used.
 * @vht_capa: VHT Capability overrides
 * @vht_capa_mask: The bits of vht_capa which are to be used.
 * @aen: authentication information.
 * @mfp: whether to use management frame protection.
 * @payload: variable portion of connection request.
 */
struct qlink_cmd_connect {} __packed;

/**
 * struct qlink_cmd_external_auth - data for QLINK_CMD_EXTERNAL_AUTH command
 *
 * @bssid: BSSID of the BSS to connect to
 * @status: authentication status code
 * @payload: variable portion of connection request.
 */
struct qlink_cmd_external_auth {} __packed;

/**
 * struct qlink_cmd_disconnect - data for QLINK_CMD_DISCONNECT command
 *
 * @reason: code of the reason of disconnect, see &enum ieee80211_reasoncode.
 */
struct qlink_cmd_disconnect {} __packed;

/**
 * struct qlink_cmd_updown - data for QLINK_CMD_UPDOWN_INTF command
 *
 * @if_up: bring specified interface DOWN (if_up==0) or UP (otherwise).
 *	Interface is specified in common command header @chdr.
 */
struct qlink_cmd_updown {} __packed;

/**
 * enum qlink_band - a list of frequency bands
 *
 * @QLINK_BAND_2GHZ: 2.4GHz band
 * @QLINK_BAND_5GHZ: 5GHz band
 * @QLINK_BAND_60GHZ: 60GHz band
 */
enum qlink_band {};

/**
 * struct qlink_cmd_band_info_get - data for QLINK_CMD_BAND_INFO_GET command
 *
 * @band: a PHY band for which information is queried, one of @enum qlink_band
 */
struct qlink_cmd_band_info_get {} __packed;

/**
 * struct qlink_cmd_get_chan_stats - data for QLINK_CMD_CHAN_STATS command
 *
 * @channel_freq: channel center frequency
 */
struct qlink_cmd_get_chan_stats {} __packed;

/**
 * enum qlink_reg_initiator - Indicates the initiator of a reg domain request
 *
 * See &enum nl80211_reg_initiator for more info.
 */
enum qlink_reg_initiator {};

/**
 * enum qlink_user_reg_hint_type - type of user regulatory hint
 *
 * See &enum nl80211_user_reg_hint_type for more info.
 */
enum qlink_user_reg_hint_type {};

/**
 * struct qlink_cmd_reg_notify - data for QLINK_CMD_REG_NOTIFY command
 *
 * @alpha2: the ISO / IEC 3166 alpha2 country code.
 * @initiator: which entity sent the request, one of &enum qlink_reg_initiator.
 * @user_reg_hint_type: type of hint for QLINK_REGDOM_SET_BY_USER request, one
 *	of &enum qlink_user_reg_hint_type.
 * @num_channels: number of &struct qlink_tlv_channel in a variable portion of a
 *	payload.
 * @dfs_region: one of &enum qlink_dfs_regions.
 * @slave_radar: whether slave device should enable radar detection.
 * @dfs_offload: enable or disable DFS offload to firmware.
 * @info: variable portion of regulatory notifier callback.
 */
struct qlink_cmd_reg_notify {} __packed;

/**
 * enum qlink_chan_sw_flags - channel switch control flags
 *
 * @QLINK_CHAN_SW_RADAR_REQUIRED: whether radar detection is required on a new
 *	channel.
 * @QLINK_CHAN_SW_BLOCK_TX: whether transmissions should be blocked while
 *	changing a channel.
 */
enum qlink_chan_sw_flags {};

/**
 * struct qlink_cmd_chan_switch - data for QLINK_CMD_CHAN_SWITCH command
 *
 * @channel: channel to switch to.
 * @flags: flags to control channel switch, bitmap of &enum qlink_chan_sw_flags.
 * @beacon_count: number of beacons until switch
 */
struct qlink_cmd_chan_switch {} __packed;

/**
 * enum qlink_hidden_ssid - values for %NL80211_ATTR_HIDDEN_SSID
 *
 * Refer to &enum nl80211_hidden_ssid
 */
enum qlink_hidden_ssid {};

/**
 * struct qlink_cmd_start_ap - data for QLINK_CMD_START_AP command
 *
 * @beacon_interval: beacon interval
 * @inactivity_timeout: station's inactivity period in seconds
 * @dtim_period: DTIM period
 * @hidden_ssid: whether to hide the SSID, one of &enum qlink_hidden_ssid
 * @smps_mode: SMPS mode
 * @ht_required: stations must support HT
 * @vht_required: stations must support VHT
 * @aen: encryption info
 * @sr_params: spatial reuse parameters
 * @twt_responder: enable Target Wake Time
 * @info: variable configurations
 */
struct qlink_cmd_start_ap {} __packed;

/**
 * struct qlink_cmd_start_cac - data for QLINK_CMD_START_CAC command
 *
 * @chan: a channel to start a radar detection procedure on.
 * @cac_time_ms: CAC time.
 */
struct qlink_cmd_start_cac {} __packed;

enum qlink_acl_policy {};

struct qlink_mac_address {} __packed;

/**
 * struct qlink_acl_data - ACL data
 *
 * @policy: filter policy, one of &enum qlink_acl_policy.
 * @num_entries: number of MAC addresses in array.
 * @mac_address: MAC addresses array.
 */
struct qlink_acl_data {} __packed;

/**
 * enum qlink_pm_mode - Power Management mode
 *
 * @QLINK_PM_OFF: normal mode, no power saving enabled
 * @QLINK_PM_AUTO_STANDBY: enable auto power save mode
 */
enum qlink_pm_mode {};

/**
 * struct qlink_cmd_pm_set - data for QLINK_CMD_PM_SET command
 *
 * @pm_standby timer: period of network inactivity in seconds before
 *	putting a radio in power save mode
 * @pm_mode: power management mode
 */
struct qlink_cmd_pm_set {} __packed;

/**
 * enum qlink_txpwr_op - transmit power operation type
 * @QLINK_TXPWR_SET: set tx power
 * @QLINK_TXPWR_GET: get current tx power setting
 */
enum qlink_txpwr_op {};

/**
 * struct qlink_cmd_txpwr - get or set current transmit power
 *
 * @txpwr: new transmit power setting, in mBm
 * @txpwr_setting: transmit power setting type, one of
 *	&enum nl80211_tx_power_setting
 * @op_type: type of operation, one of &enum qlink_txpwr_op
 */
struct qlink_cmd_txpwr {} __packed;

/**
 * enum qlink_wowlan_trigger
 *
 * @QLINK_WOWLAN_TRIG_DISCONNECT: wakeup on disconnect
 * @QLINK_WOWLAN_TRIG_MAGIC_PKT: wakeup on magic packet
 * @QLINK_WOWLAN_TRIG_PATTERN_PKT: wakeup on user-defined packet
 */
enum qlink_wowlan_trigger {};

/**
 * struct qlink_cmd_wowlan_set - data for QLINK_CMD_WOWLAN_SET command
 *
 * @triggers: requested bitmask of WoWLAN triggers
 */
struct qlink_cmd_wowlan_set {} __packed;

enum qlink_ndev_event_type {};

/**
 * struct qlink_cmd_ndev_event - data for QLINK_CMD_NDEV_EVENT command
 *
 * @event: type of event, one of &enum qlink_ndev_event_type
 */
struct qlink_cmd_ndev_event {} __packed;

enum qlink_ndev_upper_type {};

/**
 * struct qlink_cmd_ndev_changeupper - data for QLINK_NDEV_EVENT_CHANGEUPPER
 *
 * @br_domain: layer 2 broadcast domain ID that ndev is a member of
 * @upper_type: type of upper device, one of &enum qlink_ndev_upper_type
 */
struct qlink_cmd_ndev_changeupper {} __packed;

/**
 * enum qlink_scan_flags -  scan request control flags
 *
 * Scan flags are used to control QLINK_CMD_SCAN behavior.
 *
 * @QLINK_SCAN_FLAG_FLUSH: flush cache before scanning.
 */
enum qlink_scan_flags {};

/**
 * struct qlink_cmd_scan - data for QLINK_CMD_SCAN command
 *
 * @flags: scan flags, a bitmap of &enum qlink_scan_flags.
 * @n_ssids: number of WLAN_EID_SSID TLVs expected in variable portion of the
 *	command.
 * @n_channels: number of QTN_TLV_ID_CHANNEL TLVs expected in variable payload.
 * @active_dwell: time spent on a single channel for an active scan.
 * @passive_dwell: time spent on a single channel for a passive scan.
 * @sample_duration: total duration of sampling a single channel during a scan
 *	including off-channel dwell time and operating channel time.
 * @bssid: specific BSSID to scan for or a broadcast BSSID.
 * @scan_width: channel width to use, one of &enum qlink_channel_width.
 */
struct qlink_cmd_scan {} __packed;

/**
 * struct qlink_cmd_update_owe - data for QLINK_CMD_UPDATE_OWE_INFO command
 *
 * @peer: MAC of the peer device for which OWE processing has been completed
 * @status: OWE external processing status code
 * @ies: IEs for the peer constructed by the user space
 */
struct qlink_cmd_update_owe {} __packed;

/* QLINK Command Responses messages related definitions
 */

enum qlink_cmd_result {};

/**
 * struct qlink_resp - QLINK command response message header
 *
 * Header used for QLINK messages of QLINK_MSG_TYPE_CMDRSP type.
 *
 * @mhdr: see &struct qlink_msg_header.
 * @cmd_id: command ID the response corresponds to, one of &enum qlink_cmd_type.
 * @seq_num: sequence number of command message, used for matching with
 *	response message.
 * @result: result of the command execution, one of &enum qlink_cmd_result.
 * @macid: index of physical radio device the response is sent from or
 *	QLINK_MACID_RSVD if not applicable.
 * @vifid: index of virtual wireless interface on specified @macid the response
 *	is sent from or QLINK_VIFID_RSVD if not applicable.
 */
struct qlink_resp {} __packed;

/**
 * struct qlink_resp_init_fw - response for QLINK_CMD_FW_INIT
 *
 * @qlink_proto_ver: QLINK protocol version used by wifi card firmware.
 */
struct qlink_resp_init_fw {} __packed;

/**
 * enum qlink_dfs_regions - regulatory DFS regions
 *
 * Corresponds to &enum nl80211_dfs_regions.
 */
enum qlink_dfs_regions {};

/**
 * struct qlink_resp_get_mac_info - response for QLINK_CMD_MAC_INFO command
 *
 * Data describing specific physical device providing wireless MAC
 * functionality.
 *
 * @dev_mac: MAC address of physical WMAC device (used for first BSS on
 *	specified WMAC).
 * @num_tx_chain: Number of transmit chains used by WMAC.
 * @num_rx_chain: Number of receive chains used by WMAC.
 * @vht_cap_mod_mask: mask specifying which VHT capabilities can be altered.
 * @ht_cap_mod_mask: mask specifying which HT capabilities can be altered.
 * @max_scan_ssids: maximum number of SSIDs the device can scan for in any scan.
 * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band.
 * @max_ap_assoc_sta: Maximum number of associations supported by WMAC.
 * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar.
 * @alpha2: country code ID firmware is configured to.
 * @n_reg_rules: number of regulatory rules TLVs in variable portion of the
 *	message.
 * @dfs_region: regulatory DFS region, one of &enum qlink_dfs_regions.
 * @var_info: variable-length WMAC info data.
 */
struct qlink_resp_get_mac_info {} __packed;

/**
 * struct qlink_resp_get_hw_info - response for QLINK_CMD_GET_HW_INFO command
 *
 * Description of wireless hardware capabilities and features.
 *
 * @fw_ver: wireless hardware firmware version.
 * @num_mac: Number of separate physical radio devices provided by hardware.
 * @mac_bitmap: Bitmap of MAC IDs that are active and can be used in firmware.
 * @total_tx_chains: total number of transmit chains used by device.
 * @total_rx_chains: total number of receive chains.
 * @info: variable-length HW info.
 */
struct qlink_resp_get_hw_info {} __packed;

/**
 * struct qlink_resp_manage_intf - response for interface management commands
 *
 * Response data for QLINK_CMD_ADD_INTF and QLINK_CMD_CHANGE_INTF commands.
 *
 * @rhdr: Common Command Response message header.
 * @intf_info: interface description.
 */
struct qlink_resp_manage_intf {} __packed;

enum qlink_sta_info_rate_flags {};

/**
 * struct qlink_resp_get_sta_info - response for QLINK_CMD_GET_STA_INFO command
 *
 * Response data containing statistics for specified STA.
 *
 * @sta_addr: MAC address of STA the response carries statistic for.
 * @info: variable statistics for specified STA.
 */
struct qlink_resp_get_sta_info {} __packed;

/**
 * struct qlink_resp_band_info_get - response for QLINK_CMD_BAND_INFO_GET cmd
 *
 * @band: frequency band that the response describes, one of @enum qlink_band.
 * @num_chans: total number of channels info TLVs contained in reply.
 * @num_bitrates: total number of bitrate TLVs contained in reply.
 * @info: variable-length info portion.
 */
struct qlink_resp_band_info_get {} __packed;

/**
 * struct qlink_resp_get_chan_stats - response for QLINK_CMD_CHAN_STATS cmd
 *
 * @chan_freq: center frequency for a channel the report is sent for.
 * @info: variable-length channel info.
 */
struct qlink_resp_get_chan_stats {} __packed;

/**
 * struct qlink_resp_channel_get - response for QLINK_CMD_CHAN_GET command
 *
 * @chan: definition of current operating channel.
 */
struct qlink_resp_channel_get {} __packed;

/**
 * struct qlink_resp_txpwr - response for QLINK_CMD_TXPWR command
 *
 * This response is intended for QLINK_TXPWR_GET operation and does not
 * contain any meaningful information in case of QLINK_TXPWR_SET operation.
 *
 * @txpwr: current transmit power setting, in mBm
 */
struct qlink_resp_txpwr {} __packed;

/* QLINK Events messages related definitions
 */

enum qlink_event_type {};

/**
 * struct qlink_event - QLINK event message header
 *
 * Header used for QLINK messages of QLINK_MSG_TYPE_EVENT type.
 *
 * @mhdr: Common QLINK message header.
 * @event_id: Specifies specific event ID, one of &enum qlink_event_type.
 * @macid: index of physical radio device the event was generated on or
 *	QLINK_MACID_RSVD if not applicable.
 * @vifid: index of virtual wireless interface on specified @macid the event
 *	was generated on or QLINK_VIFID_RSVD if not applicable.
 */
struct qlink_event {} __packed;

/**
 * struct qlink_event_sta_assoc - data for QLINK_EVENT_STA_ASSOCIATED event
 *
 * @sta_addr: Address of a STA for which new association event was generated
 * @frame_control: control bits from 802.11 ASSOC_REQUEST header.
 * @payload: IEs from association request.
 */
struct qlink_event_sta_assoc {} __packed;

/**
 * struct qlink_event_sta_deauth - data for QLINK_EVENT_STA_DEAUTH event
 *
 * @sta_addr: Address of a deauthenticated STA.
 * @reason: reason for deauthentication.
 */
struct qlink_event_sta_deauth {} __packed;

/**
 * struct qlink_event_bss_join - data for QLINK_EVENT_BSS_JOIN event
 *
 * @chan: new operating channel definition
 * @bssid: BSSID of a BSS which interface tried to joined.
 * @status: status of joining attempt, see &enum ieee80211_statuscode.
 */
struct qlink_event_bss_join {} __packed;

/**
 * struct qlink_event_bss_leave - data for QLINK_EVENT_BSS_LEAVE event
 *
 * @reason: reason of disconnecting from BSS.
 */
struct qlink_event_bss_leave {} __packed;

/**
 * struct qlink_event_freq_change - data for QLINK_EVENT_FREQ_CHANGE event
 *
 * @chan: new operating channel definition
 */
struct qlink_event_freq_change {} __packed;

enum qlink_rxmgmt_flags {};

/**
 * struct qlink_event_rxmgmt - data for QLINK_EVENT_MGMT_RECEIVED event
 *
 * @freq: Frequency on which the frame was received in MHz.
 * @flags: bitmap of &enum qlink_rxmgmt_flags.
 * @sig_dbm: signal strength in dBm.
 * @frame_data: data of Rx'd frame itself.
 */
struct qlink_event_rxmgmt {} __packed;

/**
 * struct qlink_event_scan_result - data for QLINK_EVENT_SCAN_RESULTS event
 *
 * @tsf: TSF timestamp indicating when scan results were generated.
 * @freq: Center frequency of the channel where BSS for which the scan result
 *	event was generated was discovered.
 * @capab: capabilities field.
 * @bintval: beacon interval announced by discovered BSS.
 * @sig_dbm: signal strength in dBm.
 * @bssid: BSSID announced by discovered BSS.
 * @ssid_len: length of SSID announced by BSS.
 * @ssid: SSID announced by discovered BSS.
 * @payload: IEs that are announced by discovered BSS in its MGMt frames.
 */
struct qlink_event_scan_result {} __packed;

/**
 * enum qlink_scan_complete_flags - indicates result of scan request.
 *
 * @QLINK_SCAN_NONE: Scan request was processed.
 * @QLINK_SCAN_ABORTED: Scan was aborted.
 */
enum qlink_scan_complete_flags {};

/**
 * struct qlink_event_scan_complete - data for QLINK_EVENT_SCAN_COMPLETE event
 *
 * @flags: flags indicating the status of pending scan request,
 *	see &enum qlink_scan_complete_flags.
 */
struct qlink_event_scan_complete {} __packed;

enum qlink_radar_event {};

/**
 * struct qlink_event_radar - data for QLINK_EVENT_RADAR event
 *
 * @chan: channel on which radar event happened.
 * @event: radar event type, one of &enum qlink_radar_event.
 */
struct qlink_event_radar {} __packed;

/**
 * struct qlink_event_external_auth - data for QLINK_EVENT_EXTERNAL_AUTH event
 *
 * @ssid: SSID announced by BSS
 * @ssid_len: SSID length
 * @bssid: BSSID of the BSS to connect to
 * @akm_suite: AKM suite for external authentication
 * @action: action type/trigger for external authentication
 */
struct qlink_event_external_auth {} __packed;

/**
 * struct qlink_event_mic_failure - data for QLINK_EVENT_MIC_FAILURE event
 *
 * @src: source MAC address of the frame
 * @key_index: index of the key being reported
 * @pairwise: whether the key is pairwise or group
 */
struct qlink_event_mic_failure {} __packed;

/**
 * struct qlink_event_update_owe - data for QLINK_EVENT_UPDATE_OWE event
 *
 * @peer: MAC addr of the peer device for which OWE processing needs to be done
 * @ies: IEs from the peer
 */
struct qlink_event_update_owe {} __packed;

/* QLINK TLVs (Type-Length Values) definitions
 */

/**
 * enum qlink_tlv_id - list of TLVs that Qlink messages can carry
 *
 * @QTN_TLV_ID_BITMAP: a data representing a bitmap that is used together with
 *	other TLVs:
 *	&enum qlink_sta_info used to indicate which statistic carried in
 *	QTN_TLV_ID_STA_STATS is valid.
 *	&enum qlink_hw_capab listing wireless card capabilities.
 *	&enum qlink_driver_capab listing driver/host system capabilities.
 *	&enum qlink_chan_stat used to indicate which statistic carried in
 *	QTN_TLV_ID_CHANNEL_STATS is valid.
 * @QTN_TLV_ID_STA_STATS: per-STA statistics as defined by
 *	&struct qlink_sta_stats. Valid values are marked as such in a bitmap
 *	carried by QTN_TLV_ID_BITMAP.
 * @QTN_TLV_ID_IFTYPE_DATA: supported band data.
 */
enum qlink_tlv_id {};

struct qlink_tlv_hdr {} __packed;

struct qlink_iface_limit {} __packed;

struct qlink_iface_limit_record {} __packed;

#define QLINK_RSSI_OFFSET

/**
 * enum qlink_reg_rule_flags - regulatory rule flags
 *
 * See description of &enum nl80211_reg_rule_flags
 */
enum qlink_reg_rule_flags {};

/**
 * struct qlink_tlv_reg_rule - data for QTN_TLV_ID_REG_RULE TLV
 *
 * Regulatory rule description.
 *
 * @start_freq_khz: start frequency of the range the rule is attributed to.
 * @end_freq_khz: end frequency of the range the rule is attributed to.
 * @max_bandwidth_khz: max bandwidth that channels in specified range can be
 *	configured to.
 * @max_antenna_gain: max antenna gain that can be used in the specified
 *	frequency range, dBi.
 * @max_eirp: maximum EIRP.
 * @flags: regulatory rule flags in &enum qlink_reg_rule_flags.
 * @dfs_cac_ms: DFS CAC period.
 */
struct qlink_tlv_reg_rule {} __packed;

enum qlink_channel_flags {};

enum qlink_dfs_state {};

/**
 * struct qlink_tlv_channel - data for QTN_TLV_ID_CHANNEL TLV
 *
 * Channel settings.
 *
 * @channel: ieee80211 channel settings.
 */
struct qlink_tlv_channel {} __packed;

/**
 * struct qlink_tlv_chandef - data for QTN_TLV_ID_CHANDEF TLV
 *
 * Channel definition.
 *
 * @chan: channel definition data.
 */
struct qlink_tlv_chandef {} __packed;

enum qlink_ie_set_type {};

/**
 * struct qlink_tlv_ie_set - data for QTN_TLV_ID_IE_SET
 *
 * @type: type of MGMT frame IEs belong to, one of &enum qlink_ie_set_type.
 * @flags: for future use.
 * @ie_data: IEs data.
 */
struct qlink_tlv_ie_set {} __packed;

/**
 * struct qlink_tlv_ext_ie - extension IE
 *
 * @eid_ext: element ID extension, one of &enum ieee80211_eid_ext.
 * @ie_data: IEs data.
 */
struct qlink_tlv_ext_ie {} __packed;

#define IEEE80211_HE_PPE_THRES_MAX_LEN
struct qlink_sband_iftype_data {} __packed;

/**
 * struct qlink_tlv_iftype_data - data for QTN_TLV_ID_IFTYPE_DATA
 *
 * @n_iftype_data: number of entries in iftype_data.
 * @iftype_data: interface type data entries.
 */
struct qlink_tlv_iftype_data {} __packed;

/**
 * enum qlink_chan_stat - channel statistics bitmap
 *
 * Used to indicate which statistics values in &struct qlink_chan_stats
 * are valid. Individual values are used to fill a bitmap carried in a
 * payload of QTN_TLV_ID_BITMAP.
 *
 * @QLINK_CHAN_STAT_TIME_ON: time_on value is valid.
 * @QLINK_CHAN_STAT_TIME_TX: time_tx value is valid.
 * @QLINK_CHAN_STAT_TIME_RX: time_rx value is valid.
 * @QLINK_CHAN_STAT_CCA_BUSY: cca_busy value is valid.
 * @QLINK_CHAN_STAT_CCA_BUSY_EXT: cca_busy_ext value is valid.
 * @QLINK_CHAN_STAT_TIME_SCAN: time_scan value is valid.
 * @QLINK_CHAN_STAT_CHAN_NOISE: chan_noise value is valid.
 */
enum qlink_chan_stat {};

/**
 * struct qlink_chan_stats - data for QTN_TLV_ID_CHANNEL_STATS
 *
 * Carries a per-channel statistics. Not all fields may be filled with
 * valid values. Valid fields should be indicated as such using a bitmap of
 * &enum qlink_chan_stat. Bitmap is carried separately in a payload of
 * QTN_TLV_ID_BITMAP.
 *
 * @time_on: amount of time radio operated on that channel.
 * @time_tx: amount of time radio spent transmitting on the channel.
 * @time_rx: amount of time radio spent receiving on the channel.
 * @cca_busy: amount of time the primary channel was busy.
 * @cca_busy_ext: amount of time the secondary channel was busy.
 * @time_scan: amount of radio spent scanning on the channel.
 * @chan_noise: channel noise.
 */
struct qlink_chan_stats {} __packed;

/**
 * enum qlink_sta_info - station information bitmap
 *
 * Used to indicate which statistics values in &struct qlink_sta_stats
 * are valid. Individual values are used to fill a bitmap carried in a
 * payload of QTN_TLV_ID_BITMAP.
 *
 * @QLINK_STA_INFO_CONNECTED_TIME: connected_time value is valid.
 * @QLINK_STA_INFO_INACTIVE_TIME: inactive_time value is valid.
 * @QLINK_STA_INFO_RX_BYTES: lower 32 bits of rx_bytes value are valid.
 * @QLINK_STA_INFO_TX_BYTES: lower 32 bits of tx_bytes value are valid.
 * @QLINK_STA_INFO_RX_BYTES64: rx_bytes value is valid.
 * @QLINK_STA_INFO_TX_BYTES64: tx_bytes value is valid.
 * @QLINK_STA_INFO_RX_DROP_MISC: rx_dropped_misc value is valid.
 * @QLINK_STA_INFO_BEACON_RX: rx_beacon value is valid.
 * @QLINK_STA_INFO_SIGNAL: signal value is valid.
 * @QLINK_STA_INFO_SIGNAL_AVG: signal_avg value is valid.
 * @QLINK_STA_INFO_RX_BITRATE: rxrate value is valid.
 * @QLINK_STA_INFO_TX_BITRATE: txrate value is valid.
 * @QLINK_STA_INFO_RX_PACKETS: rx_packets value is valid.
 * @QLINK_STA_INFO_TX_PACKETS: tx_packets value is valid.
 * @QLINK_STA_INFO_TX_RETRIES: tx_retries value is valid.
 * @QLINK_STA_INFO_TX_FAILED: tx_failed value is valid.
 * @QLINK_STA_INFO_STA_FLAGS: sta_flags value is valid.
 */
enum qlink_sta_info {};

/**
 * struct qlink_sta_info_rate - STA rate statistics
 *
 * @rate: data rate in Mbps.
 * @flags: bitmap of &enum qlink_sta_info_rate_flags.
 * @mcs: 802.11-defined MCS index.
 * nss: Number of Spatial Streams.
 * @bw: bandwidth, one of &enum qlink_channel_width.
 */
struct qlink_sta_info_rate {} __packed;

/**
 * struct qlink_sta_stats - data for QTN_TLV_ID_STA_STATS
 *
 * Carries statistics of a STA. Not all fields may be filled with
 * valid values. Valid fields should be indicated as such using a bitmap of
 * &enum qlink_sta_info. Bitmap is carried separately in a payload of
 * QTN_TLV_ID_BITMAP.
 */
struct qlink_sta_stats {};

/**
 * struct qlink_random_mac_addr - data for QTN_TLV_ID_RANDOM_MAC_ADDR TLV
 *
 * Specifies MAC address mask/value for generation random MAC address
 * during scan.
 *
 * @mac_addr: MAC address used with randomisation
 * @mac_addr_mask: MAC address mask used with randomisation, bits that
 *	are 0 in the mask should be randomised, bits that are 1 should
 *	be taken from the @mac_addr
 */
struct qlink_random_mac_addr {} __packed;

/**
 * struct qlink_wowlan_capab_data - data for QTN_TLV_ID_WOWLAN_CAPAB TLV
 *
 * WoWLAN capabilities supported by cards.
 *
 * @version: version of WoWLAN data structure, to ensure backward
 *	compatibility for firmwares with limited WoWLAN support
 * @len: Total length of WoWLAN data
 * @data: supported WoWLAN features
 */
struct qlink_wowlan_capab_data {} __packed;

/**
 * struct qlink_wowlan_support - supported WoWLAN capabilities
 *
 * @n_patterns: number of supported wakeup patterns
 * @pattern_max_len: maximum length of each pattern
 * @pattern_min_len: minimum length of each pattern
 */
struct qlink_wowlan_support {} __packed;

#endif /* _QTN_QLINK_H_ */