xref: /linux/drivers/net/wireless/intel/iwlwifi/fw/api/power.h (revision bfd5bb6f90af092aa345b15cd78143956a13c2a8)
1 /******************************************************************************
2  *
3  * This file is provided under a dual BSD/GPLv2 license.  When using or
4  * redistributing this file, you may do so under either license.
5  *
6  * GPL LICENSE SUMMARY
7  *
8  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
10  * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of version 2 of the GNU General Public License as
14  * published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * The full GNU General Public License is included in this distribution
22  * in the file called COPYING.
23  *
24  * Contact Information:
25  *  Intel Linux Wireless <linuxwifi@intel.com>
26  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
27  *
28  * BSD LICENSE
29  *
30  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
31  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
32  * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
33  * All rights reserved.
34  *
35  * Redistribution and use in source and binary forms, with or without
36  * modification, are permitted provided that the following conditions
37  * are met:
38  *
39  *  * Redistributions of source code must retain the above copyright
40  *    notice, this list of conditions and the following disclaimer.
41  *  * Redistributions in binary form must reproduce the above copyright
42  *    notice, this list of conditions and the following disclaimer in
43  *    the documentation and/or other materials provided with the
44  *    distribution.
45  *  * Neither the name Intel Corporation nor the names of its
46  *    contributors may be used to endorse or promote products derived
47  *    from this software without specific prior written permission.
48  *
49  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
53  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
54  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
55  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
57  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
59  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60  *
61  *****************************************************************************/
62 
63 #ifndef __iwl_fw_api_power_h__
64 #define __iwl_fw_api_power_h__
65 
66 /* Power Management Commands, Responses, Notifications */
67 
68 /**
69  * enum iwl_ltr_config_flags - masks for LTR config command flags
70  * @LTR_CFG_FLAG_FEATURE_ENABLE: Feature operational status
71  * @LTR_CFG_FLAG_HW_DIS_ON_SHADOW_REG_ACCESS: allow LTR change on shadow
72  *	memory access
73  * @LTR_CFG_FLAG_HW_EN_SHRT_WR_THROUGH: allow LTR msg send on ANY LTR
74  *	reg change
75  * @LTR_CFG_FLAG_HW_DIS_ON_D0_2_D3: allow LTR msg send on transition from
76  *	D0 to D3
77  * @LTR_CFG_FLAG_SW_SET_SHORT: fixed static short LTR register
78  * @LTR_CFG_FLAG_SW_SET_LONG: fixed static short LONG register
79  * @LTR_CFG_FLAG_DENIE_C10_ON_PD: allow going into C10 on PD
80  * @LTR_CFG_FLAG_UPDATE_VALUES: update config values and short
81  *	idle timeout
82  */
83 enum iwl_ltr_config_flags {
84 	LTR_CFG_FLAG_FEATURE_ENABLE = BIT(0),
85 	LTR_CFG_FLAG_HW_DIS_ON_SHADOW_REG_ACCESS = BIT(1),
86 	LTR_CFG_FLAG_HW_EN_SHRT_WR_THROUGH = BIT(2),
87 	LTR_CFG_FLAG_HW_DIS_ON_D0_2_D3 = BIT(3),
88 	LTR_CFG_FLAG_SW_SET_SHORT = BIT(4),
89 	LTR_CFG_FLAG_SW_SET_LONG = BIT(5),
90 	LTR_CFG_FLAG_DENIE_C10_ON_PD = BIT(6),
91 	LTR_CFG_FLAG_UPDATE_VALUES = BIT(7),
92 };
93 
94 /**
95  * struct iwl_ltr_config_cmd_v1 - configures the LTR
96  * @flags: See &enum iwl_ltr_config_flags
97  * @static_long: static LTR Long register value.
98  * @static_short: static LTR Short register value.
99  */
100 struct iwl_ltr_config_cmd_v1 {
101 	__le32 flags;
102 	__le32 static_long;
103 	__le32 static_short;
104 } __packed; /* LTR_CAPABLE_API_S_VER_1 */
105 
106 #define LTR_VALID_STATES_NUM 4
107 
108 /**
109  * struct iwl_ltr_config_cmd - configures the LTR
110  * @flags: See &enum iwl_ltr_config_flags
111  * @static_long: static LTR Long register value.
112  * @static_short: static LTR Short register value.
113  * @ltr_cfg_values: LTR parameters table values (in usec) in folowing order:
114  *	TX, RX, Short Idle, Long Idle. Used only if %LTR_CFG_FLAG_UPDATE_VALUES
115  *	is set.
116  * @ltr_short_idle_timeout: LTR Short Idle timeout (in usec). Used only if
117  *	%LTR_CFG_FLAG_UPDATE_VALUES is set.
118  */
119 struct iwl_ltr_config_cmd {
120 	__le32 flags;
121 	__le32 static_long;
122 	__le32 static_short;
123 	__le32 ltr_cfg_values[LTR_VALID_STATES_NUM];
124 	__le32 ltr_short_idle_timeout;
125 } __packed; /* LTR_CAPABLE_API_S_VER_2 */
126 
127 /* Radio LP RX Energy Threshold measured in dBm */
128 #define POWER_LPRX_RSSI_THRESHOLD	75
129 #define POWER_LPRX_RSSI_THRESHOLD_MAX	94
130 #define POWER_LPRX_RSSI_THRESHOLD_MIN	30
131 
132 /**
133  * enum iwl_power_flags - masks for power table command flags
134  * @POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
135  *		receiver and transmitter. '0' - does not allow.
136  * @POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management,
137  *		'1' Driver enables PM (use rest of parameters)
138  * @POWER_FLAGS_SKIP_OVER_DTIM_MSK: '0' PM have to walk up every DTIM,
139  *		'1' PM could sleep over DTIM till listen Interval.
140  * @POWER_FLAGS_SNOOZE_ENA_MSK: Enable snoozing only if uAPSD is enabled and all
141  *		access categories are both delivery and trigger enabled.
142  * @POWER_FLAGS_BT_SCO_ENA: Enable BT SCO coex only if uAPSD and
143  *		PBW Snoozing enabled
144  * @POWER_FLAGS_ADVANCE_PM_ENA_MSK: Advanced PM (uAPSD) enable mask
145  * @POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable.
146  * @POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK: AP/GO's uAPSD misbehaving
147  *		detection enablement
148 */
149 enum iwl_power_flags {
150 	POWER_FLAGS_POWER_SAVE_ENA_MSK		= BIT(0),
151 	POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK	= BIT(1),
152 	POWER_FLAGS_SKIP_OVER_DTIM_MSK		= BIT(2),
153 	POWER_FLAGS_SNOOZE_ENA_MSK		= BIT(5),
154 	POWER_FLAGS_BT_SCO_ENA			= BIT(8),
155 	POWER_FLAGS_ADVANCE_PM_ENA_MSK		= BIT(9),
156 	POWER_FLAGS_LPRX_ENA_MSK		= BIT(11),
157 	POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK	= BIT(12),
158 };
159 
160 #define IWL_POWER_VEC_SIZE 5
161 
162 /**
163  * struct iwl_powertable_cmd - legacy power command. Beside old API support this
164  *	is used also with a new	power API for device wide power settings.
165  * POWER_TABLE_CMD = 0x77 (command, has simple generic response)
166  *
167  * @flags:		Power table command flags from POWER_FLAGS_*
168  * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec.
169  *			Minimum allowed:- 3 * DTIM. Keep alive period must be
170  *			set regardless of power scheme or current power state.
171  *			FW use this value also when PM is disabled.
172  * @debug_flags:	debug flags
173  * @rx_data_timeout:    Minimum time (usec) from last Rx packet for AM to
174  *			PSM transition - legacy PM
175  * @tx_data_timeout:    Minimum time (usec) from last Tx packet for AM to
176  *			PSM transition - legacy PM
177  * @sleep_interval:	not in use
178  * @skip_dtim_periods:	Number of DTIM periods to skip if Skip over DTIM flag
179  *			is set. For example, if it is required to skip over
180  *			one DTIM, this value need to be set to 2 (DTIM periods).
181  * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled.
182  *			Default: 80dbm
183  */
184 struct iwl_powertable_cmd {
185 	/* PM_POWER_TABLE_CMD_API_S_VER_6 */
186 	__le16 flags;
187 	u8 keep_alive_seconds;
188 	u8 debug_flags;
189 	__le32 rx_data_timeout;
190 	__le32 tx_data_timeout;
191 	__le32 sleep_interval[IWL_POWER_VEC_SIZE];
192 	__le32 skip_dtim_periods;
193 	__le32 lprx_rssi_threshold;
194 } __packed;
195 
196 /**
197  * enum iwl_device_power_flags - masks for device power command flags
198  * @DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK:
199  *	'1' Allow to save power by turning off
200  *	receiver and transmitter. '0' - does not allow.
201 */
202 enum iwl_device_power_flags {
203 	DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK	= BIT(0),
204 };
205 
206 /**
207  * struct iwl_device_power_cmd - device wide power command.
208  * DEVICE_POWER_CMD = 0x77 (command, has simple generic response)
209  *
210  * @flags:	Power table command flags from &enum iwl_device_power_flags
211  * @reserved: reserved (padding)
212  */
213 struct iwl_device_power_cmd {
214 	/* PM_POWER_TABLE_CMD_API_S_VER_6 */
215 	__le16 flags;
216 	__le16 reserved;
217 } __packed;
218 
219 /**
220  * struct iwl_mac_power_cmd - New power command containing uAPSD support
221  * MAC_PM_POWER_TABLE = 0xA9 (command, has simple generic response)
222  * @id_and_color:	MAC contex identifier, &enum iwl_ctxt_id_and_color
223  * @flags:		Power table command flags from POWER_FLAGS_*
224  * @keep_alive_seconds:	Keep alive period in seconds. Default - 25 sec.
225  *			Minimum allowed:- 3 * DTIM. Keep alive period must be
226  *			set regardless of power scheme or current power state.
227  *			FW use this value also when PM is disabled.
228  * @rx_data_timeout:    Minimum time (usec) from last Rx packet for AM to
229  *			PSM transition - legacy PM
230  * @tx_data_timeout:    Minimum time (usec) from last Tx packet for AM to
231  *			PSM transition - legacy PM
232  * @skip_dtim_periods:	Number of DTIM periods to skip if Skip over DTIM flag
233  *			is set. For example, if it is required to skip over
234  *			one DTIM, this value need to be set to 2 (DTIM periods).
235  * @rx_data_timeout_uapsd: Minimum time (usec) from last Rx packet for AM to
236  *			PSM transition - uAPSD
237  * @tx_data_timeout_uapsd: Minimum time (usec) from last Tx packet for AM to
238  *			PSM transition - uAPSD
239  * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled.
240  *			Default: 80dbm
241  * @snooze_interval:	Maximum time between attempts to retrieve buffered data
242  *			from the AP [msec]
243  * @snooze_window:	A window of time in which PBW snoozing insures that all
244  *			packets received. It is also the minimum time from last
245  *			received unicast RX packet, before client stops snoozing
246  *			for data. [msec]
247  * @snooze_step:	TBD
248  * @qndp_tid:		TID client shall use for uAPSD QNDP triggers
249  * @uapsd_ac_flags:	Set trigger-enabled and delivery-enabled indication for
250  *			each corresponding AC.
251  *			Use IEEE80211_WMM_IE_STA_QOSINFO_AC* for correct values.
252  * @uapsd_max_sp:	Use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct
253  *			values.
254  * @heavy_tx_thld_packets:	TX threshold measured in number of packets
255  * @heavy_rx_thld_packets:	RX threshold measured in number of packets
256  * @heavy_tx_thld_percentage:	TX threshold measured in load's percentage
257  * @heavy_rx_thld_percentage:	RX threshold measured in load's percentage
258  * @limited_ps_threshold: (unused)
259  * @reserved: reserved (padding)
260  */
261 struct iwl_mac_power_cmd {
262 	/* CONTEXT_DESC_API_T_VER_1 */
263 	__le32 id_and_color;
264 
265 	/* CLIENT_PM_POWER_TABLE_S_VER_1 */
266 	__le16 flags;
267 	__le16 keep_alive_seconds;
268 	__le32 rx_data_timeout;
269 	__le32 tx_data_timeout;
270 	__le32 rx_data_timeout_uapsd;
271 	__le32 tx_data_timeout_uapsd;
272 	u8 lprx_rssi_threshold;
273 	u8 skip_dtim_periods;
274 	__le16 snooze_interval;
275 	__le16 snooze_window;
276 	u8 snooze_step;
277 	u8 qndp_tid;
278 	u8 uapsd_ac_flags;
279 	u8 uapsd_max_sp;
280 	u8 heavy_tx_thld_packets;
281 	u8 heavy_rx_thld_packets;
282 	u8 heavy_tx_thld_percentage;
283 	u8 heavy_rx_thld_percentage;
284 	u8 limited_ps_threshold;
285 	u8 reserved;
286 } __packed;
287 
288 /*
289  * struct iwl_uapsd_misbehaving_ap_notif - FW sends this notification when
290  * associated AP is identified as improperly implementing uAPSD protocol.
291  * PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78
292  * @sta_id: index of station in uCode's station table - associated AP ID in
293  *	    this context.
294  */
295 struct iwl_uapsd_misbehaving_ap_notif {
296 	__le32 sta_id;
297 	u8 mac_id;
298 	u8 reserved[3];
299 } __packed;
300 
301 /**
302  * struct iwl_reduce_tx_power_cmd - TX power reduction command
303  * REDUCE_TX_POWER_CMD = 0x9f
304  * @flags: (reserved for future implementation)
305  * @mac_context_id: id of the mac ctx for which we are reducing TX power.
306  * @pwr_restriction: TX power restriction in dBms.
307  */
308 struct iwl_reduce_tx_power_cmd {
309 	u8 flags;
310 	u8 mac_context_id;
311 	__le16 pwr_restriction;
312 } __packed; /* TX_REDUCED_POWER_API_S_VER_1 */
313 
314 enum iwl_dev_tx_power_cmd_mode {
315 	IWL_TX_POWER_MODE_SET_MAC = 0,
316 	IWL_TX_POWER_MODE_SET_DEVICE = 1,
317 	IWL_TX_POWER_MODE_SET_CHAINS = 2,
318 	IWL_TX_POWER_MODE_SET_ACK = 3,
319 }; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_4 */;
320 
321 #define IWL_NUM_CHAIN_LIMITS	2
322 #define IWL_NUM_SUB_BANDS	5
323 
324 /**
325  * struct iwl_dev_tx_power_cmd - TX power reduction command
326  * @set_mode: see &enum iwl_dev_tx_power_cmd_mode
327  * @mac_context_id: id of the mac ctx for which we are reducing TX power.
328  * @pwr_restriction: TX power restriction in 1/8 dBms.
329  * @dev_24: device TX power restriction in 1/8 dBms
330  * @dev_52_low: device TX power restriction upper band - low
331  * @dev_52_high: device TX power restriction upper band - high
332  * @per_chain_restriction: per chain restrictions
333  */
334 struct iwl_dev_tx_power_cmd_v3 {
335 	__le32 set_mode;
336 	__le32 mac_context_id;
337 	__le16 pwr_restriction;
338 	__le16 dev_24;
339 	__le16 dev_52_low;
340 	__le16 dev_52_high;
341 	__le16 per_chain_restriction[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS];
342 } __packed; /* TX_REDUCED_POWER_API_S_VER_3 */
343 
344 #define IWL_DEV_MAX_TX_POWER 0x7FFF
345 
346 /**
347  * struct iwl_dev_tx_power_cmd - TX power reduction command
348  * @v3: version 3 of the command, embedded here for easier software handling
349  * @enable_ack_reduction: enable or disable close range ack TX power
350  *	reduction.
351  * @reserved: reserved (padding)
352  */
353 struct iwl_dev_tx_power_cmd {
354 	/* v4 is just an extension of v3 - keep this here */
355 	struct iwl_dev_tx_power_cmd_v3 v3;
356 	u8 enable_ack_reduction;
357 	u8 reserved[3];
358 } __packed; /* TX_REDUCED_POWER_API_S_VER_4 */
359 
360 #define IWL_NUM_GEO_PROFILES   3
361 
362 /**
363  * enum iwl_geo_per_chain_offset_operation - type of operation
364  * @IWL_PER_CHAIN_OFFSET_SET_TABLES: send the tables from the host to the FW.
365  * @IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE: retrieve the last configured table.
366  */
367 enum iwl_geo_per_chain_offset_operation {
368 	IWL_PER_CHAIN_OFFSET_SET_TABLES,
369 	IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE,
370 };  /* GEO_TX_POWER_LIMIT FLAGS TYPE */
371 
372 /**
373  * struct iwl_per_chain_offset - embedded struct for GEO_TX_POWER_LIMIT.
374  * @max_tx_power: maximum allowed tx power.
375  * @chain_a: tx power offset for chain a.
376  * @chain_b: tx power offset for chain b.
377  */
378 struct iwl_per_chain_offset {
379 	__le16 max_tx_power;
380 	u8 chain_a;
381 	u8 chain_b;
382 } __packed; /* PER_CHAIN_LIMIT_OFFSET_PER_CHAIN_S_VER_1 */
383 
384 struct iwl_per_chain_offset_group {
385 	struct iwl_per_chain_offset lb;
386 	struct iwl_per_chain_offset hb;
387 } __packed; /* PER_CHAIN_LIMIT_OFFSET_GROUP_S_VER_1 */
388 
389 /**
390  * struct iwl_geo_tx_power_profile_cmd - struct for GEO_TX_POWER_LIMIT cmd.
391  * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
392  * @table: offset profile per band.
393  */
394 struct iwl_geo_tx_power_profiles_cmd {
395 	__le32 ops;
396 	struct iwl_per_chain_offset_group table[IWL_NUM_GEO_PROFILES];
397 } __packed; /* GEO_TX_POWER_LIMIT */
398 
399 /**
400  * struct iwl_geo_tx_power_profiles_resp -  response to GEO_TX_POWER_LIMIT cmd
401  * @profile_idx: current geo profile in use
402  */
403 struct iwl_geo_tx_power_profiles_resp {
404 	__le32 profile_idx;
405 } __packed; /* GEO_TX_POWER_LIMIT_RESP */
406 
407 /**
408  * struct iwl_beacon_filter_cmd
409  * REPLY_BEACON_FILTERING_CMD = 0xd2 (command)
410  * @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon
411  *      to driver if delta in Energy values calculated for this and last
412  *      passed beacon is greater than this threshold. Zero value means that
413  *      the Energy change is ignored for beacon filtering, and beacon will
414  *      not be forced to be sent to driver regardless of this delta. Typical
415  *      energy delta 5dB.
416  * @bf_roaming_energy_delta: Used for RSSI filtering, if in 'roaming' state.
417  *      Send beacon to driver if delta in Energy values calculated for this
418  *      and last passed beacon is greater than this threshold. Zero value
419  *      means that the Energy change is ignored for beacon filtering while in
420  *      Roaming state, typical energy delta 1dB.
421  * @bf_roaming_state: Used for RSSI filtering. If absolute Energy values
422  *      calculated for current beacon is less than the threshold, use
423  *      Roaming Energy Delta Threshold, otherwise use normal Energy Delta
424  *      Threshold. Typical energy threshold is -72dBm.
425  * @bf_temp_threshold: This threshold determines the type of temperature
426  *	filtering (Slow or Fast) that is selected (Units are in Celsuis):
427  *	If the current temperature is above this threshold - Fast filter
428  *	will be used, If the current temperature is below this threshold -
429  *	Slow filter will be used.
430  * @bf_temp_fast_filter: Send Beacon to driver if delta in temperature values
431  *      calculated for this and the last passed beacon is greater than this
432  *      threshold. Zero value means that the temperature change is ignored for
433  *      beacon filtering; beacons will not be  forced to be sent to driver
434  *      regardless of whether its temerature has been changed.
435  * @bf_temp_slow_filter: Send Beacon to driver if delta in temperature values
436  *      calculated for this and the last passed beacon is greater than this
437  *      threshold. Zero value means that the temperature change is ignored for
438  *      beacon filtering; beacons will not be forced to be sent to driver
439  *      regardless of whether its temerature has been changed.
440  * @bf_enable_beacon_filter: 1, beacon filtering is enabled; 0, disabled.
441  * @bf_debug_flag: beacon filtering debug configuration
442  * @bf_escape_timer: Send beacons to to driver if no beacons were passed
443  *      for a specific period of time. Units: Beacons.
444  * @ba_escape_timer: Fully receive and parse beacon if no beacons were passed
445  *      for a longer period of time then this escape-timeout. Units: Beacons.
446  * @ba_enable_beacon_abort: 1, beacon abort is enabled; 0, disabled.
447  */
448 struct iwl_beacon_filter_cmd {
449 	__le32 bf_energy_delta;
450 	__le32 bf_roaming_energy_delta;
451 	__le32 bf_roaming_state;
452 	__le32 bf_temp_threshold;
453 	__le32 bf_temp_fast_filter;
454 	__le32 bf_temp_slow_filter;
455 	__le32 bf_enable_beacon_filter;
456 	__le32 bf_debug_flag;
457 	__le32 bf_escape_timer;
458 	__le32 ba_escape_timer;
459 	__le32 ba_enable_beacon_abort;
460 } __packed;
461 
462 /* Beacon filtering and beacon abort */
463 #define IWL_BF_ENERGY_DELTA_DEFAULT 5
464 #define IWL_BF_ENERGY_DELTA_D0I3 20
465 #define IWL_BF_ENERGY_DELTA_MAX 255
466 #define IWL_BF_ENERGY_DELTA_MIN 0
467 
468 #define IWL_BF_ROAMING_ENERGY_DELTA_DEFAULT 1
469 #define IWL_BF_ROAMING_ENERGY_DELTA_D0I3 20
470 #define IWL_BF_ROAMING_ENERGY_DELTA_MAX 255
471 #define IWL_BF_ROAMING_ENERGY_DELTA_MIN 0
472 
473 #define IWL_BF_ROAMING_STATE_DEFAULT 72
474 #define IWL_BF_ROAMING_STATE_D0I3 72
475 #define IWL_BF_ROAMING_STATE_MAX 255
476 #define IWL_BF_ROAMING_STATE_MIN 0
477 
478 #define IWL_BF_TEMP_THRESHOLD_DEFAULT 112
479 #define IWL_BF_TEMP_THRESHOLD_D0I3 112
480 #define IWL_BF_TEMP_THRESHOLD_MAX 255
481 #define IWL_BF_TEMP_THRESHOLD_MIN 0
482 
483 #define IWL_BF_TEMP_FAST_FILTER_DEFAULT 1
484 #define IWL_BF_TEMP_FAST_FILTER_D0I3 1
485 #define IWL_BF_TEMP_FAST_FILTER_MAX 255
486 #define IWL_BF_TEMP_FAST_FILTER_MIN 0
487 
488 #define IWL_BF_TEMP_SLOW_FILTER_DEFAULT 5
489 #define IWL_BF_TEMP_SLOW_FILTER_D0I3 20
490 #define IWL_BF_TEMP_SLOW_FILTER_MAX 255
491 #define IWL_BF_TEMP_SLOW_FILTER_MIN 0
492 
493 #define IWL_BF_ENABLE_BEACON_FILTER_DEFAULT 1
494 
495 #define IWL_BF_DEBUG_FLAG_DEFAULT 0
496 #define IWL_BF_DEBUG_FLAG_D0I3 0
497 
498 #define IWL_BF_ESCAPE_TIMER_DEFAULT 0
499 #define IWL_BF_ESCAPE_TIMER_D0I3 0
500 #define IWL_BF_ESCAPE_TIMER_MAX 1024
501 #define IWL_BF_ESCAPE_TIMER_MIN 0
502 
503 #define IWL_BA_ESCAPE_TIMER_DEFAULT 6
504 #define IWL_BA_ESCAPE_TIMER_D0I3 6
505 #define IWL_BA_ESCAPE_TIMER_D3 9
506 #define IWL_BA_ESCAPE_TIMER_MAX 1024
507 #define IWL_BA_ESCAPE_TIMER_MIN 0
508 
509 #define IWL_BA_ENABLE_BEACON_ABORT_DEFAULT 1
510 
511 #define IWL_BF_CMD_CONFIG(mode)					     \
512 	.bf_energy_delta = cpu_to_le32(IWL_BF_ENERGY_DELTA ## mode),	      \
513 	.bf_roaming_energy_delta =					      \
514 		cpu_to_le32(IWL_BF_ROAMING_ENERGY_DELTA ## mode),	      \
515 	.bf_roaming_state = cpu_to_le32(IWL_BF_ROAMING_STATE ## mode),	      \
516 	.bf_temp_threshold = cpu_to_le32(IWL_BF_TEMP_THRESHOLD ## mode),      \
517 	.bf_temp_fast_filter = cpu_to_le32(IWL_BF_TEMP_FAST_FILTER ## mode),  \
518 	.bf_temp_slow_filter = cpu_to_le32(IWL_BF_TEMP_SLOW_FILTER ## mode),  \
519 	.bf_debug_flag = cpu_to_le32(IWL_BF_DEBUG_FLAG ## mode),	      \
520 	.bf_escape_timer = cpu_to_le32(IWL_BF_ESCAPE_TIMER ## mode),	      \
521 	.ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER ## mode)
522 
523 #define IWL_BF_CMD_CONFIG_DEFAULTS IWL_BF_CMD_CONFIG(_DEFAULT)
524 #define IWL_BF_CMD_CONFIG_D0I3 IWL_BF_CMD_CONFIG(_D0I3)
525 #endif /* __iwl_fw_api_power_h__ */
526