diff options
Diffstat (limited to 'sys/contrib/dev/iwlwifi/fw/api/tx.h')
| -rw-r--r-- | sys/contrib/dev/iwlwifi/fw/api/tx.h | 105 | 
1 files changed, 58 insertions, 47 deletions
| diff --git a/sys/contrib/dev/iwlwifi/fw/api/tx.h b/sys/contrib/dev/iwlwifi/fw/api/tx.h index c5277e2f8cd4..26d2013905ed 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/tx.h +++ b/sys/contrib/dev/iwlwifi/fw/api/tx.h @@ -1,6 +1,6 @@  /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */  /* - * Copyright (C) 2012-2014, 2018-2024 Intel Corporation + * Copyright (C) 2012-2014, 2018-2025 Intel Corporation   * Copyright (C) 2016-2017 Intel Deutschland GmbH   */  #ifndef __iwl_fw_api_tx_h__ @@ -151,7 +151,7 @@ enum iwl_tx_cmd_sec_ctrl {  #define IWL_LOW_RETRY_LIMIT			7  /** - * enum iwl_tx_offload_assist_flags_pos -  set %iwl_tx_cmd offload_assist values + * enum iwl_tx_offload_assist_flags_pos -  set %iwl_tx_cmd_v6 offload_assist values   * @TX_CMD_OFFLD_IP_HDR: offset to start of IP header (in words)   *	from mac header end. For normal case it is 4 words for SNAP.   *	note: tx_cmd, mac header and pad are not counted in the offset. @@ -181,8 +181,8 @@ enum iwl_tx_offload_assist_flags_pos {  /* TODO: complete documentation for try_cnt and btkill_cnt */  /** - * struct iwl_tx_cmd - TX command struct to FW - * ( TX_CMD = 0x1c ) + * struct iwl_tx_cmd_v6_params - parameters of the TX + *   * @len: in bytes of the payload, see below for details   * @offload_assist: TX offload configuration   * @tx_flags: combination of TX_CMD_FLG_*, see &enum iwl_tx_flags @@ -191,7 +191,7 @@ enum iwl_tx_offload_assist_flags_pos {   *	cleared. Combination of RATE_MCS_*   * @sta_id: index of destination station in FW station table   * @sec_ctl: security control, TX_CMD_SEC_* - * @initial_rate_index: index into the the rate table for initial TX attempt. + * @initial_rate_index: index into the rate table for initial TX attempt.   *	Applied if TX_CMD_FLG_STA_RATE_MSK is set, normally 0 for data frames.   * @reserved2: reserved   * @key: security key @@ -205,8 +205,6 @@ enum iwl_tx_offload_assist_flags_pos {   * @tid_tspec: TID/tspec   * @pm_frame_timeout: PM TX frame timeout   * @reserved4: reserved - * @payload: payload (same as @hdr) - * @hdr: 802.11 header (same as @payload)   *   * The byte count (both len and next_frame_len) includes MAC header   * (24/26/30/32 bytes) @@ -217,11 +215,8 @@ enum iwl_tx_offload_assist_flags_pos {   * It does not include post-MAC padding, i.e.,   * MIC (CCM) 8 bytes, ICV (WEP/TKIP/CKIP) 4 bytes, CRC 4 bytes.   * Range of len: 14-2342 bytes. - * - * After the struct fields the MAC header is placed, plus any padding, - * and then the actial payload.   */ -struct iwl_tx_cmd { +struct iwl_tx_cmd_v6_params {  	__le16 len;  	__le16 offload_assist;  	__le32 tx_flags; @@ -245,10 +240,20 @@ struct iwl_tx_cmd {  	u8 tid_tspec;  	__le16 pm_frame_timeout;  	__le16 reserved4; -	union { -		DECLARE_FLEX_ARRAY(u8, payload); -		DECLARE_FLEX_ARRAY(struct ieee80211_hdr, hdr); -	}; +} __packed; /* TX_CMD_API_S_VER_6 */ + +/** + * struct iwl_tx_cmd_v6 - TX command struct to FW + * ( TX_CMD = 0x1c ) + * @params: parameters of the TX, see &struct iwl_tx_cmd_v6_tx_params + * @hdr: 802.11 header + * + * After ¶ms, the MAC header is placed, plus any padding, + * and then the actual payload. + */ +struct iwl_tx_cmd_v6 { +	struct iwl_tx_cmd_v6_params params; +	struct ieee80211_hdr hdr[];  } __packed; /* TX_CMD_API_S_VER_6 */  struct iwl_dram_sec_info { @@ -258,7 +263,7 @@ struct iwl_dram_sec_info {  } __packed; /* DRAM_SEC_INFO_API_S_VER_1 */  /** - * struct iwl_tx_cmd_gen2 - TX command struct to FW for 22000 devices + * struct iwl_tx_cmd_v9 - TX command struct to FW for 22000 devices   * ( TX_CMD = 0x1c )   * @len: in bytes of the payload, see below for details   * @offload_assist: TX offload configuration @@ -268,7 +273,7 @@ struct iwl_dram_sec_info {   *	cleared. Combination of RATE_MCS_*   * @hdr: 802.11 header   */ -struct iwl_tx_cmd_gen2 { +struct iwl_tx_cmd_v9 {  	__le16 len;  	__le16 offload_assist;  	__le32 flags; @@ -279,18 +284,18 @@ struct iwl_tx_cmd_gen2 {  	       TX_CMD_API_S_VER_9 */  /** - * struct iwl_tx_cmd_gen3 - TX command struct to FW for AX210+ devices + * struct iwl_tx_cmd - TX command struct to FW for AX210+ devices   * ( TX_CMD = 0x1c )   * @len: in bytes of the payload, see below for details   * @flags: combination of &enum iwl_tx_cmd_flags   * @offload_assist: TX offload configuration   * @dram_info: FW internal DRAM storage   * @rate_n_flags: rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is - *	cleared. Combination of RATE_MCS_* + *	cleared. Combination of RATE_MCS_*; format depends on version   * @reserved: reserved   * @hdr: 802.11 header   */ -struct iwl_tx_cmd_gen3 { +struct iwl_tx_cmd {  	__le16 len;  	__le16 flags;  	__le32 offload_assist; @@ -298,8 +303,9 @@ struct iwl_tx_cmd_gen3 {  	__le32 rate_n_flags;  	u8 reserved[8];  	struct ieee80211_hdr hdr[]; -} __packed; /* TX_CMD_API_S_VER_8, -	       TX_CMD_API_S_VER_10 */ +} __packed; /* TX_CMD_API_S_VER_10, +	     * TX_CMD_API_S_VER_11 +	     */  /*   * TX response related data @@ -482,11 +488,11 @@ struct agg_tx_status {  #define TX_RES_RATE_TABLE_COL_GET(_f) (((_f) & TX_RES_RATE_TABLE_COLOR_MSK) >>\  				       TX_RES_RATE_TABLE_COLOR_POS) -#define IWL_MVM_TX_RES_GET_TID(_ra_tid) ((_ra_tid) & 0x0f) -#define IWL_MVM_TX_RES_GET_RA(_ra_tid) ((_ra_tid) >> 4) +#define IWL_TX_RES_GET_TID(_ra_tid) ((_ra_tid) & 0x0f) +#define IWL_TX_RES_GET_RA(_ra_tid) ((_ra_tid) >> 4)  /** - * struct iwl_mvm_tx_resp_v3 - notifies that fw is TXing a packet + * struct iwl_tx_resp_v3 - notifies that fw is TXing a packet   * ( REPLY_TX = 0x1c )   * @frame_count: 1 no aggregation, >1 aggregation   * @bt_kill_count: num of times blocked by bluetooth (unused for agg) @@ -517,7 +523,7 @@ struct agg_tx_status {   * After the array of statuses comes the SSN of the SCD. Look at   * %iwl_mvm_get_scd_ssn for more details.   */ -struct iwl_mvm_tx_resp_v3 { +struct iwl_tx_resp_v3 {  	u8 frame_count;  	u8 bt_kill_count;  	u8 failure_rts; @@ -543,14 +549,14 @@ struct iwl_mvm_tx_resp_v3 {  } __packed; /* TX_RSP_API_S_VER_3 */  /** - * struct iwl_mvm_tx_resp - notifies that fw is TXing a packet + * struct iwl_tx_resp - notifies that fw is TXing a packet   * ( REPLY_TX = 0x1c )   * @frame_count: 1 no aggregation, >1 aggregation   * @bt_kill_count: num of times blocked by bluetooth (unused for agg)   * @failure_rts: num of failures due to unsuccessful RTS   * @failure_frame: num failures due to no ACK (unused for agg)   * @initial_rate: for non-agg: rate of the successful Tx. For agg: rate of the - *	Tx of all the batch. RATE_MCS_* + *	Tx of all the batch. RATE_MCS_*; format depends on command version   * @wireless_media_time: for non-agg: RTS + CTS + frame tx attempts time + ACK.   *	for agg: RTS + CTS + aggregation tx time + block-ack time.   *	in usec. @@ -575,7 +581,7 @@ struct iwl_mvm_tx_resp_v3 {   * After the array of statuses comes the SSN of the SCD. Look at   * %iwl_mvm_get_scd_ssn for more details.   */ -struct iwl_mvm_tx_resp { +struct iwl_tx_resp {  	u8 frame_count;  	u8 bt_kill_count;  	u8 failure_rts; @@ -601,7 +607,10 @@ struct iwl_mvm_tx_resp {  	__le16 reserved2;  	struct agg_tx_status status;  } __packed; /* TX_RSP_API_S_VER_6, -	       TX_RSP_API_S_VER_7 */ +	     * TX_RSP_API_S_VER_7, +	     * TX_RSP_API_S_VER_8, +	     * TX_RSP_API_S_VER_9 +	     */  /**   * struct iwl_mvm_ba_notif - notifies about reception of BA @@ -638,14 +647,14 @@ struct iwl_mvm_ba_notif {  } __packed;  /** - * struct iwl_mvm_compressed_ba_tfd - progress of a TFD queue + * struct iwl_compressed_ba_tfd - progress of a TFD queue   * @q_num: TFD queue number   * @tfd_index: Index of first un-acked frame in the  TFD queue   * @scd_queue: For debug only - the physical queue the TFD queue is bound to   * @tid: TID of the queue (0-7)   * @reserved: reserved for alignment   */ -struct iwl_mvm_compressed_ba_tfd { +struct iwl_compressed_ba_tfd {  	__le16 q_num;  	__le16 tfd_index;  	u8 scd_queue; @@ -654,12 +663,12 @@ struct iwl_mvm_compressed_ba_tfd {  } __packed; /* COMPRESSED_BA_TFD_API_S_VER_1 */  /** - * struct iwl_mvm_compressed_ba_ratid - progress of a RA TID queue + * struct iwl_compressed_ba_ratid - progress of a RA TID queue   * @q_num: RA TID queue number   * @tid: TID of the queue   * @ssn: BA window current SSN   */ -struct iwl_mvm_compressed_ba_ratid { +struct iwl_compressed_ba_ratid {  	u8 q_num;  	u8 tid;  	__le16 ssn; @@ -685,7 +694,7 @@ enum iwl_mvm_ba_resp_flags {  };  /** - * struct iwl_mvm_compressed_ba_notif - notifies about reception of BA + * struct iwl_compressed_ba_notif - notifies about reception of BA   * ( BA_NOTIF = 0xc5 )   * @flags: status flag, see the &iwl_mvm_ba_resp_flags   * @sta_id: Index of recipient (BA-sending) station in fw's station table @@ -701,15 +710,16 @@ enum iwl_mvm_ba_resp_flags {   * @rts_retry_cnt: RTS retry count   * @reserved: reserved (for alignment)   * @wireless_time: Wireless-media time - * @tx_rate: the rate the aggregation was sent at + * @tx_rate: the rate the aggregation was sent at. Format depends on command + *	version.   * @tfd_cnt: number of TFD-Q elements   * @ra_tid_cnt: number of RATID-Q elements - * @tfd: array of TFD queue status updates. See &iwl_mvm_compressed_ba_tfd + * @tfd: array of TFD queue status updates. See &iwl_compressed_ba_tfd   *	for details. Length in @tfd_cnt.   * @ra_tid: array of RA-TID queue status updates. For debug purposes only. See - *	&iwl_mvm_compressed_ba_ratid for more details. Length in @ra_tid_cnt. + *	&iwl_compressed_ba_ratid for more details. Length in @ra_tid_cnt.   */ -struct iwl_mvm_compressed_ba_notif { +struct iwl_compressed_ba_notif {  	__le32 flags;  	u8 sta_id;  	u8 reduced_txp; @@ -726,11 +736,12 @@ struct iwl_mvm_compressed_ba_notif {  	__le16 tfd_cnt;  	__le16 ra_tid_cnt;  	union { -		DECLARE_FLEX_ARRAY(struct iwl_mvm_compressed_ba_ratid, ra_tid); -		DECLARE_FLEX_ARRAY(struct iwl_mvm_compressed_ba_tfd, tfd); +		DECLARE_FLEX_ARRAY(struct iwl_compressed_ba_ratid, ra_tid); +		DECLARE_FLEX_ARRAY(struct iwl_compressed_ba_tfd, tfd);  	};  } __packed; /* COMPRESSED_BA_RES_API_S_VER_4, -	       COMPRESSED_BA_RES_API_S_VER_5 */ +	       COMPRESSED_BA_RES_API_S_VER_6, +	       COMPRESSED_BA_RES_API_S_VER_7 */  /**   * struct iwl_mac_beacon_cmd_v6 - beacon template command @@ -742,7 +753,7 @@ struct iwl_mvm_compressed_ba_notif {   * @frame: the template of the beacon frame   */  struct iwl_mac_beacon_cmd_v6 { -	struct iwl_tx_cmd tx; +	struct iwl_tx_cmd_v6_params tx;  	__le32 template_id;  	__le32 tim_idx;  	__le32 tim_size; @@ -761,7 +772,7 @@ struct iwl_mac_beacon_cmd_v6 {   * @frame: the template of the beacon frame   */  struct iwl_mac_beacon_cmd_v7 { -	struct iwl_tx_cmd tx; +	struct iwl_tx_cmd_v6_params tx;  	__le32 template_id;  	__le32 tim_idx;  	__le32 tim_size; @@ -823,7 +834,7 @@ struct iwl_mac_beacon_cmd {  	     */  struct iwl_beacon_notif { -	struct iwl_mvm_tx_resp beacon_notify_hdr; +	struct iwl_tx_resp beacon_notify_hdr;  	__le64 tsf;  	__le32 ibss_mgr_status;  } __packed; @@ -836,7 +847,7 @@ struct iwl_beacon_notif {   * @gp2: last beacon time in gp2   */  struct iwl_extended_beacon_notif_v5 { -	struct iwl_mvm_tx_resp beacon_notify_hdr; +	struct iwl_tx_resp beacon_notify_hdr;  	__le64 tsf;  	__le32 ibss_mgr_status;  	__le32 gp2; @@ -858,7 +869,7 @@ struct iwl_extended_beacon_notif {  /**   * enum iwl_dump_control - dump (flush) control flags - * @DUMP_TX_FIFO_FLUSH: Dump MSDUs until the the FIFO is empty + * @DUMP_TX_FIFO_FLUSH: Dump MSDUs until the FIFO is empty   *	and the TFD queues are empty.   */  enum iwl_dump_control { | 
