diff options
Diffstat (limited to 'sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h')
| -rw-r--r-- | sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h | 394 | 
1 files changed, 359 insertions, 35 deletions
| diff --git a/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h b/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h index ca6fa66d1917..b9f559dac39f 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h +++ b/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h @@ -1,6 +1,6 @@  /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */  /* - * Copyright (C) 2012-2014, 2018-2019, 2021-2024 Intel Corporation + * Copyright (C) 2012-2014, 2018-2019, 2021-2025 Intel Corporation   * Copyright (C) 2013-2015 Intel Mobile Communications GmbH   * Copyright (C) 2016-2017 Intel Deutschland GmbH   */ @@ -42,15 +42,15 @@ enum iwl_mac_conf_subcmd_ids {  	 */  	LINK_CONFIG_CMD = 0x9,  	/** -	 * @STA_CONFIG_CMD: &struct iwl_mvm_sta_cfg_cmd +	 * @STA_CONFIG_CMD: &struct iwl_sta_cfg_cmd  	 */  	STA_CONFIG_CMD = 0xA,  	/** -	 * @AUX_STA_CMD: &struct iwl_mvm_aux_sta_cmd +	 * @AUX_STA_CMD: &struct iwl_aux_sta_cmd  	 */  	AUX_STA_CMD = 0xB,  	/** -	 * @STA_REMOVE_CMD: &struct iwl_mvm_remove_sta_cmd +	 * @STA_REMOVE_CMD: &struct iwl_remove_sta_cmd  	 */  	STA_REMOVE_CMD = 0xC,  	/** @@ -62,11 +62,23 @@ enum iwl_mac_conf_subcmd_ids {  	 */  	ROC_CMD = 0xE,  	/** +	 * @TWT_OPERATION_CMD: &struct iwl_twt_operation_cmd +	 */ +	TWT_OPERATION_CMD = 0x10, +	/** +	 * @MISSED_BEACONS_NOTIF: &struct iwl_missed_beacons_notif +	 */ +	MISSED_BEACONS_NOTIF = 0xF6, +	/** +	 * @EMLSR_TRANS_FAIL_NOTIF: &struct iwl_esr_trans_fail_notif +	 */ +	EMLSR_TRANS_FAIL_NOTIF = 0xF7, +	/**  	 * @ROC_NOTIF: &struct iwl_roc_notif  	 */  	ROC_NOTIF = 0xF8,  	/** -	 * @SESSION_PROTECTION_NOTIF: &struct iwl_mvm_session_prot_notif +	 * @SESSION_PROTECTION_NOTIF: &struct iwl_session_prot_notif  	 */  	SESSION_PROTECTION_NOTIF = 0xFB, @@ -299,8 +311,41 @@ enum iwl_mac_config_filter_flags {  }; /* MAC_FILTER_FLAGS_MASK_E_VER_1 */  /** + * struct iwl_mac_wifi_gen_support_v2 - parameters of iwl_mac_config_cmd + *	with support up to eht as in version 2 of the command + * + * @he_support: does this MAC support HE + * @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling + * @eht_support: does this MAC support EHT. Requires he_support + */ +struct iwl_mac_wifi_gen_support_v2 { +	__le16 he_support; +	__le16 he_ap_support; +	__le32 eht_support; +} __packed; + +/** + * struct iwl_mac_wifi_gen_support - parameters of iwl_mac_config_cmd + *	with support up to uhr as in version 3 of the command + * ( MAC_CONTEXT_CONFIG_CMD = 0x8 ) + * + * @he_support: does this MAC support HE + * @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling + * @eht_support: does this MAC support EHT. Requires he_support + * @uhr_support: does this MAC support UHR. Requires eht_support + * @reserved: reserved for alignment and to match version 2's size + */ +struct iwl_mac_wifi_gen_support { +	u8 he_support; +	u8 he_ap_support; +	u8 eht_support; +	u8 uhr_support; +	__le32 reserved; +} __packed; + +/**   * struct iwl_mac_config_cmd - command structure to configure MAC contexts in - *	MLD API + *	MLD API for versions 2 and 3   * ( MAC_CONTEXT_CONFIG_CMD = 0x8 )   *   * @id_and_color: ID and color of the MAC @@ -309,9 +354,8 @@ enum iwl_mac_config_filter_flags {   * @local_mld_addr: mld address   * @reserved_for_local_mld_addr: reserved   * @filter_flags: combination of &enum iwl_mac_config_filter_flags - * @he_support: does this MAC support HE - * @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling - * @eht_support: does this MAC support EHT. Requires he_support + * @wifi_gen_v2: he/eht parameters as in cmd version 2 + * @wifi_gen: he/eht/uhr parameters as in cmd version 3   * @nic_not_ack_enabled: mark that the NIC doesn't support receiving   *	ACK-enabled AGG, (i.e. both BACK and non-BACK frames in single AGG).   *	If the NIC is not ACK_ENABLED it may use the EOF-bit in first non-0 @@ -320,7 +364,6 @@ enum iwl_mac_config_filter_flags {   * @p2p_dev: mac data for p2p device   */  struct iwl_mac_config_cmd { -	/* COMMON_INDEX_HDR_API_S_VER_1 */  	__le32 id_and_color;  	__le32 action;  	/* MAC_CONTEXT_TYPE_API_E */ @@ -328,16 +371,17 @@ struct iwl_mac_config_cmd {  	u8 local_mld_addr[6];  	__le16 reserved_for_local_mld_addr;  	__le32 filter_flags; -	__le16 he_support; -	__le16 he_ap_support; -	__le32 eht_support; +	union { +		struct iwl_mac_wifi_gen_support_v2 wifi_gen_v2; +		struct iwl_mac_wifi_gen_support wifi_gen; +	};  	__le32 nic_not_ack_enabled;  	/* MAC_CONTEXT_CONFIG_SPECIFIC_DATA_API_U_VER_2 */  	union {  		struct iwl_mac_client_data client;  		struct iwl_mac_p2p_dev_data p2p_dev;  	}; -} __packed; /* MAC_CONTEXT_CONFIG_CMD_API_S_VER_2 */ +} __packed; /* MAC_CONTEXT_CONFIG_CMD_API_S_VER_2_VER_3 */  /**   * enum iwl_link_ctx_modify_flags - indicate to the fw what fields are being @@ -374,6 +418,8 @@ struct iwl_mac_config_cmd {   * @LINK_CONTEXT_MODIFY_EHT_PARAMS: covers iwl_link_ctx_cfg_cmd::puncture_mask.   *	This flag can be set only if the MAC that this link relates to has   *	eht_support set to true. No longer used since _VER_3 of this command. + * @LINK_CONTEXT_MODIFY_BANDWIDTH: Covers iwl_link_ctx_cfg_cmd::modify_bandwidth. + *	Request RX OMI to the AP to modify bandwidth of this link.   * @LINK_CONTEXT_MODIFY_ALL: set all above flags   */  enum iwl_link_ctx_modify_flags { @@ -385,6 +431,7 @@ enum iwl_link_ctx_modify_flags {  	LINK_CONTEXT_MODIFY_HE_PARAMS		= BIT(5),  	LINK_CONTEXT_MODIFY_BSS_COLOR_DISABLE	= BIT(6),  	LINK_CONTEXT_MODIFY_EHT_PARAMS		= BIT(7), +	LINK_CONTEXT_MODIFY_BANDWIDTH		= BIT(8),  	LINK_CONTEXT_MODIFY_ALL			= 0xff,  }; /* LINK_CONTEXT_MODIFY_MASK_E_VER_1 */ @@ -426,6 +473,40 @@ enum iwl_link_ctx_flags {  }; /* LINK_CONTEXT_FLAG_E_VER_1 */  /** + * enum iwl_link_modify_bandwidth - link modify (RX OMI) bandwidth + * @IWL_LINK_MODIFY_BW_20: request 20 MHz + * @IWL_LINK_MODIFY_BW_40: request 40 MHz + * @IWL_LINK_MODIFY_BW_80: request 80 MHz + * @IWL_LINK_MODIFY_BW_160: request 160 MHz + * @IWL_LINK_MODIFY_BW_320: request 320 MHz + */ +enum iwl_link_modify_bandwidth { +	IWL_LINK_MODIFY_BW_20, +	IWL_LINK_MODIFY_BW_40, +	IWL_LINK_MODIFY_BW_80, +	IWL_LINK_MODIFY_BW_160, +	IWL_LINK_MODIFY_BW_320, +}; + +/** + * struct iwl_npca_params - NPCA parameters (non-primary channel access) + * + * @switch_delay: after switch, delay TX according to destination AP + * @switch_back_delay: switch back to control channel before OBSS frame end + * @min_dur_threshold: minimum PPDU time to switch to the non-primary + *	NPCA channel + * @flags: NPCA flags - bit 0: puncturing allowed, bit 1: new TX allowed + * @reserved: reserved for alignment purposes + */ +struct iwl_npca_params { +	u8 switch_delay; +	u8 switch_back_delay; +	__le16 min_dur_threshold; +	__le16 flags; +	__le16 reserved; +} __packed; /* NPCA_PARAM_API_S_VER_1 */ + +/**   * struct iwl_link_config_cmd - command structure to configure the LINK context   *	in MLD API   * ( LINK_CONFIG_CMD =0x9 ) @@ -446,6 +527,11 @@ enum iwl_link_ctx_flags {   * @listen_lmac: indicates whether the link should be allocated on the Listen   *	Lmac or on the Main Lmac. Cannot be changed on an active Link.   *	Relevant only for eSR. + * @block_tx: tell the firmware that this link can't Tx. This should be used + *	only when a link is de-activated because of CSA with mode = 1. + *	Available since version 5. + * @modify_bandwidth: bandwidth request value for RX OMI (see also + *	%LINK_CONTEXT_MODIFY_BANDWIDTH), from &enum iwl_link_modify_bandwidth.   * @reserved1: in version 2, listen_lmac became reserved   * @cck_rates: basic rates available for CCK   * @ofdm_rates: basic rates available for OFDM @@ -472,9 +558,13 @@ enum iwl_link_ctx_flags {   * @bssid_index: index of the associated VAP   * @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame   * @spec_link_id: link_id as the AP knows it - * @reserved2: alignment + * @ul_mu_data_disable: OM Control UL MU Data Disable RX Support (bit 44) in + *	HE MAC Capabilities information field as defined in figure 9-897 in + *	IEEE802.11REVme-D5.0   * @ibss_bssid_addr: bssid for ibss   * @reserved_for_ibss_bssid_addr: reserved + * @npca_params: NPCA parameters + * @prio_edca_params: priority EDCA parameters for enhanced QoS   * @reserved3: reserved for future use   */  struct iwl_link_config_cmd { @@ -487,8 +577,12 @@ struct iwl_link_config_cmd {  	__le32 modify_mask;  	__le32 active;  	union { -		__le32 listen_lmac; -		__le32 reserved1; +		__le32 listen_lmac; /* only _VER_1 */ +		struct { +			u8 block_tx; /* since _VER_5 */ +			u8 modify_bandwidth; /* since _VER_6 */ +			u8 reserved1[2]; +		};  	};  	__le32 cck_rates;  	__le32 ofdm_rates; @@ -508,24 +602,26 @@ struct iwl_link_config_cmd {  	__le16 puncture_mask; /* removed in _VER_3 */  	__le16 frame_time_rts_th;  	__le32 flags; -	__le32 flags_mask; +	__le32 flags_mask; /* removed in _VER_6 */  	/* The below fields are for multi-bssid */  	u8 ref_bssid_addr[6];  	__le16 reserved_for_ref_bssid_addr;  	u8 bssid_index;  	u8 bss_color;  	u8 spec_link_id; -	u8 reserved2; +	u8 ul_mu_data_disable;  	u8 ibss_bssid_addr[6];  	__le16 reserved_for_ibss_bssid_addr; -	__le32 reserved3[8]; -} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3 */ +	struct iwl_npca_params npca_params; /* since _VER_7 */ +	struct iwl_ac_qos prio_edca_params; /* since _VER_7 */ +	__le32 reserved3[4]; +} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, _VER_5, _VER_6, _VER_7 */  /* Currently FW supports link ids in the range 0-3 and can have   * at most two active links for each vif.   */ -#define IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM 2 -#define IWL_MVM_FW_MAX_LINK_ID 3 +#define IWL_FW_MAX_ACTIVE_LINKS_NUM 2 +#define IWL_FW_MAX_LINK_ID 3  /**   * enum iwl_fw_sta_type - FW station types @@ -547,7 +643,7 @@ enum iwl_fw_sta_type {  }; /* STATION_TYPE_E_VER_1 */  /** - * struct iwl_mvm_sta_cfg_cmd - cmd structure to add a peer sta to the uCode's + * struct iwl_sta_cfg_cmd_v1 - cmd structure to add a peer sta to the uCode's   *	station table   * ( STA_CONFIG_CMD = 0xA )   * @@ -579,7 +675,7 @@ enum iwl_fw_sta_type {   *	capa   * @htc_flags: which features are supported in HTC   */ -struct iwl_mvm_sta_cfg_cmd { +struct iwl_sta_cfg_cmd_v1 {  	__le32 sta_id;  	__le32 link_id;  	u8 peer_mld_address[ETH_ALEN]; @@ -603,7 +699,78 @@ struct iwl_mvm_sta_cfg_cmd {  } __packed; /* STA_CMD_API_S_VER_1 */  /** - * struct iwl_mvm_aux_sta_cmd - command for AUX STA configuration + * struct iwl_sta_cfg_cmd - cmd structure to add a peer sta to the uCode's + *	station table + * ( STA_CONFIG_CMD = 0xA ) + * + * @sta_id: index of station in uCode's station table + * @link_id: the id of the link that is used to communicate with this sta + * @peer_mld_address: the peers mld address + * @reserved_for_peer_mld_address: reserved + * @peer_link_address: the address of the link that is used to communicate + *	with this sta + * @reserved_for_peer_link_address: reserved + * @station_type: type of this station. See &enum iwl_fw_sta_type + * @assoc_id: for GO only + * @beamform_flags: beam forming controls + * @mfp: indicates whether the STA uses management frame protection or not. + * @mimo: indicates whether the sta uses mimo or not + * @mimo_protection: indicates whether the sta uses mimo protection or not + * @ack_enabled: indicates that the AP supports receiving ACK- + *	enabled AGG, i.e. both BACK and non-BACK frames in a single AGG + * @trig_rnd_alloc: indicates that trigger based random allocation + *	is enabled according to UORA element existence + * @tx_ampdu_spacing: minimum A-MPDU spacing: + *	4 - 2us density, 5 - 4us density, 6 - 8us density, 7 - 16us density + * @tx_ampdu_max_size: maximum A-MPDU length: 0 - 8K, 1 - 16K, 2 - 32K, + *	3 - 64K, 4 - 128K, 5 - 256K, 6 - 512K, 7 - 1024K. + * @sp_length: the size of the SP in actual number of frames + * @uapsd_acs:  4 LS bits are trigger enabled ACs, 4 MS bits are the deliver + *	enabled ACs. + * @pkt_ext: optional, exists according to PPE-present bit in the HE/EHT-PHY + *	capa + * @htc_flags: which features are supported in HTC + * @use_ldpc_x2_cw: Indicates whether to use LDPC with double CW + * @use_icf: Indicates whether to use ICF instead of RTS + * @dps_pad_time: DPS (Dynamic Power Save) padding delay resolution to ensure + *	proper timing alignment + * @dps_trans_delay: DPS minimal time that takes the peer to return to low power + * @mic_prep_pad_delay: MIC prep time padding + * @mic_compute_pad_delay: MIC compute time padding + * @reserved: Reserved for alignment + */ +struct iwl_sta_cfg_cmd { +	__le32 sta_id; +	__le32 link_id; +	u8 peer_mld_address[ETH_ALEN]; +	__le16 reserved_for_peer_mld_address; +	u8 peer_link_address[ETH_ALEN]; +	__le16 reserved_for_peer_link_address; +	__le32 station_type; +	__le32 assoc_id; +	__le32 beamform_flags; +	__le32 mfp; +	__le32 mimo; +	__le32 mimo_protection; +	__le32 ack_enabled; +	__le32 trig_rnd_alloc; +	__le32 tx_ampdu_spacing; +	__le32 tx_ampdu_max_size; +	__le32 sp_length; +	__le32 uapsd_acs; +	struct iwl_he_pkt_ext_v2 pkt_ext; +	__le32 htc_flags; +	u8 use_ldpc_x2_cw; +	u8 use_icf; +	u8 dps_pad_time; +	u8 dps_trans_delay; +	u8 mic_prep_pad_delay; +	u8 mic_compute_pad_delay; +	u8 reserved[2]; +} __packed; /* STA_CMD_API_S_VER_2 */ + +/** + * struct iwl_aux_sta_cmd - command for AUX STA configuration   * ( AUX_STA_CMD = 0xB )   *   * @sta_id: index of aux sta to configure @@ -611,7 +778,7 @@ struct iwl_mvm_sta_cfg_cmd {   * @mac_addr: mac addr of the auxilary sta   * @reserved_for_mac_addr: reserved   */ -struct iwl_mvm_aux_sta_cmd { +struct iwl_aux_sta_cmd {  	__le32 sta_id;  	__le32 lmac_id;  	u8 mac_addr[ETH_ALEN]; @@ -620,13 +787,13 @@ struct iwl_mvm_aux_sta_cmd {  } __packed; /* AUX_STA_CMD_API_S_VER_1 */  /** - * struct iwl_mvm_remove_sta_cmd - a cmd structure to remove a sta added by + * struct iwl_remove_sta_cmd - a cmd structure to remove a sta added by   *	STA_CONFIG_CMD or AUX_STA_CONFIG_CMD   * ( STA_REMOVE_CMD = 0xC )   *   * @sta_id: index of station to remove   */ -struct iwl_mvm_remove_sta_cmd { +struct iwl_remove_sta_cmd {  	__le32 sta_id;  } __packed; /* REMOVE_STA_API_S_VER_1 */ @@ -644,9 +811,9 @@ struct iwl_mvm_sta_disable_tx_cmd {  /**   * enum iwl_mvm_fw_esr_recommendation - FW recommendation code - * @ESR_RECOMMEND_LEAVE: recommendation to leave esr - * @ESR_FORCE_LEAVE: force exiting esr - * @ESR_RECOMMEND_ENTER: recommendation to enter esr + * @ESR_RECOMMEND_LEAVE: recommendation to leave EMLSR + * @ESR_FORCE_LEAVE: force exiting EMLSR + * @ESR_RECOMMEND_ENTER: recommendation to enter EMLSR   */  enum iwl_mvm_fw_esr_recommendation {  	ESR_RECOMMEND_LEAVE, @@ -655,12 +822,169 @@ enum iwl_mvm_fw_esr_recommendation {  }; /* ESR_MODE_RECOMMENDATION_CODE_API_E_VER_1 */  /** - * struct iwl_mvm_esr_mode_notif - FWs recommendation/force for esr mode + * struct iwl_esr_mode_notif_v1 - FW recommendation/force for EMLSR mode   * - * @action: the action to apply on esr state. See &iwl_mvm_fw_esr_recommendation + * @action: the action to apply on EMLSR state. + *	See &iwl_mvm_fw_esr_recommendation   */ -struct iwl_mvm_esr_mode_notif { +struct iwl_esr_mode_notif_v1 {  	__le32 action;  } __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_1 */ +/** + * enum iwl_esr_leave_reason - reasons for leaving EMLSR mode + * + * @ESR_LEAVE_REASON_OMI_MU_UL_DISALLOWED: OMI MU UL disallowed + * @ESR_LEAVE_REASON_NO_TRIG_FOR_ESR_STA: No trigger for EMLSR station + * @ESR_LEAVE_REASON_NO_ESR_STA_IN_MU_DL: No EMLSR station in MU DL + * @ESR_LEAVE_REASON_BAD_ACTIV_FRAME_TH: Bad activation frame threshold + * @ESR_LEAVE_REASON_RTS_IN_DUAL_LISTEN: RTS in dual listen + */ +enum iwl_esr_leave_reason { +	ESR_LEAVE_REASON_OMI_MU_UL_DISALLOWED	= BIT(0), +	ESR_LEAVE_REASON_NO_TRIG_FOR_ESR_STA	= BIT(1), +	ESR_LEAVE_REASON_NO_ESR_STA_IN_MU_DL	= BIT(2), +	ESR_LEAVE_REASON_BAD_ACTIV_FRAME_TH	= BIT(3), +	ESR_LEAVE_REASON_RTS_IN_DUAL_LISTEN	= BIT(4), +}; + +/** + * struct iwl_esr_mode_notif - FW recommendation/force for EMLSR mode + * + * @action: the action to apply on EMLSR state. + *	See &iwl_mvm_fw_esr_recommendation + * @leave_reason_mask: mask for various reasons to leave EMLSR mode. + *	See &iwl_esr_leave_reason + */ +struct iwl_esr_mode_notif { +	__le32 action; +	__le32 leave_reason_mask; +} __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_2 */ + +/** + * struct iwl_missed_beacons_notif - sent when by the firmware upon beacon loss + *  ( MISSED_BEACONS_NOTIF = 0xF6 ) + * @link_id: fw link ID + * @consec_missed_beacons_since_last_rx: number of consecutive missed + *	beacons since last RX. + * @consec_missed_beacons: number of consecutive missed beacons + * @other_link_id: used in EMLSR only. The fw link ID for + *	&consec_missed_beacons_other_link. IWL_MVM_FW_LINK_ID_INVALID (0xff) if + *	invalid. + * @consec_missed_beacons_other_link: number of consecutive missed beacons on + *	&other_link_id. + */ +struct iwl_missed_beacons_notif { +	__le32 link_id; +	__le32 consec_missed_beacons_since_last_rx; +	__le32 consec_missed_beacons; +	__le32 other_link_id; +	__le32 consec_missed_beacons_other_link; +} __packed; /* MISSED_BEACON_NTFY_API_S_VER_5 */ + +/* + * enum iwl_esr_trans_fail_code: to be used to parse the notif below + * + * @ESR_TRANS_FAILED_TX_STATUS_ERROR: failed to TX EML OMN frame + * @ESR_TRANSITION_FAILED_TX_TIMEOUT: timeout on the EML OMN frame + * @ESR_TRANSITION_FAILED_BEACONS_NOT_HEARD: can't get a beacon on the new link + */ +enum iwl_esr_trans_fail_code { +	ESR_TRANS_FAILED_TX_STATUS_ERROR, +	ESR_TRANSITION_FAILED_TX_TIMEOUT, +	ESR_TRANSITION_FAILED_BEACONS_NOT_HEARD, +}; + +/** + * struct iwl_esr_trans_fail_notif - FW reports a failure in EMLSR transition + * + * @link_id: the link_id that still works after the failure + * @activation: true if the link was activated, false otherwise + * @err_code: see &enum iwl_esr_trans_fail_code + */ +struct iwl_esr_trans_fail_notif { +	__le32 link_id; +	__le32 activation; +	__le32 err_code; +} __packed; /* ESR_TRANSITION_FAILED_NTFY_API_S_VER_1 */ + +/* + * enum iwl_twt_operation_type: TWT operation in a TWT action frame + * + * @TWT_OPERATION_REQUEST: TWT Request + * @TWT_OPERATION_SUGGEST: TWT Suggest + * @TWT_OPERATION_DEMAND: TWT Demand + * @TWT_OPERATION_GROUPING: TWT Grouping + * @TWT_OPERATION_ACCEPT: TWT Accept + * @TWT_OPERATION_ALTERNATE: TWT Alternate + * @TWT_OPERATION_DICTATE: TWT Dictate + * @TWT_OPERATION_REJECT: TWT Reject + * @TWT_OPERATION_TEARDOWN: TWT Teardown + * @TWT_OPERATION_UNAVAILABILITY: TWT Unavailability + */ +enum iwl_twt_operation_type { +	TWT_OPERATION_REQUEST, +	TWT_OPERATION_SUGGEST, +	TWT_OPERATION_DEMAND, +	TWT_OPERATION_GROUPING, +	TWT_OPERATION_ACCEPT, +	TWT_OPERATION_ALTERNATE, +	TWT_OPERATION_DICTATE, +	TWT_OPERATION_REJECT, +	TWT_OPERATION_TEARDOWN, +	TWT_OPERATION_UNAVAILABILITY, +	TWT_OPERATION_MAX, +}; /* TWT_OPERATION_TYPE_E_VER_1 */ + +/** + * struct iwl_twt_operation_cmd - initiate a TWT session from driver + * + * @link_id: FW link id to initiate the TWT + * @twt_operation: &enum iwl_twt_operation_type + * @target_wake_time: TSF time to start the TWT + * @interval_exponent: the exponent for the interval + * @interval_mantissa: the mantissa for the interval + * @minimum_wake_duration: the minimum duration for the wake period + * @trigger: is the TWT triggered or not + * @flow_type: is the TWT announced (0) or not (1) + * @flow_id: the TWT flow identifier 0 - 7 + * @twt_protection: is the TWT protected + * @ndp_paging_indicator: is ndp paging indicator set + * @responder_pm_mode: is responder pm mode set + * @negotiation_type: if the responder wants to doze outside the TWT SP + * @twt_request: 1 for TWT request (STA), 0 for TWT response (AP) + * @implicit: is TWT implicit + * @twt_group_assignment: the TWT group assignment + * @twt_channel: the TWT channel + * @restricted_info_present: is this a restricted TWT + * @dl_bitmap_valid: is DL (download) bitmap valid (restricted TWT) + * @ul_bitmap_valid: is UL (upload) bitmap valid (restricted TWT) + * @dl_tid_bitmap: DL TID bitmap (restricted TWT) + * @ul_tid_bitmap: UL TID bitmap (restricted TWT) + */ +struct iwl_twt_operation_cmd { +	__le32 link_id; +	__le32 twt_operation; +	__le64 target_wake_time; +	__le32 interval_exponent; +	__le32 interval_mantissa; +	__le32 minimum_wake_duration; +	u8 trigger; +	u8 flow_type; +	u8 flow_id; +	u8 twt_protection; +	u8 ndp_paging_indicator; +	u8 responder_pm_mode; +	u8 negotiation_type; +	u8 twt_request; +	u8 implicit; +	u8 twt_group_assignment; +	u8 twt_channel; +	u8 restricted_info_present; +	u8 dl_bitmap_valid; +	u8 ul_bitmap_valid; +	u8 dl_tid_bitmap; +	u8 ul_tid_bitmap; +} __packed; /* TWT_OPERATION_API_S_VER_1 */ +  #endif /* __iwl_fw_api_mac_cfg_h__ */ | 
