diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2009-10-16 11:32:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:29 -0400 |
commit | 9e66e701d0e42efd548f0f7249af8a56f8e07b67 (patch) | |
tree | ae4019c91ef359a4d91e6db059bec6ce260da187 /drivers/net/wireless/libertas | |
parent | b8fcf590939f0aa24d43bdbdae7c963f31ba90bd (diff) |
libertas: cleanup host.h and hostcmd.h
Also remove some unused definitions and make tab usage consistent.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/host.h | 1001 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/hostcmd.h | 800 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/rx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 2 |
7 files changed, 853 insertions, 957 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index eb0bce338e55..cced646a8847 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <net/lib80211.h> | 7 | #include <net/lib80211.h> |
8 | #include <linux/kfifo.h> | 8 | #include <linux/kfifo.h> |
9 | #include "host.h" | 9 | #include "host.h" |
10 | #include "hostcmd.h" | ||
11 | #include "decl.h" | 10 | #include "decl.h" |
12 | #include "defs.h" | 11 | #include "defs.h" |
13 | #include "dev.h" | 12 | #include "dev.h" |
diff --git a/drivers/net/wireless/libertas/cmd.h b/drivers/net/wireless/libertas/cmd.h index 2730c6aadfd2..bf7c421c7a53 100644 --- a/drivers/net/wireless/libertas/cmd.h +++ b/drivers/net/wireless/libertas/cmd.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #ifndef _LBS_CMD_H_ | 3 | #ifndef _LBS_CMD_H_ |
4 | #define _LBS_CMD_H_ | 4 | #define _LBS_CMD_H_ |
5 | 5 | ||
6 | #include "hostcmd.h" | 6 | #include "host.h" |
7 | #include "dev.h" | 7 | #include "dev.h" |
8 | 8 | ||
9 | /* lbs_cmd() infers the size of the buffer to copy data back into, from | 9 | /* lbs_cmd() infers the size of the buffer to copy data back into, from |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 8abb28af5afa..191ea33de509 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/debugfs.h> | 12 | #include <linux/debugfs.h> |
13 | 13 | ||
14 | #include "defs.h" | 14 | #include "defs.h" |
15 | #include "hostcmd.h" | 15 | #include "host.h" |
16 | 16 | ||
17 | extern const struct ethtool_ops lbs_ethtool_ops; | 17 | extern const struct ethtool_ops lbs_ethtool_ops; |
18 | 18 | ||
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h index c055daabea13..45cd7f1e5937 100644 --- a/drivers/net/wireless/libertas/host.h +++ b/drivers/net/wireless/libertas/host.h | |||
@@ -1,202 +1,189 @@ | |||
1 | /** | 1 | /** |
2 | * This file contains definitions of WLAN commands. | 2 | * This file function prototypes, data structure |
3 | * and definitions for all the host/station commands | ||
3 | */ | 4 | */ |
4 | 5 | ||
5 | #ifndef _LBS_HOST_H_ | 6 | #ifndef _LBS_HOST_H_ |
6 | #define _LBS_HOST_H_ | 7 | #define _LBS_HOST_H_ |
7 | 8 | ||
8 | /** PUBLIC DEFINITIONS */ | 9 | #include "11d.h" |
9 | #define DEFAULT_AD_HOC_CHANNEL 6 | ||
10 | #define DEFAULT_AD_HOC_CHANNEL_A 36 | ||
11 | 10 | ||
12 | #define CMD_OPTION_WAITFORRSP 0x0002 | 11 | #define DEFAULT_AD_HOC_CHANNEL 6 |
12 | |||
13 | #define CMD_OPTION_WAITFORRSP 0x0002 | ||
13 | 14 | ||
14 | /** Host command IDs */ | 15 | /** Host command IDs */ |
15 | 16 | ||
16 | /* Return command are almost always the same as the host command, but with | 17 | /* Return command are almost always the same as the host command, but with |
17 | * bit 15 set high. There are a few exceptions, though... | 18 | * bit 15 set high. There are a few exceptions, though... |
18 | */ | 19 | */ |
19 | #define CMD_RET(cmd) (0x8000 | cmd) | 20 | #define CMD_RET(cmd) (0x8000 | cmd) |
20 | 21 | ||
21 | /* Return command convention exceptions: */ | 22 | /* Return command convention exceptions: */ |
22 | #define CMD_RET_802_11_ASSOCIATE 0x8012 | 23 | #define CMD_RET_802_11_ASSOCIATE 0x8012 |
23 | 24 | ||
24 | /* Command codes */ | 25 | /* Command codes */ |
25 | #define CMD_GET_HW_SPEC 0x0003 | 26 | #define CMD_GET_HW_SPEC 0x0003 |
26 | #define CMD_EEPROM_UPDATE 0x0004 | 27 | #define CMD_EEPROM_UPDATE 0x0004 |
27 | #define CMD_802_11_RESET 0x0005 | 28 | #define CMD_802_11_RESET 0x0005 |
28 | #define CMD_802_11_SCAN 0x0006 | 29 | #define CMD_802_11_SCAN 0x0006 |
29 | #define CMD_802_11_GET_LOG 0x000b | 30 | #define CMD_802_11_GET_LOG 0x000b |
30 | #define CMD_MAC_MULTICAST_ADR 0x0010 | 31 | #define CMD_MAC_MULTICAST_ADR 0x0010 |
31 | #define CMD_802_11_AUTHENTICATE 0x0011 | 32 | #define CMD_802_11_AUTHENTICATE 0x0011 |
32 | #define CMD_802_11_EEPROM_ACCESS 0x0059 | 33 | #define CMD_802_11_EEPROM_ACCESS 0x0059 |
33 | #define CMD_802_11_ASSOCIATE 0x0050 | 34 | #define CMD_802_11_ASSOCIATE 0x0050 |
34 | #define CMD_802_11_SET_WEP 0x0013 | 35 | #define CMD_802_11_SET_WEP 0x0013 |
35 | #define CMD_802_11_GET_STAT 0x0014 | 36 | #define CMD_802_11_GET_STAT 0x0014 |
36 | #define CMD_802_3_GET_STAT 0x0015 | 37 | #define CMD_802_3_GET_STAT 0x0015 |
37 | #define CMD_802_11_SNMP_MIB 0x0016 | 38 | #define CMD_802_11_SNMP_MIB 0x0016 |
38 | #define CMD_MAC_REG_MAP 0x0017 | 39 | #define CMD_MAC_REG_MAP 0x0017 |
39 | #define CMD_BBP_REG_MAP 0x0018 | 40 | #define CMD_BBP_REG_MAP 0x0018 |
40 | #define CMD_MAC_REG_ACCESS 0x0019 | 41 | #define CMD_MAC_REG_ACCESS 0x0019 |
41 | #define CMD_BBP_REG_ACCESS 0x001a | 42 | #define CMD_BBP_REG_ACCESS 0x001a |
42 | #define CMD_RF_REG_ACCESS 0x001b | 43 | #define CMD_RF_REG_ACCESS 0x001b |
43 | #define CMD_802_11_RADIO_CONTROL 0x001c | 44 | #define CMD_802_11_RADIO_CONTROL 0x001c |
44 | #define CMD_802_11_RF_CHANNEL 0x001d | 45 | #define CMD_802_11_RF_CHANNEL 0x001d |
45 | #define CMD_802_11_RF_TX_POWER 0x001e | 46 | #define CMD_802_11_RF_TX_POWER 0x001e |
46 | #define CMD_802_11_RSSI 0x001f | 47 | #define CMD_802_11_RSSI 0x001f |
47 | #define CMD_802_11_RF_ANTENNA 0x0020 | 48 | #define CMD_802_11_RF_ANTENNA 0x0020 |
48 | #define CMD_802_11_PS_MODE 0x0021 | 49 | #define CMD_802_11_PS_MODE 0x0021 |
49 | #define CMD_802_11_DATA_RATE 0x0022 | 50 | #define CMD_802_11_DATA_RATE 0x0022 |
50 | #define CMD_RF_REG_MAP 0x0023 | 51 | #define CMD_RF_REG_MAP 0x0023 |
51 | #define CMD_802_11_DEAUTHENTICATE 0x0024 | 52 | #define CMD_802_11_DEAUTHENTICATE 0x0024 |
52 | #define CMD_802_11_REASSOCIATE 0x0025 | 53 | #define CMD_802_11_REASSOCIATE 0x0025 |
53 | #define CMD_MAC_CONTROL 0x0028 | 54 | #define CMD_MAC_CONTROL 0x0028 |
54 | #define CMD_802_11_AD_HOC_START 0x002b | 55 | #define CMD_802_11_AD_HOC_START 0x002b |
55 | #define CMD_802_11_AD_HOC_JOIN 0x002c | 56 | #define CMD_802_11_AD_HOC_JOIN 0x002c |
56 | #define CMD_802_11_QUERY_TKIP_REPLY_CNTRS 0x002e | 57 | #define CMD_802_11_QUERY_TKIP_REPLY_CNTRS 0x002e |
57 | #define CMD_802_11_ENABLE_RSN 0x002f | 58 | #define CMD_802_11_ENABLE_RSN 0x002f |
58 | #define CMD_802_11_SET_AFC 0x003c | 59 | #define CMD_802_11_SET_AFC 0x003c |
59 | #define CMD_802_11_GET_AFC 0x003d | 60 | #define CMD_802_11_GET_AFC 0x003d |
60 | #define CMD_802_11_DEEP_SLEEP 0x003e | 61 | #define CMD_802_11_DEEP_SLEEP 0x003e |
61 | #define CMD_802_11_AD_HOC_STOP 0x0040 | 62 | #define CMD_802_11_AD_HOC_STOP 0x0040 |
62 | #define CMD_802_11_HOST_SLEEP_CFG 0x0043 | 63 | #define CMD_802_11_HOST_SLEEP_CFG 0x0043 |
63 | #define CMD_802_11_WAKEUP_CONFIRM 0x0044 | 64 | #define CMD_802_11_WAKEUP_CONFIRM 0x0044 |
64 | #define CMD_802_11_HOST_SLEEP_ACTIVATE 0x0045 | 65 | #define CMD_802_11_HOST_SLEEP_ACTIVATE 0x0045 |
65 | #define CMD_802_11_BEACON_STOP 0x0049 | 66 | #define CMD_802_11_BEACON_STOP 0x0049 |
66 | #define CMD_802_11_MAC_ADDRESS 0x004d | 67 | #define CMD_802_11_MAC_ADDRESS 0x004d |
67 | #define CMD_802_11_LED_GPIO_CTRL 0x004e | 68 | #define CMD_802_11_LED_GPIO_CTRL 0x004e |
68 | #define CMD_802_11_EEPROM_ACCESS 0x0059 | 69 | #define CMD_802_11_EEPROM_ACCESS 0x0059 |
69 | #define CMD_802_11_BAND_CONFIG 0x0058 | 70 | #define CMD_802_11_BAND_CONFIG 0x0058 |
70 | #define CMD_GSPI_BUS_CONFIG 0x005a | 71 | #define CMD_GSPI_BUS_CONFIG 0x005a |
71 | #define CMD_802_11D_DOMAIN_INFO 0x005b | 72 | #define CMD_802_11D_DOMAIN_INFO 0x005b |
72 | #define CMD_802_11_KEY_MATERIAL 0x005e | 73 | #define CMD_802_11_KEY_MATERIAL 0x005e |
73 | #define CMD_802_11_SLEEP_PARAMS 0x0066 | 74 | #define CMD_802_11_SLEEP_PARAMS 0x0066 |
74 | #define CMD_802_11_INACTIVITY_TIMEOUT 0x0067 | 75 | #define CMD_802_11_INACTIVITY_TIMEOUT 0x0067 |
75 | #define CMD_802_11_SLEEP_PERIOD 0x0068 | 76 | #define CMD_802_11_SLEEP_PERIOD 0x0068 |
76 | #define CMD_802_11_TPC_CFG 0x0072 | 77 | #define CMD_802_11_TPC_CFG 0x0072 |
77 | #define CMD_802_11_PA_CFG 0x0073 | 78 | #define CMD_802_11_PA_CFG 0x0073 |
78 | #define CMD_802_11_FW_WAKE_METHOD 0x0074 | 79 | #define CMD_802_11_FW_WAKE_METHOD 0x0074 |
79 | #define CMD_802_11_SUBSCRIBE_EVENT 0x0075 | 80 | #define CMD_802_11_SUBSCRIBE_EVENT 0x0075 |
80 | #define CMD_802_11_RATE_ADAPT_RATESET 0x0076 | 81 | #define CMD_802_11_RATE_ADAPT_RATESET 0x0076 |
81 | #define CMD_802_11_TX_RATE_QUERY 0x007f | 82 | #define CMD_802_11_TX_RATE_QUERY 0x007f |
82 | #define CMD_GET_TSF 0x0080 | 83 | #define CMD_GET_TSF 0x0080 |
83 | #define CMD_BT_ACCESS 0x0087 | 84 | #define CMD_BT_ACCESS 0x0087 |
84 | #define CMD_FWT_ACCESS 0x0095 | 85 | #define CMD_FWT_ACCESS 0x0095 |
85 | #define CMD_802_11_MONITOR_MODE 0x0098 | 86 | #define CMD_802_11_MONITOR_MODE 0x0098 |
86 | #define CMD_MESH_ACCESS 0x009b | 87 | #define CMD_MESH_ACCESS 0x009b |
87 | #define CMD_MESH_CONFIG_OLD 0x00a3 | 88 | #define CMD_MESH_CONFIG_OLD 0x00a3 |
88 | #define CMD_MESH_CONFIG 0x00ac | 89 | #define CMD_MESH_CONFIG 0x00ac |
89 | #define CMD_SET_BOOT2_VER 0x00a5 | 90 | #define CMD_SET_BOOT2_VER 0x00a5 |
90 | #define CMD_FUNC_INIT 0x00a9 | 91 | #define CMD_FUNC_INIT 0x00a9 |
91 | #define CMD_FUNC_SHUTDOWN 0x00aa | 92 | #define CMD_FUNC_SHUTDOWN 0x00aa |
92 | #define CMD_802_11_BEACON_CTRL 0x00b0 | 93 | #define CMD_802_11_BEACON_CTRL 0x00b0 |
93 | 94 | ||
94 | /* For the IEEE Power Save */ | 95 | /* For the IEEE Power Save */ |
95 | #define CMD_SUBCMD_ENTER_PS 0x0030 | 96 | #define CMD_SUBCMD_ENTER_PS 0x0030 |
96 | #define CMD_SUBCMD_EXIT_PS 0x0031 | 97 | #define CMD_SUBCMD_EXIT_PS 0x0031 |
97 | #define CMD_SUBCMD_SLEEP_CONFIRMED 0x0034 | 98 | #define CMD_SUBCMD_SLEEP_CONFIRMED 0x0034 |
98 | #define CMD_SUBCMD_FULL_POWERDOWN 0x0035 | 99 | #define CMD_SUBCMD_FULL_POWERDOWN 0x0035 |
99 | #define CMD_SUBCMD_FULL_POWERUP 0x0036 | 100 | #define CMD_SUBCMD_FULL_POWERUP 0x0036 |
100 | 101 | ||
101 | #define CMD_ENABLE_RSN 0x0001 | 102 | #define CMD_ENABLE_RSN 0x0001 |
102 | #define CMD_DISABLE_RSN 0x0000 | 103 | #define CMD_DISABLE_RSN 0x0000 |
103 | 104 | ||
104 | #define CMD_ACT_GET 0x0000 | 105 | #define CMD_ACT_GET 0x0000 |
105 | #define CMD_ACT_SET 0x0001 | 106 | #define CMD_ACT_SET 0x0001 |
106 | #define CMD_ACT_GET_AES 0x0002 | ||
107 | #define CMD_ACT_SET_AES 0x0003 | ||
108 | #define CMD_ACT_REMOVE_AES 0x0004 | ||
109 | 107 | ||
110 | /* Define action or option for CMD_802_11_SET_WEP */ | 108 | /* Define action or option for CMD_802_11_SET_WEP */ |
111 | #define CMD_ACT_ADD 0x0002 | 109 | #define CMD_ACT_ADD 0x0002 |
112 | #define CMD_ACT_REMOVE 0x0004 | 110 | #define CMD_ACT_REMOVE 0x0004 |
113 | #define CMD_ACT_USE_DEFAULT 0x0008 | ||
114 | |||
115 | #define CMD_TYPE_WEP_40_BIT 0x01 | ||
116 | #define CMD_TYPE_WEP_104_BIT 0x02 | ||
117 | 111 | ||
118 | #define CMD_NUM_OF_WEP_KEYS 4 | 112 | #define CMD_TYPE_WEP_40_BIT 0x01 |
113 | #define CMD_TYPE_WEP_104_BIT 0x02 | ||
119 | 114 | ||
120 | #define CMD_WEP_KEY_INDEX_MASK 0x3fff | 115 | #define CMD_NUM_OF_WEP_KEYS 4 |
121 | 116 | ||
122 | /* Define action or option for CMD_802_11_RESET */ | 117 | #define CMD_WEP_KEY_INDEX_MASK 0x3fff |
123 | #define CMD_ACT_HALT 0x0003 | ||
124 | 118 | ||
125 | /* Define action or option for CMD_802_11_SCAN */ | 119 | /* Define action or option for CMD_802_11_SCAN */ |
126 | #define CMD_BSS_TYPE_BSS 0x0001 | 120 | #define CMD_BSS_TYPE_BSS 0x0001 |
127 | #define CMD_BSS_TYPE_IBSS 0x0002 | 121 | #define CMD_BSS_TYPE_IBSS 0x0002 |
128 | #define CMD_BSS_TYPE_ANY 0x0003 | 122 | #define CMD_BSS_TYPE_ANY 0x0003 |
129 | 123 | ||
130 | /* Define action or option for CMD_802_11_SCAN */ | 124 | /* Define action or option for CMD_802_11_SCAN */ |
131 | #define CMD_SCAN_TYPE_ACTIVE 0x0000 | 125 | #define CMD_SCAN_TYPE_ACTIVE 0x0000 |
132 | #define CMD_SCAN_TYPE_PASSIVE 0x0001 | 126 | #define CMD_SCAN_TYPE_PASSIVE 0x0001 |
133 | 127 | ||
134 | #define CMD_SCAN_RADIO_TYPE_BG 0 | 128 | #define CMD_SCAN_RADIO_TYPE_BG 0 |
135 | 129 | ||
136 | #define CMD_SCAN_PROBE_DELAY_TIME 0 | 130 | #define CMD_SCAN_PROBE_DELAY_TIME 0 |
137 | 131 | ||
138 | /* Define action or option for CMD_MAC_CONTROL */ | 132 | /* Define action or option for CMD_MAC_CONTROL */ |
139 | #define CMD_ACT_MAC_RX_ON 0x0001 | 133 | #define CMD_ACT_MAC_RX_ON 0x0001 |
140 | #define CMD_ACT_MAC_TX_ON 0x0002 | 134 | #define CMD_ACT_MAC_TX_ON 0x0002 |
141 | #define CMD_ACT_MAC_LOOPBACK_ON 0x0004 | 135 | #define CMD_ACT_MAC_LOOPBACK_ON 0x0004 |
142 | #define CMD_ACT_MAC_WEP_ENABLE 0x0008 | 136 | #define CMD_ACT_MAC_WEP_ENABLE 0x0008 |
143 | #define CMD_ACT_MAC_INT_ENABLE 0x0010 | 137 | #define CMD_ACT_MAC_INT_ENABLE 0x0010 |
144 | #define CMD_ACT_MAC_MULTICAST_ENABLE 0x0020 | 138 | #define CMD_ACT_MAC_MULTICAST_ENABLE 0x0020 |
145 | #define CMD_ACT_MAC_BROADCAST_ENABLE 0x0040 | 139 | #define CMD_ACT_MAC_BROADCAST_ENABLE 0x0040 |
146 | #define CMD_ACT_MAC_PROMISCUOUS_ENABLE 0x0080 | 140 | #define CMD_ACT_MAC_PROMISCUOUS_ENABLE 0x0080 |
147 | #define CMD_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100 | 141 | #define CMD_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100 |
148 | #define CMD_ACT_MAC_STRICT_PROTECTION_ENABLE 0x0400 | 142 | #define CMD_ACT_MAC_STRICT_PROTECTION_ENABLE 0x0400 |
149 | 143 | ||
150 | /* Event flags for CMD_802_11_SUBSCRIBE_EVENT */ | 144 | /* Event flags for CMD_802_11_SUBSCRIBE_EVENT */ |
151 | #define CMD_SUBSCRIBE_RSSI_LOW 0x0001 | 145 | #define CMD_SUBSCRIBE_RSSI_LOW 0x0001 |
152 | #define CMD_SUBSCRIBE_SNR_LOW 0x0002 | 146 | #define CMD_SUBSCRIBE_SNR_LOW 0x0002 |
153 | #define CMD_SUBSCRIBE_FAILCOUNT 0x0004 | 147 | #define CMD_SUBSCRIBE_FAILCOUNT 0x0004 |
154 | #define CMD_SUBSCRIBE_BCNMISS 0x0008 | 148 | #define CMD_SUBSCRIBE_BCNMISS 0x0008 |
155 | #define CMD_SUBSCRIBE_RSSI_HIGH 0x0010 | 149 | #define CMD_SUBSCRIBE_RSSI_HIGH 0x0010 |
156 | #define CMD_SUBSCRIBE_SNR_HIGH 0x0020 | 150 | #define CMD_SUBSCRIBE_SNR_HIGH 0x0020 |
157 | 151 | ||
158 | #define RADIO_PREAMBLE_LONG 0x00 | 152 | #define RADIO_PREAMBLE_LONG 0x00 |
159 | #define RADIO_PREAMBLE_SHORT 0x02 | 153 | #define RADIO_PREAMBLE_SHORT 0x02 |
160 | #define RADIO_PREAMBLE_AUTO 0x04 | 154 | #define RADIO_PREAMBLE_AUTO 0x04 |
161 | 155 | ||
162 | /* Define action or option for CMD_802_11_RF_CHANNEL */ | 156 | /* Define action or option for CMD_802_11_RF_CHANNEL */ |
163 | #define CMD_OPT_802_11_RF_CHANNEL_GET 0x00 | 157 | #define CMD_OPT_802_11_RF_CHANNEL_GET 0x00 |
164 | #define CMD_OPT_802_11_RF_CHANNEL_SET 0x01 | 158 | #define CMD_OPT_802_11_RF_CHANNEL_SET 0x01 |
165 | 159 | ||
166 | /* Define action or option for CMD_802_11_DATA_RATE */ | 160 | /* Define action or option for CMD_802_11_DATA_RATE */ |
167 | #define CMD_ACT_SET_TX_AUTO 0x0000 | 161 | #define CMD_ACT_SET_TX_AUTO 0x0000 |
168 | #define CMD_ACT_SET_TX_FIX_RATE 0x0001 | 162 | #define CMD_ACT_SET_TX_FIX_RATE 0x0001 |
169 | #define CMD_ACT_GET_TX_RATE 0x0002 | 163 | #define CMD_ACT_GET_TX_RATE 0x0002 |
170 | |||
171 | #define CMD_ACT_SET_RX 0x0001 | ||
172 | #define CMD_ACT_SET_TX 0x0002 | ||
173 | #define CMD_ACT_SET_BOTH 0x0003 | ||
174 | #define CMD_ACT_GET_RX 0x0004 | ||
175 | #define CMD_ACT_GET_TX 0x0008 | ||
176 | #define CMD_ACT_GET_BOTH 0x000c | ||
177 | 164 | ||
178 | /* Define action or option for CMD_802_11_PS_MODE */ | 165 | /* Define action or option for CMD_802_11_PS_MODE */ |
179 | #define CMD_TYPE_CAM 0x0000 | 166 | #define CMD_TYPE_CAM 0x0000 |
180 | #define CMD_TYPE_MAX_PSP 0x0001 | 167 | #define CMD_TYPE_MAX_PSP 0x0001 |
181 | #define CMD_TYPE_FAST_PSP 0x0002 | 168 | #define CMD_TYPE_FAST_PSP 0x0002 |
182 | 169 | ||
183 | /* Options for CMD_802_11_FW_WAKE_METHOD */ | 170 | /* Options for CMD_802_11_FW_WAKE_METHOD */ |
184 | #define CMD_WAKE_METHOD_UNCHANGED 0x0000 | 171 | #define CMD_WAKE_METHOD_UNCHANGED 0x0000 |
185 | #define CMD_WAKE_METHOD_COMMAND_INT 0x0001 | 172 | #define CMD_WAKE_METHOD_COMMAND_INT 0x0001 |
186 | #define CMD_WAKE_METHOD_GPIO 0x0002 | 173 | #define CMD_WAKE_METHOD_GPIO 0x0002 |
187 | 174 | ||
188 | /* Object IDs for CMD_802_11_SNMP_MIB */ | 175 | /* Object IDs for CMD_802_11_SNMP_MIB */ |
189 | #define SNMP_MIB_OID_BSS_TYPE 0x0000 | 176 | #define SNMP_MIB_OID_BSS_TYPE 0x0000 |
190 | #define SNMP_MIB_OID_OP_RATE_SET 0x0001 | 177 | #define SNMP_MIB_OID_OP_RATE_SET 0x0001 |
191 | #define SNMP_MIB_OID_BEACON_PERIOD 0x0002 /* Reserved on v9+ */ | 178 | #define SNMP_MIB_OID_BEACON_PERIOD 0x0002 /* Reserved on v9+ */ |
192 | #define SNMP_MIB_OID_DTIM_PERIOD 0x0003 /* Reserved on v9+ */ | 179 | #define SNMP_MIB_OID_DTIM_PERIOD 0x0003 /* Reserved on v9+ */ |
193 | #define SNMP_MIB_OID_ASSOC_TIMEOUT 0x0004 /* Reserved on v9+ */ | 180 | #define SNMP_MIB_OID_ASSOC_TIMEOUT 0x0004 /* Reserved on v9+ */ |
194 | #define SNMP_MIB_OID_RTS_THRESHOLD 0x0005 | 181 | #define SNMP_MIB_OID_RTS_THRESHOLD 0x0005 |
195 | #define SNMP_MIB_OID_SHORT_RETRY_LIMIT 0x0006 | 182 | #define SNMP_MIB_OID_SHORT_RETRY_LIMIT 0x0006 |
196 | #define SNMP_MIB_OID_LONG_RETRY_LIMIT 0x0007 | 183 | #define SNMP_MIB_OID_LONG_RETRY_LIMIT 0x0007 |
197 | #define SNMP_MIB_OID_FRAG_THRESHOLD 0x0008 | 184 | #define SNMP_MIB_OID_FRAG_THRESHOLD 0x0008 |
198 | #define SNMP_MIB_OID_11D_ENABLE 0x0009 | 185 | #define SNMP_MIB_OID_11D_ENABLE 0x0009 |
199 | #define SNMP_MIB_OID_11H_ENABLE 0x000A | 186 | #define SNMP_MIB_OID_11H_ENABLE 0x000A |
200 | 187 | ||
201 | /* Define action or option for CMD_BT_ACCESS */ | 188 | /* Define action or option for CMD_BT_ACCESS */ |
202 | enum cmd_bt_access_opts { | 189 | enum cmd_bt_access_opts { |
@@ -303,4 +290,714 @@ enum cmd_mesh_config_types { | |||
303 | #define MACREG_INT_CODE_MESH_AUTO_STARTED 35 | 290 | #define MACREG_INT_CODE_MESH_AUTO_STARTED 35 |
304 | #define MACREG_INT_CODE_FIRMWARE_READY 48 | 291 | #define MACREG_INT_CODE_FIRMWARE_READY 48 |
305 | 292 | ||
293 | |||
294 | /* 802.11-related definitions */ | ||
295 | |||
296 | /* TxPD descriptor */ | ||
297 | struct txpd { | ||
298 | /* union to cope up with later FW revisions */ | ||
299 | union { | ||
300 | /* Current Tx packet status */ | ||
301 | __le32 tx_status; | ||
302 | struct { | ||
303 | /* BSS type: client, AP, etc. */ | ||
304 | u8 bss_type; | ||
305 | /* BSS number */ | ||
306 | u8 bss_num; | ||
307 | /* Reserved */ | ||
308 | __le16 reserved; | ||
309 | } bss; | ||
310 | } u; | ||
311 | /* Tx control */ | ||
312 | __le32 tx_control; | ||
313 | __le32 tx_packet_location; | ||
314 | /* Tx packet length */ | ||
315 | __le16 tx_packet_length; | ||
316 | /* First 2 byte of destination MAC address */ | ||
317 | u8 tx_dest_addr_high[2]; | ||
318 | /* Last 4 byte of destination MAC address */ | ||
319 | u8 tx_dest_addr_low[4]; | ||
320 | /* Pkt Priority */ | ||
321 | u8 priority; | ||
322 | /* Pkt Trasnit Power control */ | ||
323 | u8 powermgmt; | ||
324 | /* Amount of time the packet has been queued (units = 2ms) */ | ||
325 | u8 pktdelay_2ms; | ||
326 | /* reserved */ | ||
327 | u8 reserved1; | ||
328 | } __attribute__ ((packed)); | ||
329 | |||
330 | /* RxPD Descriptor */ | ||
331 | struct rxpd { | ||
332 | /* union to cope up with later FW revisions */ | ||
333 | union { | ||
334 | /* Current Rx packet status */ | ||
335 | __le16 status; | ||
336 | struct { | ||
337 | /* BSS type: client, AP, etc. */ | ||
338 | u8 bss_type; | ||
339 | /* BSS number */ | ||
340 | u8 bss_num; | ||
341 | } __attribute__ ((packed)) bss; | ||
342 | } __attribute__ ((packed)) u; | ||
343 | |||
344 | /* SNR */ | ||
345 | u8 snr; | ||
346 | |||
347 | /* Tx control */ | ||
348 | u8 rx_control; | ||
349 | |||
350 | /* Pkt length */ | ||
351 | __le16 pkt_len; | ||
352 | |||
353 | /* Noise Floor */ | ||
354 | u8 nf; | ||
355 | |||
356 | /* Rx Packet Rate */ | ||
357 | u8 rx_rate; | ||
358 | |||
359 | /* Pkt addr */ | ||
360 | __le32 pkt_ptr; | ||
361 | |||
362 | /* Next Rx RxPD addr */ | ||
363 | __le32 next_rxpd_ptr; | ||
364 | |||
365 | /* Pkt Priority */ | ||
366 | u8 priority; | ||
367 | u8 reserved[3]; | ||
368 | } __attribute__ ((packed)); | ||
369 | |||
370 | struct cmd_header { | ||
371 | __le16 command; | ||
372 | __le16 size; | ||
373 | __le16 seqnum; | ||
374 | __le16 result; | ||
375 | } __attribute__ ((packed)); | ||
376 | |||
377 | struct cmd_ctrl_node { | ||
378 | struct list_head list; | ||
379 | int result; | ||
380 | /* command response */ | ||
381 | int (*callback)(struct lbs_private *, | ||
382 | unsigned long, | ||
383 | struct cmd_header *); | ||
384 | unsigned long callback_arg; | ||
385 | /* command data */ | ||
386 | struct cmd_header *cmdbuf; | ||
387 | /* wait queue */ | ||
388 | u16 cmdwaitqwoken; | ||
389 | wait_queue_head_t cmdwait_q; | ||
390 | }; | ||
391 | |||
392 | /* Generic structure to hold all key types. */ | ||
393 | struct enc_key { | ||
394 | u16 len; | ||
395 | u16 flags; /* KEY_INFO_* from defs.h */ | ||
396 | u16 type; /* KEY_TYPE_* from defs.h */ | ||
397 | u8 key[32]; | ||
398 | }; | ||
399 | |||
400 | /* lbs_offset_value */ | ||
401 | struct lbs_offset_value { | ||
402 | u32 offset; | ||
403 | u32 value; | ||
404 | } __attribute__ ((packed)); | ||
405 | |||
406 | /* Define general data structure */ | ||
407 | /* cmd_DS_GEN */ | ||
408 | struct cmd_ds_gen { | ||
409 | __le16 command; | ||
410 | __le16 size; | ||
411 | __le16 seqnum; | ||
412 | __le16 result; | ||
413 | void *cmdresp[0]; | ||
414 | } __attribute__ ((packed)); | ||
415 | |||
416 | #define S_DS_GEN sizeof(struct cmd_ds_gen) | ||
417 | |||
418 | |||
419 | /* | ||
420 | * Define data structure for CMD_GET_HW_SPEC | ||
421 | * This structure defines the response for the GET_HW_SPEC command | ||
422 | */ | ||
423 | struct cmd_ds_get_hw_spec { | ||
424 | struct cmd_header hdr; | ||
425 | |||
426 | /* HW Interface version number */ | ||
427 | __le16 hwifversion; | ||
428 | /* HW version number */ | ||
429 | __le16 version; | ||
430 | /* Max number of TxPD FW can handle */ | ||
431 | __le16 nr_txpd; | ||
432 | /* Max no of Multicast address */ | ||
433 | __le16 nr_mcast_adr; | ||
434 | /* MAC address */ | ||
435 | u8 permanentaddr[6]; | ||
436 | |||
437 | /* region Code */ | ||
438 | __le16 regioncode; | ||
439 | |||
440 | /* Number of antenna used */ | ||
441 | __le16 nr_antenna; | ||
442 | |||
443 | /* FW release number, example 0x01030304 = 2.3.4p1 */ | ||
444 | __le32 fwrelease; | ||
445 | |||
446 | /* Base Address of TxPD queue */ | ||
447 | __le32 wcb_base; | ||
448 | /* Read Pointer of RxPd queue */ | ||
449 | __le32 rxpd_rdptr; | ||
450 | |||
451 | /* Write Pointer of RxPd queue */ | ||
452 | __le32 rxpd_wrptr; | ||
453 | |||
454 | /*FW/HW capability */ | ||
455 | __le32 fwcapinfo; | ||
456 | } __attribute__ ((packed)); | ||
457 | |||
458 | struct cmd_ds_802_11_subscribe_event { | ||
459 | struct cmd_header hdr; | ||
460 | |||
461 | __le16 action; | ||
462 | __le16 events; | ||
463 | |||
464 | /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a | ||
465 | * number of TLVs. From the v5.1 manual, those TLVs would add up to | ||
466 | * 40 bytes. However, future firmware might add additional TLVs, so I | ||
467 | * bump this up a bit. | ||
468 | */ | ||
469 | uint8_t tlv[128]; | ||
470 | } __attribute__ ((packed)); | ||
471 | |||
472 | /* | ||
473 | * This scan handle Country Information IE(802.11d compliant) | ||
474 | * Define data structure for CMD_802_11_SCAN | ||
475 | */ | ||
476 | struct cmd_ds_802_11_scan { | ||
477 | struct cmd_header hdr; | ||
478 | |||
479 | uint8_t bsstype; | ||
480 | uint8_t bssid[ETH_ALEN]; | ||
481 | uint8_t tlvbuffer[0]; | ||
482 | } __attribute__ ((packed)); | ||
483 | |||
484 | struct cmd_ds_802_11_scan_rsp { | ||
485 | struct cmd_header hdr; | ||
486 | |||
487 | __le16 bssdescriptsize; | ||
488 | uint8_t nr_sets; | ||
489 | uint8_t bssdesc_and_tlvbuffer[0]; | ||
490 | } __attribute__ ((packed)); | ||
491 | |||
492 | struct cmd_ds_802_11_get_log { | ||
493 | struct cmd_header hdr; | ||
494 | |||
495 | __le32 mcasttxframe; | ||
496 | __le32 failed; | ||
497 | __le32 retry; | ||
498 | __le32 multiretry; | ||
499 | __le32 framedup; | ||
500 | __le32 rtssuccess; | ||
501 | __le32 rtsfailure; | ||
502 | __le32 ackfailure; | ||
503 | __le32 rxfrag; | ||
504 | __le32 mcastrxframe; | ||
505 | __le32 fcserror; | ||
506 | __le32 txframe; | ||
507 | __le32 wepundecryptable; | ||
508 | } __attribute__ ((packed)); | ||
509 | |||
510 | struct cmd_ds_mac_control { | ||
511 | struct cmd_header hdr; | ||
512 | __le16 action; | ||
513 | u16 reserved; | ||
514 | } __attribute__ ((packed)); | ||
515 | |||
516 | struct cmd_ds_mac_multicast_adr { | ||
517 | struct cmd_header hdr; | ||
518 | __le16 action; | ||
519 | __le16 nr_of_adrs; | ||
520 | u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE]; | ||
521 | } __attribute__ ((packed)); | ||
522 | |||
523 | struct cmd_ds_802_11_authenticate { | ||
524 | struct cmd_header hdr; | ||
525 | |||
526 | u8 bssid[ETH_ALEN]; | ||
527 | u8 authtype; | ||
528 | u8 reserved[10]; | ||
529 | } __attribute__ ((packed)); | ||
530 | |||
531 | struct cmd_ds_802_11_deauthenticate { | ||
532 | struct cmd_header hdr; | ||
533 | |||
534 | u8 macaddr[ETH_ALEN]; | ||
535 | __le16 reasoncode; | ||
536 | } __attribute__ ((packed)); | ||
537 | |||
538 | struct cmd_ds_802_11_associate { | ||
539 | struct cmd_header hdr; | ||
540 | |||
541 | u8 bssid[6]; | ||
542 | __le16 capability; | ||
543 | __le16 listeninterval; | ||
544 | __le16 bcnperiod; | ||
545 | u8 dtimperiod; | ||
546 | u8 iebuf[512]; /* Enough for required and most optional IEs */ | ||
547 | } __attribute__ ((packed)); | ||
548 | |||
549 | struct cmd_ds_802_11_associate_response { | ||
550 | struct cmd_header hdr; | ||
551 | |||
552 | __le16 capability; | ||
553 | __le16 statuscode; | ||
554 | __le16 aid; | ||
555 | u8 iebuf[512]; | ||
556 | } __attribute__ ((packed)); | ||
557 | |||
558 | struct cmd_ds_802_11_set_wep { | ||
559 | struct cmd_header hdr; | ||
560 | |||
561 | /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */ | ||
562 | __le16 action; | ||
563 | |||
564 | /* key Index selected for Tx */ | ||
565 | __le16 keyindex; | ||
566 | |||
567 | /* 40, 128bit or TXWEP */ | ||
568 | uint8_t keytype[4]; | ||
569 | uint8_t keymaterial[4][16]; | ||
570 | } __attribute__ ((packed)); | ||
571 | |||
572 | struct cmd_ds_802_11_snmp_mib { | ||
573 | struct cmd_header hdr; | ||
574 | |||
575 | __le16 action; | ||
576 | __le16 oid; | ||
577 | __le16 bufsize; | ||
578 | u8 value[128]; | ||
579 | } __attribute__ ((packed)); | ||
580 | |||
581 | struct cmd_ds_mac_reg_access { | ||
582 | __le16 action; | ||
583 | __le16 offset; | ||
584 | __le32 value; | ||
585 | } __attribute__ ((packed)); | ||
586 | |||
587 | struct cmd_ds_bbp_reg_access { | ||
588 | __le16 action; | ||
589 | __le16 offset; | ||
590 | u8 value; | ||
591 | u8 reserved[3]; | ||
592 | } __attribute__ ((packed)); | ||
593 | |||
594 | struct cmd_ds_rf_reg_access { | ||
595 | __le16 action; | ||
596 | __le16 offset; | ||
597 | u8 value; | ||
598 | u8 reserved[3]; | ||
599 | } __attribute__ ((packed)); | ||
600 | |||
601 | struct cmd_ds_802_11_radio_control { | ||
602 | struct cmd_header hdr; | ||
603 | |||
604 | __le16 action; | ||
605 | __le16 control; | ||
606 | } __attribute__ ((packed)); | ||
607 | |||
608 | struct cmd_ds_802_11_beacon_control { | ||
609 | __le16 action; | ||
610 | __le16 beacon_enable; | ||
611 | __le16 beacon_period; | ||
612 | } __attribute__ ((packed)); | ||
613 | |||
614 | struct cmd_ds_802_11_sleep_params { | ||
615 | struct cmd_header hdr; | ||
616 | |||
617 | /* ACT_GET/ACT_SET */ | ||
618 | __le16 action; | ||
619 | |||
620 | /* Sleep clock error in ppm */ | ||
621 | __le16 error; | ||
622 | |||
623 | /* Wakeup offset in usec */ | ||
624 | __le16 offset; | ||
625 | |||
626 | /* Clock stabilization time in usec */ | ||
627 | __le16 stabletime; | ||
628 | |||
629 | /* control periodic calibration */ | ||
630 | uint8_t calcontrol; | ||
631 | |||
632 | /* control the use of external sleep clock */ | ||
633 | uint8_t externalsleepclk; | ||
634 | |||
635 | /* reserved field, should be set to zero */ | ||
636 | __le16 reserved; | ||
637 | } __attribute__ ((packed)); | ||
638 | |||
639 | struct cmd_ds_802_11_inactivity_timeout { | ||
640 | struct cmd_header hdr; | ||
641 | |||
642 | /* ACT_GET/ACT_SET */ | ||
643 | __le16 action; | ||
644 | |||
645 | /* Inactivity timeout in msec */ | ||
646 | __le16 timeout; | ||
647 | } __attribute__ ((packed)); | ||
648 | |||
649 | struct cmd_ds_802_11_rf_channel { | ||
650 | struct cmd_header hdr; | ||
651 | |||
652 | __le16 action; | ||
653 | __le16 channel; | ||
654 | __le16 rftype; /* unused */ | ||
655 | __le16 reserved; /* unused */ | ||
656 | u8 channellist[32]; /* unused */ | ||
657 | } __attribute__ ((packed)); | ||
658 | |||
659 | struct cmd_ds_802_11_rssi { | ||
660 | /* weighting factor */ | ||
661 | __le16 N; | ||
662 | |||
663 | __le16 reserved_0; | ||
664 | __le16 reserved_1; | ||
665 | __le16 reserved_2; | ||
666 | } __attribute__ ((packed)); | ||
667 | |||
668 | struct cmd_ds_802_11_rssi_rsp { | ||
669 | __le16 SNR; | ||
670 | __le16 noisefloor; | ||
671 | __le16 avgSNR; | ||
672 | __le16 avgnoisefloor; | ||
673 | } __attribute__ ((packed)); | ||
674 | |||
675 | struct cmd_ds_802_11_mac_address { | ||
676 | struct cmd_header hdr; | ||
677 | |||
678 | __le16 action; | ||
679 | u8 macadd[ETH_ALEN]; | ||
680 | } __attribute__ ((packed)); | ||
681 | |||
682 | struct cmd_ds_802_11_rf_tx_power { | ||
683 | struct cmd_header hdr; | ||
684 | |||
685 | __le16 action; | ||
686 | __le16 curlevel; | ||
687 | s8 maxlevel; | ||
688 | s8 minlevel; | ||
689 | } __attribute__ ((packed)); | ||
690 | |||
691 | struct cmd_ds_802_11_monitor_mode { | ||
692 | __le16 action; | ||
693 | __le16 mode; | ||
694 | } __attribute__ ((packed)); | ||
695 | |||
696 | struct cmd_ds_set_boot2_ver { | ||
697 | struct cmd_header hdr; | ||
698 | |||
699 | __le16 action; | ||
700 | __le16 version; | ||
701 | } __attribute__ ((packed)); | ||
702 | |||
703 | struct cmd_ds_802_11_fw_wake_method { | ||
704 | struct cmd_header hdr; | ||
705 | |||
706 | __le16 action; | ||
707 | __le16 method; | ||
708 | } __attribute__ ((packed)); | ||
709 | |||
710 | struct cmd_ds_802_11_ps_mode { | ||
711 | __le16 action; | ||
712 | __le16 nullpktinterval; | ||
713 | __le16 multipledtim; | ||
714 | __le16 reserved; | ||
715 | __le16 locallisteninterval; | ||
716 | } __attribute__ ((packed)); | ||
717 | |||
718 | struct cmd_confirm_sleep { | ||
719 | struct cmd_header hdr; | ||
720 | |||
721 | __le16 action; | ||
722 | __le16 nullpktinterval; | ||
723 | __le16 multipledtim; | ||
724 | __le16 reserved; | ||
725 | __le16 locallisteninterval; | ||
726 | } __attribute__ ((packed)); | ||
727 | |||
728 | struct cmd_ds_802_11_data_rate { | ||
729 | struct cmd_header hdr; | ||
730 | |||
731 | __le16 action; | ||
732 | __le16 reserved; | ||
733 | u8 rates[MAX_RATES]; | ||
734 | } __attribute__ ((packed)); | ||
735 | |||
736 | struct cmd_ds_802_11_rate_adapt_rateset { | ||
737 | struct cmd_header hdr; | ||
738 | __le16 action; | ||
739 | __le16 enablehwauto; | ||
740 | __le16 bitmap; | ||
741 | } __attribute__ ((packed)); | ||
742 | |||
743 | struct cmd_ds_802_11_ad_hoc_start { | ||
744 | struct cmd_header hdr; | ||
745 | |||
746 | u8 ssid[IW_ESSID_MAX_SIZE]; | ||
747 | u8 bsstype; | ||
748 | __le16 beaconperiod; | ||
749 | u8 dtimperiod; /* Reserved on v9 and later */ | ||
750 | struct ieee_ie_ibss_param_set ibss; | ||
751 | u8 reserved1[4]; | ||
752 | struct ieee_ie_ds_param_set ds; | ||
753 | u8 reserved2[4]; | ||
754 | __le16 probedelay; /* Reserved on v9 and later */ | ||
755 | __le16 capability; | ||
756 | u8 rates[MAX_RATES]; | ||
757 | u8 tlv_memory_size_pad[100]; | ||
758 | } __attribute__ ((packed)); | ||
759 | |||
760 | struct cmd_ds_802_11_ad_hoc_result { | ||
761 | struct cmd_header hdr; | ||
762 | |||
763 | u8 pad[3]; | ||
764 | u8 bssid[ETH_ALEN]; | ||
765 | } __attribute__ ((packed)); | ||
766 | |||
767 | struct adhoc_bssdesc { | ||
768 | u8 bssid[ETH_ALEN]; | ||
769 | u8 ssid[IW_ESSID_MAX_SIZE]; | ||
770 | u8 type; | ||
771 | __le16 beaconperiod; | ||
772 | u8 dtimperiod; | ||
773 | __le64 timestamp; | ||
774 | __le64 localtime; | ||
775 | struct ieee_ie_ds_param_set ds; | ||
776 | u8 reserved1[4]; | ||
777 | struct ieee_ie_ibss_param_set ibss; | ||
778 | u8 reserved2[4]; | ||
779 | __le16 capability; | ||
780 | u8 rates[MAX_RATES]; | ||
781 | |||
782 | /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the | ||
783 | * Adhoc join command and will cause a binary layout mismatch with | ||
784 | * the firmware | ||
785 | */ | ||
786 | } __attribute__ ((packed)); | ||
787 | |||
788 | struct cmd_ds_802_11_ad_hoc_join { | ||
789 | struct cmd_header hdr; | ||
790 | |||
791 | struct adhoc_bssdesc bss; | ||
792 | __le16 failtimeout; /* Reserved on v9 and later */ | ||
793 | __le16 probedelay; /* Reserved on v9 and later */ | ||
794 | } __attribute__ ((packed)); | ||
795 | |||
796 | struct cmd_ds_802_11_ad_hoc_stop { | ||
797 | struct cmd_header hdr; | ||
798 | } __attribute__ ((packed)); | ||
799 | |||
800 | struct cmd_ds_802_11_enable_rsn { | ||
801 | struct cmd_header hdr; | ||
802 | |||
803 | __le16 action; | ||
804 | __le16 enable; | ||
805 | } __attribute__ ((packed)); | ||
806 | |||
807 | struct MrvlIEtype_keyParamSet { | ||
808 | /* type ID */ | ||
809 | __le16 type; | ||
810 | |||
811 | /* length of Payload */ | ||
812 | __le16 length; | ||
813 | |||
814 | /* type of key: WEP=0, TKIP=1, AES=2 */ | ||
815 | __le16 keytypeid; | ||
816 | |||
817 | /* key control Info specific to a keytypeid */ | ||
818 | __le16 keyinfo; | ||
819 | |||
820 | /* length of key */ | ||
821 | __le16 keylen; | ||
822 | |||
823 | /* key material of size keylen */ | ||
824 | u8 key[32]; | ||
825 | } __attribute__ ((packed)); | ||
826 | |||
827 | #define MAX_WOL_RULES 16 | ||
828 | |||
829 | struct host_wol_rule { | ||
830 | uint8_t rule_no; | ||
831 | uint8_t rule_ops; | ||
832 | __le16 sig_offset; | ||
833 | __le16 sig_length; | ||
834 | __le16 reserve; | ||
835 | __be32 sig_mask; | ||
836 | __be32 signature; | ||
837 | } __attribute__ ((packed)); | ||
838 | |||
839 | struct wol_config { | ||
840 | uint8_t action; | ||
841 | uint8_t pattern; | ||
842 | uint8_t no_rules_in_cmd; | ||
843 | uint8_t result; | ||
844 | struct host_wol_rule rule[MAX_WOL_RULES]; | ||
845 | } __attribute__ ((packed)); | ||
846 | |||
847 | struct cmd_ds_host_sleep { | ||
848 | struct cmd_header hdr; | ||
849 | __le32 criteria; | ||
850 | uint8_t gpio; | ||
851 | uint16_t gap; | ||
852 | struct wol_config wol_conf; | ||
853 | } __attribute__ ((packed)); | ||
854 | |||
855 | |||
856 | |||
857 | struct cmd_ds_802_11_key_material { | ||
858 | struct cmd_header hdr; | ||
859 | |||
860 | __le16 action; | ||
861 | struct MrvlIEtype_keyParamSet keyParamSet[2]; | ||
862 | } __attribute__ ((packed)); | ||
863 | |||
864 | struct cmd_ds_802_11_eeprom_access { | ||
865 | struct cmd_header hdr; | ||
866 | __le16 action; | ||
867 | __le16 offset; | ||
868 | __le16 len; | ||
869 | /* firmware says it returns a maximum of 20 bytes */ | ||
870 | #define LBS_EEPROM_READ_LEN 20 | ||
871 | u8 value[LBS_EEPROM_READ_LEN]; | ||
872 | } __attribute__ ((packed)); | ||
873 | |||
874 | struct cmd_ds_802_11_tpc_cfg { | ||
875 | struct cmd_header hdr; | ||
876 | |||
877 | __le16 action; | ||
878 | uint8_t enable; | ||
879 | int8_t P0; | ||
880 | int8_t P1; | ||
881 | int8_t P2; | ||
882 | uint8_t usesnr; | ||
883 | } __attribute__ ((packed)); | ||
884 | |||
885 | |||
886 | struct cmd_ds_802_11_pa_cfg { | ||
887 | struct cmd_header hdr; | ||
888 | |||
889 | __le16 action; | ||
890 | uint8_t enable; | ||
891 | int8_t P0; | ||
892 | int8_t P1; | ||
893 | int8_t P2; | ||
894 | } __attribute__ ((packed)); | ||
895 | |||
896 | |||
897 | struct cmd_ds_802_11_led_ctrl { | ||
898 | __le16 action; | ||
899 | __le16 numled; | ||
900 | u8 data[256]; | ||
901 | } __attribute__ ((packed)); | ||
902 | |||
903 | struct cmd_ds_802_11_afc { | ||
904 | __le16 afc_auto; | ||
905 | union { | ||
906 | struct { | ||
907 | __le16 threshold; | ||
908 | __le16 period; | ||
909 | }; | ||
910 | struct { | ||
911 | __le16 timing_offset; /* signed */ | ||
912 | __le16 carrier_offset; /* signed */ | ||
913 | }; | ||
914 | }; | ||
915 | } __attribute__ ((packed)); | ||
916 | |||
917 | struct cmd_tx_rate_query { | ||
918 | __le16 txrate; | ||
919 | } __attribute__ ((packed)); | ||
920 | |||
921 | struct cmd_ds_get_tsf { | ||
922 | __le64 tsfvalue; | ||
923 | } __attribute__ ((packed)); | ||
924 | |||
925 | struct cmd_ds_bt_access { | ||
926 | __le16 action; | ||
927 | __le32 id; | ||
928 | u8 addr1[ETH_ALEN]; | ||
929 | u8 addr2[ETH_ALEN]; | ||
930 | } __attribute__ ((packed)); | ||
931 | |||
932 | struct cmd_ds_fwt_access { | ||
933 | __le16 action; | ||
934 | __le32 id; | ||
935 | u8 valid; | ||
936 | u8 da[ETH_ALEN]; | ||
937 | u8 dir; | ||
938 | u8 ra[ETH_ALEN]; | ||
939 | __le32 ssn; | ||
940 | __le32 dsn; | ||
941 | __le32 metric; | ||
942 | u8 rate; | ||
943 | u8 hopcount; | ||
944 | u8 ttl; | ||
945 | __le32 expiration; | ||
946 | u8 sleepmode; | ||
947 | __le32 snr; | ||
948 | __le32 references; | ||
949 | u8 prec[ETH_ALEN]; | ||
950 | } __attribute__ ((packed)); | ||
951 | |||
952 | struct cmd_ds_mesh_config { | ||
953 | struct cmd_header hdr; | ||
954 | |||
955 | __le16 action; | ||
956 | __le16 channel; | ||
957 | __le16 type; | ||
958 | __le16 length; | ||
959 | u8 data[128]; /* last position reserved */ | ||
960 | } __attribute__ ((packed)); | ||
961 | |||
962 | struct cmd_ds_mesh_access { | ||
963 | struct cmd_header hdr; | ||
964 | |||
965 | __le16 action; | ||
966 | __le32 data[32]; /* last position reserved */ | ||
967 | } __attribute__ ((packed)); | ||
968 | |||
969 | /* Number of stats counters returned by the firmware */ | ||
970 | #define MESH_STATS_NUM 8 | ||
971 | |||
972 | struct cmd_ds_command { | ||
973 | /* command header */ | ||
974 | __le16 command; | ||
975 | __le16 size; | ||
976 | __le16 seqnum; | ||
977 | __le16 result; | ||
978 | |||
979 | /* command Body */ | ||
980 | union { | ||
981 | struct cmd_ds_802_11_ps_mode psmode; | ||
982 | struct cmd_ds_802_11_monitor_mode monitor; | ||
983 | struct cmd_ds_802_11_rssi rssi; | ||
984 | struct cmd_ds_802_11_rssi_rsp rssirsp; | ||
985 | struct cmd_ds_mac_reg_access macreg; | ||
986 | struct cmd_ds_bbp_reg_access bbpreg; | ||
987 | struct cmd_ds_rf_reg_access rfreg; | ||
988 | |||
989 | struct cmd_ds_802_11d_domain_info domaininfo; | ||
990 | struct cmd_ds_802_11d_domain_info domaininforesp; | ||
991 | |||
992 | struct cmd_ds_802_11_tpc_cfg tpccfg; | ||
993 | struct cmd_ds_802_11_afc afc; | ||
994 | struct cmd_ds_802_11_led_ctrl ledgpio; | ||
995 | |||
996 | struct cmd_ds_bt_access bt; | ||
997 | struct cmd_ds_fwt_access fwt; | ||
998 | struct cmd_ds_get_tsf gettsf; | ||
999 | struct cmd_ds_802_11_beacon_control bcn_ctrl; | ||
1000 | } params; | ||
1001 | } __attribute__ ((packed)); | ||
1002 | |||
306 | #endif | 1003 | #endif |
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h deleted file mode 100644 index c8a1998d4744..000000000000 --- a/drivers/net/wireless/libertas/hostcmd.h +++ /dev/null | |||
@@ -1,800 +0,0 @@ | |||
1 | /* | ||
2 | * This file contains the function prototypes, data structure | ||
3 | * and defines for all the host/station commands | ||
4 | */ | ||
5 | #ifndef _LBS_HOSTCMD_H | ||
6 | #define _LBS_HOSTCMD_H | ||
7 | |||
8 | #include <linux/wireless.h> | ||
9 | #include "11d.h" | ||
10 | #include "types.h" | ||
11 | |||
12 | /* 802.11-related definitions */ | ||
13 | |||
14 | /* TxPD descriptor */ | ||
15 | struct txpd { | ||
16 | /* union to cope up with later FW revisions */ | ||
17 | union { | ||
18 | /* Current Tx packet status */ | ||
19 | __le32 tx_status; | ||
20 | struct { | ||
21 | /* BSS type: client, AP, etc. */ | ||
22 | u8 bss_type; | ||
23 | /* BSS number */ | ||
24 | u8 bss_num; | ||
25 | /* Reserved */ | ||
26 | __le16 reserved; | ||
27 | } bss; | ||
28 | } u; | ||
29 | /* Tx control */ | ||
30 | __le32 tx_control; | ||
31 | __le32 tx_packet_location; | ||
32 | /* Tx packet length */ | ||
33 | __le16 tx_packet_length; | ||
34 | /* First 2 byte of destination MAC address */ | ||
35 | u8 tx_dest_addr_high[2]; | ||
36 | /* Last 4 byte of destination MAC address */ | ||
37 | u8 tx_dest_addr_low[4]; | ||
38 | /* Pkt Priority */ | ||
39 | u8 priority; | ||
40 | /* Pkt Trasnit Power control */ | ||
41 | u8 powermgmt; | ||
42 | /* Amount of time the packet has been queued in the driver (units = 2ms) */ | ||
43 | u8 pktdelay_2ms; | ||
44 | /* reserved */ | ||
45 | u8 reserved1; | ||
46 | } __attribute__ ((packed)); | ||
47 | |||
48 | /* RxPD Descriptor */ | ||
49 | struct rxpd { | ||
50 | /* union to cope up with later FW revisions */ | ||
51 | union { | ||
52 | /* Current Rx packet status */ | ||
53 | __le16 status; | ||
54 | struct { | ||
55 | /* BSS type: client, AP, etc. */ | ||
56 | u8 bss_type; | ||
57 | /* BSS number */ | ||
58 | u8 bss_num; | ||
59 | } __attribute__ ((packed)) bss; | ||
60 | } __attribute__ ((packed)) u; | ||
61 | |||
62 | /* SNR */ | ||
63 | u8 snr; | ||
64 | |||
65 | /* Tx control */ | ||
66 | u8 rx_control; | ||
67 | |||
68 | /* Pkt length */ | ||
69 | __le16 pkt_len; | ||
70 | |||
71 | /* Noise Floor */ | ||
72 | u8 nf; | ||
73 | |||
74 | /* Rx Packet Rate */ | ||
75 | u8 rx_rate; | ||
76 | |||
77 | /* Pkt addr */ | ||
78 | __le32 pkt_ptr; | ||
79 | |||
80 | /* Next Rx RxPD addr */ | ||
81 | __le32 next_rxpd_ptr; | ||
82 | |||
83 | /* Pkt Priority */ | ||
84 | u8 priority; | ||
85 | u8 reserved[3]; | ||
86 | } __attribute__ ((packed)); | ||
87 | |||
88 | struct cmd_header { | ||
89 | __le16 command; | ||
90 | __le16 size; | ||
91 | __le16 seqnum; | ||
92 | __le16 result; | ||
93 | } __attribute__ ((packed)); | ||
94 | |||
95 | struct cmd_ctrl_node { | ||
96 | struct list_head list; | ||
97 | int result; | ||
98 | /* command response */ | ||
99 | int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *); | ||
100 | unsigned long callback_arg; | ||
101 | /* command data */ | ||
102 | struct cmd_header *cmdbuf; | ||
103 | /* wait queue */ | ||
104 | u16 cmdwaitqwoken; | ||
105 | wait_queue_head_t cmdwait_q; | ||
106 | }; | ||
107 | |||
108 | /* Generic structure to hold all key types. */ | ||
109 | struct enc_key { | ||
110 | u16 len; | ||
111 | u16 flags; /* KEY_INFO_* from defs.h */ | ||
112 | u16 type; /* KEY_TYPE_* from defs.h */ | ||
113 | u8 key[32]; | ||
114 | }; | ||
115 | |||
116 | /* lbs_offset_value */ | ||
117 | struct lbs_offset_value { | ||
118 | u32 offset; | ||
119 | u32 value; | ||
120 | } __attribute__ ((packed)); | ||
121 | |||
122 | /* Define general data structure */ | ||
123 | /* cmd_DS_GEN */ | ||
124 | struct cmd_ds_gen { | ||
125 | __le16 command; | ||
126 | __le16 size; | ||
127 | __le16 seqnum; | ||
128 | __le16 result; | ||
129 | void *cmdresp[0]; | ||
130 | } __attribute__ ((packed)); | ||
131 | |||
132 | #define S_DS_GEN sizeof(struct cmd_ds_gen) | ||
133 | |||
134 | |||
135 | /* | ||
136 | * Define data structure for CMD_GET_HW_SPEC | ||
137 | * This structure defines the response for the GET_HW_SPEC command | ||
138 | */ | ||
139 | struct cmd_ds_get_hw_spec { | ||
140 | struct cmd_header hdr; | ||
141 | |||
142 | /* HW Interface version number */ | ||
143 | __le16 hwifversion; | ||
144 | /* HW version number */ | ||
145 | __le16 version; | ||
146 | /* Max number of TxPD FW can handle */ | ||
147 | __le16 nr_txpd; | ||
148 | /* Max no of Multicast address */ | ||
149 | __le16 nr_mcast_adr; | ||
150 | /* MAC address */ | ||
151 | u8 permanentaddr[6]; | ||
152 | |||
153 | /* region Code */ | ||
154 | __le16 regioncode; | ||
155 | |||
156 | /* Number of antenna used */ | ||
157 | __le16 nr_antenna; | ||
158 | |||
159 | /* FW release number, example 0x01030304 = 2.3.4p1 */ | ||
160 | __le32 fwrelease; | ||
161 | |||
162 | /* Base Address of TxPD queue */ | ||
163 | __le32 wcb_base; | ||
164 | /* Read Pointer of RxPd queue */ | ||
165 | __le32 rxpd_rdptr; | ||
166 | |||
167 | /* Write Pointer of RxPd queue */ | ||
168 | __le32 rxpd_wrptr; | ||
169 | |||
170 | /*FW/HW capability */ | ||
171 | __le32 fwcapinfo; | ||
172 | } __attribute__ ((packed)); | ||
173 | |||
174 | struct cmd_ds_802_11_subscribe_event { | ||
175 | struct cmd_header hdr; | ||
176 | |||
177 | __le16 action; | ||
178 | __le16 events; | ||
179 | |||
180 | /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a | ||
181 | * number of TLVs. From the v5.1 manual, those TLVs would add up to | ||
182 | * 40 bytes. However, future firmware might add additional TLVs, so I | ||
183 | * bump this up a bit. | ||
184 | */ | ||
185 | uint8_t tlv[128]; | ||
186 | } __attribute__ ((packed)); | ||
187 | |||
188 | /* | ||
189 | * This scan handle Country Information IE(802.11d compliant) | ||
190 | * Define data structure for CMD_802_11_SCAN | ||
191 | */ | ||
192 | struct cmd_ds_802_11_scan { | ||
193 | struct cmd_header hdr; | ||
194 | |||
195 | uint8_t bsstype; | ||
196 | uint8_t bssid[ETH_ALEN]; | ||
197 | uint8_t tlvbuffer[0]; | ||
198 | #if 0 | ||
199 | mrvlietypes_ssidparamset_t ssidParamSet; | ||
200 | mrvlietypes_chanlistparamset_t ChanListParamSet; | ||
201 | mrvlietypes_ratesparamset_t OpRateSet; | ||
202 | #endif | ||
203 | } __attribute__ ((packed)); | ||
204 | |||
205 | struct cmd_ds_802_11_scan_rsp { | ||
206 | struct cmd_header hdr; | ||
207 | |||
208 | __le16 bssdescriptsize; | ||
209 | uint8_t nr_sets; | ||
210 | uint8_t bssdesc_and_tlvbuffer[0]; | ||
211 | } __attribute__ ((packed)); | ||
212 | |||
213 | struct cmd_ds_802_11_get_log { | ||
214 | struct cmd_header hdr; | ||
215 | |||
216 | __le32 mcasttxframe; | ||
217 | __le32 failed; | ||
218 | __le32 retry; | ||
219 | __le32 multiretry; | ||
220 | __le32 framedup; | ||
221 | __le32 rtssuccess; | ||
222 | __le32 rtsfailure; | ||
223 | __le32 ackfailure; | ||
224 | __le32 rxfrag; | ||
225 | __le32 mcastrxframe; | ||
226 | __le32 fcserror; | ||
227 | __le32 txframe; | ||
228 | __le32 wepundecryptable; | ||
229 | } __attribute__ ((packed)); | ||
230 | |||
231 | struct cmd_ds_mac_control { | ||
232 | struct cmd_header hdr; | ||
233 | __le16 action; | ||
234 | u16 reserved; | ||
235 | } __attribute__ ((packed)); | ||
236 | |||
237 | struct cmd_ds_mac_multicast_adr { | ||
238 | struct cmd_header hdr; | ||
239 | __le16 action; | ||
240 | __le16 nr_of_adrs; | ||
241 | u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE]; | ||
242 | } __attribute__ ((packed)); | ||
243 | |||
244 | struct cmd_ds_gspi_bus_config { | ||
245 | struct cmd_header hdr; | ||
246 | __le16 action; | ||
247 | __le16 bus_delay_mode; | ||
248 | __le16 host_time_delay_to_read_port; | ||
249 | __le16 host_time_delay_to_read_register; | ||
250 | } __attribute__ ((packed)); | ||
251 | |||
252 | struct cmd_ds_802_11_authenticate { | ||
253 | struct cmd_header hdr; | ||
254 | |||
255 | u8 bssid[ETH_ALEN]; | ||
256 | u8 authtype; | ||
257 | u8 reserved[10]; | ||
258 | } __attribute__ ((packed)); | ||
259 | |||
260 | struct cmd_ds_802_11_deauthenticate { | ||
261 | struct cmd_header hdr; | ||
262 | |||
263 | u8 macaddr[ETH_ALEN]; | ||
264 | __le16 reasoncode; | ||
265 | } __attribute__ ((packed)); | ||
266 | |||
267 | struct cmd_ds_802_11_associate { | ||
268 | struct cmd_header hdr; | ||
269 | |||
270 | u8 bssid[6]; | ||
271 | __le16 capability; | ||
272 | __le16 listeninterval; | ||
273 | __le16 bcnperiod; | ||
274 | u8 dtimperiod; | ||
275 | u8 iebuf[512]; /* Enough for required and most optional IEs */ | ||
276 | } __attribute__ ((packed)); | ||
277 | |||
278 | struct cmd_ds_802_11_associate_response { | ||
279 | struct cmd_header hdr; | ||
280 | |||
281 | __le16 capability; | ||
282 | __le16 statuscode; | ||
283 | __le16 aid; | ||
284 | u8 iebuf[512]; | ||
285 | } __attribute__ ((packed)); | ||
286 | |||
287 | struct cmd_ds_802_11_set_wep { | ||
288 | struct cmd_header hdr; | ||
289 | |||
290 | /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */ | ||
291 | __le16 action; | ||
292 | |||
293 | /* key Index selected for Tx */ | ||
294 | __le16 keyindex; | ||
295 | |||
296 | /* 40, 128bit or TXWEP */ | ||
297 | uint8_t keytype[4]; | ||
298 | uint8_t keymaterial[4][16]; | ||
299 | } __attribute__ ((packed)); | ||
300 | |||
301 | struct cmd_ds_802_3_get_stat { | ||
302 | __le32 xmitok; | ||
303 | __le32 rcvok; | ||
304 | __le32 xmiterror; | ||
305 | __le32 rcverror; | ||
306 | __le32 rcvnobuffer; | ||
307 | __le32 rcvcrcerror; | ||
308 | } __attribute__ ((packed)); | ||
309 | |||
310 | struct cmd_ds_802_11_get_stat { | ||
311 | __le32 txfragmentcnt; | ||
312 | __le32 mcasttxframecnt; | ||
313 | __le32 failedcnt; | ||
314 | __le32 retrycnt; | ||
315 | __le32 Multipleretrycnt; | ||
316 | __le32 rtssuccesscnt; | ||
317 | __le32 rtsfailurecnt; | ||
318 | __le32 ackfailurecnt; | ||
319 | __le32 frameduplicatecnt; | ||
320 | __le32 rxfragmentcnt; | ||
321 | __le32 mcastrxframecnt; | ||
322 | __le32 fcserrorcnt; | ||
323 | __le32 bcasttxframecnt; | ||
324 | __le32 bcastrxframecnt; | ||
325 | __le32 txbeacon; | ||
326 | __le32 rxbeacon; | ||
327 | __le32 wepundecryptable; | ||
328 | } __attribute__ ((packed)); | ||
329 | |||
330 | struct cmd_ds_802_11_snmp_mib { | ||
331 | struct cmd_header hdr; | ||
332 | |||
333 | __le16 action; | ||
334 | __le16 oid; | ||
335 | __le16 bufsize; | ||
336 | u8 value[128]; | ||
337 | } __attribute__ ((packed)); | ||
338 | |||
339 | struct cmd_ds_mac_reg_map { | ||
340 | __le16 buffersize; | ||
341 | u8 regmap[128]; | ||
342 | __le16 reserved; | ||
343 | } __attribute__ ((packed)); | ||
344 | |||
345 | struct cmd_ds_bbp_reg_map { | ||
346 | __le16 buffersize; | ||
347 | u8 regmap[128]; | ||
348 | __le16 reserved; | ||
349 | } __attribute__ ((packed)); | ||
350 | |||
351 | struct cmd_ds_rf_reg_map { | ||
352 | __le16 buffersize; | ||
353 | u8 regmap[64]; | ||
354 | __le16 reserved; | ||
355 | } __attribute__ ((packed)); | ||
356 | |||
357 | struct cmd_ds_mac_reg_access { | ||
358 | __le16 action; | ||
359 | __le16 offset; | ||
360 | __le32 value; | ||
361 | } __attribute__ ((packed)); | ||
362 | |||
363 | struct cmd_ds_bbp_reg_access { | ||
364 | __le16 action; | ||
365 | __le16 offset; | ||
366 | u8 value; | ||
367 | u8 reserved[3]; | ||
368 | } __attribute__ ((packed)); | ||
369 | |||
370 | struct cmd_ds_rf_reg_access { | ||
371 | __le16 action; | ||
372 | __le16 offset; | ||
373 | u8 value; | ||
374 | u8 reserved[3]; | ||
375 | } __attribute__ ((packed)); | ||
376 | |||
377 | struct cmd_ds_802_11_radio_control { | ||
378 | struct cmd_header hdr; | ||
379 | |||
380 | __le16 action; | ||
381 | __le16 control; | ||
382 | } __attribute__ ((packed)); | ||
383 | |||
384 | struct cmd_ds_802_11_beacon_control { | ||
385 | __le16 action; | ||
386 | __le16 beacon_enable; | ||
387 | __le16 beacon_period; | ||
388 | } __attribute__ ((packed)); | ||
389 | |||
390 | struct cmd_ds_802_11_sleep_params { | ||
391 | struct cmd_header hdr; | ||
392 | |||
393 | /* ACT_GET/ACT_SET */ | ||
394 | __le16 action; | ||
395 | |||
396 | /* Sleep clock error in ppm */ | ||
397 | __le16 error; | ||
398 | |||
399 | /* Wakeup offset in usec */ | ||
400 | __le16 offset; | ||
401 | |||
402 | /* Clock stabilization time in usec */ | ||
403 | __le16 stabletime; | ||
404 | |||
405 | /* control periodic calibration */ | ||
406 | uint8_t calcontrol; | ||
407 | |||
408 | /* control the use of external sleep clock */ | ||
409 | uint8_t externalsleepclk; | ||
410 | |||
411 | /* reserved field, should be set to zero */ | ||
412 | __le16 reserved; | ||
413 | } __attribute__ ((packed)); | ||
414 | |||
415 | struct cmd_ds_802_11_inactivity_timeout { | ||
416 | struct cmd_header hdr; | ||
417 | |||
418 | /* ACT_GET/ACT_SET */ | ||
419 | __le16 action; | ||
420 | |||
421 | /* Inactivity timeout in msec */ | ||
422 | __le16 timeout; | ||
423 | } __attribute__ ((packed)); | ||
424 | |||
425 | struct cmd_ds_802_11_rf_channel { | ||
426 | struct cmd_header hdr; | ||
427 | |||
428 | __le16 action; | ||
429 | __le16 channel; | ||
430 | __le16 rftype; /* unused */ | ||
431 | __le16 reserved; /* unused */ | ||
432 | u8 channellist[32]; /* unused */ | ||
433 | } __attribute__ ((packed)); | ||
434 | |||
435 | struct cmd_ds_802_11_rssi { | ||
436 | /* weighting factor */ | ||
437 | __le16 N; | ||
438 | |||
439 | __le16 reserved_0; | ||
440 | __le16 reserved_1; | ||
441 | __le16 reserved_2; | ||
442 | } __attribute__ ((packed)); | ||
443 | |||
444 | struct cmd_ds_802_11_rssi_rsp { | ||
445 | __le16 SNR; | ||
446 | __le16 noisefloor; | ||
447 | __le16 avgSNR; | ||
448 | __le16 avgnoisefloor; | ||
449 | } __attribute__ ((packed)); | ||
450 | |||
451 | struct cmd_ds_802_11_mac_address { | ||
452 | struct cmd_header hdr; | ||
453 | |||
454 | __le16 action; | ||
455 | u8 macadd[ETH_ALEN]; | ||
456 | } __attribute__ ((packed)); | ||
457 | |||
458 | struct cmd_ds_802_11_rf_tx_power { | ||
459 | struct cmd_header hdr; | ||
460 | |||
461 | __le16 action; | ||
462 | __le16 curlevel; | ||
463 | s8 maxlevel; | ||
464 | s8 minlevel; | ||
465 | } __attribute__ ((packed)); | ||
466 | |||
467 | struct cmd_ds_802_11_rf_antenna { | ||
468 | __le16 action; | ||
469 | |||
470 | /* Number of antennas or 0xffff(diversity) */ | ||
471 | __le16 antennamode; | ||
472 | |||
473 | } __attribute__ ((packed)); | ||
474 | |||
475 | struct cmd_ds_802_11_monitor_mode { | ||
476 | __le16 action; | ||
477 | __le16 mode; | ||
478 | } __attribute__ ((packed)); | ||
479 | |||
480 | struct cmd_ds_set_boot2_ver { | ||
481 | struct cmd_header hdr; | ||
482 | |||
483 | __le16 action; | ||
484 | __le16 version; | ||
485 | } __attribute__ ((packed)); | ||
486 | |||
487 | struct cmd_ds_802_11_fw_wake_method { | ||
488 | struct cmd_header hdr; | ||
489 | |||
490 | __le16 action; | ||
491 | __le16 method; | ||
492 | } __attribute__ ((packed)); | ||
493 | |||
494 | struct cmd_ds_802_11_sleep_period { | ||
495 | struct cmd_header hdr; | ||
496 | |||
497 | __le16 action; | ||
498 | __le16 period; | ||
499 | } __attribute__ ((packed)); | ||
500 | |||
501 | struct cmd_ds_802_11_ps_mode { | ||
502 | __le16 action; | ||
503 | __le16 nullpktinterval; | ||
504 | __le16 multipledtim; | ||
505 | __le16 reserved; | ||
506 | __le16 locallisteninterval; | ||
507 | } __attribute__ ((packed)); | ||
508 | |||
509 | struct cmd_confirm_sleep { | ||
510 | struct cmd_header hdr; | ||
511 | |||
512 | __le16 action; | ||
513 | __le16 nullpktinterval; | ||
514 | __le16 multipledtim; | ||
515 | __le16 reserved; | ||
516 | __le16 locallisteninterval; | ||
517 | } __attribute__ ((packed)); | ||
518 | |||
519 | struct cmd_ds_802_11_data_rate { | ||
520 | struct cmd_header hdr; | ||
521 | |||
522 | __le16 action; | ||
523 | __le16 reserved; | ||
524 | u8 rates[MAX_RATES]; | ||
525 | } __attribute__ ((packed)); | ||
526 | |||
527 | struct cmd_ds_802_11_rate_adapt_rateset { | ||
528 | struct cmd_header hdr; | ||
529 | __le16 action; | ||
530 | __le16 enablehwauto; | ||
531 | __le16 bitmap; | ||
532 | } __attribute__ ((packed)); | ||
533 | |||
534 | struct cmd_ds_802_11_ad_hoc_start { | ||
535 | struct cmd_header hdr; | ||
536 | |||
537 | u8 ssid[IW_ESSID_MAX_SIZE]; | ||
538 | u8 bsstype; | ||
539 | __le16 beaconperiod; | ||
540 | u8 dtimperiod; /* Reserved on v9 and later */ | ||
541 | struct ieee_ie_ibss_param_set ibss; | ||
542 | u8 reserved1[4]; | ||
543 | struct ieee_ie_ds_param_set ds; | ||
544 | u8 reserved2[4]; | ||
545 | __le16 probedelay; /* Reserved on v9 and later */ | ||
546 | __le16 capability; | ||
547 | u8 rates[MAX_RATES]; | ||
548 | u8 tlv_memory_size_pad[100]; | ||
549 | } __attribute__ ((packed)); | ||
550 | |||
551 | struct cmd_ds_802_11_ad_hoc_result { | ||
552 | struct cmd_header hdr; | ||
553 | |||
554 | u8 pad[3]; | ||
555 | u8 bssid[ETH_ALEN]; | ||
556 | } __attribute__ ((packed)); | ||
557 | |||
558 | struct adhoc_bssdesc { | ||
559 | u8 bssid[ETH_ALEN]; | ||
560 | u8 ssid[IW_ESSID_MAX_SIZE]; | ||
561 | u8 type; | ||
562 | __le16 beaconperiod; | ||
563 | u8 dtimperiod; | ||
564 | __le64 timestamp; | ||
565 | __le64 localtime; | ||
566 | struct ieee_ie_ds_param_set ds; | ||
567 | u8 reserved1[4]; | ||
568 | struct ieee_ie_ibss_param_set ibss; | ||
569 | u8 reserved2[4]; | ||
570 | __le16 capability; | ||
571 | u8 rates[MAX_RATES]; | ||
572 | |||
573 | /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the | ||
574 | * Adhoc join command and will cause a binary layout mismatch with | ||
575 | * the firmware | ||
576 | */ | ||
577 | } __attribute__ ((packed)); | ||
578 | |||
579 | struct cmd_ds_802_11_ad_hoc_join { | ||
580 | struct cmd_header hdr; | ||
581 | |||
582 | struct adhoc_bssdesc bss; | ||
583 | __le16 failtimeout; /* Reserved on v9 and later */ | ||
584 | __le16 probedelay; /* Reserved on v9 and later */ | ||
585 | } __attribute__ ((packed)); | ||
586 | |||
587 | struct cmd_ds_802_11_ad_hoc_stop { | ||
588 | struct cmd_header hdr; | ||
589 | } __attribute__ ((packed)); | ||
590 | |||
591 | struct cmd_ds_802_11_enable_rsn { | ||
592 | struct cmd_header hdr; | ||
593 | |||
594 | __le16 action; | ||
595 | __le16 enable; | ||
596 | } __attribute__ ((packed)); | ||
597 | |||
598 | struct MrvlIEtype_keyParamSet { | ||
599 | /* type ID */ | ||
600 | __le16 type; | ||
601 | |||
602 | /* length of Payload */ | ||
603 | __le16 length; | ||
604 | |||
605 | /* type of key: WEP=0, TKIP=1, AES=2 */ | ||
606 | __le16 keytypeid; | ||
607 | |||
608 | /* key control Info specific to a keytypeid */ | ||
609 | __le16 keyinfo; | ||
610 | |||
611 | /* length of key */ | ||
612 | __le16 keylen; | ||
613 | |||
614 | /* key material of size keylen */ | ||
615 | u8 key[32]; | ||
616 | } __attribute__ ((packed)); | ||
617 | |||
618 | #define MAX_WOL_RULES 16 | ||
619 | |||
620 | struct host_wol_rule { | ||
621 | uint8_t rule_no; | ||
622 | uint8_t rule_ops; | ||
623 | __le16 sig_offset; | ||
624 | __le16 sig_length; | ||
625 | __le16 reserve; | ||
626 | __be32 sig_mask; | ||
627 | __be32 signature; | ||
628 | } __attribute__ ((packed)); | ||
629 | |||
630 | struct wol_config { | ||
631 | uint8_t action; | ||
632 | uint8_t pattern; | ||
633 | uint8_t no_rules_in_cmd; | ||
634 | uint8_t result; | ||
635 | struct host_wol_rule rule[MAX_WOL_RULES]; | ||
636 | } __attribute__ ((packed)); | ||
637 | |||
638 | struct cmd_ds_host_sleep { | ||
639 | struct cmd_header hdr; | ||
640 | __le32 criteria; | ||
641 | uint8_t gpio; | ||
642 | uint16_t gap; | ||
643 | struct wol_config wol_conf; | ||
644 | } __attribute__ ((packed)); | ||
645 | |||
646 | |||
647 | |||
648 | struct cmd_ds_802_11_key_material { | ||
649 | struct cmd_header hdr; | ||
650 | |||
651 | __le16 action; | ||
652 | struct MrvlIEtype_keyParamSet keyParamSet[2]; | ||
653 | } __attribute__ ((packed)); | ||
654 | |||
655 | struct cmd_ds_802_11_eeprom_access { | ||
656 | struct cmd_header hdr; | ||
657 | __le16 action; | ||
658 | __le16 offset; | ||
659 | __le16 len; | ||
660 | /* firmware says it returns a maximum of 20 bytes */ | ||
661 | #define LBS_EEPROM_READ_LEN 20 | ||
662 | u8 value[LBS_EEPROM_READ_LEN]; | ||
663 | } __attribute__ ((packed)); | ||
664 | |||
665 | struct cmd_ds_802_11_tpc_cfg { | ||
666 | struct cmd_header hdr; | ||
667 | |||
668 | __le16 action; | ||
669 | uint8_t enable; | ||
670 | int8_t P0; | ||
671 | int8_t P1; | ||
672 | int8_t P2; | ||
673 | uint8_t usesnr; | ||
674 | } __attribute__ ((packed)); | ||
675 | |||
676 | |||
677 | struct cmd_ds_802_11_pa_cfg { | ||
678 | struct cmd_header hdr; | ||
679 | |||
680 | __le16 action; | ||
681 | uint8_t enable; | ||
682 | int8_t P0; | ||
683 | int8_t P1; | ||
684 | int8_t P2; | ||
685 | } __attribute__ ((packed)); | ||
686 | |||
687 | |||
688 | struct cmd_ds_802_11_led_ctrl { | ||
689 | __le16 action; | ||
690 | __le16 numled; | ||
691 | u8 data[256]; | ||
692 | } __attribute__ ((packed)); | ||
693 | |||
694 | struct cmd_ds_802_11_afc { | ||
695 | __le16 afc_auto; | ||
696 | union { | ||
697 | struct { | ||
698 | __le16 threshold; | ||
699 | __le16 period; | ||
700 | }; | ||
701 | struct { | ||
702 | __le16 timing_offset; /* signed */ | ||
703 | __le16 carrier_offset; /* signed */ | ||
704 | }; | ||
705 | }; | ||
706 | } __attribute__ ((packed)); | ||
707 | |||
708 | struct cmd_tx_rate_query { | ||
709 | __le16 txrate; | ||
710 | } __attribute__ ((packed)); | ||
711 | |||
712 | struct cmd_ds_get_tsf { | ||
713 | __le64 tsfvalue; | ||
714 | } __attribute__ ((packed)); | ||
715 | |||
716 | struct cmd_ds_bt_access { | ||
717 | __le16 action; | ||
718 | __le32 id; | ||
719 | u8 addr1[ETH_ALEN]; | ||
720 | u8 addr2[ETH_ALEN]; | ||
721 | } __attribute__ ((packed)); | ||
722 | |||
723 | struct cmd_ds_fwt_access { | ||
724 | __le16 action; | ||
725 | __le32 id; | ||
726 | u8 valid; | ||
727 | u8 da[ETH_ALEN]; | ||
728 | u8 dir; | ||
729 | u8 ra[ETH_ALEN]; | ||
730 | __le32 ssn; | ||
731 | __le32 dsn; | ||
732 | __le32 metric; | ||
733 | u8 rate; | ||
734 | u8 hopcount; | ||
735 | u8 ttl; | ||
736 | __le32 expiration; | ||
737 | u8 sleepmode; | ||
738 | __le32 snr; | ||
739 | __le32 references; | ||
740 | u8 prec[ETH_ALEN]; | ||
741 | } __attribute__ ((packed)); | ||
742 | |||
743 | |||
744 | struct cmd_ds_mesh_config { | ||
745 | struct cmd_header hdr; | ||
746 | |||
747 | __le16 action; | ||
748 | __le16 channel; | ||
749 | __le16 type; | ||
750 | __le16 length; | ||
751 | u8 data[128]; /* last position reserved */ | ||
752 | } __attribute__ ((packed)); | ||
753 | |||
754 | |||
755 | struct cmd_ds_mesh_access { | ||
756 | struct cmd_header hdr; | ||
757 | |||
758 | __le16 action; | ||
759 | __le32 data[32]; /* last position reserved */ | ||
760 | } __attribute__ ((packed)); | ||
761 | |||
762 | /* Number of stats counters returned by the firmware */ | ||
763 | #define MESH_STATS_NUM 8 | ||
764 | |||
765 | struct cmd_ds_command { | ||
766 | /* command header */ | ||
767 | __le16 command; | ||
768 | __le16 size; | ||
769 | __le16 seqnum; | ||
770 | __le16 result; | ||
771 | |||
772 | /* command Body */ | ||
773 | union { | ||
774 | struct cmd_ds_802_11_ps_mode psmode; | ||
775 | struct cmd_ds_802_11_get_stat gstat; | ||
776 | struct cmd_ds_802_3_get_stat gstat_8023; | ||
777 | struct cmd_ds_802_11_rf_antenna rant; | ||
778 | struct cmd_ds_802_11_monitor_mode monitor; | ||
779 | struct cmd_ds_802_11_rssi rssi; | ||
780 | struct cmd_ds_802_11_rssi_rsp rssirsp; | ||
781 | struct cmd_ds_mac_reg_access macreg; | ||
782 | struct cmd_ds_bbp_reg_access bbpreg; | ||
783 | struct cmd_ds_rf_reg_access rfreg; | ||
784 | |||
785 | struct cmd_ds_802_11d_domain_info domaininfo; | ||
786 | struct cmd_ds_802_11d_domain_info domaininforesp; | ||
787 | |||
788 | struct cmd_ds_802_11_tpc_cfg tpccfg; | ||
789 | struct cmd_ds_802_11_afc afc; | ||
790 | struct cmd_ds_802_11_led_ctrl ledgpio; | ||
791 | |||
792 | struct cmd_tx_rate_query txrate; | ||
793 | struct cmd_ds_bt_access bt; | ||
794 | struct cmd_ds_fwt_access fwt; | ||
795 | struct cmd_ds_get_tsf gettsf; | ||
796 | struct cmd_ds_802_11_beacon_control bcn_ctrl; | ||
797 | } params; | ||
798 | } __attribute__ ((packed)); | ||
799 | |||
800 | #endif | ||
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index 65f02cc6752f..9f18a19cc49d 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/etherdevice.h> | 4 | #include <linux/etherdevice.h> |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | 6 | ||
7 | #include "hostcmd.h" | 7 | #include "host.h" |
8 | #include "radiotap.h" | 8 | #include "radiotap.h" |
9 | #include "decl.h" | 9 | #include "decl.h" |
10 | #include "dev.h" | 10 | #include "dev.h" |
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 4c018f7a0a8d..5d7c011fe296 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/netdevice.h> | 4 | #include <linux/netdevice.h> |
5 | #include <linux/etherdevice.h> | 5 | #include <linux/etherdevice.h> |
6 | 6 | ||
7 | #include "hostcmd.h" | 7 | #include "host.h" |
8 | #include "radiotap.h" | 8 | #include "radiotap.h" |
9 | #include "decl.h" | 9 | #include "decl.h" |
10 | #include "defs.h" | 10 | #include "defs.h" |