diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-commands.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-commands.h | 96 |
1 files changed, 32 insertions, 64 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h index 46bb2c7d11dd..817ece773643 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
7 | * | 7 | * |
8 | * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved. | 8 | * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 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 | 11 | * it under the terms of version 2 of the GNU General Public License as |
@@ -30,7 +30,7 @@ | |||
30 | * | 30 | * |
31 | * BSD LICENSE | 31 | * BSD LICENSE |
32 | * | 32 | * |
33 | * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved. | 33 | * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved. |
34 | * All rights reserved. | 34 | * All rights reserved. |
35 | * | 35 | * |
36 | * Redistribution and use in source and binary forms, with or without | 36 | * Redistribution and use in source and binary forms, with or without |
@@ -515,14 +515,20 @@ struct iwl3945_qosparam_cmd { | |||
515 | #define STA_CONTROL_MODIFY_MSK 0x01 | 515 | #define STA_CONTROL_MODIFY_MSK 0x01 |
516 | 516 | ||
517 | /* key flags __le16*/ | 517 | /* key flags __le16*/ |
518 | #define STA_KEY_FLG_ENCRYPT_MSK __constant_cpu_to_le16(0x7) | 518 | #define STA_KEY_FLG_ENCRYPT_MSK __constant_cpu_to_le16(0x0007) |
519 | #define STA_KEY_FLG_NO_ENC __constant_cpu_to_le16(0x0) | 519 | #define STA_KEY_FLG_NO_ENC __constant_cpu_to_le16(0x0000) |
520 | #define STA_KEY_FLG_WEP __constant_cpu_to_le16(0x1) | 520 | #define STA_KEY_FLG_WEP __constant_cpu_to_le16(0x0001) |
521 | #define STA_KEY_FLG_CCMP __constant_cpu_to_le16(0x2) | 521 | #define STA_KEY_FLG_CCMP __constant_cpu_to_le16(0x0002) |
522 | #define STA_KEY_FLG_TKIP __constant_cpu_to_le16(0x3) | 522 | #define STA_KEY_FLG_TKIP __constant_cpu_to_le16(0x0003) |
523 | 523 | ||
524 | #define STA_KEY_FLG_KEYID_POS 8 | 524 | #define STA_KEY_FLG_KEYID_POS 8 |
525 | #define STA_KEY_FLG_INVALID __constant_cpu_to_le16(0x0800) | 525 | #define STA_KEY_FLG_INVALID __constant_cpu_to_le16(0x0800) |
526 | /* wep key is either from global key (0) or from station info array (1) */ | ||
527 | #define STA_KEY_FLG_WEP_KEY_MAP_MSK __constant_cpu_to_le16(0x0008) | ||
528 | |||
529 | /* wep key in STA: 5-bytes (0) or 13-bytes (1) */ | ||
530 | #define STA_KEY_FLG_KEY_SIZE_MSK __constant_cpu_to_le16(0x1000) | ||
531 | #define STA_KEY_MULTICAST_MSK __constant_cpu_to_le16(0x4000) | ||
526 | 532 | ||
527 | /* Flags indicate whether to modify vs. don't change various station params */ | 533 | /* Flags indicate whether to modify vs. don't change various station params */ |
528 | #define STA_MODIFY_KEY_MASK 0x01 | 534 | #define STA_MODIFY_KEY_MASK 0x01 |
@@ -546,7 +552,8 @@ struct iwl3945_keyinfo { | |||
546 | u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */ | 552 | u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */ |
547 | u8 reserved1; | 553 | u8 reserved1; |
548 | __le16 tkip_rx_ttak[5]; /* 10-byte unicast TKIP TTAK */ | 554 | __le16 tkip_rx_ttak[5]; /* 10-byte unicast TKIP TTAK */ |
549 | __le16 reserved2; | 555 | u8 key_offset; |
556 | u8 reserved2; | ||
550 | u8 key[16]; /* 16-byte unicast decryption key */ | 557 | u8 key[16]; /* 16-byte unicast decryption key */ |
551 | } __attribute__ ((packed)); | 558 | } __attribute__ ((packed)); |
552 | 559 | ||
@@ -659,26 +666,26 @@ struct iwl3945_rx_frame_hdr { | |||
659 | u8 payload[0]; | 666 | u8 payload[0]; |
660 | } __attribute__ ((packed)); | 667 | } __attribute__ ((packed)); |
661 | 668 | ||
662 | #define RX_RES_STATUS_NO_CRC32_ERROR __constant_cpu_to_le32(1 << 0) | 669 | #define RX_RES_STATUS_NO_CRC32_ERROR __constant_cpu_to_le32(1 << 0) |
663 | #define RX_RES_STATUS_NO_RXE_OVERFLOW __constant_cpu_to_le32(1 << 1) | 670 | #define RX_RES_STATUS_NO_RXE_OVERFLOW __constant_cpu_to_le32(1 << 1) |
664 | 671 | ||
665 | #define RX_RES_PHY_FLAGS_BAND_24_MSK __constant_cpu_to_le16(1 << 0) | 672 | #define RX_RES_PHY_FLAGS_BAND_24_MSK __constant_cpu_to_le16(1 << 0) |
666 | #define RX_RES_PHY_FLAGS_MOD_CCK_MSK __constant_cpu_to_le16(1 << 1) | 673 | #define RX_RES_PHY_FLAGS_MOD_CCK_MSK __constant_cpu_to_le16(1 << 1) |
667 | #define RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK __constant_cpu_to_le16(1 << 2) | 674 | #define RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK __constant_cpu_to_le16(1 << 2) |
668 | #define RX_RES_PHY_FLAGS_NARROW_BAND_MSK __constant_cpu_to_le16(1 << 3) | 675 | #define RX_RES_PHY_FLAGS_NARROW_BAND_MSK __constant_cpu_to_le16(1 << 3) |
669 | #define RX_RES_PHY_FLAGS_ANTENNA_MSK __constant_cpu_to_le16(0xf0) | 676 | #define RX_RES_PHY_FLAGS_ANTENNA_MSK __constant_cpu_to_le16(0xf0) |
670 | 677 | ||
671 | #define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8) | 678 | #define RX_RES_STATUS_SEC_TYPE_MSK (0x7 << 8) |
672 | #define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8) | 679 | #define RX_RES_STATUS_SEC_TYPE_NONE (0x0 << 8) |
673 | #define RX_RES_STATUS_SEC_TYPE_WEP (0x1 << 8) | 680 | #define RX_RES_STATUS_SEC_TYPE_WEP (0x1 << 8) |
674 | #define RX_RES_STATUS_SEC_TYPE_CCMP (0x2 << 8) | 681 | #define RX_RES_STATUS_SEC_TYPE_CCMP (0x2 << 8) |
675 | #define RX_RES_STATUS_SEC_TYPE_TKIP (0x3 << 8) | 682 | #define RX_RES_STATUS_SEC_TYPE_TKIP (0x3 << 8) |
676 | 683 | ||
677 | #define RX_RES_STATUS_DECRYPT_TYPE_MSK (0x3 << 11) | 684 | #define RX_RES_STATUS_DECRYPT_TYPE_MSK (0x3 << 11) |
678 | #define RX_RES_STATUS_NOT_DECRYPT (0x0 << 11) | 685 | #define RX_RES_STATUS_NOT_DECRYPT (0x0 << 11) |
679 | #define RX_RES_STATUS_DECRYPT_OK (0x3 << 11) | 686 | #define RX_RES_STATUS_DECRYPT_OK (0x3 << 11) |
680 | #define RX_RES_STATUS_BAD_ICV_MIC (0x1 << 11) | 687 | #define RX_RES_STATUS_BAD_ICV_MIC (0x1 << 11) |
681 | #define RX_RES_STATUS_BAD_KEY_TTAK (0x2 << 11) | 688 | #define RX_RES_STATUS_BAD_KEY_TTAK (0x2 << 11) |
682 | 689 | ||
683 | struct iwl3945_rx_frame_end { | 690 | struct iwl3945_rx_frame_end { |
684 | __le32 status; | 691 | __le32 status; |
@@ -700,45 +707,6 @@ struct iwl3945_rx_frame { | |||
700 | struct iwl3945_rx_frame_end end; | 707 | struct iwl3945_rx_frame_end end; |
701 | } __attribute__ ((packed)); | 708 | } __attribute__ ((packed)); |
702 | 709 | ||
703 | /* Fixed (non-configurable) rx data from phy */ | ||
704 | #define RX_PHY_FLAGS_ANTENNAE_OFFSET (4) | ||
705 | #define RX_PHY_FLAGS_ANTENNAE_MASK (0x70) | ||
706 | #define IWL_AGC_DB_MASK (0x3f80) /* MASK(7,13) */ | ||
707 | #define IWL_AGC_DB_POS (7) | ||
708 | struct iwl4965_rx_non_cfg_phy { | ||
709 | __le16 ant_selection; /* ant A bit 4, ant B bit 5, ant C bit 6 */ | ||
710 | __le16 agc_info; /* agc code 0:6, agc dB 7:13, reserved 14:15 */ | ||
711 | u8 rssi_info[6]; /* we use even entries, 0/2/4 for A/B/C rssi */ | ||
712 | u8 pad[0]; | ||
713 | } __attribute__ ((packed)); | ||
714 | |||
715 | /* | ||
716 | * REPLY_4965_RX = 0xc3 (response only, not a command) | ||
717 | * Used only for legacy (non 11n) frames. | ||
718 | */ | ||
719 | #define RX_RES_PHY_CNT 14 | ||
720 | struct iwl4965_rx_phy_res { | ||
721 | u8 non_cfg_phy_cnt; /* non configurable DSP phy data byte count */ | ||
722 | u8 cfg_phy_cnt; /* configurable DSP phy data byte count */ | ||
723 | u8 stat_id; /* configurable DSP phy data set ID */ | ||
724 | u8 reserved1; | ||
725 | __le64 timestamp; /* TSF at on air rise */ | ||
726 | __le32 beacon_time_stamp; /* beacon at on-air rise */ | ||
727 | __le16 phy_flags; /* general phy flags: band, modulation, ... */ | ||
728 | __le16 channel; /* channel number */ | ||
729 | __le16 non_cfg_phy[RX_RES_PHY_CNT]; /* upto 14 phy entries */ | ||
730 | __le32 reserved2; | ||
731 | __le32 rate_n_flags; | ||
732 | __le16 byte_count; /* frame's byte-count */ | ||
733 | __le16 reserved3; | ||
734 | } __attribute__ ((packed)); | ||
735 | |||
736 | struct iwl4965_rx_mpdu_res_start { | ||
737 | __le16 byte_count; | ||
738 | __le16 reserved; | ||
739 | } __attribute__ ((packed)); | ||
740 | |||
741 | |||
742 | /****************************************************************************** | 710 | /****************************************************************************** |
743 | * (5) | 711 | * (5) |
744 | * Tx Commands & Responses: | 712 | * Tx Commands & Responses: |