diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-commands.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-commands.h | 97 |
1 files changed, 80 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h index 4a8fc6878cff..4885971a1536 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h | |||
@@ -445,6 +445,23 @@ struct iwl3945_csa_notification { | |||
445 | * Quality-of-Service (QOS) Commands & Responses: | 445 | * Quality-of-Service (QOS) Commands & Responses: |
446 | * | 446 | * |
447 | *****************************************************************************/ | 447 | *****************************************************************************/ |
448 | |||
449 | /** | ||
450 | * struct iwl_ac_qos -- QOS timing params for REPLY_QOS_PARAM | ||
451 | * One for each of 4 EDCA access categories in struct iwl_qosparam_cmd | ||
452 | * | ||
453 | * @cw_min: Contention window, start value in numbers of slots. | ||
454 | * Should be a power-of-2, minus 1. Device's default is 0x0f. | ||
455 | * @cw_max: Contention window, max value in numbers of slots. | ||
456 | * Should be a power-of-2, minus 1. Device's default is 0x3f. | ||
457 | * @aifsn: Number of slots in Arbitration Interframe Space (before | ||
458 | * performing random backoff timing prior to Tx). Device default 1. | ||
459 | * @edca_txop: Length of Tx opportunity, in uSecs. Device default is 0. | ||
460 | * | ||
461 | * Device will automatically increase contention window by (2*CW) + 1 for each | ||
462 | * transmission retry. Device uses cw_max as a bit mask, ANDed with new CW | ||
463 | * value, to cap the CW value. | ||
464 | */ | ||
448 | struct iwl3945_ac_qos { | 465 | struct iwl3945_ac_qos { |
449 | __le16 cw_min; | 466 | __le16 cw_min; |
450 | __le16 cw_max; | 467 | __le16 cw_max; |
@@ -458,14 +475,14 @@ struct iwl3945_ac_qos { | |||
458 | #define QOS_PARAM_FLG_TGN_MSK __constant_cpu_to_le32(0x02) | 475 | #define QOS_PARAM_FLG_TGN_MSK __constant_cpu_to_le32(0x02) |
459 | #define QOS_PARAM_FLG_TXOP_TYPE_MSK __constant_cpu_to_le32(0x10) | 476 | #define QOS_PARAM_FLG_TXOP_TYPE_MSK __constant_cpu_to_le32(0x10) |
460 | 477 | ||
461 | /* | 478 | /* Number of Access Categories (AC) (EDCA), queues 0..3 */ |
462 | * TXFIFO Queue number defines | ||
463 | */ | ||
464 | /* number of Access categories (AC) (EDCA), queues 0..3 */ | ||
465 | #define AC_NUM 4 | 479 | #define AC_NUM 4 |
466 | 480 | ||
467 | /* | 481 | /* |
468 | * REPLY_QOS_PARAM = 0x13 (command, has simple generic response) | 482 | * REPLY_QOS_PARAM = 0x13 (command, has simple generic response) |
483 | * | ||
484 | * This command sets up timings for each of the 4 prioritized EDCA Tx FIFOs | ||
485 | * 0: Background, 1: Best Effort, 2: Video, 3: Voice. | ||
469 | */ | 486 | */ |
470 | struct iwl3945_qosparam_cmd { | 487 | struct iwl3945_qosparam_cmd { |
471 | __le32 qos_flags; | 488 | __le32 qos_flags; |
@@ -480,22 +497,21 @@ struct iwl3945_qosparam_cmd { | |||
480 | /* | 497 | /* |
481 | * Multi station support | 498 | * Multi station support |
482 | */ | 499 | */ |
500 | |||
501 | /* Special, dedicated locations within device's station table */ | ||
483 | #define IWL_AP_ID 0 | 502 | #define IWL_AP_ID 0 |
484 | #define IWL_MULTICAST_ID 1 | 503 | #define IWL_MULTICAST_ID 1 |
485 | #define IWL_STA_ID 2 | 504 | #define IWL_STA_ID 2 |
486 | |||
487 | #define IWL3945_BROADCAST_ID 24 | 505 | #define IWL3945_BROADCAST_ID 24 |
488 | #define IWL3945_STATION_COUNT 25 | 506 | #define IWL3945_STATION_COUNT 25 |
489 | 507 | ||
490 | #define IWL4965_BROADCAST_ID 31 | ||
491 | #define IWL4965_STATION_COUNT 32 | ||
492 | |||
493 | #define IWL_STATION_COUNT 32 /* MAX(3945,4965)*/ | 508 | #define IWL_STATION_COUNT 32 /* MAX(3945,4965)*/ |
494 | #define IWL_INVALID_STATION 255 | 509 | #define IWL_INVALID_STATION 255 |
495 | 510 | ||
496 | #define STA_FLG_TX_RATE_MSK __constant_cpu_to_le32(1<<2); | 511 | #define STA_FLG_TX_RATE_MSK __constant_cpu_to_le32(1<<2); |
497 | #define STA_FLG_PWR_SAVE_MSK __constant_cpu_to_le32(1<<8); | 512 | #define STA_FLG_PWR_SAVE_MSK __constant_cpu_to_le32(1<<8); |
498 | 513 | ||
514 | /* Use in mode field. 1: modify existing entry, 0: add new station entry */ | ||
499 | #define STA_CONTROL_MODIFY_MSK 0x01 | 515 | #define STA_CONTROL_MODIFY_MSK 0x01 |
500 | 516 | ||
501 | /* key flags __le16*/ | 517 | /* key flags __le16*/ |
@@ -508,13 +524,10 @@ struct iwl3945_qosparam_cmd { | |||
508 | #define STA_KEY_FLG_KEYID_POS 8 | 524 | #define STA_KEY_FLG_KEYID_POS 8 |
509 | #define STA_KEY_FLG_INVALID __constant_cpu_to_le16(0x0800) | 525 | #define STA_KEY_FLG_INVALID __constant_cpu_to_le16(0x0800) |
510 | 526 | ||
511 | /* modify flags */ | 527 | /* Flags indicate whether to modify vs. don't change various station params */ |
512 | #define STA_MODIFY_KEY_MASK 0x01 | 528 | #define STA_MODIFY_KEY_MASK 0x01 |
513 | #define STA_MODIFY_TID_DISABLE_TX 0x02 | 529 | #define STA_MODIFY_TID_DISABLE_TX 0x02 |
514 | #define STA_MODIFY_TX_RATE_MSK 0x04 | 530 | #define STA_MODIFY_TX_RATE_MSK 0x04 |
515 | #define STA_MODIFY_ADDBA_TID_MSK 0x08 | ||
516 | #define STA_MODIFY_DELBA_TID_MSK 0x10 | ||
517 | #define BUILD_RAxTID(sta_id, tid) (((sta_id) << 4) + (tid)) | ||
518 | 531 | ||
519 | /* | 532 | /* |
520 | * Antenna masks: | 533 | * Antenna masks: |
@@ -537,6 +550,18 @@ struct iwl3945_keyinfo { | |||
537 | u8 key[16]; /* 16-byte unicast decryption key */ | 550 | u8 key[16]; /* 16-byte unicast decryption key */ |
538 | } __attribute__ ((packed)); | 551 | } __attribute__ ((packed)); |
539 | 552 | ||
553 | /** | ||
554 | * struct sta_id_modify | ||
555 | * @addr[ETH_ALEN]: station's MAC address | ||
556 | * @sta_id: index of station in uCode's station table | ||
557 | * @modify_mask: STA_MODIFY_*, 1: modify, 0: don't change | ||
558 | * | ||
559 | * Driver selects unused table index when adding new station, | ||
560 | * or the index to a pre-existing station entry when modifying that station. | ||
561 | * Some indexes have special purposes (IWL_AP_ID, index 0, is for AP). | ||
562 | * | ||
563 | * modify_mask flags select which parameters to modify vs. leave alone. | ||
564 | */ | ||
540 | struct sta_id_modify { | 565 | struct sta_id_modify { |
541 | u8 addr[ETH_ALEN]; | 566 | u8 addr[ETH_ALEN]; |
542 | __le16 reserved1; | 567 | __le16 reserved1; |
@@ -547,29 +572,67 @@ struct sta_id_modify { | |||
547 | 572 | ||
548 | /* | 573 | /* |
549 | * REPLY_ADD_STA = 0x18 (command) | 574 | * REPLY_ADD_STA = 0x18 (command) |
575 | * | ||
576 | * The device contains an internal table of per-station information, | ||
577 | * with info on security keys, aggregation parameters, and Tx rates for | ||
578 | * initial Tx attempt and any retries (4965 uses REPLY_TX_LINK_QUALITY_CMD, | ||
579 | * 3945 uses REPLY_RATE_SCALE to set up rate tables). | ||
580 | * | ||
581 | * REPLY_ADD_STA sets up the table entry for one station, either creating | ||
582 | * a new entry, or modifying a pre-existing one. | ||
583 | * | ||
584 | * NOTE: RXON command (without "associated" bit set) wipes the station table | ||
585 | * clean. Moving into RF_KILL state does this also. Driver must set up | ||
586 | * new station table before transmitting anything on the RXON channel | ||
587 | * (except active scans or active measurements; those commands carry | ||
588 | * their own txpower/rate setup data). | ||
589 | * | ||
590 | * When getting started on a new channel, driver must set up the | ||
591 | * IWL_BROADCAST_ID entry (last entry in the table). For a client | ||
592 | * station in a BSS, once an AP is selected, driver sets up the AP STA | ||
593 | * in the IWL_AP_ID entry (1st entry in the table). BROADCAST and AP | ||
594 | * are all that are needed for a BSS client station. If the device is | ||
595 | * used as AP, or in an IBSS network, driver must set up station table | ||
596 | * entries for all STAs in network, starting with index IWL_STA_ID. | ||
550 | */ | 597 | */ |
551 | struct iwl3945_addsta_cmd { | 598 | struct iwl3945_addsta_cmd { |
552 | u8 mode; | 599 | u8 mode; /* 1: modify existing, 0: add new station */ |
553 | u8 reserved[3]; | 600 | u8 reserved[3]; |
554 | struct sta_id_modify sta; | 601 | struct sta_id_modify sta; |
555 | struct iwl3945_keyinfo key; | 602 | struct iwl3945_keyinfo key; |
556 | __le32 station_flags; | 603 | __le32 station_flags; /* STA_FLG_* */ |
557 | __le32 station_flags_msk; | 604 | __le32 station_flags_msk; /* STA_FLG_* */ |
605 | |||
606 | /* bit field to disable (1) or enable (0) Tx for Traffic ID (TID) | ||
607 | * corresponding to bit (e.g. bit 5 controls TID 5). | ||
608 | * Set modify_mask bit STA_MODIFY_TID_DISABLE_TX to use this field. */ | ||
558 | __le16 tid_disable_tx; | 609 | __le16 tid_disable_tx; |
610 | |||
559 | __le16 rate_n_flags; | 611 | __le16 rate_n_flags; |
612 | |||
613 | /* TID for which to add block-ack support. | ||
614 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | ||
560 | u8 add_immediate_ba_tid; | 615 | u8 add_immediate_ba_tid; |
616 | |||
617 | /* TID for which to remove block-ack support. | ||
618 | * Set modify_mask bit STA_MODIFY_DELBA_TID_MSK to use this field. */ | ||
561 | u8 remove_immediate_ba_tid; | 619 | u8 remove_immediate_ba_tid; |
620 | |||
621 | /* Starting Sequence Number for added block-ack support. | ||
622 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | ||
562 | __le16 add_immediate_ba_ssn; | 623 | __le16 add_immediate_ba_ssn; |
563 | } __attribute__ ((packed)); | 624 | } __attribute__ ((packed)); |
564 | 625 | ||
626 | #define ADD_STA_SUCCESS_MSK 0x1 | ||
627 | #define ADD_STA_NO_ROOM_IN_TABLE 0x2 | ||
628 | #define ADD_STA_NO_BLOCK_ACK_RESOURCE 0x4 | ||
565 | /* | 629 | /* |
566 | * REPLY_ADD_STA = 0x18 (response) | 630 | * REPLY_ADD_STA = 0x18 (response) |
567 | */ | 631 | */ |
568 | struct iwl3945_add_sta_resp { | 632 | struct iwl3945_add_sta_resp { |
569 | u8 status; | 633 | u8 status; /* ADD_STA_* */ |
570 | } __attribute__ ((packed)); | 634 | } __attribute__ ((packed)); |
571 | 635 | ||
572 | #define ADD_STA_SUCCESS_MSK 0x1 | ||
573 | 636 | ||
574 | /****************************************************************************** | 637 | /****************************************************************************** |
575 | * (4) | 638 | * (4) |