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