]>
Commit | Line | Data |
---|---|---|
8ca151b5 JB |
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 | * | |
51368bf7 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
8b4139dc | 9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
8ca151b5 JB |
10 | * |
11 | * This program is free software; you can redistribute it and/or modify | |
12 | * it under the terms of version 2 of the GNU General Public License as | |
13 | * published by the Free Software Foundation. | |
14 | * | |
15 | * This program is distributed in the hope that it will be useful, but | |
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | * General Public License for more details. | |
19 | * | |
20 | * You should have received a copy of the GNU General Public License | |
21 | * along with this program; if not, write to the Free Software | |
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | |
23 | * USA | |
24 | * | |
25 | * The full GNU General Public License is included in this distribution | |
410dc5aa | 26 | * in the file called COPYING. |
8ca151b5 JB |
27 | * |
28 | * Contact Information: | |
29 | * Intel Linux Wireless <ilw@linux.intel.com> | |
30 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | |
31 | * | |
32 | * BSD LICENSE | |
33 | * | |
51368bf7 | 34 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
8b4139dc | 35 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
8ca151b5 JB |
36 | * All rights reserved. |
37 | * | |
38 | * Redistribution and use in source and binary forms, with or without | |
39 | * modification, are permitted provided that the following conditions | |
40 | * are met: | |
41 | * | |
42 | * * Redistributions of source code must retain the above copyright | |
43 | * notice, this list of conditions and the following disclaimer. | |
44 | * * Redistributions in binary form must reproduce the above copyright | |
45 | * notice, this list of conditions and the following disclaimer in | |
46 | * the documentation and/or other materials provided with the | |
47 | * distribution. | |
48 | * * Neither the name Intel Corporation nor the names of its | |
49 | * contributors may be used to endorse or promote products derived | |
50 | * from this software without specific prior written permission. | |
51 | * | |
52 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
53 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
54 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
55 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
56 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
57 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
58 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
59 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
60 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
61 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
62 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
63 | * | |
64 | *****************************************************************************/ | |
65 | ||
66 | #ifndef __fw_api_power_h__ | |
67 | #define __fw_api_power_h__ | |
68 | ||
69 | /* Power Management Commands, Responses, Notifications */ | |
70 | ||
9180ac50 EG |
71 | /** |
72 | * enum iwl_ltr_config_flags - masks for LTR config command flags | |
73 | * @LTR_CFG_FLAG_FEATURE_ENABLE: Feature operational status | |
74 | * @LTR_CFG_FLAG_HW_DIS_ON_SHADOW_REG_ACCESS: allow LTR change on shadow | |
75 | * memory access | |
76 | * @LTR_CFG_FLAG_HW_EN_SHRT_WR_THROUGH: allow LTR msg send on ANY LTR | |
77 | * reg change | |
78 | * @LTR_CFG_FLAG_HW_DIS_ON_D0_2_D3: allow LTR msg send on transition from | |
79 | * D0 to D3 | |
80 | * @LTR_CFG_FLAG_SW_SET_SHORT: fixed static short LTR register | |
81 | * @LTR_CFG_FLAG_SW_SET_LONG: fixed static short LONG register | |
82 | * @LTR_CFG_FLAG_DENIE_C10_ON_PD: allow going into C10 on PD | |
83 | */ | |
84 | enum iwl_ltr_config_flags { | |
85 | LTR_CFG_FLAG_FEATURE_ENABLE = BIT(0), | |
86 | LTR_CFG_FLAG_HW_DIS_ON_SHADOW_REG_ACCESS = BIT(1), | |
87 | LTR_CFG_FLAG_HW_EN_SHRT_WR_THROUGH = BIT(2), | |
88 | LTR_CFG_FLAG_HW_DIS_ON_D0_2_D3 = BIT(3), | |
89 | LTR_CFG_FLAG_SW_SET_SHORT = BIT(4), | |
90 | LTR_CFG_FLAG_SW_SET_LONG = BIT(5), | |
91 | LTR_CFG_FLAG_DENIE_C10_ON_PD = BIT(6), | |
92 | }; | |
93 | ||
84bfffa9 EG |
94 | /** |
95 | * struct iwl_ltr_config_cmd_v1 - configures the LTR | |
96 | * @flags: See %enum iwl_ltr_config_flags | |
97 | */ | |
98 | struct iwl_ltr_config_cmd_v1 { | |
99 | __le32 flags; | |
100 | __le32 static_long; | |
101 | __le32 static_short; | |
102 | } __packed; /* LTR_CAPABLE_API_S_VER_1 */ | |
103 | ||
104 | #define LTR_VALID_STATES_NUM 4 | |
105 | ||
9180ac50 EG |
106 | /** |
107 | * struct iwl_ltr_config_cmd - configures the LTR | |
108 | * @flags: See %enum iwl_ltr_config_flags | |
84bfffa9 EG |
109 | * @static_long: |
110 | * @static_short: | |
111 | * @ltr_cfg_values: | |
112 | * @ltr_short_idle_timeout: | |
9180ac50 EG |
113 | */ |
114 | struct iwl_ltr_config_cmd { | |
115 | __le32 flags; | |
116 | __le32 static_long; | |
117 | __le32 static_short; | |
84bfffa9 EG |
118 | __le32 ltr_cfg_values[LTR_VALID_STATES_NUM]; |
119 | __le32 ltr_short_idle_timeout; | |
120 | } __packed; /* LTR_CAPABLE_API_S_VER_2 */ | |
9180ac50 | 121 | |
bd4ace2a AB |
122 | /* Radio LP RX Energy Threshold measured in dBm */ |
123 | #define POWER_LPRX_RSSI_THRESHOLD 75 | |
124 | #define POWER_LPRX_RSSI_THRESHOLD_MAX 94 | |
125 | #define POWER_LPRX_RSSI_THRESHOLD_MIN 30 | |
126 | ||
8ca151b5 | 127 | /** |
9180ac50 | 128 | * enum iwl_power_flags - masks for power table command flags |
83bdad52 AB |
129 | * @POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off |
130 | * receiver and transmitter. '0' - does not allow. | |
8ca151b5 JB |
131 | * @POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management, |
132 | * '1' Driver enables PM (use rest of parameters) | |
f4a3e2fe | 133 | * @POWER_FLAGS_SKIP_OVER_DTIM_MSK: '0' PM have to walk up every DTIM, |
8ca151b5 | 134 | * '1' PM could sleep over DTIM till listen Interval. |
e811ada7 AB |
135 | * @POWER_FLAGS_SNOOZE_ENA_MSK: Enable snoozing only if uAPSD is enabled and all |
136 | * access categories are both delivery and trigger enabled. | |
137 | * @POWER_FLAGS_BT_SCO_ENA: Enable BT SCO coex only if uAPSD and | |
138 | * PBW Snoozing enabled | |
8ca151b5 | 139 | * @POWER_FLAGS_ADVANCE_PM_ENA_MSK: Advanced PM (uAPSD) enable mask |
83bdad52 | 140 | * @POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable. |
175a70b7 AB |
141 | * @POWER_FLAGS_AP_UAPSD_MISBEHAVING_ENA_MSK: AP/GO's uAPSD misbehaving |
142 | * detection enablement | |
8ca151b5 JB |
143 | */ |
144 | enum iwl_power_flags { | |
83bdad52 AB |
145 | POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), |
146 | POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK = BIT(1), | |
f4a3e2fe | 147 | POWER_FLAGS_SKIP_OVER_DTIM_MSK = BIT(2), |
e811ada7 AB |
148 | POWER_FLAGS_SNOOZE_ENA_MSK = BIT(5), |
149 | POWER_FLAGS_BT_SCO_ENA = BIT(8), | |
83bdad52 AB |
150 | POWER_FLAGS_ADVANCE_PM_ENA_MSK = BIT(9), |
151 | POWER_FLAGS_LPRX_ENA_MSK = BIT(11), | |
175a70b7 | 152 | POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK = BIT(12), |
8ca151b5 JB |
153 | }; |
154 | ||
83bdad52 AB |
155 | #define IWL_POWER_VEC_SIZE 5 |
156 | ||
8ca151b5 | 157 | /** |
e811ada7 AB |
158 | * struct iwl_powertable_cmd - legacy power command. Beside old API support this |
159 | * is used also with a new power API for device wide power settings. | |
8ca151b5 JB |
160 | * POWER_TABLE_CMD = 0x77 (command, has simple generic response) |
161 | * | |
8ca151b5 JB |
162 | * @flags: Power table command flags from POWER_FLAGS_* |
163 | * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec. | |
e16cf7ec AB |
164 | * Minimum allowed:- 3 * DTIM. Keep alive period must be |
165 | * set regardless of power scheme or current power state. | |
166 | * FW use this value also when PM is disabled. | |
8ca151b5 JB |
167 | * @rx_data_timeout: Minimum time (usec) from last Rx packet for AM to |
168 | * PSM transition - legacy PM | |
169 | * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to | |
170 | * PSM transition - legacy PM | |
83bdad52 | 171 | * @sleep_interval: not in use |
1bd2d175 AB |
172 | * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag |
173 | * is set. For example, if it is required to skip over | |
174 | * one DTIM, this value need to be set to 2 (DTIM periods). | |
8ca151b5 JB |
175 | * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. |
176 | * Default: 80dbm | |
8ca151b5 JB |
177 | */ |
178 | struct iwl_powertable_cmd { | |
5b1dbfc3 | 179 | /* PM_POWER_TABLE_CMD_API_S_VER_6 */ |
8ca151b5 | 180 | __le16 flags; |
83bdad52 AB |
181 | u8 keep_alive_seconds; |
182 | u8 debug_flags; | |
8ca151b5 JB |
183 | __le32 rx_data_timeout; |
184 | __le32 tx_data_timeout; | |
83bdad52 | 185 | __le32 sleep_interval[IWL_POWER_VEC_SIZE]; |
1bd2d175 | 186 | __le32 skip_dtim_periods; |
83bdad52 | 187 | __le32 lprx_rssi_threshold; |
8ca151b5 JB |
188 | } __packed; |
189 | ||
64b928c4 AB |
190 | /** |
191 | * enum iwl_device_power_flags - masks for device power command flags | |
192 | * @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off | |
193 | * receiver and transmitter. '0' - does not allow. This flag should be | |
194 | * always set to '1' unless one need to disable actual power down for debug | |
195 | * purposes. | |
196 | * @DEVICE_POWER_FLAGS_CAM_MSK: '1' CAM (Continuous Active Mode) is set, meaning | |
197 | * that power management is disabled. '0' Power management is enabled, one | |
198 | * of power schemes is applied. | |
199 | */ | |
200 | enum iwl_device_power_flags { | |
201 | DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), | |
202 | DEVICE_POWER_FLAGS_CAM_MSK = BIT(13), | |
203 | }; | |
204 | ||
205 | /** | |
206 | * struct iwl_device_power_cmd - device wide power command. | |
207 | * DEVICE_POWER_CMD = 0x77 (command, has simple generic response) | |
208 | * | |
209 | * @flags: Power table command flags from DEVICE_POWER_FLAGS_* | |
210 | */ | |
211 | struct iwl_device_power_cmd { | |
212 | /* PM_POWER_TABLE_CMD_API_S_VER_6 */ | |
213 | __le16 flags; | |
214 | __le16 reserved; | |
215 | } __packed; | |
216 | ||
e811ada7 AB |
217 | /** |
218 | * struct iwl_mac_power_cmd - New power command containing uAPSD support | |
219 | * MAC_PM_POWER_TABLE = 0xA9 (command, has simple generic response) | |
220 | * @id_and_color: MAC contex identifier | |
221 | * @flags: Power table command flags from POWER_FLAGS_* | |
222 | * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec. | |
223 | * Minimum allowed:- 3 * DTIM. Keep alive period must be | |
224 | * set regardless of power scheme or current power state. | |
225 | * FW use this value also when PM is disabled. | |
226 | * @rx_data_timeout: Minimum time (usec) from last Rx packet for AM to | |
227 | * PSM transition - legacy PM | |
228 | * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to | |
229 | * PSM transition - legacy PM | |
230 | * @sleep_interval: not in use | |
231 | * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag | |
232 | * is set. For example, if it is required to skip over | |
233 | * one DTIM, this value need to be set to 2 (DTIM periods). | |
234 | * @rx_data_timeout_uapsd: Minimum time (usec) from last Rx packet for AM to | |
235 | * PSM transition - uAPSD | |
236 | * @tx_data_timeout_uapsd: Minimum time (usec) from last Tx packet for AM to | |
237 | * PSM transition - uAPSD | |
238 | * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. | |
239 | * Default: 80dbm | |
240 | * @num_skip_dtim: Number of DTIMs to skip if Skip over DTIM flag is set | |
89716344 AB |
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] | |
e811ada7 AB |
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. | |
e3c588ec AB |
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 | |
e811ada7 AB |
258 | * @limited_ps_threshold: |
259 | */ | |
260 | struct iwl_mac_power_cmd { | |
261 | /* CONTEXT_DESC_API_T_VER_1 */ | |
262 | __le32 id_and_color; | |
263 | ||
264 | /* CLIENT_PM_POWER_TABLE_S_VER_1 */ | |
265 | __le16 flags; | |
266 | __le16 keep_alive_seconds; | |
267 | __le32 rx_data_timeout; | |
268 | __le32 tx_data_timeout; | |
269 | __le32 rx_data_timeout_uapsd; | |
270 | __le32 tx_data_timeout_uapsd; | |
271 | u8 lprx_rssi_threshold; | |
272 | u8 skip_dtim_periods; | |
273 | __le16 snooze_interval; | |
274 | __le16 snooze_window; | |
275 | u8 snooze_step; | |
276 | u8 qndp_tid; | |
277 | u8 uapsd_ac_flags; | |
278 | u8 uapsd_max_sp; | |
e3c588ec AB |
279 | u8 heavy_tx_thld_packets; |
280 | u8 heavy_rx_thld_packets; | |
281 | u8 heavy_tx_thld_percentage; | |
282 | u8 heavy_rx_thld_percentage; | |
e811ada7 AB |
283 | u8 limited_ps_threshold; |
284 | u8 reserved; | |
285 | } __packed; | |
286 | ||
175a70b7 AB |
287 | /* |
288 | * struct iwl_uapsd_misbehaving_ap_notif - FW sends this notification when | |
289 | * associated AP is identified as improperly implementing uAPSD protocol. | |
290 | * PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78 | |
291 | * @sta_id: index of station in uCode's station table - associated AP ID in | |
292 | * this context. | |
293 | */ | |
294 | struct iwl_uapsd_misbehaving_ap_notif { | |
295 | __le32 sta_id; | |
296 | u8 mac_id; | |
297 | u8 reserved[3]; | |
298 | } __packed; | |
299 | ||
d44c3fe6 AA |
300 | /** |
301 | * struct iwl_reduce_tx_power_cmd - TX power reduction command | |
302 | * REDUCE_TX_POWER_CMD = 0x9f | |
303 | * @flags: (reserved for future implementation) | |
304 | * @mac_context_id: id of the mac ctx for which we are reducing TX power. | |
305 | * @pwr_restriction: TX power restriction in dBms. | |
306 | */ | |
307 | struct iwl_reduce_tx_power_cmd { | |
308 | u8 flags; | |
309 | u8 mac_context_id; | |
310 | __le16 pwr_restriction; | |
311 | } __packed; /* TX_REDUCED_POWER_API_S_VER_1 */ | |
312 | ||
313 | /** | |
314 | * struct iwl_dev_tx_power_cmd - TX power reduction command | |
315 | * REDUCE_TX_POWER_CMD = 0x9f | |
316 | * @set_mode: 0 - MAC tx power, 1 - device tx power | |
317 | * @mac_context_id: id of the mac ctx for which we are reducing TX power. | |
318 | * @pwr_restriction: TX power restriction in 1/8 dBms. | |
319 | * @dev_24: device TX power restriction in 1/8 dBms | |
320 | * @dev_52_low: device TX power restriction upper band - low | |
321 | * @dev_52_high: device TX power restriction upper band - high | |
322 | */ | |
323 | struct iwl_dev_tx_power_cmd { | |
324 | __le32 set_mode; | |
325 | __le32 mac_context_id; | |
326 | __le16 pwr_restriction; | |
327 | __le16 dev_24; | |
328 | __le16 dev_52_low; | |
329 | __le16 dev_52_high; | |
330 | } __packed; /* TX_REDUCED_POWER_API_S_VER_2 */ | |
331 | ||
332 | #define IWL_DEV_MAX_TX_POWER 0x7FFF | |
333 | ||
7df15b1e HG |
334 | /** |
335 | * struct iwl_beacon_filter_cmd | |
336 | * REPLY_BEACON_FILTERING_CMD = 0xd2 (command) | |
337 | * @id_and_color: MAC contex identifier | |
338 | * @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon | |
339 | * to driver if delta in Energy values calculated for this and last | |
340 | * passed beacon is greater than this threshold. Zero value means that | |
341 | * the Energy change is ignored for beacon filtering, and beacon will | |
342 | * not be forced to be sent to driver regardless of this delta. Typical | |
343 | * energy delta 5dB. | |
344 | * @bf_roaming_energy_delta: Used for RSSI filtering, if in 'roaming' state. | |
345 | * Send beacon to driver if delta in Energy values calculated for this | |
346 | * and last passed beacon is greater than this threshold. Zero value | |
347 | * means that the Energy change is ignored for beacon filtering while in | |
348 | * Roaming state, typical energy delta 1dB. | |
349 | * @bf_roaming_state: Used for RSSI filtering. If absolute Energy values | |
350 | * calculated for current beacon is less than the threshold, use | |
351 | * Roaming Energy Delta Threshold, otherwise use normal Energy Delta | |
352 | * Threshold. Typical energy threshold is -72dBm. | |
5dca7c24 HG |
353 | * @bf_temp_threshold: This threshold determines the type of temperature |
354 | * filtering (Slow or Fast) that is selected (Units are in Celsuis): | |
355 | * If the current temperature is above this threshold - Fast filter | |
356 | * will be used, If the current temperature is below this threshold - | |
357 | * Slow filter will be used. | |
358 | * @bf_temp_fast_filter: Send Beacon to driver if delta in temperature values | |
359 | * calculated for this and the last passed beacon is greater than this | |
360 | * threshold. Zero value means that the temperature change is ignored for | |
7df15b1e HG |
361 | * beacon filtering; beacons will not be forced to be sent to driver |
362 | * regardless of whether its temerature has been changed. | |
5dca7c24 HG |
363 | * @bf_temp_slow_filter: Send Beacon to driver if delta in temperature values |
364 | * calculated for this and the last passed beacon is greater than this | |
365 | * threshold. Zero value means that the temperature change is ignored for | |
366 | * beacon filtering; beacons will not be forced to be sent to driver | |
367 | * regardless of whether its temerature has been changed. | |
7df15b1e HG |
368 | * @bf_enable_beacon_filter: 1, beacon filtering is enabled; 0, disabled. |
369 | * @bf_filter_escape_timer: Send beacons to to driver if no beacons were passed | |
370 | * for a specific period of time. Units: Beacons. | |
371 | * @ba_escape_timer: Fully receive and parse beacon if no beacons were passed | |
372 | * for a longer period of time then this escape-timeout. Units: Beacons. | |
373 | * @ba_enable_beacon_abort: 1, beacon abort is enabled; 0, disabled. | |
374 | */ | |
375 | struct iwl_beacon_filter_cmd { | |
5dca7c24 HG |
376 | __le32 bf_energy_delta; |
377 | __le32 bf_roaming_energy_delta; | |
378 | __le32 bf_roaming_state; | |
379 | __le32 bf_temp_threshold; | |
380 | __le32 bf_temp_fast_filter; | |
381 | __le32 bf_temp_slow_filter; | |
382 | __le32 bf_enable_beacon_filter; | |
383 | __le32 bf_debug_flag; | |
7df15b1e HG |
384 | __le32 bf_escape_timer; |
385 | __le32 ba_escape_timer; | |
5dca7c24 | 386 | __le32 ba_enable_beacon_abort; |
7df15b1e HG |
387 | } __packed; |
388 | ||
389 | /* Beacon filtering and beacon abort */ | |
390 | #define IWL_BF_ENERGY_DELTA_DEFAULT 5 | |
3dd37d05 | 391 | #define IWL_BF_ENERGY_DELTA_D0I3 20 |
7df15b1e HG |
392 | #define IWL_BF_ENERGY_DELTA_MAX 255 |
393 | #define IWL_BF_ENERGY_DELTA_MIN 0 | |
394 | ||
395 | #define IWL_BF_ROAMING_ENERGY_DELTA_DEFAULT 1 | |
3dd37d05 | 396 | #define IWL_BF_ROAMING_ENERGY_DELTA_D0I3 20 |
7df15b1e HG |
397 | #define IWL_BF_ROAMING_ENERGY_DELTA_MAX 255 |
398 | #define IWL_BF_ROAMING_ENERGY_DELTA_MIN 0 | |
399 | ||
400 | #define IWL_BF_ROAMING_STATE_DEFAULT 72 | |
3dd37d05 | 401 | #define IWL_BF_ROAMING_STATE_D0I3 72 |
7df15b1e HG |
402 | #define IWL_BF_ROAMING_STATE_MAX 255 |
403 | #define IWL_BF_ROAMING_STATE_MIN 0 | |
404 | ||
5dca7c24 | 405 | #define IWL_BF_TEMP_THRESHOLD_DEFAULT 112 |
3dd37d05 | 406 | #define IWL_BF_TEMP_THRESHOLD_D0I3 112 |
5dca7c24 HG |
407 | #define IWL_BF_TEMP_THRESHOLD_MAX 255 |
408 | #define IWL_BF_TEMP_THRESHOLD_MIN 0 | |
409 | ||
410 | #define IWL_BF_TEMP_FAST_FILTER_DEFAULT 1 | |
3dd37d05 | 411 | #define IWL_BF_TEMP_FAST_FILTER_D0I3 1 |
5dca7c24 HG |
412 | #define IWL_BF_TEMP_FAST_FILTER_MAX 255 |
413 | #define IWL_BF_TEMP_FAST_FILTER_MIN 0 | |
414 | ||
415 | #define IWL_BF_TEMP_SLOW_FILTER_DEFAULT 5 | |
3dd37d05 | 416 | #define IWL_BF_TEMP_SLOW_FILTER_D0I3 5 |
5dca7c24 HG |
417 | #define IWL_BF_TEMP_SLOW_FILTER_MAX 255 |
418 | #define IWL_BF_TEMP_SLOW_FILTER_MIN 0 | |
7df15b1e HG |
419 | |
420 | #define IWL_BF_ENABLE_BEACON_FILTER_DEFAULT 1 | |
421 | ||
422 | #define IWL_BF_DEBUG_FLAG_DEFAULT 0 | |
3dd37d05 | 423 | #define IWL_BF_DEBUG_FLAG_D0I3 0 |
7df15b1e | 424 | |
fb68e1a4 | 425 | #define IWL_BF_ESCAPE_TIMER_DEFAULT 0 |
50675360 | 426 | #define IWL_BF_ESCAPE_TIMER_D0I3 0 |
7df15b1e HG |
427 | #define IWL_BF_ESCAPE_TIMER_MAX 1024 |
428 | #define IWL_BF_ESCAPE_TIMER_MIN 0 | |
429 | ||
8434925f | 430 | #define IWL_BA_ESCAPE_TIMER_DEFAULT 6 |
3dd37d05 | 431 | #define IWL_BA_ESCAPE_TIMER_D0I3 6 |
b34b912f | 432 | #define IWL_BA_ESCAPE_TIMER_D3 9 |
7df15b1e HG |
433 | #define IWL_BA_ESCAPE_TIMER_MAX 1024 |
434 | #define IWL_BA_ESCAPE_TIMER_MIN 0 | |
435 | ||
436 | #define IWL_BA_ENABLE_BEACON_ABORT_DEFAULT 1 | |
437 | ||
3dd37d05 EP |
438 | #define IWL_BF_CMD_CONFIG(mode) \ |
439 | .bf_energy_delta = cpu_to_le32(IWL_BF_ENERGY_DELTA ## mode), \ | |
440 | .bf_roaming_energy_delta = \ | |
441 | cpu_to_le32(IWL_BF_ROAMING_ENERGY_DELTA ## mode), \ | |
442 | .bf_roaming_state = cpu_to_le32(IWL_BF_ROAMING_STATE ## mode), \ | |
443 | .bf_temp_threshold = cpu_to_le32(IWL_BF_TEMP_THRESHOLD ## mode), \ | |
444 | .bf_temp_fast_filter = cpu_to_le32(IWL_BF_TEMP_FAST_FILTER ## mode), \ | |
445 | .bf_temp_slow_filter = cpu_to_le32(IWL_BF_TEMP_SLOW_FILTER ## mode), \ | |
446 | .bf_debug_flag = cpu_to_le32(IWL_BF_DEBUG_FLAG ## mode), \ | |
447 | .bf_escape_timer = cpu_to_le32(IWL_BF_ESCAPE_TIMER ## mode), \ | |
448 | .ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER ## mode) | |
071d4990 | 449 | |
3dd37d05 EP |
450 | #define IWL_BF_CMD_CONFIG_DEFAULTS IWL_BF_CMD_CONFIG(_DEFAULT) |
451 | #define IWL_BF_CMD_CONFIG_D0I3 IWL_BF_CMD_CONFIG(_D0I3) | |
8ca151b5 | 452 | #endif |