1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2bfcc09ddSBjoern A. Zeeb /* 3*a4128aadSBjoern A. Zeeb * Copyright (C) 2012-2014, 2018-2024 Intel Corporation 4bfcc09ddSBjoern A. Zeeb * Copyright (C) 2013-2014 Intel Mobile Communications GmbH 5bfcc09ddSBjoern A. Zeeb * Copyright (C) 2015-2017 Intel Deutschland GmbH 6bfcc09ddSBjoern A. Zeeb */ 7bfcc09ddSBjoern A. Zeeb #ifndef __iwl_fw_api_power_h__ 8bfcc09ddSBjoern A. Zeeb #define __iwl_fw_api_power_h__ 9bfcc09ddSBjoern A. Zeeb 10bfcc09ddSBjoern A. Zeeb /* Power Management Commands, Responses, Notifications */ 11bfcc09ddSBjoern A. Zeeb 12bfcc09ddSBjoern A. Zeeb /** 13bfcc09ddSBjoern A. Zeeb * enum iwl_ltr_config_flags - masks for LTR config command flags 14bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_FEATURE_ENABLE: Feature operational status 15bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_HW_DIS_ON_SHADOW_REG_ACCESS: allow LTR change on shadow 16bfcc09ddSBjoern A. Zeeb * memory access 17bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_HW_EN_SHRT_WR_THROUGH: allow LTR msg send on ANY LTR 18bfcc09ddSBjoern A. Zeeb * reg change 19bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_HW_DIS_ON_D0_2_D3: allow LTR msg send on transition from 20bfcc09ddSBjoern A. Zeeb * D0 to D3 21bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_SW_SET_SHORT: fixed static short LTR register 22bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_SW_SET_LONG: fixed static short LONG register 23bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_DENIE_C10_ON_PD: allow going into C10 on PD 24bfcc09ddSBjoern A. Zeeb * @LTR_CFG_FLAG_UPDATE_VALUES: update config values and short 25bfcc09ddSBjoern A. Zeeb * idle timeout 26bfcc09ddSBjoern A. Zeeb */ 27bfcc09ddSBjoern A. Zeeb enum iwl_ltr_config_flags { 28bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_FEATURE_ENABLE = BIT(0), 29bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_HW_DIS_ON_SHADOW_REG_ACCESS = BIT(1), 30bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_HW_EN_SHRT_WR_THROUGH = BIT(2), 31bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_HW_DIS_ON_D0_2_D3 = BIT(3), 32bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_SW_SET_SHORT = BIT(4), 33bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_SW_SET_LONG = BIT(5), 34bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_DENIE_C10_ON_PD = BIT(6), 35bfcc09ddSBjoern A. Zeeb LTR_CFG_FLAG_UPDATE_VALUES = BIT(7), 36bfcc09ddSBjoern A. Zeeb }; 37bfcc09ddSBjoern A. Zeeb 38bfcc09ddSBjoern A. Zeeb /** 39bfcc09ddSBjoern A. Zeeb * struct iwl_ltr_config_cmd_v1 - configures the LTR 40bfcc09ddSBjoern A. Zeeb * @flags: See &enum iwl_ltr_config_flags 41bfcc09ddSBjoern A. Zeeb * @static_long: static LTR Long register value. 42bfcc09ddSBjoern A. Zeeb * @static_short: static LTR Short register value. 43bfcc09ddSBjoern A. Zeeb */ 44bfcc09ddSBjoern A. Zeeb struct iwl_ltr_config_cmd_v1 { 45bfcc09ddSBjoern A. Zeeb __le32 flags; 46bfcc09ddSBjoern A. Zeeb __le32 static_long; 47bfcc09ddSBjoern A. Zeeb __le32 static_short; 48bfcc09ddSBjoern A. Zeeb } __packed; /* LTR_CAPABLE_API_S_VER_1 */ 49bfcc09ddSBjoern A. Zeeb 50bfcc09ddSBjoern A. Zeeb #define LTR_VALID_STATES_NUM 4 51bfcc09ddSBjoern A. Zeeb 52bfcc09ddSBjoern A. Zeeb /** 53bfcc09ddSBjoern A. Zeeb * struct iwl_ltr_config_cmd - configures the LTR 54bfcc09ddSBjoern A. Zeeb * @flags: See &enum iwl_ltr_config_flags 55bfcc09ddSBjoern A. Zeeb * @static_long: static LTR Long register value. 56bfcc09ddSBjoern A. Zeeb * @static_short: static LTR Short register value. 57bfcc09ddSBjoern A. Zeeb * @ltr_cfg_values: LTR parameters table values (in usec) in folowing order: 58bfcc09ddSBjoern A. Zeeb * TX, RX, Short Idle, Long Idle. Used only if %LTR_CFG_FLAG_UPDATE_VALUES 59bfcc09ddSBjoern A. Zeeb * is set. 60bfcc09ddSBjoern A. Zeeb * @ltr_short_idle_timeout: LTR Short Idle timeout (in usec). Used only if 61bfcc09ddSBjoern A. Zeeb * %LTR_CFG_FLAG_UPDATE_VALUES is set. 62bfcc09ddSBjoern A. Zeeb */ 63bfcc09ddSBjoern A. Zeeb struct iwl_ltr_config_cmd { 64bfcc09ddSBjoern A. Zeeb __le32 flags; 65bfcc09ddSBjoern A. Zeeb __le32 static_long; 66bfcc09ddSBjoern A. Zeeb __le32 static_short; 67bfcc09ddSBjoern A. Zeeb __le32 ltr_cfg_values[LTR_VALID_STATES_NUM]; 68bfcc09ddSBjoern A. Zeeb __le32 ltr_short_idle_timeout; 69bfcc09ddSBjoern A. Zeeb } __packed; /* LTR_CAPABLE_API_S_VER_2 */ 70bfcc09ddSBjoern A. Zeeb 71bfcc09ddSBjoern A. Zeeb /* Radio LP RX Energy Threshold measured in dBm */ 72bfcc09ddSBjoern A. Zeeb #define POWER_LPRX_RSSI_THRESHOLD 75 73bfcc09ddSBjoern A. Zeeb #define POWER_LPRX_RSSI_THRESHOLD_MAX 94 74bfcc09ddSBjoern A. Zeeb #define POWER_LPRX_RSSI_THRESHOLD_MIN 30 75bfcc09ddSBjoern A. Zeeb 76bfcc09ddSBjoern A. Zeeb /** 77bfcc09ddSBjoern A. Zeeb * enum iwl_power_flags - masks for power table command flags 78bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off 79bfcc09ddSBjoern A. Zeeb * receiver and transmitter. '0' - does not allow. 80bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management, 81bfcc09ddSBjoern A. Zeeb * '1' Driver enables PM (use rest of parameters) 82bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_SKIP_OVER_DTIM_MSK: '0' PM have to walk up every DTIM, 83bfcc09ddSBjoern A. Zeeb * '1' PM could sleep over DTIM till listen Interval. 84bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_SNOOZE_ENA_MSK: Enable snoozing only if uAPSD is enabled and all 85bfcc09ddSBjoern A. Zeeb * access categories are both delivery and trigger enabled. 86bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_BT_SCO_ENA: Enable BT SCO coex only if uAPSD and 87bfcc09ddSBjoern A. Zeeb * PBW Snoozing enabled 88bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_ADVANCE_PM_ENA_MSK: Advanced PM (uAPSD) enable mask 89bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable. 90bfcc09ddSBjoern A. Zeeb * @POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK: AP/GO's uAPSD misbehaving 91bfcc09ddSBjoern A. Zeeb * detection enablement 92bfcc09ddSBjoern A. Zeeb */ 93bfcc09ddSBjoern A. Zeeb enum iwl_power_flags { 94bfcc09ddSBjoern A. Zeeb POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), 95bfcc09ddSBjoern A. Zeeb POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK = BIT(1), 96bfcc09ddSBjoern A. Zeeb POWER_FLAGS_SKIP_OVER_DTIM_MSK = BIT(2), 97bfcc09ddSBjoern A. Zeeb POWER_FLAGS_SNOOZE_ENA_MSK = BIT(5), 98bfcc09ddSBjoern A. Zeeb POWER_FLAGS_BT_SCO_ENA = BIT(8), 99bfcc09ddSBjoern A. Zeeb POWER_FLAGS_ADVANCE_PM_ENA_MSK = BIT(9), 100bfcc09ddSBjoern A. Zeeb POWER_FLAGS_LPRX_ENA_MSK = BIT(11), 101bfcc09ddSBjoern A. Zeeb POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK = BIT(12), 102bfcc09ddSBjoern A. Zeeb }; 103bfcc09ddSBjoern A. Zeeb 104bfcc09ddSBjoern A. Zeeb #define IWL_POWER_VEC_SIZE 5 105bfcc09ddSBjoern A. Zeeb 106bfcc09ddSBjoern A. Zeeb /** 107bfcc09ddSBjoern A. Zeeb * struct iwl_powertable_cmd - legacy power command. Beside old API support this 108bfcc09ddSBjoern A. Zeeb * is used also with a new power API for device wide power settings. 109bfcc09ddSBjoern A. Zeeb * POWER_TABLE_CMD = 0x77 (command, has simple generic response) 110bfcc09ddSBjoern A. Zeeb * 111bfcc09ddSBjoern A. Zeeb * @flags: Power table command flags from POWER_FLAGS_* 112bfcc09ddSBjoern A. Zeeb * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec. 113bfcc09ddSBjoern A. Zeeb * Minimum allowed:- 3 * DTIM. Keep alive period must be 114bfcc09ddSBjoern A. Zeeb * set regardless of power scheme or current power state. 115bfcc09ddSBjoern A. Zeeb * FW use this value also when PM is disabled. 116bfcc09ddSBjoern A. Zeeb * @debug_flags: debug flags 117bfcc09ddSBjoern A. Zeeb * @rx_data_timeout: Minimum time (usec) from last Rx packet for AM to 118bfcc09ddSBjoern A. Zeeb * PSM transition - legacy PM 119bfcc09ddSBjoern A. Zeeb * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to 120bfcc09ddSBjoern A. Zeeb * PSM transition - legacy PM 121bfcc09ddSBjoern A. Zeeb * @sleep_interval: not in use 122bfcc09ddSBjoern A. Zeeb * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag 123bfcc09ddSBjoern A. Zeeb * is set. For example, if it is required to skip over 124bfcc09ddSBjoern A. Zeeb * one DTIM, this value need to be set to 2 (DTIM periods). 125bfcc09ddSBjoern A. Zeeb * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. 126bfcc09ddSBjoern A. Zeeb * Default: 80dbm 127bfcc09ddSBjoern A. Zeeb */ 128bfcc09ddSBjoern A. Zeeb struct iwl_powertable_cmd { 129bfcc09ddSBjoern A. Zeeb /* PM_POWER_TABLE_CMD_API_S_VER_6 */ 130bfcc09ddSBjoern A. Zeeb __le16 flags; 131bfcc09ddSBjoern A. Zeeb u8 keep_alive_seconds; 132bfcc09ddSBjoern A. Zeeb u8 debug_flags; 133bfcc09ddSBjoern A. Zeeb __le32 rx_data_timeout; 134bfcc09ddSBjoern A. Zeeb __le32 tx_data_timeout; 135bfcc09ddSBjoern A. Zeeb __le32 sleep_interval[IWL_POWER_VEC_SIZE]; 136bfcc09ddSBjoern A. Zeeb __le32 skip_dtim_periods; 137bfcc09ddSBjoern A. Zeeb __le32 lprx_rssi_threshold; 138bfcc09ddSBjoern A. Zeeb } __packed; 139bfcc09ddSBjoern A. Zeeb 140bfcc09ddSBjoern A. Zeeb /** 141bfcc09ddSBjoern A. Zeeb * enum iwl_device_power_flags - masks for device power command flags 142bfcc09ddSBjoern A. Zeeb * @DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK: 143bfcc09ddSBjoern A. Zeeb * '1' Allow to save power by turning off 144bfcc09ddSBjoern A. Zeeb * receiver and transmitter. '0' - does not allow. 145bfcc09ddSBjoern A. Zeeb * @DEVICE_POWER_FLAGS_ALLOW_MEM_RETENTION_MSK: 146bfcc09ddSBjoern A. Zeeb * Device Retention indication, '1' indicate retention is enabled. 147*a4128aadSBjoern A. Zeeb * @DEVICE_POWER_FLAGS_NO_SLEEP_TILL_D3_MSK: 148*a4128aadSBjoern A. Zeeb * Prevent power save until entering d3 is completed. 149bfcc09ddSBjoern A. Zeeb * @DEVICE_POWER_FLAGS_32K_CLK_VALID_MSK: 150bfcc09ddSBjoern A. Zeeb * 32Khz external slow clock valid indication, '1' indicate cloack is 151bfcc09ddSBjoern A. Zeeb * valid. 152bfcc09ddSBjoern A. Zeeb */ 153bfcc09ddSBjoern A. Zeeb enum iwl_device_power_flags { 154bfcc09ddSBjoern A. Zeeb DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), 155bfcc09ddSBjoern A. Zeeb DEVICE_POWER_FLAGS_ALLOW_MEM_RETENTION_MSK = BIT(1), 156*a4128aadSBjoern A. Zeeb DEVICE_POWER_FLAGS_NO_SLEEP_TILL_D3_MSK = BIT(7), 157bfcc09ddSBjoern A. Zeeb DEVICE_POWER_FLAGS_32K_CLK_VALID_MSK = BIT(12), 158bfcc09ddSBjoern A. Zeeb }; 159bfcc09ddSBjoern A. Zeeb 160bfcc09ddSBjoern A. Zeeb /** 161bfcc09ddSBjoern A. Zeeb * struct iwl_device_power_cmd - device wide power command. 162bfcc09ddSBjoern A. Zeeb * DEVICE_POWER_CMD = 0x77 (command, has simple generic response) 163bfcc09ddSBjoern A. Zeeb * 164bfcc09ddSBjoern A. Zeeb * @flags: Power table command flags from &enum iwl_device_power_flags 165bfcc09ddSBjoern A. Zeeb * @reserved: reserved (padding) 166bfcc09ddSBjoern A. Zeeb */ 167bfcc09ddSBjoern A. Zeeb struct iwl_device_power_cmd { 168*a4128aadSBjoern A. Zeeb /* PM_POWER_TABLE_CMD_API_S_VER_7 */ 169bfcc09ddSBjoern A. Zeeb __le16 flags; 170bfcc09ddSBjoern A. Zeeb __le16 reserved; 171bfcc09ddSBjoern A. Zeeb } __packed; 172bfcc09ddSBjoern A. Zeeb 173bfcc09ddSBjoern A. Zeeb /** 174bfcc09ddSBjoern A. Zeeb * struct iwl_mac_power_cmd - New power command containing uAPSD support 175bfcc09ddSBjoern A. Zeeb * MAC_PM_POWER_TABLE = 0xA9 (command, has simple generic response) 176bfcc09ddSBjoern A. Zeeb * @id_and_color: MAC contex identifier, &enum iwl_ctxt_id_and_color 177bfcc09ddSBjoern A. Zeeb * @flags: Power table command flags from POWER_FLAGS_* 178bfcc09ddSBjoern A. Zeeb * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec. 179bfcc09ddSBjoern A. Zeeb * Minimum allowed:- 3 * DTIM. Keep alive period must be 180bfcc09ddSBjoern A. Zeeb * set regardless of power scheme or current power state. 181bfcc09ddSBjoern A. Zeeb * FW use this value also when PM is disabled. 182bfcc09ddSBjoern A. Zeeb * @rx_data_timeout: Minimum time (usec) from last Rx packet for AM to 183bfcc09ddSBjoern A. Zeeb * PSM transition - legacy PM 184bfcc09ddSBjoern A. Zeeb * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to 185bfcc09ddSBjoern A. Zeeb * PSM transition - legacy PM 186bfcc09ddSBjoern A. Zeeb * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag 187bfcc09ddSBjoern A. Zeeb * is set. For example, if it is required to skip over 188bfcc09ddSBjoern A. Zeeb * one DTIM, this value need to be set to 2 (DTIM periods). 189bfcc09ddSBjoern A. Zeeb * @rx_data_timeout_uapsd: Minimum time (usec) from last Rx packet for AM to 190bfcc09ddSBjoern A. Zeeb * PSM transition - uAPSD 191bfcc09ddSBjoern A. Zeeb * @tx_data_timeout_uapsd: Minimum time (usec) from last Tx packet for AM to 192bfcc09ddSBjoern A. Zeeb * PSM transition - uAPSD 193bfcc09ddSBjoern A. Zeeb * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. 194bfcc09ddSBjoern A. Zeeb * Default: 80dbm 195bfcc09ddSBjoern A. Zeeb * @snooze_interval: Maximum time between attempts to retrieve buffered data 196bfcc09ddSBjoern A. Zeeb * from the AP [msec] 197bfcc09ddSBjoern A. Zeeb * @snooze_window: A window of time in which PBW snoozing insures that all 198bfcc09ddSBjoern A. Zeeb * packets received. It is also the minimum time from last 199bfcc09ddSBjoern A. Zeeb * received unicast RX packet, before client stops snoozing 200bfcc09ddSBjoern A. Zeeb * for data. [msec] 201bfcc09ddSBjoern A. Zeeb * @snooze_step: TBD 202bfcc09ddSBjoern A. Zeeb * @qndp_tid: TID client shall use for uAPSD QNDP triggers 203bfcc09ddSBjoern A. Zeeb * @uapsd_ac_flags: Set trigger-enabled and delivery-enabled indication for 204bfcc09ddSBjoern A. Zeeb * each corresponding AC. 205bfcc09ddSBjoern A. Zeeb * Use IEEE80211_WMM_IE_STA_QOSINFO_AC* for correct values. 206bfcc09ddSBjoern A. Zeeb * @uapsd_max_sp: Use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct 207bfcc09ddSBjoern A. Zeeb * values. 208bfcc09ddSBjoern A. Zeeb * @heavy_tx_thld_packets: TX threshold measured in number of packets 209bfcc09ddSBjoern A. Zeeb * @heavy_rx_thld_packets: RX threshold measured in number of packets 210bfcc09ddSBjoern A. Zeeb * @heavy_tx_thld_percentage: TX threshold measured in load's percentage 211bfcc09ddSBjoern A. Zeeb * @heavy_rx_thld_percentage: RX threshold measured in load's percentage 212bfcc09ddSBjoern A. Zeeb * @limited_ps_threshold: (unused) 213bfcc09ddSBjoern A. Zeeb * @reserved: reserved (padding) 214bfcc09ddSBjoern A. Zeeb */ 215bfcc09ddSBjoern A. Zeeb struct iwl_mac_power_cmd { 216bfcc09ddSBjoern A. Zeeb /* CONTEXT_DESC_API_T_VER_1 */ 217bfcc09ddSBjoern A. Zeeb __le32 id_and_color; 218bfcc09ddSBjoern A. Zeeb 219bfcc09ddSBjoern A. Zeeb /* CLIENT_PM_POWER_TABLE_S_VER_1 */ 220bfcc09ddSBjoern A. Zeeb __le16 flags; 221bfcc09ddSBjoern A. Zeeb __le16 keep_alive_seconds; 222bfcc09ddSBjoern A. Zeeb __le32 rx_data_timeout; 223bfcc09ddSBjoern A. Zeeb __le32 tx_data_timeout; 224bfcc09ddSBjoern A. Zeeb __le32 rx_data_timeout_uapsd; 225bfcc09ddSBjoern A. Zeeb __le32 tx_data_timeout_uapsd; 226bfcc09ddSBjoern A. Zeeb u8 lprx_rssi_threshold; 227bfcc09ddSBjoern A. Zeeb u8 skip_dtim_periods; 228bfcc09ddSBjoern A. Zeeb __le16 snooze_interval; 229bfcc09ddSBjoern A. Zeeb __le16 snooze_window; 230bfcc09ddSBjoern A. Zeeb u8 snooze_step; 231bfcc09ddSBjoern A. Zeeb u8 qndp_tid; 232bfcc09ddSBjoern A. Zeeb u8 uapsd_ac_flags; 233bfcc09ddSBjoern A. Zeeb u8 uapsd_max_sp; 234bfcc09ddSBjoern A. Zeeb u8 heavy_tx_thld_packets; 235bfcc09ddSBjoern A. Zeeb u8 heavy_rx_thld_packets; 236bfcc09ddSBjoern A. Zeeb u8 heavy_tx_thld_percentage; 237bfcc09ddSBjoern A. Zeeb u8 heavy_rx_thld_percentage; 238bfcc09ddSBjoern A. Zeeb u8 limited_ps_threshold; 239bfcc09ddSBjoern A. Zeeb u8 reserved; 240bfcc09ddSBjoern A. Zeeb } __packed; 241bfcc09ddSBjoern A. Zeeb 242bfcc09ddSBjoern A. Zeeb /* 243bfcc09ddSBjoern A. Zeeb * struct iwl_uapsd_misbehaving_ap_notif - FW sends this notification when 244bfcc09ddSBjoern A. Zeeb * associated AP is identified as improperly implementing uAPSD protocol. 245bfcc09ddSBjoern A. Zeeb * PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78 246bfcc09ddSBjoern A. Zeeb * @sta_id: index of station in uCode's station table - associated AP ID in 247bfcc09ddSBjoern A. Zeeb * this context. 248bfcc09ddSBjoern A. Zeeb */ 249bfcc09ddSBjoern A. Zeeb struct iwl_uapsd_misbehaving_ap_notif { 250bfcc09ddSBjoern A. Zeeb __le32 sta_id; 251bfcc09ddSBjoern A. Zeeb u8 mac_id; 252bfcc09ddSBjoern A. Zeeb u8 reserved[3]; 253bfcc09ddSBjoern A. Zeeb } __packed; 254bfcc09ddSBjoern A. Zeeb 255bfcc09ddSBjoern A. Zeeb /** 256bfcc09ddSBjoern A. Zeeb * struct iwl_reduce_tx_power_cmd - TX power reduction command 257bfcc09ddSBjoern A. Zeeb * REDUCE_TX_POWER_CMD = 0x9f 258bfcc09ddSBjoern A. Zeeb * @flags: (reserved for future implementation) 259bfcc09ddSBjoern A. Zeeb * @mac_context_id: id of the mac ctx for which we are reducing TX power. 260bfcc09ddSBjoern A. Zeeb * @pwr_restriction: TX power restriction in dBms. 261bfcc09ddSBjoern A. Zeeb */ 262bfcc09ddSBjoern A. Zeeb struct iwl_reduce_tx_power_cmd { 263bfcc09ddSBjoern A. Zeeb u8 flags; 264bfcc09ddSBjoern A. Zeeb u8 mac_context_id; 265bfcc09ddSBjoern A. Zeeb __le16 pwr_restriction; 266bfcc09ddSBjoern A. Zeeb } __packed; /* TX_REDUCED_POWER_API_S_VER_1 */ 267bfcc09ddSBjoern A. Zeeb 268bfcc09ddSBjoern A. Zeeb enum iwl_dev_tx_power_cmd_mode { 269bfcc09ddSBjoern A. Zeeb IWL_TX_POWER_MODE_SET_MAC = 0, 270bfcc09ddSBjoern A. Zeeb IWL_TX_POWER_MODE_SET_DEVICE = 1, 271bfcc09ddSBjoern A. Zeeb IWL_TX_POWER_MODE_SET_CHAINS = 2, 272bfcc09ddSBjoern A. Zeeb IWL_TX_POWER_MODE_SET_ACK = 3, 273bfcc09ddSBjoern A. Zeeb IWL_TX_POWER_MODE_SET_SAR_TIMER = 4, 274bfcc09ddSBjoern A. Zeeb IWL_TX_POWER_MODE_SET_SAR_TIMER_DEFAULT_TABLE = 5, 275bfcc09ddSBjoern A. Zeeb }; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_5 */; 276bfcc09ddSBjoern A. Zeeb 277bfcc09ddSBjoern A. Zeeb #define IWL_NUM_CHAIN_TABLES 1 278bfcc09ddSBjoern A. Zeeb #define IWL_NUM_CHAIN_TABLES_V2 2 279bfcc09ddSBjoern A. Zeeb #define IWL_NUM_CHAIN_LIMITS 2 280bfcc09ddSBjoern A. Zeeb #define IWL_NUM_SUB_BANDS_V1 5 281bfcc09ddSBjoern A. Zeeb #define IWL_NUM_SUB_BANDS_V2 11 282bfcc09ddSBjoern A. Zeeb 283bfcc09ddSBjoern A. Zeeb /** 284bfcc09ddSBjoern A. Zeeb * struct iwl_dev_tx_power_common - Common part of the TX power reduction cmd 285bfcc09ddSBjoern A. Zeeb * @set_mode: see &enum iwl_dev_tx_power_cmd_mode 286bfcc09ddSBjoern A. Zeeb * @mac_context_id: id of the mac ctx for which we are reducing TX power. 287bfcc09ddSBjoern A. Zeeb * @pwr_restriction: TX power restriction in 1/8 dBms. 288bfcc09ddSBjoern A. Zeeb * @dev_24: device TX power restriction in 1/8 dBms 289bfcc09ddSBjoern A. Zeeb * @dev_52_low: device TX power restriction upper band - low 290bfcc09ddSBjoern A. Zeeb * @dev_52_high: device TX power restriction upper band - high 291bfcc09ddSBjoern A. Zeeb */ 292bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_common { 293bfcc09ddSBjoern A. Zeeb __le32 set_mode; 294bfcc09ddSBjoern A. Zeeb __le32 mac_context_id; 295bfcc09ddSBjoern A. Zeeb __le16 pwr_restriction; 296bfcc09ddSBjoern A. Zeeb __le16 dev_24; 297bfcc09ddSBjoern A. Zeeb __le16 dev_52_low; 298bfcc09ddSBjoern A. Zeeb __le16 dev_52_high; 299bfcc09ddSBjoern A. Zeeb }; 300bfcc09ddSBjoern A. Zeeb 301bfcc09ddSBjoern A. Zeeb /** 302bfcc09ddSBjoern A. Zeeb * struct iwl_dev_tx_power_cmd_v3 - TX power reduction command version 3 303bfcc09ddSBjoern A. Zeeb * @per_chain: per chain restrictions 304bfcc09ddSBjoern A. Zeeb */ 305bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v3 { 306bfcc09ddSBjoern A. Zeeb __le16 per_chain[IWL_NUM_CHAIN_TABLES][IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V1]; 307bfcc09ddSBjoern A. Zeeb } __packed; /* TX_REDUCED_POWER_API_S_VER_3 */ 308bfcc09ddSBjoern A. Zeeb 309bfcc09ddSBjoern A. Zeeb #define IWL_DEV_MAX_TX_POWER 0x7FFF 310bfcc09ddSBjoern A. Zeeb 311bfcc09ddSBjoern A. Zeeb /** 312bfcc09ddSBjoern A. Zeeb * struct iwl_dev_tx_power_cmd_v4 - TX power reduction command version 4 313bfcc09ddSBjoern A. Zeeb * @per_chain: per chain restrictions 314bfcc09ddSBjoern A. Zeeb * @enable_ack_reduction: enable or disable close range ack TX power 315bfcc09ddSBjoern A. Zeeb * reduction. 316bfcc09ddSBjoern A. Zeeb * @reserved: reserved (padding) 317bfcc09ddSBjoern A. Zeeb */ 318bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v4 { 319bfcc09ddSBjoern A. Zeeb __le16 per_chain[IWL_NUM_CHAIN_TABLES][IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V1]; 320bfcc09ddSBjoern A. Zeeb u8 enable_ack_reduction; 321bfcc09ddSBjoern A. Zeeb u8 reserved[3]; 322bfcc09ddSBjoern A. Zeeb } __packed; /* TX_REDUCED_POWER_API_S_VER_4 */ 323bfcc09ddSBjoern A. Zeeb 324bfcc09ddSBjoern A. Zeeb /** 325bfcc09ddSBjoern A. Zeeb * struct iwl_dev_tx_power_cmd_v5 - TX power reduction command version 5 326bfcc09ddSBjoern A. Zeeb * @per_chain: per chain restrictions 327bfcc09ddSBjoern A. Zeeb * @enable_ack_reduction: enable or disable close range ack TX power 328bfcc09ddSBjoern A. Zeeb * reduction. 329bfcc09ddSBjoern A. Zeeb * @per_chain_restriction_changed: is per_chain_restriction has changed 330bfcc09ddSBjoern A. Zeeb * from last command. used if set_mode is 331bfcc09ddSBjoern A. Zeeb * IWL_TX_POWER_MODE_SET_SAR_TIMER. 332bfcc09ddSBjoern A. Zeeb * note: if not changed, the command is used for keep alive only. 333bfcc09ddSBjoern A. Zeeb * @reserved: reserved (padding) 334bfcc09ddSBjoern A. Zeeb * @timer_period: timer in milliseconds. if expires FW will change to default 335bfcc09ddSBjoern A. Zeeb * BIOS values. relevant if setMode is IWL_TX_POWER_MODE_SET_SAR_TIMER 336bfcc09ddSBjoern A. Zeeb */ 337bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v5 { 338bfcc09ddSBjoern A. Zeeb __le16 per_chain[IWL_NUM_CHAIN_TABLES][IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V1]; 339bfcc09ddSBjoern A. Zeeb u8 enable_ack_reduction; 340bfcc09ddSBjoern A. Zeeb u8 per_chain_restriction_changed; 341bfcc09ddSBjoern A. Zeeb u8 reserved[2]; 342bfcc09ddSBjoern A. Zeeb __le32 timer_period; 343bfcc09ddSBjoern A. Zeeb } __packed; /* TX_REDUCED_POWER_API_S_VER_5 */ 344bfcc09ddSBjoern A. Zeeb 345bfcc09ddSBjoern A. Zeeb /** 346fac1f593SBjoern A. Zeeb * struct iwl_dev_tx_power_cmd_v6 - TX power reduction command version 6 347bfcc09ddSBjoern A. Zeeb * @per_chain: per chain restrictions 348bfcc09ddSBjoern A. Zeeb * @enable_ack_reduction: enable or disable close range ack TX power 349bfcc09ddSBjoern A. Zeeb * reduction. 350bfcc09ddSBjoern A. Zeeb * @per_chain_restriction_changed: is per_chain_restriction has changed 351bfcc09ddSBjoern A. Zeeb * from last command. used if set_mode is 352bfcc09ddSBjoern A. Zeeb * IWL_TX_POWER_MODE_SET_SAR_TIMER. 353bfcc09ddSBjoern A. Zeeb * note: if not changed, the command is used for keep alive only. 354bfcc09ddSBjoern A. Zeeb * @reserved: reserved (padding) 355bfcc09ddSBjoern A. Zeeb * @timer_period: timer in milliseconds. if expires FW will change to default 356bfcc09ddSBjoern A. Zeeb * BIOS values. relevant if setMode is IWL_TX_POWER_MODE_SET_SAR_TIMER 357bfcc09ddSBjoern A. Zeeb */ 358bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v6 { 359bfcc09ddSBjoern A. Zeeb __le16 per_chain[IWL_NUM_CHAIN_TABLES_V2][IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V2]; 360bfcc09ddSBjoern A. Zeeb u8 enable_ack_reduction; 361bfcc09ddSBjoern A. Zeeb u8 per_chain_restriction_changed; 362bfcc09ddSBjoern A. Zeeb u8 reserved[2]; 363bfcc09ddSBjoern A. Zeeb __le32 timer_period; 364bfcc09ddSBjoern A. Zeeb } __packed; /* TX_REDUCED_POWER_API_S_VER_6 */ 365bfcc09ddSBjoern A. Zeeb 366bfcc09ddSBjoern A. Zeeb /** 367fac1f593SBjoern A. Zeeb * struct iwl_dev_tx_power_cmd_v7 - TX power reduction command version 7 368fac1f593SBjoern A. Zeeb * @per_chain: per chain restrictions 369fac1f593SBjoern A. Zeeb * @enable_ack_reduction: enable or disable close range ack TX power 370fac1f593SBjoern A. Zeeb * reduction. 371fac1f593SBjoern A. Zeeb * @per_chain_restriction_changed: is per_chain_restriction has changed 372fac1f593SBjoern A. Zeeb * from last command. used if set_mode is 373fac1f593SBjoern A. Zeeb * IWL_TX_POWER_MODE_SET_SAR_TIMER. 374fac1f593SBjoern A. Zeeb * note: if not changed, the command is used for keep alive only. 375fac1f593SBjoern A. Zeeb * @reserved: reserved (padding) 376fac1f593SBjoern A. Zeeb * @timer_period: timer in milliseconds. if expires FW will change to default 377fac1f593SBjoern A. Zeeb * BIOS values. relevant if setMode is IWL_TX_POWER_MODE_SET_SAR_TIMER 378fac1f593SBjoern A. Zeeb * @flags: reduce power flags. 379fac1f593SBjoern A. Zeeb */ 380fac1f593SBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v7 { 381fac1f593SBjoern A. Zeeb __le16 per_chain[IWL_NUM_CHAIN_TABLES_V2][IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V2]; 382fac1f593SBjoern A. Zeeb u8 enable_ack_reduction; 383fac1f593SBjoern A. Zeeb u8 per_chain_restriction_changed; 384fac1f593SBjoern A. Zeeb u8 reserved[2]; 385fac1f593SBjoern A. Zeeb __le32 timer_period; 386fac1f593SBjoern A. Zeeb __le32 flags; 387fac1f593SBjoern A. Zeeb } __packed; /* TX_REDUCED_POWER_API_S_VER_7 */ 388*a4128aadSBjoern A. Zeeb 389*a4128aadSBjoern A. Zeeb /** 390*a4128aadSBjoern A. Zeeb * struct iwl_dev_tx_power_cmd_v8 - TX power reduction command version 8 391*a4128aadSBjoern A. Zeeb * @per_chain: per chain restrictions 392*a4128aadSBjoern A. Zeeb * @enable_ack_reduction: enable or disable close range ack TX power 393*a4128aadSBjoern A. Zeeb * reduction. 394*a4128aadSBjoern A. Zeeb * @per_chain_restriction_changed: is per_chain_restriction has changed 395*a4128aadSBjoern A. Zeeb * from last command. used if set_mode is 396*a4128aadSBjoern A. Zeeb * IWL_TX_POWER_MODE_SET_SAR_TIMER. 397*a4128aadSBjoern A. Zeeb * note: if not changed, the command is used for keep alive only. 398*a4128aadSBjoern A. Zeeb * @reserved: reserved (padding) 399*a4128aadSBjoern A. Zeeb * @timer_period: timer in milliseconds. if expires FW will change to default 400*a4128aadSBjoern A. Zeeb * BIOS values. relevant if setMode is IWL_TX_POWER_MODE_SET_SAR_TIMER 401*a4128aadSBjoern A. Zeeb * @flags: reduce power flags. 402*a4128aadSBjoern A. Zeeb * @tpc_vlp_backoff_level: user backoff of UNII5,7 VLP channels in USA. 403*a4128aadSBjoern A. Zeeb * Not in use. 404*a4128aadSBjoern A. Zeeb */ 405*a4128aadSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v8 { 406*a4128aadSBjoern A. Zeeb __le16 per_chain[IWL_NUM_CHAIN_TABLES_V2][IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V2]; 407*a4128aadSBjoern A. Zeeb u8 enable_ack_reduction; 408*a4128aadSBjoern A. Zeeb u8 per_chain_restriction_changed; 409*a4128aadSBjoern A. Zeeb u8 reserved[2]; 410*a4128aadSBjoern A. Zeeb __le32 timer_period; 411*a4128aadSBjoern A. Zeeb __le32 flags; 412*a4128aadSBjoern A. Zeeb __le32 tpc_vlp_backoff_level; 413*a4128aadSBjoern A. Zeeb } __packed; /* TX_REDUCED_POWER_API_S_VER_8 */ 414*a4128aadSBjoern A. Zeeb 415fac1f593SBjoern A. Zeeb /** 416bfcc09ddSBjoern A. Zeeb * struct iwl_dev_tx_power_cmd - TX power reduction command (multiversion) 417bfcc09ddSBjoern A. Zeeb * @common: common part of the command 418bfcc09ddSBjoern A. Zeeb * @v3: version 3 part of the command 419bfcc09ddSBjoern A. Zeeb * @v4: version 4 part of the command 420bfcc09ddSBjoern A. Zeeb * @v5: version 5 part of the command 421bfcc09ddSBjoern A. Zeeb * @v6: version 6 part of the command 422*a4128aadSBjoern A. Zeeb * @v7: version 7 part of the command 423*a4128aadSBjoern A. Zeeb * @v8: version 8 part of the command 424bfcc09ddSBjoern A. Zeeb */ 425bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd { 426bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_common common; 427bfcc09ddSBjoern A. Zeeb union { 428bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v3 v3; 429bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v4 v4; 430bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v5 v5; 431bfcc09ddSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v6 v6; 432fac1f593SBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v7 v7; 433*a4128aadSBjoern A. Zeeb struct iwl_dev_tx_power_cmd_v8 v8; 434bfcc09ddSBjoern A. Zeeb }; 435bfcc09ddSBjoern A. Zeeb }; 436bfcc09ddSBjoern A. Zeeb 437bfcc09ddSBjoern A. Zeeb #define IWL_NUM_GEO_PROFILES 3 438bfcc09ddSBjoern A. Zeeb #define IWL_NUM_GEO_PROFILES_V3 8 439bfcc09ddSBjoern A. Zeeb #define IWL_NUM_BANDS_PER_CHAIN_V1 2 440bfcc09ddSBjoern A. Zeeb #define IWL_NUM_BANDS_PER_CHAIN_V2 3 441bfcc09ddSBjoern A. Zeeb 442bfcc09ddSBjoern A. Zeeb /** 443bfcc09ddSBjoern A. Zeeb * enum iwl_geo_per_chain_offset_operation - type of operation 444bfcc09ddSBjoern A. Zeeb * @IWL_PER_CHAIN_OFFSET_SET_TABLES: send the tables from the host to the FW. 445bfcc09ddSBjoern A. Zeeb * @IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE: retrieve the last configured table. 446bfcc09ddSBjoern A. Zeeb */ 447bfcc09ddSBjoern A. Zeeb enum iwl_geo_per_chain_offset_operation { 448bfcc09ddSBjoern A. Zeeb IWL_PER_CHAIN_OFFSET_SET_TABLES, 449bfcc09ddSBjoern A. Zeeb IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE, 450bfcc09ddSBjoern A. Zeeb }; /* PER_CHAIN_OFFSET_OPERATION_E */ 451bfcc09ddSBjoern A. Zeeb 452bfcc09ddSBjoern A. Zeeb /** 453bfcc09ddSBjoern A. Zeeb * struct iwl_per_chain_offset - embedded struct for PER_CHAIN_LIMIT_OFFSET_CMD. 454bfcc09ddSBjoern A. Zeeb * @max_tx_power: maximum allowed tx power. 455bfcc09ddSBjoern A. Zeeb * @chain_a: tx power offset for chain a. 456bfcc09ddSBjoern A. Zeeb * @chain_b: tx power offset for chain b. 457bfcc09ddSBjoern A. Zeeb */ 458bfcc09ddSBjoern A. Zeeb struct iwl_per_chain_offset { 459bfcc09ddSBjoern A. Zeeb __le16 max_tx_power; 460bfcc09ddSBjoern A. Zeeb u8 chain_a; 461bfcc09ddSBjoern A. Zeeb u8 chain_b; 462bfcc09ddSBjoern A. Zeeb } __packed; /* PER_CHAIN_LIMIT_OFFSET_PER_CHAIN_S_VER_1 */ 463bfcc09ddSBjoern A. Zeeb 464bfcc09ddSBjoern A. Zeeb /** 465*a4128aadSBjoern A. Zeeb * struct iwl_geo_tx_power_profiles_cmd_v1 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd. 466bfcc09ddSBjoern A. Zeeb * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation 467bfcc09ddSBjoern A. Zeeb * @table: offset profile per band. 468bfcc09ddSBjoern A. Zeeb */ 469bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v1 { 470bfcc09ddSBjoern A. Zeeb __le32 ops; 471bfcc09ddSBjoern A. Zeeb struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES][IWL_NUM_BANDS_PER_CHAIN_V1]; 472bfcc09ddSBjoern A. Zeeb } __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_1 */ 473bfcc09ddSBjoern A. Zeeb 474bfcc09ddSBjoern A. Zeeb /** 475*a4128aadSBjoern A. Zeeb * struct iwl_geo_tx_power_profiles_cmd_v2 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd. 476bfcc09ddSBjoern A. Zeeb * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation 477bfcc09ddSBjoern A. Zeeb * @table: offset profile per band. 478d9836fb4SBjoern A. Zeeb * @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading) 479bfcc09ddSBjoern A. Zeeb */ 480bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v2 { 481bfcc09ddSBjoern A. Zeeb __le32 ops; 482bfcc09ddSBjoern A. Zeeb struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES][IWL_NUM_BANDS_PER_CHAIN_V1]; 483bfcc09ddSBjoern A. Zeeb __le32 table_revision; 484bfcc09ddSBjoern A. Zeeb } __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_2 */ 485bfcc09ddSBjoern A. Zeeb 486bfcc09ddSBjoern A. Zeeb /** 487*a4128aadSBjoern A. Zeeb * struct iwl_geo_tx_power_profiles_cmd_v3 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd. 488bfcc09ddSBjoern A. Zeeb * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation 489bfcc09ddSBjoern A. Zeeb * @table: offset profile per band. 490d9836fb4SBjoern A. Zeeb * @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading) 491bfcc09ddSBjoern A. Zeeb */ 492bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v3 { 493bfcc09ddSBjoern A. Zeeb __le32 ops; 494bfcc09ddSBjoern A. Zeeb struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES][IWL_NUM_BANDS_PER_CHAIN_V2]; 495bfcc09ddSBjoern A. Zeeb __le32 table_revision; 496bfcc09ddSBjoern A. Zeeb } __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_3 */ 497bfcc09ddSBjoern A. Zeeb 498bfcc09ddSBjoern A. Zeeb /** 499*a4128aadSBjoern A. Zeeb * struct iwl_geo_tx_power_profiles_cmd_v4 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd. 500bfcc09ddSBjoern A. Zeeb * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation 501bfcc09ddSBjoern A. Zeeb * @table: offset profile per band. 502d9836fb4SBjoern A. Zeeb * @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading) 503bfcc09ddSBjoern A. Zeeb */ 504bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v4 { 505bfcc09ddSBjoern A. Zeeb __le32 ops; 506bfcc09ddSBjoern A. Zeeb struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES_V3][IWL_NUM_BANDS_PER_CHAIN_V1]; 507bfcc09ddSBjoern A. Zeeb __le32 table_revision; 508bfcc09ddSBjoern A. Zeeb } __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_4 */ 509bfcc09ddSBjoern A. Zeeb 510bfcc09ddSBjoern A. Zeeb /** 511*a4128aadSBjoern A. Zeeb * struct iwl_geo_tx_power_profiles_cmd_v5 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd. 512bfcc09ddSBjoern A. Zeeb * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation 513bfcc09ddSBjoern A. Zeeb * @table: offset profile per band. 514d9836fb4SBjoern A. Zeeb * @table_revision: 0 for not-South Korea, 1 for South Korea (the name is misleading) 515bfcc09ddSBjoern A. Zeeb */ 516bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v5 { 517bfcc09ddSBjoern A. Zeeb __le32 ops; 518bfcc09ddSBjoern A. Zeeb struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES_V3][IWL_NUM_BANDS_PER_CHAIN_V2]; 519bfcc09ddSBjoern A. Zeeb __le32 table_revision; 520bfcc09ddSBjoern A. Zeeb } __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_5 */ 521bfcc09ddSBjoern A. Zeeb 522bfcc09ddSBjoern A. Zeeb union iwl_geo_tx_power_profiles_cmd { 523bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v1 v1; 524bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v2 v2; 525bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v3 v3; 526bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v4 v4; 527bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_cmd_v5 v5; 528bfcc09ddSBjoern A. Zeeb }; 529bfcc09ddSBjoern A. Zeeb 530bfcc09ddSBjoern A. Zeeb /** 531bfcc09ddSBjoern A. Zeeb * struct iwl_geo_tx_power_profiles_resp - response to PER_CHAIN_LIMIT_OFFSET_CMD cmd 532bfcc09ddSBjoern A. Zeeb * @profile_idx: current geo profile in use 533bfcc09ddSBjoern A. Zeeb */ 534bfcc09ddSBjoern A. Zeeb struct iwl_geo_tx_power_profiles_resp { 535bfcc09ddSBjoern A. Zeeb __le32 profile_idx; 536bfcc09ddSBjoern A. Zeeb } __packed; /* PER_CHAIN_LIMIT_OFFSET_RSP */ 537bfcc09ddSBjoern A. Zeeb 538bfcc09ddSBjoern A. Zeeb /** 539*a4128aadSBjoern A. Zeeb * enum iwl_ppag_flags - PPAG enable masks 540*a4128aadSBjoern A. Zeeb * @IWL_PPAG_ETSI_MASK: enable PPAG in ETSI 541*a4128aadSBjoern A. Zeeb * @IWL_PPAG_CHINA_MASK: enable PPAG in China 542*a4128aadSBjoern A. Zeeb * @IWL_PPAG_ETSI_LPI_UHB_MASK: enable LPI in ETSI for UHB 543*a4128aadSBjoern A. Zeeb * @IWL_PPAG_ETSI_VLP_UHB_MASK: enable VLP in ETSI for UHB 544*a4128aadSBjoern A. Zeeb * @IWL_PPAG_ETSI_SP_UHB_MASK: enable SP in ETSI for UHB 545*a4128aadSBjoern A. Zeeb * @IWL_PPAG_USA_LPI_UHB_MASK: enable LPI in USA for UHB 546*a4128aadSBjoern A. Zeeb * @IWL_PPAG_USA_VLP_UHB_MASK: enable VLP in USA for UHB 547*a4128aadSBjoern A. Zeeb * @IWL_PPAG_USA_SP_UHB_MASK: enable SP in USA for UHB 548*a4128aadSBjoern A. Zeeb * @IWL_PPAG_CANADA_LPI_UHB_MASK: enable LPI in CANADA for UHB 549*a4128aadSBjoern A. Zeeb * @IWL_PPAG_CANADA_VLP_UHB_MASK: enable VLP in CANADA for UHB 550*a4128aadSBjoern A. Zeeb * @IWL_PPAG_CANADA_SP_UHB_MASK: enable SP in CANADA for UHB 551*a4128aadSBjoern A. Zeeb */ 552*a4128aadSBjoern A. Zeeb enum iwl_ppag_flags { 553*a4128aadSBjoern A. Zeeb IWL_PPAG_ETSI_MASK = BIT(0), 554*a4128aadSBjoern A. Zeeb IWL_PPAG_CHINA_MASK = BIT(1), 555*a4128aadSBjoern A. Zeeb IWL_PPAG_ETSI_LPI_UHB_MASK = BIT(2), 556*a4128aadSBjoern A. Zeeb IWL_PPAG_ETSI_VLP_UHB_MASK = BIT(3), 557*a4128aadSBjoern A. Zeeb IWL_PPAG_ETSI_SP_UHB_MASK = BIT(4), 558*a4128aadSBjoern A. Zeeb IWL_PPAG_USA_LPI_UHB_MASK = BIT(5), 559*a4128aadSBjoern A. Zeeb IWL_PPAG_USA_VLP_UHB_MASK = BIT(6), 560*a4128aadSBjoern A. Zeeb IWL_PPAG_USA_SP_UHB_MASK = BIT(7), 561*a4128aadSBjoern A. Zeeb IWL_PPAG_CANADA_LPI_UHB_MASK = BIT(8), 562*a4128aadSBjoern A. Zeeb IWL_PPAG_CANADA_VLP_UHB_MASK = BIT(9), 563*a4128aadSBjoern A. Zeeb IWL_PPAG_CANADA_SP_UHB_MASK = BIT(10), 564*a4128aadSBjoern A. Zeeb }; 565*a4128aadSBjoern A. Zeeb 566*a4128aadSBjoern A. Zeeb /** 567bfcc09ddSBjoern A. Zeeb * union iwl_ppag_table_cmd - union for all versions of PPAG command 568bfcc09ddSBjoern A. Zeeb * @v1: version 1 569bfcc09ddSBjoern A. Zeeb * @v2: version 2 570*a4128aadSBjoern A. Zeeb * version 3, 4, 5 and 6 are the same structure as v2, 571*a4128aadSBjoern A. Zeeb * but has a different format of the flags bitmap 572*a4128aadSBjoern A. Zeeb * @v1.flags: values from &enum iwl_ppag_flags 573*a4128aadSBjoern A. Zeeb * @v1.gain: table of antenna gain values per chain and sub-band 574*a4128aadSBjoern A. Zeeb * @v1.reserved: reserved 575*a4128aadSBjoern A. Zeeb * @v2.flags: values from &enum iwl_ppag_flags 576*a4128aadSBjoern A. Zeeb * @v2.gain: table of antenna gain values per chain and sub-band 577*a4128aadSBjoern A. Zeeb * @v2.reserved: reserved 578bfcc09ddSBjoern A. Zeeb */ 579bfcc09ddSBjoern A. Zeeb union iwl_ppag_table_cmd { 580bfcc09ddSBjoern A. Zeeb struct { 581bfcc09ddSBjoern A. Zeeb __le32 flags; 582bfcc09ddSBjoern A. Zeeb s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V1]; 583bfcc09ddSBjoern A. Zeeb s8 reserved[2]; 584bfcc09ddSBjoern A. Zeeb } v1; 585bfcc09ddSBjoern A. Zeeb struct { 586bfcc09ddSBjoern A. Zeeb __le32 flags; 587bfcc09ddSBjoern A. Zeeb s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V2]; 588bfcc09ddSBjoern A. Zeeb s8 reserved[2]; 589bfcc09ddSBjoern A. Zeeb } v2; 590bfcc09ddSBjoern A. Zeeb } __packed; 591bfcc09ddSBjoern A. Zeeb 592*a4128aadSBjoern A. Zeeb #define IWL_PPAG_CMD_V4_MASK (IWL_PPAG_ETSI_MASK | IWL_PPAG_CHINA_MASK) 593*a4128aadSBjoern A. Zeeb #define IWL_PPAG_CMD_V5_MASK (IWL_PPAG_CMD_V4_MASK | \ 594*a4128aadSBjoern A. Zeeb IWL_PPAG_ETSI_LPI_UHB_MASK | \ 595*a4128aadSBjoern A. Zeeb IWL_PPAG_USA_LPI_UHB_MASK) 596*a4128aadSBjoern A. Zeeb 597d9836fb4SBjoern A. Zeeb #define MCC_TO_SAR_OFFSET_TABLE_ROW_SIZE 26 598d9836fb4SBjoern A. Zeeb #define MCC_TO_SAR_OFFSET_TABLE_COL_SIZE 13 599d9836fb4SBjoern A. Zeeb 600d9836fb4SBjoern A. Zeeb /** 601d9836fb4SBjoern A. Zeeb * struct iwl_sar_offset_mapping_cmd - struct for SAR_OFFSET_MAPPING_TABLE_CMD 602d9836fb4SBjoern A. Zeeb * @offset_map: mapping a mcc to a geo sar group 603d9836fb4SBjoern A. Zeeb * @reserved: reserved 604d9836fb4SBjoern A. Zeeb */ 605d9836fb4SBjoern A. Zeeb struct iwl_sar_offset_mapping_cmd { 606d9836fb4SBjoern A. Zeeb u8 offset_map[MCC_TO_SAR_OFFSET_TABLE_ROW_SIZE] 607d9836fb4SBjoern A. Zeeb [MCC_TO_SAR_OFFSET_TABLE_COL_SIZE]; 6089af1bba4SBjoern A. Zeeb __le16 reserved; 609d9836fb4SBjoern A. Zeeb } __packed; /*SAR_OFFSET_MAPPING_TABLE_CMD_API_S*/ 610d9836fb4SBjoern A. Zeeb 611bfcc09ddSBjoern A. Zeeb /** 612bfcc09ddSBjoern A. Zeeb * struct iwl_beacon_filter_cmd 613bfcc09ddSBjoern A. Zeeb * REPLY_BEACON_FILTERING_CMD = 0xd2 (command) 614bfcc09ddSBjoern A. Zeeb * @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon 615bfcc09ddSBjoern A. Zeeb * to driver if delta in Energy values calculated for this and last 616bfcc09ddSBjoern A. Zeeb * passed beacon is greater than this threshold. Zero value means that 617bfcc09ddSBjoern A. Zeeb * the Energy change is ignored for beacon filtering, and beacon will 618bfcc09ddSBjoern A. Zeeb * not be forced to be sent to driver regardless of this delta. Typical 619bfcc09ddSBjoern A. Zeeb * energy delta 5dB. 620bfcc09ddSBjoern A. Zeeb * @bf_roaming_energy_delta: Used for RSSI filtering, if in 'roaming' state. 621bfcc09ddSBjoern A. Zeeb * Send beacon to driver if delta in Energy values calculated for this 622bfcc09ddSBjoern A. Zeeb * and last passed beacon is greater than this threshold. Zero value 623bfcc09ddSBjoern A. Zeeb * means that the Energy change is ignored for beacon filtering while in 624bfcc09ddSBjoern A. Zeeb * Roaming state, typical energy delta 1dB. 625bfcc09ddSBjoern A. Zeeb * @bf_roaming_state: Used for RSSI filtering. If absolute Energy values 626bfcc09ddSBjoern A. Zeeb * calculated for current beacon is less than the threshold, use 627bfcc09ddSBjoern A. Zeeb * Roaming Energy Delta Threshold, otherwise use normal Energy Delta 628bfcc09ddSBjoern A. Zeeb * Threshold. Typical energy threshold is -72dBm. 629bfcc09ddSBjoern A. Zeeb * @bf_temp_threshold: This threshold determines the type of temperature 630bfcc09ddSBjoern A. Zeeb * filtering (Slow or Fast) that is selected (Units are in Celsuis): 631bfcc09ddSBjoern A. Zeeb * If the current temperature is above this threshold - Fast filter 632bfcc09ddSBjoern A. Zeeb * will be used, If the current temperature is below this threshold - 633bfcc09ddSBjoern A. Zeeb * Slow filter will be used. 634bfcc09ddSBjoern A. Zeeb * @bf_temp_fast_filter: Send Beacon to driver if delta in temperature values 635bfcc09ddSBjoern A. Zeeb * calculated for this and the last passed beacon is greater than this 636bfcc09ddSBjoern A. Zeeb * threshold. Zero value means that the temperature change is ignored for 637bfcc09ddSBjoern A. Zeeb * beacon filtering; beacons will not be forced to be sent to driver 638bfcc09ddSBjoern A. Zeeb * regardless of whether its temerature has been changed. 639bfcc09ddSBjoern A. Zeeb * @bf_temp_slow_filter: Send Beacon to driver if delta in temperature values 640bfcc09ddSBjoern A. Zeeb * calculated for this and the last passed beacon is greater than this 641bfcc09ddSBjoern A. Zeeb * threshold. Zero value means that the temperature change is ignored for 642bfcc09ddSBjoern A. Zeeb * beacon filtering; beacons will not be forced to be sent to driver 643bfcc09ddSBjoern A. Zeeb * regardless of whether its temerature has been changed. 644bfcc09ddSBjoern A. Zeeb * @bf_enable_beacon_filter: 1, beacon filtering is enabled; 0, disabled. 645bfcc09ddSBjoern A. Zeeb * @bf_debug_flag: beacon filtering debug configuration 646bfcc09ddSBjoern A. Zeeb * @bf_escape_timer: Send beacons to to driver if no beacons were passed 647bfcc09ddSBjoern A. Zeeb * for a specific period of time. Units: Beacons. 648bfcc09ddSBjoern A. Zeeb * @ba_escape_timer: Fully receive and parse beacon if no beacons were passed 649bfcc09ddSBjoern A. Zeeb * for a longer period of time then this escape-timeout. Units: Beacons. 650bfcc09ddSBjoern A. Zeeb * @ba_enable_beacon_abort: 1, beacon abort is enabled; 0, disabled. 651bfcc09ddSBjoern A. Zeeb * @bf_threshold_absolute_low: See below. 652bfcc09ddSBjoern A. Zeeb * @bf_threshold_absolute_high: Send Beacon to driver if Energy value calculated 653bfcc09ddSBjoern A. Zeeb * for this beacon crossed this absolute threshold. For the 'Increase' 654bfcc09ddSBjoern A. Zeeb * direction the bf_energy_absolute_low[i] is used. For the 'Decrease' 655bfcc09ddSBjoern A. Zeeb * direction the bf_energy_absolute_high[i] is used. Zero value means 656bfcc09ddSBjoern A. Zeeb * that this specific threshold is ignored for beacon filtering, and 657bfcc09ddSBjoern A. Zeeb * beacon will not be forced to be sent to driver due to this setting. 658bfcc09ddSBjoern A. Zeeb */ 659bfcc09ddSBjoern A. Zeeb struct iwl_beacon_filter_cmd { 660bfcc09ddSBjoern A. Zeeb __le32 bf_energy_delta; 661bfcc09ddSBjoern A. Zeeb __le32 bf_roaming_energy_delta; 662bfcc09ddSBjoern A. Zeeb __le32 bf_roaming_state; 663bfcc09ddSBjoern A. Zeeb __le32 bf_temp_threshold; 664bfcc09ddSBjoern A. Zeeb __le32 bf_temp_fast_filter; 665bfcc09ddSBjoern A. Zeeb __le32 bf_temp_slow_filter; 666bfcc09ddSBjoern A. Zeeb __le32 bf_enable_beacon_filter; 667bfcc09ddSBjoern A. Zeeb __le32 bf_debug_flag; 668bfcc09ddSBjoern A. Zeeb __le32 bf_escape_timer; 669bfcc09ddSBjoern A. Zeeb __le32 ba_escape_timer; 670bfcc09ddSBjoern A. Zeeb __le32 ba_enable_beacon_abort; 671bfcc09ddSBjoern A. Zeeb __le32 bf_threshold_absolute_low[2]; 672bfcc09ddSBjoern A. Zeeb __le32 bf_threshold_absolute_high[2]; 673bfcc09ddSBjoern A. Zeeb } __packed; /* BEACON_FILTER_CONFIG_API_S_VER_4 */ 674bfcc09ddSBjoern A. Zeeb 675bfcc09ddSBjoern A. Zeeb /* Beacon filtering and beacon abort */ 676bfcc09ddSBjoern A. Zeeb #define IWL_BF_ENERGY_DELTA_DEFAULT 5 677bfcc09ddSBjoern A. Zeeb #define IWL_BF_ENERGY_DELTA_D0I3 20 678bfcc09ddSBjoern A. Zeeb #define IWL_BF_ENERGY_DELTA_MAX 255 679bfcc09ddSBjoern A. Zeeb #define IWL_BF_ENERGY_DELTA_MIN 0 680bfcc09ddSBjoern A. Zeeb 681bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_ENERGY_DELTA_DEFAULT 1 682bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_ENERGY_DELTA_D0I3 20 683bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_ENERGY_DELTA_MAX 255 684bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_ENERGY_DELTA_MIN 0 685bfcc09ddSBjoern A. Zeeb 686bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_STATE_DEFAULT 72 687bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_STATE_D0I3 72 688bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_STATE_MAX 255 689bfcc09ddSBjoern A. Zeeb #define IWL_BF_ROAMING_STATE_MIN 0 690bfcc09ddSBjoern A. Zeeb 691bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_THRESHOLD_DEFAULT 112 692bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_THRESHOLD_D0I3 112 693bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_THRESHOLD_MAX 255 694bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_THRESHOLD_MIN 0 695bfcc09ddSBjoern A. Zeeb 696bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_FAST_FILTER_DEFAULT 1 697bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_FAST_FILTER_D0I3 1 698bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_FAST_FILTER_MAX 255 699bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_FAST_FILTER_MIN 0 700bfcc09ddSBjoern A. Zeeb 701bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_SLOW_FILTER_DEFAULT 5 702bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_SLOW_FILTER_D0I3 20 703bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_SLOW_FILTER_MAX 255 704bfcc09ddSBjoern A. Zeeb #define IWL_BF_TEMP_SLOW_FILTER_MIN 0 705bfcc09ddSBjoern A. Zeeb 706bfcc09ddSBjoern A. Zeeb #define IWL_BF_ENABLE_BEACON_FILTER_DEFAULT 1 707bfcc09ddSBjoern A. Zeeb 708bfcc09ddSBjoern A. Zeeb #define IWL_BF_DEBUG_FLAG_DEFAULT 0 709bfcc09ddSBjoern A. Zeeb #define IWL_BF_DEBUG_FLAG_D0I3 0 710bfcc09ddSBjoern A. Zeeb 711bfcc09ddSBjoern A. Zeeb #define IWL_BF_ESCAPE_TIMER_DEFAULT 0 712bfcc09ddSBjoern A. Zeeb #define IWL_BF_ESCAPE_TIMER_D0I3 0 713bfcc09ddSBjoern A. Zeeb #define IWL_BF_ESCAPE_TIMER_MAX 1024 714bfcc09ddSBjoern A. Zeeb #define IWL_BF_ESCAPE_TIMER_MIN 0 715bfcc09ddSBjoern A. Zeeb 716bfcc09ddSBjoern A. Zeeb #define IWL_BA_ESCAPE_TIMER_DEFAULT 6 717bfcc09ddSBjoern A. Zeeb #define IWL_BA_ESCAPE_TIMER_D0I3 6 718bfcc09ddSBjoern A. Zeeb #define IWL_BA_ESCAPE_TIMER_D3 9 719bfcc09ddSBjoern A. Zeeb #define IWL_BA_ESCAPE_TIMER_MAX 1024 720bfcc09ddSBjoern A. Zeeb #define IWL_BA_ESCAPE_TIMER_MIN 0 721bfcc09ddSBjoern A. Zeeb 722bfcc09ddSBjoern A. Zeeb #define IWL_BA_ENABLE_BEACON_ABORT_DEFAULT 1 723bfcc09ddSBjoern A. Zeeb 724bfcc09ddSBjoern A. Zeeb #define IWL_BF_CMD_CONFIG(mode) \ 725bfcc09ddSBjoern A. Zeeb .bf_energy_delta = cpu_to_le32(IWL_BF_ENERGY_DELTA ## mode), \ 726bfcc09ddSBjoern A. Zeeb .bf_roaming_energy_delta = \ 727bfcc09ddSBjoern A. Zeeb cpu_to_le32(IWL_BF_ROAMING_ENERGY_DELTA ## mode), \ 728bfcc09ddSBjoern A. Zeeb .bf_roaming_state = cpu_to_le32(IWL_BF_ROAMING_STATE ## mode), \ 729bfcc09ddSBjoern A. Zeeb .bf_temp_threshold = cpu_to_le32(IWL_BF_TEMP_THRESHOLD ## mode), \ 730bfcc09ddSBjoern A. Zeeb .bf_temp_fast_filter = cpu_to_le32(IWL_BF_TEMP_FAST_FILTER ## mode), \ 731bfcc09ddSBjoern A. Zeeb .bf_temp_slow_filter = cpu_to_le32(IWL_BF_TEMP_SLOW_FILTER ## mode), \ 732bfcc09ddSBjoern A. Zeeb .bf_debug_flag = cpu_to_le32(IWL_BF_DEBUG_FLAG ## mode), \ 733bfcc09ddSBjoern A. Zeeb .bf_escape_timer = cpu_to_le32(IWL_BF_ESCAPE_TIMER ## mode), \ 734bfcc09ddSBjoern A. Zeeb .ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER ## mode) 735bfcc09ddSBjoern A. Zeeb 736bfcc09ddSBjoern A. Zeeb #define IWL_BF_CMD_CONFIG_DEFAULTS IWL_BF_CMD_CONFIG(_DEFAULT) 737bfcc09ddSBjoern A. Zeeb #define IWL_BF_CMD_CONFIG_D0I3 IWL_BF_CMD_CONFIG(_D0I3) 738*a4128aadSBjoern A. Zeeb 739*a4128aadSBjoern A. Zeeb #define DEFAULT_TPE_TX_POWER 0x7F 740*a4128aadSBjoern A. Zeeb 741*a4128aadSBjoern A. Zeeb /* 742*a4128aadSBjoern A. Zeeb * Bandwidth: 20/40/80/(160/80+80)/320 743*a4128aadSBjoern A. Zeeb */ 744*a4128aadSBjoern A. Zeeb #define IWL_MAX_TX_EIRP_PWR_MAX_SIZE 5 745*a4128aadSBjoern A. Zeeb #define IWL_MAX_TX_EIRP_PSD_PWR_MAX_SIZE 16 746*a4128aadSBjoern A. Zeeb 747*a4128aadSBjoern A. Zeeb enum iwl_6ghz_ap_type { 748*a4128aadSBjoern A. Zeeb IWL_6GHZ_AP_TYPE_LPI, 749*a4128aadSBjoern A. Zeeb IWL_6GHZ_AP_TYPE_SP, 750*a4128aadSBjoern A. Zeeb IWL_6GHZ_AP_TYPE_VLP, 751*a4128aadSBjoern A. Zeeb }; /* PHY_AP_TYPE_API_E_VER_1 */ 752*a4128aadSBjoern A. Zeeb 753*a4128aadSBjoern A. Zeeb /** 754*a4128aadSBjoern A. Zeeb * struct iwl_txpower_constraints_cmd 755*a4128aadSBjoern A. Zeeb * AP_TX_POWER_CONSTRAINTS_CMD 756*a4128aadSBjoern A. Zeeb * Used for VLP/LPI/AFC Access Point power constraints for 6GHz channels 757*a4128aadSBjoern A. Zeeb * @link_id: linkId 758*a4128aadSBjoern A. Zeeb * @ap_type: see &enum iwl_ap_type 759*a4128aadSBjoern A. Zeeb * @eirp_pwr: 8-bit 2s complement signed integer in the range 760*a4128aadSBjoern A. Zeeb * -64 dBm to 63 dBm with a 0.5 dB step 761*a4128aadSBjoern A. Zeeb * default &DEFAULT_TPE_TX_POWER (no maximum limit) 762*a4128aadSBjoern A. Zeeb * @psd_pwr: 8-bit 2s complement signed integer in the range 763*a4128aadSBjoern A. Zeeb * -63.5 to +63 dBm/MHz with a 0.5 step 764*a4128aadSBjoern A. Zeeb * value - 128 indicates that the corresponding 20 765*a4128aadSBjoern A. Zeeb * MHz channel cannot be used for transmission. 766*a4128aadSBjoern A. Zeeb * value +127 indicates that no maximum PSD limit 767*a4128aadSBjoern A. Zeeb * is specified for the corresponding 20 MHz channel 768*a4128aadSBjoern A. Zeeb * default &DEFAULT_TPE_TX_POWER (no maximum limit) 769*a4128aadSBjoern A. Zeeb * @reserved: reserved (padding) 770*a4128aadSBjoern A. Zeeb */ 771*a4128aadSBjoern A. Zeeb struct iwl_txpower_constraints_cmd { 772*a4128aadSBjoern A. Zeeb __le16 link_id; 773*a4128aadSBjoern A. Zeeb __le16 ap_type; 774*a4128aadSBjoern A. Zeeb __s8 eirp_pwr[IWL_MAX_TX_EIRP_PWR_MAX_SIZE]; 775*a4128aadSBjoern A. Zeeb __s8 psd_pwr[IWL_MAX_TX_EIRP_PSD_PWR_MAX_SIZE]; 776*a4128aadSBjoern A. Zeeb u8 reserved[3]; 777*a4128aadSBjoern A. Zeeb } __packed; /* PHY_AP_TX_POWER_CONSTRAINTS_CMD_API_S_VER_1 */ 778bfcc09ddSBjoern A. Zeeb #endif /* __iwl_fw_api_power_h__ */ 779