Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of wl1271 |
| 3 | * |
| 4 | * Copyright (C) 2009 Nokia Corporation |
| 5 | * |
| 6 | * Contact: Luciano Coelho <luciano.coelho@nokia.com> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License |
| 10 | * version 2 as published by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 20 | * 02110-1301 USA |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef __WL1271_CONF_H__ |
| 25 | #define __WL1271_CONF_H__ |
| 26 | |
| 27 | enum { |
| 28 | CONF_HW_BIT_RATE_1MBPS = BIT(0), |
| 29 | CONF_HW_BIT_RATE_2MBPS = BIT(1), |
| 30 | CONF_HW_BIT_RATE_5_5MBPS = BIT(2), |
| 31 | CONF_HW_BIT_RATE_6MBPS = BIT(3), |
| 32 | CONF_HW_BIT_RATE_9MBPS = BIT(4), |
| 33 | CONF_HW_BIT_RATE_11MBPS = BIT(5), |
| 34 | CONF_HW_BIT_RATE_12MBPS = BIT(6), |
| 35 | CONF_HW_BIT_RATE_18MBPS = BIT(7), |
| 36 | CONF_HW_BIT_RATE_22MBPS = BIT(8), |
| 37 | CONF_HW_BIT_RATE_24MBPS = BIT(9), |
| 38 | CONF_HW_BIT_RATE_36MBPS = BIT(10), |
| 39 | CONF_HW_BIT_RATE_48MBPS = BIT(11), |
| 40 | CONF_HW_BIT_RATE_54MBPS = BIT(12), |
| 41 | CONF_HW_BIT_RATE_MCS_0 = BIT(13), |
| 42 | CONF_HW_BIT_RATE_MCS_1 = BIT(14), |
| 43 | CONF_HW_BIT_RATE_MCS_2 = BIT(15), |
| 44 | CONF_HW_BIT_RATE_MCS_3 = BIT(16), |
| 45 | CONF_HW_BIT_RATE_MCS_4 = BIT(17), |
| 46 | CONF_HW_BIT_RATE_MCS_5 = BIT(18), |
| 47 | CONF_HW_BIT_RATE_MCS_6 = BIT(19), |
| 48 | CONF_HW_BIT_RATE_MCS_7 = BIT(20) |
| 49 | }; |
| 50 | |
| 51 | enum { |
| 52 | CONF_HW_RATE_INDEX_1MBPS = 0, |
| 53 | CONF_HW_RATE_INDEX_2MBPS = 1, |
| 54 | CONF_HW_RATE_INDEX_5_5MBPS = 2, |
| 55 | CONF_HW_RATE_INDEX_6MBPS = 3, |
| 56 | CONF_HW_RATE_INDEX_9MBPS = 4, |
| 57 | CONF_HW_RATE_INDEX_11MBPS = 5, |
| 58 | CONF_HW_RATE_INDEX_12MBPS = 6, |
| 59 | CONF_HW_RATE_INDEX_18MBPS = 7, |
| 60 | CONF_HW_RATE_INDEX_22MBPS = 8, |
| 61 | CONF_HW_RATE_INDEX_24MBPS = 9, |
| 62 | CONF_HW_RATE_INDEX_36MBPS = 10, |
| 63 | CONF_HW_RATE_INDEX_48MBPS = 11, |
| 64 | CONF_HW_RATE_INDEX_54MBPS = 12, |
| 65 | CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_54MBPS, |
| 66 | }; |
| 67 | |
Juuso Oikarinen | 1b00f54 | 2010-03-18 12:26:30 +0200 | [diff] [blame] | 68 | enum { |
| 69 | CONF_SG_DISABLE = 0, |
| 70 | CONF_SG_PROTECTIVE, |
| 71 | CONF_SG_OPPORTUNISTIC |
| 72 | }; |
| 73 | |
| 74 | enum { |
| 75 | /* |
| 76 | * PER threshold in PPM of the BT voice |
| 77 | * |
| 78 | * Range: 0 - 10000000 |
| 79 | */ |
| 80 | CONF_SG_BT_PER_THRESHOLD = 0, |
| 81 | |
| 82 | /* |
| 83 | * Number of consequent RX_ACTIVE activities to override BT voice |
| 84 | * frames to ensure WLAN connection |
| 85 | * |
| 86 | * Range: 0 - 100 |
| 87 | */ |
| 88 | CONF_SG_HV3_MAX_OVERRIDE, |
| 89 | |
| 90 | /* |
| 91 | * Defines the PER threshold of the BT voice |
| 92 | * |
| 93 | * Range: 0 - 65000 |
| 94 | */ |
| 95 | CONF_SG_BT_NFS_SAMPLE_INTERVAL, |
| 96 | |
| 97 | /* |
| 98 | * Defines the load ratio of BT |
| 99 | * |
| 100 | * Range: 0 - 100 (%) |
| 101 | */ |
| 102 | CONF_SG_BT_LOAD_RATIO, |
| 103 | |
| 104 | /* |
| 105 | * Defines whether the SG will force WLAN host to enter/exit PSM |
| 106 | * |
| 107 | * Range: 1 - SG can force, 0 - host handles PSM |
| 108 | */ |
| 109 | CONF_SG_AUTO_PS_MODE, |
| 110 | |
| 111 | /* |
| 112 | * Compensation percentage of probe requests when scan initiated |
| 113 | * during BT voice/ACL link. |
| 114 | * |
| 115 | * Range: 0 - 255 (%) |
| 116 | */ |
| 117 | CONF_SG_AUTO_SCAN_PROBE_REQ, |
| 118 | |
| 119 | /* |
| 120 | * Compensation percentage of probe requests when active scan initiated |
| 121 | * during BT voice |
| 122 | * |
| 123 | * Range: 0 - 255 (%) |
| 124 | */ |
| 125 | CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3, |
| 126 | |
| 127 | /* |
| 128 | * Defines antenna configuration (single/dual antenna) |
| 129 | * |
| 130 | * Range: 0 - single antenna, 1 - dual antenna |
| 131 | */ |
| 132 | CONF_SG_ANTENNA_CONFIGURATION, |
| 133 | |
| 134 | /* |
| 135 | * The threshold (percent) of max consequtive beacon misses before |
| 136 | * increasing priority of beacon reception. |
| 137 | * |
| 138 | * Range: 0 - 100 (%) |
| 139 | */ |
| 140 | CONF_SG_BEACON_MISS_PERCENT, |
| 141 | |
| 142 | /* |
| 143 | * The rate threshold below which receiving a data frame from the AP |
| 144 | * will increase the priority of the data frame above BT traffic. |
| 145 | * |
| 146 | * Range: 0,2, 5(=5.5), 6, 9, 11, 12, 18, 24, 36, 48, 54 |
| 147 | */ |
| 148 | CONF_SG_RATE_ADAPT_THRESH, |
| 149 | |
| 150 | /* |
| 151 | * Not used currently. |
| 152 | * |
| 153 | * Range: 0 |
| 154 | */ |
| 155 | CONF_SG_RATE_ADAPT_SNR, |
| 156 | |
| 157 | /* |
| 158 | * Configure the min and max time BT gains the antenna |
| 159 | * in WLAN PSM / BT master basic rate |
| 160 | * |
| 161 | * Range: 0 - 255 (ms) |
| 162 | */ |
| 163 | CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR, |
| 164 | CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR, |
| 165 | |
| 166 | /* |
| 167 | * The time after it expires no new WLAN trigger frame is trasmitted |
| 168 | * in WLAN PSM / BT master basic rate |
| 169 | * |
| 170 | * Range: 0 - 255 (ms) |
| 171 | */ |
| 172 | CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR, |
| 173 | |
| 174 | /* |
| 175 | * Configure the min and max time BT gains the antenna |
| 176 | * in WLAN PSM / BT slave basic rate |
| 177 | * |
| 178 | * Range: 0 - 255 (ms) |
| 179 | */ |
| 180 | CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR, |
| 181 | CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR, |
| 182 | |
| 183 | /* |
| 184 | * The time after it expires no new WLAN trigger frame is trasmitted |
| 185 | * in WLAN PSM / BT slave basic rate |
| 186 | * |
| 187 | * Range: 0 - 255 (ms) |
| 188 | */ |
| 189 | CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR, |
| 190 | |
| 191 | /* |
| 192 | * Configure the min and max time BT gains the antenna |
| 193 | * in WLAN PSM / BT master EDR |
| 194 | * |
| 195 | * Range: 0 - 255 (ms) |
| 196 | */ |
| 197 | CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR, |
| 198 | CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR, |
| 199 | |
| 200 | /* |
| 201 | * The time after it expires no new WLAN trigger frame is trasmitted |
| 202 | * in WLAN PSM / BT master EDR |
| 203 | * |
| 204 | * Range: 0 - 255 (ms) |
| 205 | */ |
| 206 | CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR, |
| 207 | |
| 208 | /* |
| 209 | * Configure the min and max time BT gains the antenna |
| 210 | * in WLAN PSM / BT slave EDR |
| 211 | * |
| 212 | * Range: 0 - 255 (ms) |
| 213 | */ |
| 214 | CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR, |
| 215 | CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR, |
| 216 | |
| 217 | /* |
| 218 | * The time after it expires no new WLAN trigger frame is trasmitted |
| 219 | * in WLAN PSM / BT slave EDR |
| 220 | * |
| 221 | * Range: 0 - 255 (ms) |
| 222 | */ |
| 223 | CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR, |
| 224 | |
| 225 | /* |
| 226 | * RX guard time before the beginning of a new BT voice frame during |
| 227 | * which no new WLAN trigger frame is transmitted. |
| 228 | * |
| 229 | * Range: 0 - 100000 (us) |
| 230 | */ |
| 231 | CONF_SG_RXT, |
| 232 | |
| 233 | /* |
| 234 | * TX guard time before the beginning of a new BT voice frame during |
| 235 | * which no new WLAN frame is transmitted. |
| 236 | * |
| 237 | * Range: 0 - 100000 (us) |
| 238 | */ |
| 239 | |
| 240 | CONF_SG_TXT, |
| 241 | |
| 242 | /* |
| 243 | * Enable adaptive RXT/TXT algorithm. If disabled, the host values |
| 244 | * will be utilized. |
| 245 | * |
| 246 | * Range: 0 - disable, 1 - enable |
| 247 | */ |
| 248 | CONF_SG_ADAPTIVE_RXT_TXT, |
| 249 | |
| 250 | /* |
| 251 | * The used WLAN legacy service period during active BT ACL link |
| 252 | * |
| 253 | * Range: 0 - 255 (ms) |
| 254 | */ |
| 255 | CONF_SG_PS_POLL_TIMEOUT, |
| 256 | |
| 257 | /* |
| 258 | * The used WLAN UPSD service period during active BT ACL link |
| 259 | * |
| 260 | * Range: 0 - 255 (ms) |
| 261 | */ |
| 262 | CONF_SG_UPSD_TIMEOUT, |
| 263 | |
| 264 | /* |
| 265 | * Configure the min and max time BT gains the antenna |
| 266 | * in WLAN Active / BT master EDR |
| 267 | * |
| 268 | * Range: 0 - 255 (ms) |
| 269 | */ |
| 270 | CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR, |
| 271 | CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR, |
| 272 | |
| 273 | /* |
| 274 | * The maximum time WLAN can gain the antenna for |
| 275 | * in WLAN Active / BT master EDR |
| 276 | * |
| 277 | * Range: 0 - 255 (ms) |
| 278 | */ |
| 279 | CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR, |
| 280 | |
| 281 | /* |
| 282 | * Configure the min and max time BT gains the antenna |
| 283 | * in WLAN Active / BT slave EDR |
| 284 | * |
| 285 | * Range: 0 - 255 (ms) |
| 286 | */ |
| 287 | CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR, |
| 288 | CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR, |
| 289 | |
| 290 | /* |
| 291 | * The maximum time WLAN can gain the antenna for |
| 292 | * in WLAN Active / BT slave EDR |
| 293 | * |
| 294 | * Range: 0 - 255 (ms) |
| 295 | */ |
| 296 | CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR, |
| 297 | |
| 298 | /* |
| 299 | * Configure the min and max time BT gains the antenna |
| 300 | * in WLAN Active / BT basic rate |
| 301 | * |
| 302 | * Range: 0 - 255 (ms) |
| 303 | */ |
| 304 | CONF_SG_WLAN_ACTIVE_BT_ACL_MIN_BR, |
| 305 | CONF_SG_WLAN_ACTIVE_BT_ACL_MAX_BR, |
| 306 | |
| 307 | /* |
| 308 | * The maximum time WLAN can gain the antenna for |
| 309 | * in WLAN Active / BT basic rate |
| 310 | * |
| 311 | * Range: 0 - 255 (ms) |
| 312 | */ |
| 313 | CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_BR, |
| 314 | |
| 315 | /* |
| 316 | * Compensation percentage of WLAN passive scan window if initiated |
| 317 | * during BT voice |
| 318 | * |
| 319 | * Range: 0 - 1000 (%) |
| 320 | */ |
| 321 | CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3, |
| 322 | |
| 323 | /* |
| 324 | * Compensation percentage of WLAN passive scan window if initiated |
| 325 | * during BT A2DP |
| 326 | * |
| 327 | * Range: 0 - 1000 (%) |
| 328 | */ |
| 329 | CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP, |
| 330 | |
| 331 | /* |
| 332 | * Fixed time ensured for BT traffic to gain the antenna during WLAN |
| 333 | * passive scan. |
| 334 | * |
| 335 | * Range: 0 - 1000 ms |
| 336 | */ |
| 337 | CONF_SG_PASSIVE_SCAN_A2DP_BT_TIME, |
| 338 | |
| 339 | /* |
| 340 | * Fixed time ensured for WLAN traffic to gain the antenna during WLAN |
| 341 | * passive scan. |
| 342 | * |
| 343 | * Range: 0 - 1000 ms |
| 344 | */ |
| 345 | CONF_SG_PASSIVE_SCAN_A2DP_WLAN_TIME, |
| 346 | |
| 347 | /* |
| 348 | * Number of consequent BT voice frames not interrupted by WLAN |
| 349 | * |
| 350 | * Range: 0 - 100 |
| 351 | */ |
| 352 | CONF_SG_HV3_MAX_SERVED, |
| 353 | |
| 354 | /* |
| 355 | * Protection time of the DHCP procedure. |
| 356 | * |
| 357 | * Range: 0 - 100000 (ms) |
| 358 | */ |
| 359 | CONF_SG_DHCP_TIME, |
| 360 | |
| 361 | /* |
| 362 | * Compensation percentage of WLAN active scan window if initiated |
| 363 | * during BT A2DP |
| 364 | * |
| 365 | * Range: 0 - 1000 (%) |
| 366 | */ |
| 367 | CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP, |
| 368 | CONF_SG_TEMP_PARAM_1, |
| 369 | CONF_SG_TEMP_PARAM_2, |
| 370 | CONF_SG_TEMP_PARAM_3, |
| 371 | CONF_SG_TEMP_PARAM_4, |
| 372 | CONF_SG_TEMP_PARAM_5, |
| 373 | CONF_SG_PARAMS_MAX, |
| 374 | CONF_SG_PARAMS_ALL = 0xff |
| 375 | }; |
| 376 | |
Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 377 | struct conf_sg_settings { |
Juuso Oikarinen | 1b00f54 | 2010-03-18 12:26:30 +0200 | [diff] [blame] | 378 | __le32 params[CONF_SG_PARAMS_MAX]; |
| 379 | u8 state; |
Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 380 | }; |
| 381 | |
Juuso Oikarinen | 8793f9b | 2009-10-13 12:47:40 +0300 | [diff] [blame] | 382 | enum conf_rx_queue_type { |
| 383 | CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */ |
| 384 | CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */ |
| 385 | }; |
| 386 | |
| 387 | struct conf_rx_settings { |
| 388 | /* |
| 389 | * The maximum amount of time, in TU, before the |
| 390 | * firmware discards the MSDU. |
| 391 | * |
| 392 | * Range: 0 - 0xFFFFFFFF |
| 393 | */ |
| 394 | u32 rx_msdu_life_time; |
| 395 | |
| 396 | /* |
| 397 | * Packet detection threshold in the PHY. |
| 398 | * |
| 399 | * FIXME: details unknown. |
| 400 | */ |
| 401 | u32 packet_detection_threshold; |
| 402 | |
| 403 | /* |
| 404 | * The longest time the STA will wait to receive traffic from the AP |
| 405 | * after a PS-poll has been transmitted. |
| 406 | * |
| 407 | * Range: 0 - 200000 |
| 408 | */ |
| 409 | u16 ps_poll_timeout; |
| 410 | /* |
| 411 | * The longest time the STA will wait to receive traffic from the AP |
| 412 | * after a frame has been sent from an UPSD enabled queue. |
| 413 | * |
| 414 | * Range: 0 - 200000 |
| 415 | */ |
| 416 | u16 upsd_timeout; |
| 417 | |
| 418 | /* |
| 419 | * The number of octets in an MPDU, below which an RTS/CTS |
| 420 | * handshake is not performed. |
| 421 | * |
| 422 | * Range: 0 - 4096 |
| 423 | */ |
| 424 | u16 rts_threshold; |
| 425 | |
| 426 | /* |
| 427 | * The RX Clear Channel Assessment threshold in the PHY |
| 428 | * (the energy threshold). |
| 429 | * |
| 430 | * Range: ENABLE_ENERGY_D == 0x140A |
| 431 | * DISABLE_ENERGY_D == 0xFFEF |
| 432 | */ |
| 433 | u16 rx_cca_threshold; |
| 434 | |
| 435 | /* |
| 436 | * Occupied Rx mem-blocks number which requires interrupting the host |
| 437 | * (0 = no buffering, 0xffff = disabled). |
| 438 | * |
| 439 | * Range: u16 |
| 440 | */ |
| 441 | u16 irq_blk_threshold; |
| 442 | |
| 443 | /* |
| 444 | * Rx packets number which requires interrupting the host |
| 445 | * (0 = no buffering). |
| 446 | * |
| 447 | * Range: u16 |
| 448 | */ |
| 449 | u16 irq_pkt_threshold; |
| 450 | |
| 451 | /* |
| 452 | * Max time in msec the FW may delay RX-Complete interrupt. |
| 453 | * |
| 454 | * Range: 1 - 100 |
| 455 | */ |
| 456 | u16 irq_timeout; |
| 457 | |
| 458 | /* |
| 459 | * The RX queue type. |
| 460 | * |
| 461 | * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY, |
| 462 | */ |
| 463 | u8 queue_type; |
| 464 | }; |
| 465 | |
Juuso Oikarinen | 45b531a | 2009-10-13 12:47:41 +0300 | [diff] [blame] | 466 | #define CONF_TX_MAX_RATE_CLASSES 8 |
| 467 | |
| 468 | #define CONF_TX_RATE_MASK_UNSPECIFIED 0 |
Juuso Oikarinen | a6fe231 | 2009-12-11 15:40:58 +0200 | [diff] [blame] | 469 | #define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \ |
| 470 | CONF_HW_BIT_RATE_2MBPS) |
Juuso Oikarinen | 45b531a | 2009-10-13 12:47:41 +0300 | [diff] [blame] | 471 | #define CONF_TX_RATE_RETRY_LIMIT 10 |
| 472 | |
| 473 | struct conf_tx_rate_class { |
| 474 | |
| 475 | /* |
| 476 | * The rates enabled for this rate class. |
| 477 | * |
| 478 | * Range: CONF_HW_BIT_RATE_* bit mask |
| 479 | */ |
| 480 | u32 enabled_rates; |
| 481 | |
| 482 | /* |
| 483 | * The dot11 short retry limit used for TX retries. |
| 484 | * |
| 485 | * Range: u8 |
| 486 | */ |
| 487 | u8 short_retry_limit; |
| 488 | |
| 489 | /* |
| 490 | * The dot11 long retry limit used for TX retries. |
| 491 | * |
| 492 | * Range: u8 |
| 493 | */ |
| 494 | u8 long_retry_limit; |
| 495 | |
| 496 | /* |
| 497 | * Flags controlling the attributes of TX transmission. |
| 498 | * |
| 499 | * Range: bit 0: Truncate - when set, FW attempts to send a frame stop |
| 500 | * when the total valid per-rate attempts have |
| 501 | * been exhausted; otherwise transmissions |
| 502 | * will continue at the lowest available rate |
| 503 | * until the appropriate one of the |
| 504 | * short_retry_limit, long_retry_limit, |
| 505 | * dot11_max_transmit_msdu_life_time, or |
| 506 | * max_tx_life_time, is exhausted. |
| 507 | * 1: Preamble Override - indicates if the preamble type |
| 508 | * should be used in TX. |
| 509 | * 2: Preamble Type - the type of the preamble to be used by |
| 510 | * the policy (0 - long preamble, 1 - short preamble. |
| 511 | */ |
| 512 | u8 aflags; |
| 513 | }; |
| 514 | |
| 515 | #define CONF_TX_MAX_AC_COUNT 4 |
| 516 | |
| 517 | /* Slot number setting to start transmission at PIFS interval */ |
| 518 | #define CONF_TX_AIFS_PIFS 1 |
| 519 | /* Slot number setting to start transmission at DIFS interval normal |
| 520 | * DCF access */ |
| 521 | #define CONF_TX_AIFS_DIFS 2 |
| 522 | |
| 523 | |
| 524 | enum conf_tx_ac { |
| 525 | CONF_TX_AC_BE = 0, /* best effort / legacy */ |
| 526 | CONF_TX_AC_BK = 1, /* background */ |
| 527 | CONF_TX_AC_VI = 2, /* video */ |
| 528 | CONF_TX_AC_VO = 3, /* voice */ |
| 529 | CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */ |
| 530 | CONF_TX_AC_ANY_TID = 0x1f |
| 531 | }; |
| 532 | |
| 533 | struct conf_tx_ac_category { |
| 534 | /* |
| 535 | * The AC class identifier. |
| 536 | * |
| 537 | * Range: enum conf_tx_ac |
| 538 | */ |
| 539 | u8 ac; |
| 540 | |
| 541 | /* |
| 542 | * The contention window minimum size (in slots) for the access |
| 543 | * class. |
| 544 | * |
| 545 | * Range: u8 |
| 546 | */ |
| 547 | u8 cw_min; |
| 548 | |
| 549 | /* |
| 550 | * The contention window maximum size (in slots) for the access |
| 551 | * class. |
| 552 | * |
| 553 | * Range: u8 |
| 554 | */ |
| 555 | u16 cw_max; |
| 556 | |
| 557 | /* |
| 558 | * The AIF value (in slots) for the access class. |
| 559 | * |
| 560 | * Range: u8 |
| 561 | */ |
| 562 | u8 aifsn; |
| 563 | |
| 564 | /* |
| 565 | * The TX Op Limit (in microseconds) for the access class. |
| 566 | * |
| 567 | * Range: u16 |
| 568 | */ |
| 569 | u16 tx_op_limit; |
| 570 | }; |
| 571 | |
| 572 | #define CONF_TX_MAX_TID_COUNT 7 |
| 573 | |
| 574 | enum { |
| 575 | CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/ |
| 576 | CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/ |
| 577 | CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/ |
| 578 | }; |
| 579 | |
| 580 | enum { |
| 581 | CONF_PS_SCHEME_LEGACY = 0, |
| 582 | CONF_PS_SCHEME_UPSD_TRIGGER = 1, |
| 583 | CONF_PS_SCHEME_LEGACY_PSPOLL = 2, |
| 584 | CONF_PS_SCHEME_SAPSD = 3, |
| 585 | }; |
| 586 | |
| 587 | enum { |
| 588 | CONF_ACK_POLICY_LEGACY = 0, |
| 589 | CONF_ACK_POLICY_NO_ACK = 1, |
| 590 | CONF_ACK_POLICY_BLOCK = 2, |
| 591 | }; |
| 592 | |
| 593 | |
| 594 | struct conf_tx_tid { |
| 595 | u8 queue_id; |
| 596 | u8 channel_type; |
| 597 | u8 tsid; |
| 598 | u8 ps_scheme; |
| 599 | u8 ack_policy; |
| 600 | u32 apsd_conf[2]; |
| 601 | }; |
| 602 | |
| 603 | struct conf_tx_settings { |
| 604 | /* |
| 605 | * The TX ED value for TELEC Enable/Disable. |
| 606 | * |
| 607 | * Range: 0, 1 |
| 608 | */ |
| 609 | u8 tx_energy_detection; |
| 610 | |
| 611 | /* |
| 612 | * Configuration for rate classes for TX (currently only one |
| 613 | * rate class supported.) |
| 614 | */ |
| 615 | struct conf_tx_rate_class rc_conf; |
| 616 | |
| 617 | /* |
| 618 | * Configuration for access categories for TX rate control. |
| 619 | */ |
| 620 | u8 ac_conf_count; |
| 621 | struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT]; |
| 622 | |
| 623 | /* |
| 624 | * Configuration for TID parameters. |
| 625 | */ |
| 626 | u8 tid_conf_count; |
| 627 | struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT]; |
| 628 | |
| 629 | /* |
| 630 | * The TX fragmentation threshold. |
| 631 | * |
| 632 | * Range: u16 |
| 633 | */ |
| 634 | u16 frag_threshold; |
| 635 | |
| 636 | /* |
| 637 | * Max time in msec the FW may delay frame TX-Complete interrupt. |
| 638 | * |
| 639 | * Range: u16 |
| 640 | */ |
| 641 | u16 tx_compl_timeout; |
| 642 | |
| 643 | /* |
| 644 | * Completed TX packet count which requires to issue the TX-Complete |
| 645 | * interrupt. |
| 646 | * |
| 647 | * Range: u16 |
| 648 | */ |
| 649 | u16 tx_compl_threshold; |
| 650 | |
| 651 | }; |
| 652 | |
Juuso Oikarinen | 51f2be2 | 2009-10-13 12:47:42 +0300 | [diff] [blame] | 653 | enum { |
| 654 | CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/ |
| 655 | CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/ |
| 656 | CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */ |
| 657 | CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */ |
| 658 | CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F |
| 659 | }; |
| 660 | |
| 661 | #define CONF_MAX_BCN_FILT_IE_COUNT 32 |
| 662 | |
| 663 | #define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0) |
| 664 | #define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1) |
| 665 | |
| 666 | #define CONF_BCN_IE_OUI_LEN 3 |
| 667 | #define CONF_BCN_IE_VER_LEN 2 |
| 668 | |
| 669 | struct conf_bcn_filt_rule { |
| 670 | /* |
| 671 | * IE number to which to associate a rule. |
| 672 | * |
| 673 | * Range: u8 |
| 674 | */ |
| 675 | u8 ie; |
| 676 | |
| 677 | /* |
| 678 | * Rule to associate with the specific ie. |
| 679 | * |
| 680 | * Range: CONF_BCN_RULE_PASS_ON_* |
| 681 | */ |
| 682 | u8 rule; |
| 683 | |
| 684 | /* |
| 685 | * OUI for the vendor specifie IE (221) |
| 686 | */ |
| 687 | u8 oui[CONF_BCN_IE_OUI_LEN]; |
| 688 | |
| 689 | /* |
| 690 | * Type for the vendor specifie IE (221) |
| 691 | */ |
| 692 | u8 type; |
| 693 | |
| 694 | /* |
| 695 | * Version for the vendor specifie IE (221) |
| 696 | */ |
| 697 | u8 version[CONF_BCN_IE_VER_LEN]; |
| 698 | }; |
| 699 | |
| 700 | #define CONF_MAX_RSSI_SNR_TRIGGERS 8 |
| 701 | |
| 702 | enum { |
| 703 | CONF_TRIG_METRIC_RSSI_BEACON = 0, |
| 704 | CONF_TRIG_METRIC_RSSI_DATA, |
| 705 | CONF_TRIG_METRIC_SNR_BEACON, |
| 706 | CONF_TRIG_METRIC_SNR_DATA |
| 707 | }; |
| 708 | |
| 709 | enum { |
| 710 | CONF_TRIG_EVENT_TYPE_LEVEL = 0, |
| 711 | CONF_TRIG_EVENT_TYPE_EDGE |
| 712 | }; |
| 713 | |
| 714 | enum { |
| 715 | CONF_TRIG_EVENT_DIR_LOW = 0, |
| 716 | CONF_TRIG_EVENT_DIR_HIGH, |
| 717 | CONF_TRIG_EVENT_DIR_BIDIR |
| 718 | }; |
| 719 | |
| 720 | |
| 721 | struct conf_sig_trigger { |
| 722 | /* |
| 723 | * The RSSI / SNR threshold value. |
| 724 | * |
| 725 | * FIXME: what is the range? |
| 726 | */ |
| 727 | s16 threshold; |
| 728 | |
| 729 | /* |
| 730 | * Minimum delay between two trigger events for this trigger in ms. |
| 731 | * |
| 732 | * Range: 0 - 60000 |
| 733 | */ |
| 734 | u16 pacing; |
| 735 | |
| 736 | /* |
| 737 | * The measurement data source for this trigger. |
| 738 | * |
| 739 | * Range: CONF_TRIG_METRIC_* |
| 740 | */ |
| 741 | u8 metric; |
| 742 | |
| 743 | /* |
| 744 | * The trigger type of this trigger. |
| 745 | * |
| 746 | * Range: CONF_TRIG_EVENT_TYPE_* |
| 747 | */ |
| 748 | u8 type; |
| 749 | |
| 750 | /* |
| 751 | * The direction of the trigger. |
| 752 | * |
| 753 | * Range: CONF_TRIG_EVENT_DIR_* |
| 754 | */ |
| 755 | u8 direction; |
| 756 | |
| 757 | /* |
| 758 | * Hysteresis range of the trigger around the threshold (in dB) |
| 759 | * |
| 760 | * Range: u8 |
| 761 | */ |
| 762 | u8 hysteresis; |
| 763 | |
| 764 | /* |
| 765 | * Index of the trigger rule. |
| 766 | * |
| 767 | * Range: 0 - CONF_MAX_RSSI_SNR_TRIGGERS-1 |
| 768 | */ |
| 769 | u8 index; |
| 770 | |
| 771 | /* |
| 772 | * Enable / disable this rule (to use for clearing rules.) |
| 773 | * |
| 774 | * Range: 1 - Enabled, 2 - Not enabled |
| 775 | */ |
| 776 | u8 enable; |
| 777 | }; |
| 778 | |
| 779 | struct conf_sig_weights { |
| 780 | |
| 781 | /* |
| 782 | * RSSI from beacons average weight. |
| 783 | * |
| 784 | * Range: u8 |
| 785 | */ |
| 786 | u8 rssi_bcn_avg_weight; |
| 787 | |
| 788 | /* |
| 789 | * RSSI from data average weight. |
| 790 | * |
| 791 | * Range: u8 |
| 792 | */ |
| 793 | u8 rssi_pkt_avg_weight; |
| 794 | |
| 795 | /* |
| 796 | * SNR from beacons average weight. |
| 797 | * |
| 798 | * Range: u8 |
| 799 | */ |
| 800 | u8 snr_bcn_avg_weight; |
| 801 | |
| 802 | /* |
| 803 | * SNR from data average weight. |
| 804 | * |
| 805 | * Range: u8 |
| 806 | */ |
| 807 | u8 snr_pkt_avg_weight; |
| 808 | }; |
| 809 | |
| 810 | enum conf_bcn_filt_mode { |
| 811 | CONF_BCN_FILT_MODE_DISABLED = 0, |
| 812 | CONF_BCN_FILT_MODE_ENABLED = 1 |
| 813 | }; |
| 814 | |
Juuso Oikarinen | 11f70f9 | 2009-10-13 12:47:46 +0300 | [diff] [blame] | 815 | enum conf_bet_mode { |
| 816 | CONF_BET_MODE_DISABLE = 0, |
| 817 | CONF_BET_MODE_ENABLE = 1, |
| 818 | }; |
| 819 | |
Juuso Oikarinen | 51f2be2 | 2009-10-13 12:47:42 +0300 | [diff] [blame] | 820 | struct conf_conn_settings { |
| 821 | /* |
| 822 | * Firmware wakeup conditions configuration. The host may set only |
| 823 | * one bit. |
| 824 | * |
| 825 | * Range: CONF_WAKE_UP_EVENT_* |
| 826 | */ |
| 827 | u8 wake_up_event; |
| 828 | |
| 829 | /* |
| 830 | * Listen interval for beacons or Dtims. |
| 831 | * |
| 832 | * Range: 0 for beacon and Dtim wakeup |
| 833 | * 1-10 for x Dtims |
| 834 | * 1-255 for x beacons |
| 835 | */ |
| 836 | u8 listen_interval; |
| 837 | |
| 838 | /* |
| 839 | * Enable or disable the beacon filtering. |
| 840 | * |
| 841 | * Range: CONF_BCN_FILT_MODE_* |
| 842 | */ |
| 843 | enum conf_bcn_filt_mode bcn_filt_mode; |
| 844 | |
| 845 | /* |
| 846 | * Configure Beacon filter pass-thru rules. |
| 847 | */ |
| 848 | u8 bcn_filt_ie_count; |
| 849 | struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT]; |
| 850 | |
| 851 | /* |
| 852 | * The number of consequtive beacons to lose, before the firmware |
| 853 | * becomes out of synch. |
| 854 | * |
| 855 | * Range: u32 |
| 856 | */ |
| 857 | u32 synch_fail_thold; |
| 858 | |
| 859 | /* |
| 860 | * After out-of-synch, the number of TU's to wait without a further |
| 861 | * received beacon (or probe response) before issuing the BSS_EVENT_LOSE |
| 862 | * event. |
| 863 | * |
| 864 | * Range: u32 |
| 865 | */ |
| 866 | u32 bss_lose_timeout; |
| 867 | |
| 868 | /* |
| 869 | * Beacon receive timeout. |
| 870 | * |
| 871 | * Range: u32 |
| 872 | */ |
| 873 | u32 beacon_rx_timeout; |
| 874 | |
| 875 | /* |
| 876 | * Broadcast receive timeout. |
| 877 | * |
| 878 | * Range: u32 |
| 879 | */ |
| 880 | u32 broadcast_timeout; |
| 881 | |
| 882 | /* |
| 883 | * Enable/disable reception of broadcast packets in power save mode |
| 884 | * |
| 885 | * Range: 1 - enable, 0 - disable |
| 886 | */ |
| 887 | u8 rx_broadcast_in_ps; |
| 888 | |
| 889 | /* |
| 890 | * Consequtive PS Poll failures before sending event to driver |
| 891 | * |
| 892 | * Range: u8 |
| 893 | */ |
| 894 | u8 ps_poll_threshold; |
| 895 | |
| 896 | /* |
| 897 | * Configuration of signal (rssi/snr) triggers. |
| 898 | */ |
| 899 | u8 sig_trigger_count; |
| 900 | struct conf_sig_trigger sig_trigger[CONF_MAX_RSSI_SNR_TRIGGERS]; |
| 901 | |
| 902 | /* |
| 903 | * Configuration of signal average weights. |
| 904 | */ |
| 905 | struct conf_sig_weights sig_weights; |
Juuso Oikarinen | 11f70f9 | 2009-10-13 12:47:46 +0300 | [diff] [blame] | 906 | |
| 907 | /* |
| 908 | * Specifies if beacon early termination procedure is enabled or |
| 909 | * disabled. |
| 910 | * |
| 911 | * Range: CONF_BET_MODE_* |
| 912 | */ |
| 913 | u8 bet_enable; |
| 914 | |
| 915 | /* |
| 916 | * Specifies the maximum number of consecutive beacons that may be |
| 917 | * early terminated. After this number is reached at least one full |
| 918 | * beacon must be correctly received in FW before beacon ET |
| 919 | * resumes. |
| 920 | * |
| 921 | * Range 0 - 255 |
| 922 | */ |
| 923 | u8 bet_max_consecutive; |
Juuso Oikarinen | 19ad071 | 2009-11-02 20:22:11 +0200 | [diff] [blame] | 924 | |
| 925 | /* |
| 926 | * Specifies the maximum number of times to try PSM entry if it fails |
| 927 | * (if sending the appropriate null-func message fails.) |
| 928 | * |
| 929 | * Range 0 - 255 |
| 930 | */ |
| 931 | u8 psm_entry_retries; |
Juuso Oikarinen | 51f2be2 | 2009-10-13 12:47:42 +0300 | [diff] [blame] | 932 | }; |
| 933 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 934 | enum { |
| 935 | CONF_REF_CLK_19_2_E, |
| 936 | CONF_REF_CLK_26_E, |
| 937 | CONF_REF_CLK_38_4_E, |
| 938 | CONF_REF_CLK_52_E |
| 939 | }; |
| 940 | |
Teemu Paasikivi | 1ebec3d | 2009-10-13 12:47:48 +0300 | [diff] [blame] | 941 | enum single_dual_band_enum { |
| 942 | CONF_SINGLE_BAND, |
| 943 | CONF_DUAL_BAND |
| 944 | }; |
| 945 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 946 | #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15 |
| 947 | #define CONF_NUMBER_OF_SUB_BANDS_5 7 |
| 948 | #define CONF_NUMBER_OF_RATE_GROUPS 6 |
| 949 | #define CONF_NUMBER_OF_CHANNELS_2_4 14 |
| 950 | #define CONF_NUMBER_OF_CHANNELS_5 35 |
| 951 | |
| 952 | struct conf_radio_parms { |
| 953 | /* |
Juuso Oikarinen | 152ee6e | 2010-02-18 13:25:42 +0200 | [diff] [blame] | 954 | * FEM parameter set to use |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 955 | * |
Juuso Oikarinen | 152ee6e | 2010-02-18 13:25:42 +0200 | [diff] [blame] | 956 | * Range: 0 or 1 |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 957 | */ |
Juuso Oikarinen | 152ee6e | 2010-02-18 13:25:42 +0200 | [diff] [blame] | 958 | u8 fem; |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 959 | }; |
| 960 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 961 | struct conf_init_settings { |
| 962 | /* |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 963 | * Configure radio parameters. |
| 964 | */ |
| 965 | struct conf_radio_parms radioparam; |
| 966 | |
| 967 | }; |
| 968 | |
Luciano Coelho | 6e92b41 | 2009-12-11 15:40:50 +0200 | [diff] [blame] | 969 | struct conf_itrim_settings { |
| 970 | /* enable dco itrim */ |
| 971 | u8 enable; |
| 972 | |
| 973 | /* moderation timeout in microsecs from the last TX */ |
| 974 | u32 timeout; |
| 975 | }; |
| 976 | |
Juuso Oikarinen | 38ad2d8 | 2009-12-11 15:41:08 +0200 | [diff] [blame] | 977 | struct conf_pm_config_settings { |
| 978 | /* |
| 979 | * Host clock settling time |
| 980 | * |
| 981 | * Range: 0 - 30000 us |
| 982 | */ |
| 983 | u32 host_clk_settling_time; |
| 984 | |
| 985 | /* |
| 986 | * Host fast wakeup support |
| 987 | * |
| 988 | * Range: true, false |
| 989 | */ |
| 990 | bool host_fast_wakeup_support; |
| 991 | }; |
| 992 | |
Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 993 | struct conf_drv_settings { |
| 994 | struct conf_sg_settings sg; |
Juuso Oikarinen | 8793f9b | 2009-10-13 12:47:40 +0300 | [diff] [blame] | 995 | struct conf_rx_settings rx; |
Juuso Oikarinen | 45b531a | 2009-10-13 12:47:41 +0300 | [diff] [blame] | 996 | struct conf_tx_settings tx; |
Juuso Oikarinen | 51f2be2 | 2009-10-13 12:47:42 +0300 | [diff] [blame] | 997 | struct conf_conn_settings conn; |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 998 | struct conf_init_settings init; |
Luciano Coelho | 6e92b41 | 2009-12-11 15:40:50 +0200 | [diff] [blame] | 999 | struct conf_itrim_settings itrim; |
Juuso Oikarinen | 38ad2d8 | 2009-12-11 15:41:08 +0200 | [diff] [blame] | 1000 | struct conf_pm_config_settings pm_config; |
Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 1001 | }; |
| 1002 | |
| 1003 | #endif |