Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 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 | * |
Emmanuel Grumbach | 51368bf | 2013-12-30 13:15:54 +0200 | [diff] [blame] | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of version 2 of the GNU General Public License as |
| 12 | * published by the Free Software Foundation. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, but |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 | * General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, |
| 22 | * USA |
| 23 | * |
| 24 | * The full GNU General Public License is included in this distribution |
Emmanuel Grumbach | 410dc5a | 2013-02-18 09:22:28 +0200 | [diff] [blame] | 25 | * in the file called COPYING. |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 26 | * |
| 27 | * Contact Information: |
| 28 | * Intel Linux Wireless <ilw@linux.intel.com> |
| 29 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
| 30 | * |
| 31 | * BSD LICENSE |
| 32 | * |
Emmanuel Grumbach | 51368bf | 2013-12-30 13:15:54 +0200 | [diff] [blame] | 33 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 34 | * All rights reserved. |
| 35 | * |
| 36 | * Redistribution and use in source and binary forms, with or without |
| 37 | * modification, are permitted provided that the following conditions |
| 38 | * are met: |
| 39 | * |
| 40 | * * Redistributions of source code must retain the above copyright |
| 41 | * notice, this list of conditions and the following disclaimer. |
| 42 | * * Redistributions in binary form must reproduce the above copyright |
| 43 | * notice, this list of conditions and the following disclaimer in |
| 44 | * the documentation and/or other materials provided with the |
| 45 | * distribution. |
| 46 | * * Neither the name Intel Corporation nor the names of its |
| 47 | * contributors may be used to endorse or promote products derived |
| 48 | * from this software without specific prior written permission. |
| 49 | * |
| 50 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 51 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 52 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 53 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 54 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 56 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 57 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 58 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 59 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 61 | * |
| 62 | *****************************************************************************/ |
| 63 | |
| 64 | #ifndef __fw_api_power_h__ |
| 65 | #define __fw_api_power_h__ |
| 66 | |
| 67 | /* Power Management Commands, Responses, Notifications */ |
| 68 | |
Alexander Bondar | bd4ace2 | 2013-03-21 17:14:14 +0200 | [diff] [blame] | 69 | /* Radio LP RX Energy Threshold measured in dBm */ |
| 70 | #define POWER_LPRX_RSSI_THRESHOLD 75 |
| 71 | #define POWER_LPRX_RSSI_THRESHOLD_MAX 94 |
| 72 | #define POWER_LPRX_RSSI_THRESHOLD_MIN 30 |
| 73 | |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 74 | /** |
| 75 | * enum iwl_scan_flags - masks for power table command flags |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 76 | * @POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off |
| 77 | * receiver and transmitter. '0' - does not allow. |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 78 | * @POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management, |
| 79 | * '1' Driver enables PM (use rest of parameters) |
Alexander Bondar | f4a3e2f | 2013-03-05 13:47:04 +0200 | [diff] [blame] | 80 | * @POWER_FLAGS_SKIP_OVER_DTIM_MSK: '0' PM have to walk up every DTIM, |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 81 | * '1' PM could sleep over DTIM till listen Interval. |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 82 | * @POWER_FLAGS_SNOOZE_ENA_MSK: Enable snoozing only if uAPSD is enabled and all |
| 83 | * access categories are both delivery and trigger enabled. |
| 84 | * @POWER_FLAGS_BT_SCO_ENA: Enable BT SCO coex only if uAPSD and |
| 85 | * PBW Snoozing enabled |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 86 | * @POWER_FLAGS_ADVANCE_PM_ENA_MSK: Advanced PM (uAPSD) enable mask |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 87 | * @POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable. |
Alexander Bondar | 175a70b | 2013-04-14 20:59:37 +0300 | [diff] [blame] | 88 | * @POWER_FLAGS_AP_UAPSD_MISBEHAVING_ENA_MSK: AP/GO's uAPSD misbehaving |
| 89 | * detection enablement |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 90 | */ |
| 91 | enum iwl_power_flags { |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 92 | POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), |
| 93 | POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK = BIT(1), |
Alexander Bondar | f4a3e2f | 2013-03-05 13:47:04 +0200 | [diff] [blame] | 94 | POWER_FLAGS_SKIP_OVER_DTIM_MSK = BIT(2), |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 95 | POWER_FLAGS_SNOOZE_ENA_MSK = BIT(5), |
| 96 | POWER_FLAGS_BT_SCO_ENA = BIT(8), |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 97 | POWER_FLAGS_ADVANCE_PM_ENA_MSK = BIT(9), |
| 98 | POWER_FLAGS_LPRX_ENA_MSK = BIT(11), |
Alexander Bondar | 175a70b | 2013-04-14 20:59:37 +0300 | [diff] [blame] | 99 | POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK = BIT(12), |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 100 | }; |
| 101 | |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 102 | #define IWL_POWER_VEC_SIZE 5 |
| 103 | |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 104 | /** |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 105 | * struct iwl_powertable_cmd - legacy power command. Beside old API support this |
| 106 | * is used also with a new power API for device wide power settings. |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 107 | * POWER_TABLE_CMD = 0x77 (command, has simple generic response) |
| 108 | * |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 109 | * @flags: Power table command flags from POWER_FLAGS_* |
| 110 | * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec. |
Alexander Bondar | e16cf7e | 2013-03-05 14:01:27 +0200 | [diff] [blame] | 111 | * Minimum allowed:- 3 * DTIM. Keep alive period must be |
| 112 | * set regardless of power scheme or current power state. |
| 113 | * FW use this value also when PM is disabled. |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 114 | * @rx_data_timeout: Minimum time (usec) from last Rx packet for AM to |
| 115 | * PSM transition - legacy PM |
| 116 | * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to |
| 117 | * PSM transition - legacy PM |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 118 | * @sleep_interval: not in use |
Alexander Bondar | 1bd2d17 | 2013-05-21 14:49:09 +0300 | [diff] [blame] | 119 | * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag |
| 120 | * is set. For example, if it is required to skip over |
| 121 | * one DTIM, this value need to be set to 2 (DTIM periods). |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 122 | * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. |
| 123 | * Default: 80dbm |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 124 | */ |
| 125 | struct iwl_powertable_cmd { |
Alexander Bondar | 5b1dbfc | 2013-04-23 13:32:35 +0300 | [diff] [blame] | 126 | /* PM_POWER_TABLE_CMD_API_S_VER_6 */ |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 127 | __le16 flags; |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 128 | u8 keep_alive_seconds; |
| 129 | u8 debug_flags; |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 130 | __le32 rx_data_timeout; |
| 131 | __le32 tx_data_timeout; |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 132 | __le32 sleep_interval[IWL_POWER_VEC_SIZE]; |
Alexander Bondar | 1bd2d17 | 2013-05-21 14:49:09 +0300 | [diff] [blame] | 133 | __le32 skip_dtim_periods; |
Alexander Bondar | 83bdad5 | 2013-02-03 21:26:44 +0200 | [diff] [blame] | 134 | __le32 lprx_rssi_threshold; |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 135 | } __packed; |
| 136 | |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 137 | /** |
Alexander Bondar | 64b928c | 2013-09-03 14:18:03 +0300 | [diff] [blame] | 138 | * enum iwl_device_power_flags - masks for device power command flags |
| 139 | * @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off |
| 140 | * receiver and transmitter. '0' - does not allow. This flag should be |
| 141 | * always set to '1' unless one need to disable actual power down for debug |
| 142 | * purposes. |
| 143 | * @DEVICE_POWER_FLAGS_CAM_MSK: '1' CAM (Continuous Active Mode) is set, meaning |
| 144 | * that power management is disabled. '0' Power management is enabled, one |
| 145 | * of power schemes is applied. |
| 146 | */ |
| 147 | enum iwl_device_power_flags { |
| 148 | DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), |
| 149 | DEVICE_POWER_FLAGS_CAM_MSK = BIT(13), |
| 150 | }; |
| 151 | |
| 152 | /** |
| 153 | * struct iwl_device_power_cmd - device wide power command. |
| 154 | * DEVICE_POWER_CMD = 0x77 (command, has simple generic response) |
| 155 | * |
| 156 | * @flags: Power table command flags from DEVICE_POWER_FLAGS_* |
| 157 | */ |
| 158 | struct iwl_device_power_cmd { |
| 159 | /* PM_POWER_TABLE_CMD_API_S_VER_6 */ |
| 160 | __le16 flags; |
| 161 | __le16 reserved; |
| 162 | } __packed; |
| 163 | |
| 164 | /** |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 165 | * struct iwl_mac_power_cmd - New power command containing uAPSD support |
| 166 | * MAC_PM_POWER_TABLE = 0xA9 (command, has simple generic response) |
| 167 | * @id_and_color: MAC contex identifier |
| 168 | * @flags: Power table command flags from POWER_FLAGS_* |
| 169 | * @keep_alive_seconds: Keep alive period in seconds. Default - 25 sec. |
| 170 | * Minimum allowed:- 3 * DTIM. Keep alive period must be |
| 171 | * set regardless of power scheme or current power state. |
| 172 | * FW use this value also when PM is disabled. |
| 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 | * @rx_data_timeout_uapsd: Minimum time (usec) from last Rx packet for AM to |
| 182 | * PSM transition - uAPSD |
| 183 | * @tx_data_timeout_uapsd: Minimum time (usec) from last Tx packet for AM to |
| 184 | * PSM transition - uAPSD |
| 185 | * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. |
| 186 | * Default: 80dbm |
| 187 | * @num_skip_dtim: Number of DTIMs to skip if Skip over DTIM flag is set |
Alexander Bondar | 8971634 | 2013-08-04 17:52:23 +0300 | [diff] [blame] | 188 | * @snooze_interval: Maximum time between attempts to retrieve buffered data |
| 189 | * from the AP [msec] |
| 190 | * @snooze_window: A window of time in which PBW snoozing insures that all |
| 191 | * packets received. It is also the minimum time from last |
| 192 | * received unicast RX packet, before client stops snoozing |
| 193 | * for data. [msec] |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 194 | * @snooze_step: TBD |
| 195 | * @qndp_tid: TID client shall use for uAPSD QNDP triggers |
| 196 | * @uapsd_ac_flags: Set trigger-enabled and delivery-enabled indication for |
| 197 | * each corresponding AC. |
| 198 | * Use IEEE80211_WMM_IE_STA_QOSINFO_AC* for correct values. |
| 199 | * @uapsd_max_sp: Use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct |
| 200 | * values. |
Alexander Bondar | e3c588e | 2013-04-07 14:08:59 +0300 | [diff] [blame] | 201 | * @heavy_tx_thld_packets: TX threshold measured in number of packets |
| 202 | * @heavy_rx_thld_packets: RX threshold measured in number of packets |
| 203 | * @heavy_tx_thld_percentage: TX threshold measured in load's percentage |
| 204 | * @heavy_rx_thld_percentage: RX threshold measured in load's percentage |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 205 | * @limited_ps_threshold: |
| 206 | */ |
| 207 | struct iwl_mac_power_cmd { |
| 208 | /* CONTEXT_DESC_API_T_VER_1 */ |
| 209 | __le32 id_and_color; |
| 210 | |
| 211 | /* CLIENT_PM_POWER_TABLE_S_VER_1 */ |
| 212 | __le16 flags; |
| 213 | __le16 keep_alive_seconds; |
| 214 | __le32 rx_data_timeout; |
| 215 | __le32 tx_data_timeout; |
| 216 | __le32 rx_data_timeout_uapsd; |
| 217 | __le32 tx_data_timeout_uapsd; |
| 218 | u8 lprx_rssi_threshold; |
| 219 | u8 skip_dtim_periods; |
| 220 | __le16 snooze_interval; |
| 221 | __le16 snooze_window; |
| 222 | u8 snooze_step; |
| 223 | u8 qndp_tid; |
| 224 | u8 uapsd_ac_flags; |
| 225 | u8 uapsd_max_sp; |
Alexander Bondar | e3c588e | 2013-04-07 14:08:59 +0300 | [diff] [blame] | 226 | u8 heavy_tx_thld_packets; |
| 227 | u8 heavy_rx_thld_packets; |
| 228 | u8 heavy_tx_thld_percentage; |
| 229 | u8 heavy_rx_thld_percentage; |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 230 | u8 limited_ps_threshold; |
| 231 | u8 reserved; |
| 232 | } __packed; |
| 233 | |
Alexander Bondar | 175a70b | 2013-04-14 20:59:37 +0300 | [diff] [blame] | 234 | /* |
| 235 | * struct iwl_uapsd_misbehaving_ap_notif - FW sends this notification when |
| 236 | * associated AP is identified as improperly implementing uAPSD protocol. |
| 237 | * PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78 |
| 238 | * @sta_id: index of station in uCode's station table - associated AP ID in |
| 239 | * this context. |
| 240 | */ |
| 241 | struct iwl_uapsd_misbehaving_ap_notif { |
| 242 | __le32 sta_id; |
| 243 | u8 mac_id; |
| 244 | u8 reserved[3]; |
| 245 | } __packed; |
| 246 | |
Alexander Bondar | e811ada | 2013-03-10 15:29:44 +0200 | [diff] [blame] | 247 | /** |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 248 | * struct iwl_beacon_filter_cmd |
| 249 | * REPLY_BEACON_FILTERING_CMD = 0xd2 (command) |
| 250 | * @id_and_color: MAC contex identifier |
| 251 | * @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon |
| 252 | * to driver if delta in Energy values calculated for this and last |
| 253 | * passed beacon is greater than this threshold. Zero value means that |
| 254 | * the Energy change is ignored for beacon filtering, and beacon will |
| 255 | * not be forced to be sent to driver regardless of this delta. Typical |
| 256 | * energy delta 5dB. |
| 257 | * @bf_roaming_energy_delta: Used for RSSI filtering, if in 'roaming' state. |
| 258 | * Send beacon to driver if delta in Energy values calculated for this |
| 259 | * and last passed beacon is greater than this threshold. Zero value |
| 260 | * means that the Energy change is ignored for beacon filtering while in |
| 261 | * Roaming state, typical energy delta 1dB. |
| 262 | * @bf_roaming_state: Used for RSSI filtering. If absolute Energy values |
| 263 | * calculated for current beacon is less than the threshold, use |
| 264 | * Roaming Energy Delta Threshold, otherwise use normal Energy Delta |
| 265 | * Threshold. Typical energy threshold is -72dBm. |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 266 | * @bf_temp_threshold: This threshold determines the type of temperature |
| 267 | * filtering (Slow or Fast) that is selected (Units are in Celsuis): |
| 268 | * If the current temperature is above this threshold - Fast filter |
| 269 | * will be used, If the current temperature is below this threshold - |
| 270 | * Slow filter will be used. |
| 271 | * @bf_temp_fast_filter: Send Beacon to driver if delta in temperature values |
| 272 | * calculated for this and the last passed beacon is greater than this |
| 273 | * threshold. Zero value means that the temperature change is ignored for |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 274 | * beacon filtering; beacons will not be forced to be sent to driver |
| 275 | * regardless of whether its temerature has been changed. |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 276 | * @bf_temp_slow_filter: Send Beacon to driver if delta in temperature values |
| 277 | * calculated for this and the last passed beacon is greater than this |
| 278 | * threshold. Zero value means that the temperature change is ignored for |
| 279 | * beacon filtering; beacons will not be forced to be sent to driver |
| 280 | * regardless of whether its temerature has been changed. |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 281 | * @bf_enable_beacon_filter: 1, beacon filtering is enabled; 0, disabled. |
| 282 | * @bf_filter_escape_timer: Send beacons to to driver if no beacons were passed |
| 283 | * for a specific period of time. Units: Beacons. |
| 284 | * @ba_escape_timer: Fully receive and parse beacon if no beacons were passed |
| 285 | * for a longer period of time then this escape-timeout. Units: Beacons. |
| 286 | * @ba_enable_beacon_abort: 1, beacon abort is enabled; 0, disabled. |
| 287 | */ |
| 288 | struct iwl_beacon_filter_cmd { |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 289 | __le32 bf_energy_delta; |
| 290 | __le32 bf_roaming_energy_delta; |
| 291 | __le32 bf_roaming_state; |
| 292 | __le32 bf_temp_threshold; |
| 293 | __le32 bf_temp_fast_filter; |
| 294 | __le32 bf_temp_slow_filter; |
| 295 | __le32 bf_enable_beacon_filter; |
| 296 | __le32 bf_debug_flag; |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 297 | __le32 bf_escape_timer; |
| 298 | __le32 ba_escape_timer; |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 299 | __le32 ba_enable_beacon_abort; |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 300 | } __packed; |
| 301 | |
| 302 | /* Beacon filtering and beacon abort */ |
| 303 | #define IWL_BF_ENERGY_DELTA_DEFAULT 5 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 304 | #define IWL_BF_ENERGY_DELTA_D0I3 20 |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 305 | #define IWL_BF_ENERGY_DELTA_MAX 255 |
| 306 | #define IWL_BF_ENERGY_DELTA_MIN 0 |
| 307 | |
| 308 | #define IWL_BF_ROAMING_ENERGY_DELTA_DEFAULT 1 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 309 | #define IWL_BF_ROAMING_ENERGY_DELTA_D0I3 20 |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 310 | #define IWL_BF_ROAMING_ENERGY_DELTA_MAX 255 |
| 311 | #define IWL_BF_ROAMING_ENERGY_DELTA_MIN 0 |
| 312 | |
| 313 | #define IWL_BF_ROAMING_STATE_DEFAULT 72 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 314 | #define IWL_BF_ROAMING_STATE_D0I3 72 |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 315 | #define IWL_BF_ROAMING_STATE_MAX 255 |
| 316 | #define IWL_BF_ROAMING_STATE_MIN 0 |
| 317 | |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 318 | #define IWL_BF_TEMP_THRESHOLD_DEFAULT 112 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 319 | #define IWL_BF_TEMP_THRESHOLD_D0I3 112 |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 320 | #define IWL_BF_TEMP_THRESHOLD_MAX 255 |
| 321 | #define IWL_BF_TEMP_THRESHOLD_MIN 0 |
| 322 | |
| 323 | #define IWL_BF_TEMP_FAST_FILTER_DEFAULT 1 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 324 | #define IWL_BF_TEMP_FAST_FILTER_D0I3 1 |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 325 | #define IWL_BF_TEMP_FAST_FILTER_MAX 255 |
| 326 | #define IWL_BF_TEMP_FAST_FILTER_MIN 0 |
| 327 | |
| 328 | #define IWL_BF_TEMP_SLOW_FILTER_DEFAULT 5 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 329 | #define IWL_BF_TEMP_SLOW_FILTER_D0I3 5 |
Hila Gonen | 5dca7c2 | 2013-07-16 11:15:35 +0300 | [diff] [blame] | 330 | #define IWL_BF_TEMP_SLOW_FILTER_MAX 255 |
| 331 | #define IWL_BF_TEMP_SLOW_FILTER_MIN 0 |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 332 | |
| 333 | #define IWL_BF_ENABLE_BEACON_FILTER_DEFAULT 1 |
| 334 | |
| 335 | #define IWL_BF_DEBUG_FLAG_DEFAULT 0 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 336 | #define IWL_BF_DEBUG_FLAG_D0I3 0 |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 337 | |
| 338 | #define IWL_BF_ESCAPE_TIMER_DEFAULT 50 |
Eliad Peller | 5067536 | 2014-06-15 11:12:38 +0300 | [diff] [blame^] | 339 | #define IWL_BF_ESCAPE_TIMER_D0I3 0 |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 340 | #define IWL_BF_ESCAPE_TIMER_MAX 1024 |
| 341 | #define IWL_BF_ESCAPE_TIMER_MIN 0 |
| 342 | |
Alexander Bondar | 8434925 | 2013-07-22 15:39:26 +0300 | [diff] [blame] | 343 | #define IWL_BA_ESCAPE_TIMER_DEFAULT 6 |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 344 | #define IWL_BA_ESCAPE_TIMER_D0I3 6 |
Alexander Bondar | b34b912 | 2013-08-18 16:22:52 +0300 | [diff] [blame] | 345 | #define IWL_BA_ESCAPE_TIMER_D3 9 |
Hila Gonen | 7df15b1 | 2012-12-12 11:16:19 +0200 | [diff] [blame] | 346 | #define IWL_BA_ESCAPE_TIMER_MAX 1024 |
| 347 | #define IWL_BA_ESCAPE_TIMER_MIN 0 |
| 348 | |
| 349 | #define IWL_BA_ENABLE_BEACON_ABORT_DEFAULT 1 |
| 350 | |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 351 | #define IWL_BF_CMD_CONFIG(mode) \ |
| 352 | .bf_energy_delta = cpu_to_le32(IWL_BF_ENERGY_DELTA ## mode), \ |
| 353 | .bf_roaming_energy_delta = \ |
| 354 | cpu_to_le32(IWL_BF_ROAMING_ENERGY_DELTA ## mode), \ |
| 355 | .bf_roaming_state = cpu_to_le32(IWL_BF_ROAMING_STATE ## mode), \ |
| 356 | .bf_temp_threshold = cpu_to_le32(IWL_BF_TEMP_THRESHOLD ## mode), \ |
| 357 | .bf_temp_fast_filter = cpu_to_le32(IWL_BF_TEMP_FAST_FILTER ## mode), \ |
| 358 | .bf_temp_slow_filter = cpu_to_le32(IWL_BF_TEMP_SLOW_FILTER ## mode), \ |
| 359 | .bf_debug_flag = cpu_to_le32(IWL_BF_DEBUG_FLAG ## mode), \ |
| 360 | .bf_escape_timer = cpu_to_le32(IWL_BF_ESCAPE_TIMER ## mode), \ |
| 361 | .ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER ## mode) |
Alexander Bondar | 071d4990 | 2013-05-06 13:03:59 +0300 | [diff] [blame] | 362 | |
Eliad Peller | 3dd37d0 | 2014-01-07 14:00:24 +0200 | [diff] [blame] | 363 | #define IWL_BF_CMD_CONFIG_DEFAULTS IWL_BF_CMD_CONFIG(_DEFAULT) |
| 364 | #define IWL_BF_CMD_CONFIG_D0I3 IWL_BF_CMD_CONFIG(_D0I3) |
Johannes Berg | 8ca151b | 2013-01-24 14:25:36 +0100 | [diff] [blame] | 365 | #endif |