blob: 2fd8ad4633e0ee717096461398c96fc67181d288 [file] [log] [blame]
Johannes Berg8ca151b2013-01-24 14:25:36 +01001/******************************************************************************
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 *
Emmanuel Grumbach51368bf2013-12-30 13:15:54 +02008 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
Johannes Berg8b4139d2014-07-24 14:05:26 +02009 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
Johannes Berg8ca151b2013-01-24 14:25:36 +010010 *
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
Emmanuel Grumbach410dc5a2013-02-18 09:22:28 +020026 * in the file called COPYING.
Johannes Berg8ca151b2013-01-24 14:25:36 +010027 *
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 *
Emmanuel Grumbach51368bf2013-12-30 13:15:54 +020034 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
Johannes Berg8b4139d2014-07-24 14:05:26 +020035 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
Johannes Berg8ca151b2013-01-24 14:25:36 +010036 * 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
Emmanuel Grumbach9180ac52014-09-23 23:02:41 +030071/**
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 */
84enum 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
94/**
95 * struct iwl_ltr_config_cmd - configures the LTR
96 * @flags: See %enum iwl_ltr_config_flags
97 */
98struct iwl_ltr_config_cmd {
99 __le32 flags;
100 __le32 static_long;
101 __le32 static_short;
102} __packed;
103
Alexander Bondarbd4ace22013-03-21 17:14:14 +0200104/* Radio LP RX Energy Threshold measured in dBm */
105#define POWER_LPRX_RSSI_THRESHOLD 75
106#define POWER_LPRX_RSSI_THRESHOLD_MAX 94
107#define POWER_LPRX_RSSI_THRESHOLD_MIN 30
108
Johannes Berg8ca151b2013-01-24 14:25:36 +0100109/**
Emmanuel Grumbach9180ac52014-09-23 23:02:41 +0300110 * enum iwl_power_flags - masks for power table command flags
Alexander Bondar83bdad52013-02-03 21:26:44 +0200111 * @POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
112 * receiver and transmitter. '0' - does not allow.
Johannes Berg8ca151b2013-01-24 14:25:36 +0100113 * @POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management,
114 * '1' Driver enables PM (use rest of parameters)
Alexander Bondarf4a3e2f2013-03-05 13:47:04 +0200115 * @POWER_FLAGS_SKIP_OVER_DTIM_MSK: '0' PM have to walk up every DTIM,
Johannes Berg8ca151b2013-01-24 14:25:36 +0100116 * '1' PM could sleep over DTIM till listen Interval.
Alexander Bondare811ada2013-03-10 15:29:44 +0200117 * @POWER_FLAGS_SNOOZE_ENA_MSK: Enable snoozing only if uAPSD is enabled and all
118 * access categories are both delivery and trigger enabled.
119 * @POWER_FLAGS_BT_SCO_ENA: Enable BT SCO coex only if uAPSD and
120 * PBW Snoozing enabled
Johannes Berg8ca151b2013-01-24 14:25:36 +0100121 * @POWER_FLAGS_ADVANCE_PM_ENA_MSK: Advanced PM (uAPSD) enable mask
Alexander Bondar83bdad52013-02-03 21:26:44 +0200122 * @POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable.
Alexander Bondar175a70b2013-04-14 20:59:37 +0300123 * @POWER_FLAGS_AP_UAPSD_MISBEHAVING_ENA_MSK: AP/GO's uAPSD misbehaving
124 * detection enablement
Johannes Berg8ca151b2013-01-24 14:25:36 +0100125*/
126enum iwl_power_flags {
Alexander Bondar83bdad52013-02-03 21:26:44 +0200127 POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0),
128 POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK = BIT(1),
Alexander Bondarf4a3e2f2013-03-05 13:47:04 +0200129 POWER_FLAGS_SKIP_OVER_DTIM_MSK = BIT(2),
Alexander Bondare811ada2013-03-10 15:29:44 +0200130 POWER_FLAGS_SNOOZE_ENA_MSK = BIT(5),
131 POWER_FLAGS_BT_SCO_ENA = BIT(8),
Alexander Bondar83bdad52013-02-03 21:26:44 +0200132 POWER_FLAGS_ADVANCE_PM_ENA_MSK = BIT(9),
133 POWER_FLAGS_LPRX_ENA_MSK = BIT(11),
Alexander Bondar175a70b2013-04-14 20:59:37 +0300134 POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK = BIT(12),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100135};
136
Alexander Bondar83bdad52013-02-03 21:26:44 +0200137#define IWL_POWER_VEC_SIZE 5
138
Johannes Berg8ca151b2013-01-24 14:25:36 +0100139/**
Alexander Bondare811ada2013-03-10 15:29:44 +0200140 * struct iwl_powertable_cmd - legacy power command. Beside old API support this
141 * is used also with a new power API for device wide power settings.
Johannes Berg8ca151b2013-01-24 14:25:36 +0100142 * POWER_TABLE_CMD = 0x77 (command, has simple generic response)
143 *
Johannes Berg8ca151b2013-01-24 14:25:36 +0100144 * @flags: Power table command flags from POWER_FLAGS_*
145 * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec.
Alexander Bondare16cf7e2013-03-05 14:01:27 +0200146 * Minimum allowed:- 3 * DTIM. Keep alive period must be
147 * set regardless of power scheme or current power state.
148 * FW use this value also when PM is disabled.
Johannes Berg8ca151b2013-01-24 14:25:36 +0100149 * @rx_data_timeout: Minimum time (usec) from last Rx packet for AM to
150 * PSM transition - legacy PM
151 * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to
152 * PSM transition - legacy PM
Alexander Bondar83bdad52013-02-03 21:26:44 +0200153 * @sleep_interval: not in use
Alexander Bondar1bd2d172013-05-21 14:49:09 +0300154 * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag
155 * is set. For example, if it is required to skip over
156 * one DTIM, this value need to be set to 2 (DTIM periods).
Johannes Berg8ca151b2013-01-24 14:25:36 +0100157 * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled.
158 * Default: 80dbm
Johannes Berg8ca151b2013-01-24 14:25:36 +0100159 */
160struct iwl_powertable_cmd {
Alexander Bondar5b1dbfc2013-04-23 13:32:35 +0300161 /* PM_POWER_TABLE_CMD_API_S_VER_6 */
Johannes Berg8ca151b2013-01-24 14:25:36 +0100162 __le16 flags;
Alexander Bondar83bdad52013-02-03 21:26:44 +0200163 u8 keep_alive_seconds;
164 u8 debug_flags;
Johannes Berg8ca151b2013-01-24 14:25:36 +0100165 __le32 rx_data_timeout;
166 __le32 tx_data_timeout;
Alexander Bondar83bdad52013-02-03 21:26:44 +0200167 __le32 sleep_interval[IWL_POWER_VEC_SIZE];
Alexander Bondar1bd2d172013-05-21 14:49:09 +0300168 __le32 skip_dtim_periods;
Alexander Bondar83bdad52013-02-03 21:26:44 +0200169 __le32 lprx_rssi_threshold;
Johannes Berg8ca151b2013-01-24 14:25:36 +0100170} __packed;
171
Hila Gonen7df15b12012-12-12 11:16:19 +0200172/**
Alexander Bondar64b928c2013-09-03 14:18:03 +0300173 * enum iwl_device_power_flags - masks for device power command flags
174 * @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
175 * receiver and transmitter. '0' - does not allow. This flag should be
176 * always set to '1' unless one need to disable actual power down for debug
177 * purposes.
178 * @DEVICE_POWER_FLAGS_CAM_MSK: '1' CAM (Continuous Active Mode) is set, meaning
179 * that power management is disabled. '0' Power management is enabled, one
180 * of power schemes is applied.
181*/
182enum iwl_device_power_flags {
183 DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0),
184 DEVICE_POWER_FLAGS_CAM_MSK = BIT(13),
185};
186
187/**
188 * struct iwl_device_power_cmd - device wide power command.
189 * DEVICE_POWER_CMD = 0x77 (command, has simple generic response)
190 *
191 * @flags: Power table command flags from DEVICE_POWER_FLAGS_*
192 */
193struct iwl_device_power_cmd {
194 /* PM_POWER_TABLE_CMD_API_S_VER_6 */
195 __le16 flags;
196 __le16 reserved;
197} __packed;
198
199/**
Alexander Bondare811ada2013-03-10 15:29:44 +0200200 * struct iwl_mac_power_cmd - New power command containing uAPSD support
201 * MAC_PM_POWER_TABLE = 0xA9 (command, has simple generic response)
202 * @id_and_color: MAC contex identifier
203 * @flags: Power table command flags from POWER_FLAGS_*
204 * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec.
205 * Minimum allowed:- 3 * DTIM. Keep alive period must be
206 * set regardless of power scheme or current power state.
207 * FW use this value also when PM is disabled.
208 * @rx_data_timeout: Minimum time (usec) from last Rx packet for AM to
209 * PSM transition - legacy PM
210 * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to
211 * PSM transition - legacy PM
212 * @sleep_interval: not in use
213 * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag
214 * is set. For example, if it is required to skip over
215 * one DTIM, this value need to be set to 2 (DTIM periods).
216 * @rx_data_timeout_uapsd: Minimum time (usec) from last Rx packet for AM to
217 * PSM transition - uAPSD
218 * @tx_data_timeout_uapsd: Minimum time (usec) from last Tx packet for AM to
219 * PSM transition - uAPSD
220 * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled.
221 * Default: 80dbm
222 * @num_skip_dtim: Number of DTIMs to skip if Skip over DTIM flag is set
Alexander Bondar89716342013-08-04 17:52:23 +0300223 * @snooze_interval: Maximum time between attempts to retrieve buffered data
224 * from the AP [msec]
225 * @snooze_window: A window of time in which PBW snoozing insures that all
226 * packets received. It is also the minimum time from last
227 * received unicast RX packet, before client stops snoozing
228 * for data. [msec]
Alexander Bondare811ada2013-03-10 15:29:44 +0200229 * @snooze_step: TBD
230 * @qndp_tid: TID client shall use for uAPSD QNDP triggers
231 * @uapsd_ac_flags: Set trigger-enabled and delivery-enabled indication for
232 * each corresponding AC.
233 * Use IEEE80211_WMM_IE_STA_QOSINFO_AC* for correct values.
234 * @uapsd_max_sp: Use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct
235 * values.
Alexander Bondare3c588e2013-04-07 14:08:59 +0300236 * @heavy_tx_thld_packets: TX threshold measured in number of packets
237 * @heavy_rx_thld_packets: RX threshold measured in number of packets
238 * @heavy_tx_thld_percentage: TX threshold measured in load's percentage
239 * @heavy_rx_thld_percentage: RX threshold measured in load's percentage
Alexander Bondare811ada2013-03-10 15:29:44 +0200240 * @limited_ps_threshold:
241*/
242struct iwl_mac_power_cmd {
243 /* CONTEXT_DESC_API_T_VER_1 */
244 __le32 id_and_color;
245
246 /* CLIENT_PM_POWER_TABLE_S_VER_1 */
247 __le16 flags;
248 __le16 keep_alive_seconds;
249 __le32 rx_data_timeout;
250 __le32 tx_data_timeout;
251 __le32 rx_data_timeout_uapsd;
252 __le32 tx_data_timeout_uapsd;
253 u8 lprx_rssi_threshold;
254 u8 skip_dtim_periods;
255 __le16 snooze_interval;
256 __le16 snooze_window;
257 u8 snooze_step;
258 u8 qndp_tid;
259 u8 uapsd_ac_flags;
260 u8 uapsd_max_sp;
Alexander Bondare3c588e2013-04-07 14:08:59 +0300261 u8 heavy_tx_thld_packets;
262 u8 heavy_rx_thld_packets;
263 u8 heavy_tx_thld_percentage;
264 u8 heavy_rx_thld_percentage;
Alexander Bondare811ada2013-03-10 15:29:44 +0200265 u8 limited_ps_threshold;
266 u8 reserved;
267} __packed;
268
Alexander Bondar175a70b2013-04-14 20:59:37 +0300269/*
270 * struct iwl_uapsd_misbehaving_ap_notif - FW sends this notification when
271 * associated AP is identified as improperly implementing uAPSD protocol.
272 * PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78
273 * @sta_id: index of station in uCode's station table - associated AP ID in
274 * this context.
275 */
276struct iwl_uapsd_misbehaving_ap_notif {
277 __le32 sta_id;
278 u8 mac_id;
279 u8 reserved[3];
280} __packed;
281
Alexander Bondare811ada2013-03-10 15:29:44 +0200282/**
Hila Gonen7df15b12012-12-12 11:16:19 +0200283 * struct iwl_beacon_filter_cmd
284 * REPLY_BEACON_FILTERING_CMD = 0xd2 (command)
285 * @id_and_color: MAC contex identifier
286 * @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon
287 * to driver if delta in Energy values calculated for this and last
288 * passed beacon is greater than this threshold. Zero value means that
289 * the Energy change is ignored for beacon filtering, and beacon will
290 * not be forced to be sent to driver regardless of this delta. Typical
291 * energy delta 5dB.
292 * @bf_roaming_energy_delta: Used for RSSI filtering, if in 'roaming' state.
293 * Send beacon to driver if delta in Energy values calculated for this
294 * and last passed beacon is greater than this threshold. Zero value
295 * means that the Energy change is ignored for beacon filtering while in
296 * Roaming state, typical energy delta 1dB.
297 * @bf_roaming_state: Used for RSSI filtering. If absolute Energy values
298 * calculated for current beacon is less than the threshold, use
299 * Roaming Energy Delta Threshold, otherwise use normal Energy Delta
300 * Threshold. Typical energy threshold is -72dBm.
Hila Gonen5dca7c22013-07-16 11:15:35 +0300301 * @bf_temp_threshold: This threshold determines the type of temperature
302 * filtering (Slow or Fast) that is selected (Units are in Celsuis):
303 * If the current temperature is above this threshold - Fast filter
304 * will be used, If the current temperature is below this threshold -
305 * Slow filter will be used.
306 * @bf_temp_fast_filter: Send Beacon to driver if delta in temperature values
307 * calculated for this and the last passed beacon is greater than this
308 * threshold. Zero value means that the temperature change is ignored for
Hila Gonen7df15b12012-12-12 11:16:19 +0200309 * beacon filtering; beacons will not be forced to be sent to driver
310 * regardless of whether its temerature has been changed.
Hila Gonen5dca7c22013-07-16 11:15:35 +0300311 * @bf_temp_slow_filter: Send Beacon to driver if delta in temperature values
312 * calculated for this and the last passed beacon is greater than this
313 * threshold. Zero value means that the temperature change is ignored for
314 * beacon filtering; beacons will not be forced to be sent to driver
315 * regardless of whether its temerature has been changed.
Hila Gonen7df15b12012-12-12 11:16:19 +0200316 * @bf_enable_beacon_filter: 1, beacon filtering is enabled; 0, disabled.
317 * @bf_filter_escape_timer: Send beacons to to driver if no beacons were passed
318 * for a specific period of time. Units: Beacons.
319 * @ba_escape_timer: Fully receive and parse beacon if no beacons were passed
320 * for a longer period of time then this escape-timeout. Units: Beacons.
321 * @ba_enable_beacon_abort: 1, beacon abort is enabled; 0, disabled.
322 */
323struct iwl_beacon_filter_cmd {
Hila Gonen5dca7c22013-07-16 11:15:35 +0300324 __le32 bf_energy_delta;
325 __le32 bf_roaming_energy_delta;
326 __le32 bf_roaming_state;
327 __le32 bf_temp_threshold;
328 __le32 bf_temp_fast_filter;
329 __le32 bf_temp_slow_filter;
330 __le32 bf_enable_beacon_filter;
331 __le32 bf_debug_flag;
Hila Gonen7df15b12012-12-12 11:16:19 +0200332 __le32 bf_escape_timer;
333 __le32 ba_escape_timer;
Hila Gonen5dca7c22013-07-16 11:15:35 +0300334 __le32 ba_enable_beacon_abort;
Hila Gonen7df15b12012-12-12 11:16:19 +0200335} __packed;
336
337/* Beacon filtering and beacon abort */
338#define IWL_BF_ENERGY_DELTA_DEFAULT 5
Eliad Peller3dd37d02014-01-07 14:00:24 +0200339#define IWL_BF_ENERGY_DELTA_D0I3 20
Hila Gonen7df15b12012-12-12 11:16:19 +0200340#define IWL_BF_ENERGY_DELTA_MAX 255
341#define IWL_BF_ENERGY_DELTA_MIN 0
342
343#define IWL_BF_ROAMING_ENERGY_DELTA_DEFAULT 1
Eliad Peller3dd37d02014-01-07 14:00:24 +0200344#define IWL_BF_ROAMING_ENERGY_DELTA_D0I3 20
Hila Gonen7df15b12012-12-12 11:16:19 +0200345#define IWL_BF_ROAMING_ENERGY_DELTA_MAX 255
346#define IWL_BF_ROAMING_ENERGY_DELTA_MIN 0
347
348#define IWL_BF_ROAMING_STATE_DEFAULT 72
Eliad Peller3dd37d02014-01-07 14:00:24 +0200349#define IWL_BF_ROAMING_STATE_D0I3 72
Hila Gonen7df15b12012-12-12 11:16:19 +0200350#define IWL_BF_ROAMING_STATE_MAX 255
351#define IWL_BF_ROAMING_STATE_MIN 0
352
Hila Gonen5dca7c22013-07-16 11:15:35 +0300353#define IWL_BF_TEMP_THRESHOLD_DEFAULT 112
Eliad Peller3dd37d02014-01-07 14:00:24 +0200354#define IWL_BF_TEMP_THRESHOLD_D0I3 112
Hila Gonen5dca7c22013-07-16 11:15:35 +0300355#define IWL_BF_TEMP_THRESHOLD_MAX 255
356#define IWL_BF_TEMP_THRESHOLD_MIN 0
357
358#define IWL_BF_TEMP_FAST_FILTER_DEFAULT 1
Eliad Peller3dd37d02014-01-07 14:00:24 +0200359#define IWL_BF_TEMP_FAST_FILTER_D0I3 1
Hila Gonen5dca7c22013-07-16 11:15:35 +0300360#define IWL_BF_TEMP_FAST_FILTER_MAX 255
361#define IWL_BF_TEMP_FAST_FILTER_MIN 0
362
363#define IWL_BF_TEMP_SLOW_FILTER_DEFAULT 5
Eliad Peller3dd37d02014-01-07 14:00:24 +0200364#define IWL_BF_TEMP_SLOW_FILTER_D0I3 5
Hila Gonen5dca7c22013-07-16 11:15:35 +0300365#define IWL_BF_TEMP_SLOW_FILTER_MAX 255
366#define IWL_BF_TEMP_SLOW_FILTER_MIN 0
Hila Gonen7df15b12012-12-12 11:16:19 +0200367
368#define IWL_BF_ENABLE_BEACON_FILTER_DEFAULT 1
369
370#define IWL_BF_DEBUG_FLAG_DEFAULT 0
Eliad Peller3dd37d02014-01-07 14:00:24 +0200371#define IWL_BF_DEBUG_FLAG_D0I3 0
Hila Gonen7df15b12012-12-12 11:16:19 +0200372
373#define IWL_BF_ESCAPE_TIMER_DEFAULT 50
Eliad Peller50675362014-06-15 11:12:38 +0300374#define IWL_BF_ESCAPE_TIMER_D0I3 0
Hila Gonen7df15b12012-12-12 11:16:19 +0200375#define IWL_BF_ESCAPE_TIMER_MAX 1024
376#define IWL_BF_ESCAPE_TIMER_MIN 0
377
Alexander Bondar84349252013-07-22 15:39:26 +0300378#define IWL_BA_ESCAPE_TIMER_DEFAULT 6
Eliad Peller3dd37d02014-01-07 14:00:24 +0200379#define IWL_BA_ESCAPE_TIMER_D0I3 6
Alexander Bondarb34b9122013-08-18 16:22:52 +0300380#define IWL_BA_ESCAPE_TIMER_D3 9
Hila Gonen7df15b12012-12-12 11:16:19 +0200381#define IWL_BA_ESCAPE_TIMER_MAX 1024
382#define IWL_BA_ESCAPE_TIMER_MIN 0
383
384#define IWL_BA_ENABLE_BEACON_ABORT_DEFAULT 1
385
Eliad Peller3dd37d02014-01-07 14:00:24 +0200386#define IWL_BF_CMD_CONFIG(mode) \
387 .bf_energy_delta = cpu_to_le32(IWL_BF_ENERGY_DELTA ## mode), \
388 .bf_roaming_energy_delta = \
389 cpu_to_le32(IWL_BF_ROAMING_ENERGY_DELTA ## mode), \
390 .bf_roaming_state = cpu_to_le32(IWL_BF_ROAMING_STATE ## mode), \
391 .bf_temp_threshold = cpu_to_le32(IWL_BF_TEMP_THRESHOLD ## mode), \
392 .bf_temp_fast_filter = cpu_to_le32(IWL_BF_TEMP_FAST_FILTER ## mode), \
393 .bf_temp_slow_filter = cpu_to_le32(IWL_BF_TEMP_SLOW_FILTER ## mode), \
394 .bf_debug_flag = cpu_to_le32(IWL_BF_DEBUG_FLAG ## mode), \
395 .bf_escape_timer = cpu_to_le32(IWL_BF_ESCAPE_TIMER ## mode), \
396 .ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER ## mode)
Alexander Bondar071d49902013-05-06 13:03:59 +0300397
Eliad Peller3dd37d02014-01-07 14:00:24 +0200398#define IWL_BF_CMD_CONFIG_DEFAULTS IWL_BF_CMD_CONFIG(_DEFAULT)
399#define IWL_BF_CMD_CONFIG_D0I3 IWL_BF_CMD_CONFIG(_D0I3)
Johannes Berg8ca151b2013-01-24 14:25:36 +0100400#endif