diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-10-13 05:47:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:08 -0400 |
commit | 45b531a86f93c82d8e390e19a6258111b3627bb0 (patch) | |
tree | 8e574f2332a6f91666e5f1830204d624535cbb69 /drivers/net/wireless/wl12xx/wl1271_conf.h | |
parent | 8793f9bb19c00b26532e37f1f516e1d9c7bc0476 (diff) |
wl1271: Add config structure for TX path parameters
Add a configuration structure for TX path parameters, and set defalt
configuration values there.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_conf.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_conf.h | 187 |
1 files changed, 187 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h index 8bf8bff54b59..3c5ce3100e6e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_conf.h +++ b/drivers/net/wireless/wl12xx/wl1271_conf.h | |||
@@ -255,9 +255,196 @@ struct conf_rx_settings { | |||
255 | u8 queue_type; | 255 | u8 queue_type; |
256 | }; | 256 | }; |
257 | 257 | ||
258 | #define CONF_TX_MAX_RATE_CLASSES 8 | ||
259 | |||
260 | #define CONF_TX_RATE_MASK_UNSPECIFIED 0 | ||
261 | #define CONF_TX_RATE_MASK_ALL 0x1eff | ||
262 | #define CONF_TX_RATE_RETRY_LIMIT 10 | ||
263 | |||
264 | struct conf_tx_rate_class { | ||
265 | |||
266 | /* | ||
267 | * The rates enabled for this rate class. | ||
268 | * | ||
269 | * Range: CONF_HW_BIT_RATE_* bit mask | ||
270 | */ | ||
271 | u32 enabled_rates; | ||
272 | |||
273 | /* | ||
274 | * The dot11 short retry limit used for TX retries. | ||
275 | * | ||
276 | * Range: u8 | ||
277 | */ | ||
278 | u8 short_retry_limit; | ||
279 | |||
280 | /* | ||
281 | * The dot11 long retry limit used for TX retries. | ||
282 | * | ||
283 | * Range: u8 | ||
284 | */ | ||
285 | u8 long_retry_limit; | ||
286 | |||
287 | /* | ||
288 | * Flags controlling the attributes of TX transmission. | ||
289 | * | ||
290 | * Range: bit 0: Truncate - when set, FW attempts to send a frame stop | ||
291 | * when the total valid per-rate attempts have | ||
292 | * been exhausted; otherwise transmissions | ||
293 | * will continue at the lowest available rate | ||
294 | * until the appropriate one of the | ||
295 | * short_retry_limit, long_retry_limit, | ||
296 | * dot11_max_transmit_msdu_life_time, or | ||
297 | * max_tx_life_time, is exhausted. | ||
298 | * 1: Preamble Override - indicates if the preamble type | ||
299 | * should be used in TX. | ||
300 | * 2: Preamble Type - the type of the preamble to be used by | ||
301 | * the policy (0 - long preamble, 1 - short preamble. | ||
302 | */ | ||
303 | u8 aflags; | ||
304 | }; | ||
305 | |||
306 | #define CONF_TX_MAX_AC_COUNT 4 | ||
307 | |||
308 | /* Slot number setting to start transmission at PIFS interval */ | ||
309 | #define CONF_TX_AIFS_PIFS 1 | ||
310 | /* Slot number setting to start transmission at DIFS interval normal | ||
311 | * DCF access */ | ||
312 | #define CONF_TX_AIFS_DIFS 2 | ||
313 | |||
314 | |||
315 | enum conf_tx_ac { | ||
316 | CONF_TX_AC_BE = 0, /* best effort / legacy */ | ||
317 | CONF_TX_AC_BK = 1, /* background */ | ||
318 | CONF_TX_AC_VI = 2, /* video */ | ||
319 | CONF_TX_AC_VO = 3, /* voice */ | ||
320 | CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */ | ||
321 | CONF_TX_AC_ANY_TID = 0x1f | ||
322 | }; | ||
323 | |||
324 | struct conf_tx_ac_category { | ||
325 | /* | ||
326 | * The AC class identifier. | ||
327 | * | ||
328 | * Range: enum conf_tx_ac | ||
329 | */ | ||
330 | u8 ac; | ||
331 | |||
332 | /* | ||
333 | * The contention window minimum size (in slots) for the access | ||
334 | * class. | ||
335 | * | ||
336 | * Range: u8 | ||
337 | */ | ||
338 | u8 cw_min; | ||
339 | |||
340 | /* | ||
341 | * The contention window maximum size (in slots) for the access | ||
342 | * class. | ||
343 | * | ||
344 | * Range: u8 | ||
345 | */ | ||
346 | u16 cw_max; | ||
347 | |||
348 | /* | ||
349 | * The AIF value (in slots) for the access class. | ||
350 | * | ||
351 | * Range: u8 | ||
352 | */ | ||
353 | u8 aifsn; | ||
354 | |||
355 | /* | ||
356 | * The TX Op Limit (in microseconds) for the access class. | ||
357 | * | ||
358 | * Range: u16 | ||
359 | */ | ||
360 | u16 tx_op_limit; | ||
361 | }; | ||
362 | |||
363 | #define CONF_TX_MAX_TID_COUNT 7 | ||
364 | |||
365 | enum { | ||
366 | CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/ | ||
367 | CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/ | ||
368 | CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/ | ||
369 | }; | ||
370 | |||
371 | enum { | ||
372 | CONF_PS_SCHEME_LEGACY = 0, | ||
373 | CONF_PS_SCHEME_UPSD_TRIGGER = 1, | ||
374 | CONF_PS_SCHEME_LEGACY_PSPOLL = 2, | ||
375 | CONF_PS_SCHEME_SAPSD = 3, | ||
376 | }; | ||
377 | |||
378 | enum { | ||
379 | CONF_ACK_POLICY_LEGACY = 0, | ||
380 | CONF_ACK_POLICY_NO_ACK = 1, | ||
381 | CONF_ACK_POLICY_BLOCK = 2, | ||
382 | }; | ||
383 | |||
384 | |||
385 | struct conf_tx_tid { | ||
386 | u8 queue_id; | ||
387 | u8 channel_type; | ||
388 | u8 tsid; | ||
389 | u8 ps_scheme; | ||
390 | u8 ack_policy; | ||
391 | u32 apsd_conf[2]; | ||
392 | }; | ||
393 | |||
394 | struct conf_tx_settings { | ||
395 | /* | ||
396 | * The TX ED value for TELEC Enable/Disable. | ||
397 | * | ||
398 | * Range: 0, 1 | ||
399 | */ | ||
400 | u8 tx_energy_detection; | ||
401 | |||
402 | /* | ||
403 | * Configuration for rate classes for TX (currently only one | ||
404 | * rate class supported.) | ||
405 | */ | ||
406 | struct conf_tx_rate_class rc_conf; | ||
407 | |||
408 | /* | ||
409 | * Configuration for access categories for TX rate control. | ||
410 | */ | ||
411 | u8 ac_conf_count; | ||
412 | struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT]; | ||
413 | |||
414 | /* | ||
415 | * Configuration for TID parameters. | ||
416 | */ | ||
417 | u8 tid_conf_count; | ||
418 | struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT]; | ||
419 | |||
420 | /* | ||
421 | * The TX fragmentation threshold. | ||
422 | * | ||
423 | * Range: u16 | ||
424 | */ | ||
425 | u16 frag_threshold; | ||
426 | |||
427 | /* | ||
428 | * Max time in msec the FW may delay frame TX-Complete interrupt. | ||
429 | * | ||
430 | * Range: u16 | ||
431 | */ | ||
432 | u16 tx_compl_timeout; | ||
433 | |||
434 | /* | ||
435 | * Completed TX packet count which requires to issue the TX-Complete | ||
436 | * interrupt. | ||
437 | * | ||
438 | * Range: u16 | ||
439 | */ | ||
440 | u16 tx_compl_threshold; | ||
441 | |||
442 | }; | ||
443 | |||
258 | struct conf_drv_settings { | 444 | struct conf_drv_settings { |
259 | struct conf_sg_settings sg; | 445 | struct conf_sg_settings sg; |
260 | struct conf_rx_settings rx; | 446 | struct conf_rx_settings rx; |
447 | struct conf_tx_settings tx; | ||
261 | }; | 448 | }; |
262 | 449 | ||
263 | #endif | 450 | #endif |