aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-08-04 10:38:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-22 16:29:58 -0400
commit906c110fcc24bdd5bf0fa22d89ac75d99c747e53 (patch)
treef7288c835b1490ffee657119bef8317f69cc22aa /drivers/net/wireless/rt2x00/rt73usb.h
parent61e754f44b57060464b1fcf261a8428ecfa23bed (diff)
rt2x00: Implement HW encryption (rt73usb)
rt73usb supports hardware encryption. rt73usb supports up to 4 shared keys and up to 64 pairwise keys. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.h b/drivers/net/wireless/rt2x00/rt73usb.h
index 148493501011..91e04d319d76 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.h
+++ b/drivers/net/wireless/rt2x00/rt73usb.h
@@ -92,6 +92,16 @@
92#define PAIRWISE_KEY_TABLE_BASE 0x1200 92#define PAIRWISE_KEY_TABLE_BASE 0x1200
93#define PAIRWISE_TA_TABLE_BASE 0x1a00 93#define PAIRWISE_TA_TABLE_BASE 0x1a00
94 94
95#define SHARED_KEY_ENTRY(__idx) \
96 ( SHARED_KEY_TABLE_BASE + \
97 ((__idx) * sizeof(struct hw_key_entry)) )
98#define PAIRWISE_KEY_ENTRY(__idx) \
99 ( PAIRWISE_KEY_TABLE_BASE + \
100 ((__idx) * sizeof(struct hw_key_entry)) )
101#define PAIRWISE_TA_ENTRY(__idx) \
102 ( PAIRWISE_TA_TABLE_BASE + \
103 ((__idx) * sizeof(struct hw_pairwise_ta_entry)) )
104
95struct hw_key_entry { 105struct hw_key_entry {
96 u8 key[16]; 106 u8 key[16];
97 u8 tx_mic[8]; 107 u8 tx_mic[8];
@@ -100,7 +110,8 @@ struct hw_key_entry {
100 110
101struct hw_pairwise_ta_entry { 111struct hw_pairwise_ta_entry {
102 u8 address[6]; 112 u8 address[6];
103 u8 reserved[2]; 113 u8 cipher;
114 u8 reserved;
104} __attribute__ ((packed)); 115} __attribute__ ((packed));
105 116
106/* 117/*
@@ -563,6 +574,10 @@ struct hw_pairwise_ta_entry {
563 * SEC_CSR4: Pairwise key table lookup control. 574 * SEC_CSR4: Pairwise key table lookup control.
564 */ 575 */
565#define SEC_CSR4 0x30b0 576#define SEC_CSR4 0x30b0
577#define SEC_CSR4_ENABLE_BSS0 FIELD32(0x00000001)
578#define SEC_CSR4_ENABLE_BSS1 FIELD32(0x00000002)
579#define SEC_CSR4_ENABLE_BSS2 FIELD32(0x00000004)
580#define SEC_CSR4_ENABLE_BSS3 FIELD32(0x00000008)
566 581
567/* 582/*
568 * SEC_CSR5: shared key table security mode register. 583 * SEC_CSR5: shared key table security mode register.
@@ -1010,8 +1025,10 @@ struct hw_pairwise_ta_entry {
1010 1025
1011/* 1026/*
1012 * Word4 1027 * Word4
1028 * ICV: Received ICV of originally encrypted.
1029 * NOTE: This is a guess, the official definition is "reserved"
1013 */ 1030 */
1014#define RXD_W4_RESERVED FIELD32(0xffffffff) 1031#define RXD_W4_ICV FIELD32(0xffffffff)
1015 1032
1016/* 1033/*
1017 * the above 20-byte is called RXINFO and will be DMAed to MAC RX block 1034 * the above 20-byte is called RXINFO and will be DMAed to MAC RX block