blob: 96726f79a1dd9f8d90ff0d1f06ff5b587d93042e [file] [log] [blame]
Randy Dunlap8973a6e2011-04-26 15:25:29 -07001/*
2 * This file function prototypes, data structure
3 * and definitions for all the host/station commands
4 */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02005
Holger Schurig10078322007-11-15 18:05:47 -05006#ifndef _LBS_HOST_H_
7#define _LBS_HOST_H_
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02008
Holger Schurigf4228b42009-10-22 15:30:46 +02009#include "types.h"
10#include "defs.h"
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020011
Holger Schurig9e66e702009-10-16 17:32:16 +020012#define DEFAULT_AD_HOC_CHANNEL 6
13
14#define CMD_OPTION_WAITFORRSP 0x0002
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020015
Randy Dunlap8973a6e2011-04-26 15:25:29 -070016/* Host command IDs */
Holger Schurig6b63cd02007-08-02 11:53:36 -040017
Randy Dunlap8973a6e2011-04-26 15:25:29 -070018/*
19 * Return command are almost always the same as the host command, but with
Holger Schurig6b63cd02007-08-02 11:53:36 -040020 * bit 15 set high. There are a few exceptions, though...
21 */
Holger Schurig9e66e702009-10-16 17:32:16 +020022#define CMD_RET(cmd) (0x8000 | cmd)
Holger Schurig6b63cd02007-08-02 11:53:36 -040023
24/* Return command convention exceptions: */
Holger Schurig9e66e702009-10-16 17:32:16 +020025#define CMD_RET_802_11_ASSOCIATE 0x8012
Holger Schurig6b63cd02007-08-02 11:53:36 -040026
27/* Command codes */
Holger Schurig9e66e702009-10-16 17:32:16 +020028#define CMD_GET_HW_SPEC 0x0003
29#define CMD_EEPROM_UPDATE 0x0004
30#define CMD_802_11_RESET 0x0005
31#define CMD_802_11_SCAN 0x0006
32#define CMD_802_11_GET_LOG 0x000b
33#define CMD_MAC_MULTICAST_ADR 0x0010
34#define CMD_802_11_AUTHENTICATE 0x0011
35#define CMD_802_11_EEPROM_ACCESS 0x0059
36#define CMD_802_11_ASSOCIATE 0x0050
37#define CMD_802_11_SET_WEP 0x0013
38#define CMD_802_11_GET_STAT 0x0014
39#define CMD_802_3_GET_STAT 0x0015
40#define CMD_802_11_SNMP_MIB 0x0016
41#define CMD_MAC_REG_MAP 0x0017
42#define CMD_BBP_REG_MAP 0x0018
43#define CMD_MAC_REG_ACCESS 0x0019
44#define CMD_BBP_REG_ACCESS 0x001a
45#define CMD_RF_REG_ACCESS 0x001b
46#define CMD_802_11_RADIO_CONTROL 0x001c
47#define CMD_802_11_RF_CHANNEL 0x001d
48#define CMD_802_11_RF_TX_POWER 0x001e
49#define CMD_802_11_RSSI 0x001f
50#define CMD_802_11_RF_ANTENNA 0x0020
51#define CMD_802_11_PS_MODE 0x0021
52#define CMD_802_11_DATA_RATE 0x0022
53#define CMD_RF_REG_MAP 0x0023
54#define CMD_802_11_DEAUTHENTICATE 0x0024
55#define CMD_802_11_REASSOCIATE 0x0025
56#define CMD_MAC_CONTROL 0x0028
57#define CMD_802_11_AD_HOC_START 0x002b
58#define CMD_802_11_AD_HOC_JOIN 0x002c
59#define CMD_802_11_QUERY_TKIP_REPLY_CNTRS 0x002e
60#define CMD_802_11_ENABLE_RSN 0x002f
61#define CMD_802_11_SET_AFC 0x003c
62#define CMD_802_11_GET_AFC 0x003d
63#define CMD_802_11_DEEP_SLEEP 0x003e
64#define CMD_802_11_AD_HOC_STOP 0x0040
65#define CMD_802_11_HOST_SLEEP_CFG 0x0043
66#define CMD_802_11_WAKEUP_CONFIRM 0x0044
67#define CMD_802_11_HOST_SLEEP_ACTIVATE 0x0045
68#define CMD_802_11_BEACON_STOP 0x0049
69#define CMD_802_11_MAC_ADDRESS 0x004d
70#define CMD_802_11_LED_GPIO_CTRL 0x004e
Holger Schurig9e66e702009-10-16 17:32:16 +020071#define CMD_802_11_BAND_CONFIG 0x0058
72#define CMD_GSPI_BUS_CONFIG 0x005a
73#define CMD_802_11D_DOMAIN_INFO 0x005b
74#define CMD_802_11_KEY_MATERIAL 0x005e
75#define CMD_802_11_SLEEP_PARAMS 0x0066
76#define CMD_802_11_INACTIVITY_TIMEOUT 0x0067
77#define CMD_802_11_SLEEP_PERIOD 0x0068
78#define CMD_802_11_TPC_CFG 0x0072
79#define CMD_802_11_PA_CFG 0x0073
80#define CMD_802_11_FW_WAKE_METHOD 0x0074
81#define CMD_802_11_SUBSCRIBE_EVENT 0x0075
82#define CMD_802_11_RATE_ADAPT_RATESET 0x0076
83#define CMD_802_11_TX_RATE_QUERY 0x007f
84#define CMD_GET_TSF 0x0080
85#define CMD_BT_ACCESS 0x0087
86#define CMD_FWT_ACCESS 0x0095
87#define CMD_802_11_MONITOR_MODE 0x0098
88#define CMD_MESH_ACCESS 0x009b
89#define CMD_MESH_CONFIG_OLD 0x00a3
90#define CMD_MESH_CONFIG 0x00ac
91#define CMD_SET_BOOT2_VER 0x00a5
92#define CMD_FUNC_INIT 0x00a9
93#define CMD_FUNC_SHUTDOWN 0x00aa
94#define CMD_802_11_BEACON_CTRL 0x00b0
Brajesh Dave96287ac2007-11-20 17:44:28 -050095
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020096/* For the IEEE Power Save */
Dan Williams0bb64082010-07-27 13:08:08 -070097#define PS_MODE_ACTION_ENTER_PS 0x0030
98#define PS_MODE_ACTION_EXIT_PS 0x0031
99#define PS_MODE_ACTION_SLEEP_CONFIRMED 0x0034
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200100
Holger Schurig9e66e702009-10-16 17:32:16 +0200101#define CMD_ENABLE_RSN 0x0001
102#define CMD_DISABLE_RSN 0x0000
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200103
Holger Schurig9e66e702009-10-16 17:32:16 +0200104#define CMD_ACT_GET 0x0000
105#define CMD_ACT_SET 0x0001
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200106
Dan Williams0aef64d2007-08-02 11:31:18 -0400107/* Define action or option for CMD_802_11_SET_WEP */
Holger Schurig9e66e702009-10-16 17:32:16 +0200108#define CMD_ACT_ADD 0x0002
109#define CMD_ACT_REMOVE 0x0004
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200110
Holger Schurig9e66e702009-10-16 17:32:16 +0200111#define CMD_TYPE_WEP_40_BIT 0x01
112#define CMD_TYPE_WEP_104_BIT 0x02
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200113
Holger Schurig9e66e702009-10-16 17:32:16 +0200114#define CMD_NUM_OF_WEP_KEYS 4
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200115
Holger Schurig9e66e702009-10-16 17:32:16 +0200116#define CMD_WEP_KEY_INDEX_MASK 0x3fff
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200117
Dan Williams0aef64d2007-08-02 11:31:18 -0400118/* Define action or option for CMD_802_11_SCAN */
Holger Schurig9e66e702009-10-16 17:32:16 +0200119#define CMD_BSS_TYPE_BSS 0x0001
120#define CMD_BSS_TYPE_IBSS 0x0002
121#define CMD_BSS_TYPE_ANY 0x0003
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200122
Dan Williams0aef64d2007-08-02 11:31:18 -0400123/* Define action or option for CMD_802_11_SCAN */
Holger Schurig9e66e702009-10-16 17:32:16 +0200124#define CMD_SCAN_TYPE_ACTIVE 0x0000
125#define CMD_SCAN_TYPE_PASSIVE 0x0001
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200126
Holger Schurig9e66e702009-10-16 17:32:16 +0200127#define CMD_SCAN_RADIO_TYPE_BG 0
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200128
Holger Schurig9e66e702009-10-16 17:32:16 +0200129#define CMD_SCAN_PROBE_DELAY_TIME 0
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200130
Dan Williams0aef64d2007-08-02 11:31:18 -0400131/* Define action or option for CMD_MAC_CONTROL */
Holger Schurig9e66e702009-10-16 17:32:16 +0200132#define CMD_ACT_MAC_RX_ON 0x0001
133#define CMD_ACT_MAC_TX_ON 0x0002
134#define CMD_ACT_MAC_LOOPBACK_ON 0x0004
135#define CMD_ACT_MAC_WEP_ENABLE 0x0008
136#define CMD_ACT_MAC_INT_ENABLE 0x0010
137#define CMD_ACT_MAC_MULTICAST_ENABLE 0x0020
138#define CMD_ACT_MAC_BROADCAST_ENABLE 0x0040
139#define CMD_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
140#define CMD_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
141#define CMD_ACT_MAC_STRICT_PROTECTION_ENABLE 0x0400
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200142
Holger Schurig3a188642007-11-26 10:07:14 +0100143/* Event flags for CMD_802_11_SUBSCRIBE_EVENT */
Holger Schurig9e66e702009-10-16 17:32:16 +0200144#define CMD_SUBSCRIBE_RSSI_LOW 0x0001
145#define CMD_SUBSCRIBE_SNR_LOW 0x0002
146#define CMD_SUBSCRIBE_FAILCOUNT 0x0004
147#define CMD_SUBSCRIBE_BCNMISS 0x0008
148#define CMD_SUBSCRIBE_RSSI_HIGH 0x0010
149#define CMD_SUBSCRIBE_SNR_HIGH 0x0020
Holger Schurig3a188642007-11-26 10:07:14 +0100150
Holger Schurig9e66e702009-10-16 17:32:16 +0200151#define RADIO_PREAMBLE_LONG 0x00
152#define RADIO_PREAMBLE_SHORT 0x02
153#define RADIO_PREAMBLE_AUTO 0x04
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200154
155/* Define action or option for CMD_802_11_RF_CHANNEL */
Holger Schurig9e66e702009-10-16 17:32:16 +0200156#define CMD_OPT_802_11_RF_CHANNEL_GET 0x00
157#define CMD_OPT_802_11_RF_CHANNEL_SET 0x01
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200158
Dan Williams0aef64d2007-08-02 11:31:18 -0400159/* Define action or option for CMD_802_11_DATA_RATE */
Holger Schurig9e66e702009-10-16 17:32:16 +0200160#define CMD_ACT_SET_TX_AUTO 0x0000
161#define CMD_ACT_SET_TX_FIX_RATE 0x0001
162#define CMD_ACT_GET_TX_RATE 0x0002
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200163
David Woodhouseb2c57ee2007-12-17 14:41:13 -0500164/* Options for CMD_802_11_FW_WAKE_METHOD */
Holger Schurig9e66e702009-10-16 17:32:16 +0200165#define CMD_WAKE_METHOD_UNCHANGED 0x0000
166#define CMD_WAKE_METHOD_COMMAND_INT 0x0001
167#define CMD_WAKE_METHOD_GPIO 0x0002
David Woodhouseb2c57ee2007-12-17 14:41:13 -0500168
Dan Williams39fcf7a2008-09-10 12:49:00 -0400169/* Object IDs for CMD_802_11_SNMP_MIB */
Holger Schurig9e66e702009-10-16 17:32:16 +0200170#define SNMP_MIB_OID_BSS_TYPE 0x0000
171#define SNMP_MIB_OID_OP_RATE_SET 0x0001
172#define SNMP_MIB_OID_BEACON_PERIOD 0x0002 /* Reserved on v9+ */
173#define SNMP_MIB_OID_DTIM_PERIOD 0x0003 /* Reserved on v9+ */
174#define SNMP_MIB_OID_ASSOC_TIMEOUT 0x0004 /* Reserved on v9+ */
175#define SNMP_MIB_OID_RTS_THRESHOLD 0x0005
176#define SNMP_MIB_OID_SHORT_RETRY_LIMIT 0x0006
177#define SNMP_MIB_OID_LONG_RETRY_LIMIT 0x0007
178#define SNMP_MIB_OID_FRAG_THRESHOLD 0x0008
179#define SNMP_MIB_OID_11D_ENABLE 0x0009
180#define SNMP_MIB_OID_11H_ENABLE 0x000A
Dan Williams39fcf7a2008-09-10 12:49:00 -0400181
Dan Williams0aef64d2007-08-02 11:31:18 -0400182/* Define action or option for CMD_BT_ACCESS */
Dan Williamsffcae952007-08-02 11:35:46 -0400183enum cmd_bt_access_opts {
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200184 /* The bt commands start at 5 instead of 1 because the old dft commands
185 * are mapped to 1-4. These old commands are no longer maintained and
186 * should not be called.
187 */
Dan Williams0aef64d2007-08-02 11:31:18 -0400188 CMD_ACT_BT_ACCESS_ADD = 5,
189 CMD_ACT_BT_ACCESS_DEL,
190 CMD_ACT_BT_ACCESS_LIST,
191 CMD_ACT_BT_ACCESS_RESET,
192 CMD_ACT_BT_ACCESS_SET_INVERT,
193 CMD_ACT_BT_ACCESS_GET_INVERT
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200194};
195
Dan Williams0aef64d2007-08-02 11:31:18 -0400196/* Define action or option for CMD_FWT_ACCESS */
Dan Williamsffcae952007-08-02 11:35:46 -0400197enum cmd_fwt_access_opts {
Dan Williams0aef64d2007-08-02 11:31:18 -0400198 CMD_ACT_FWT_ACCESS_ADD = 1,
199 CMD_ACT_FWT_ACCESS_DEL,
200 CMD_ACT_FWT_ACCESS_LOOKUP,
201 CMD_ACT_FWT_ACCESS_LIST,
Dan Williams79a9a372007-12-11 15:29:10 -0500202 CMD_ACT_FWT_ACCESS_LIST_ROUTE,
203 CMD_ACT_FWT_ACCESS_LIST_NEIGHBOR,
Dan Williams0aef64d2007-08-02 11:31:18 -0400204 CMD_ACT_FWT_ACCESS_RESET,
205 CMD_ACT_FWT_ACCESS_CLEANUP,
206 CMD_ACT_FWT_ACCESS_TIME,
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200207};
208
Anna Neal582c1b52008-10-20 16:46:56 -0700209/* Define action or option for CMD_802_11_HOST_SLEEP_CFG */
210enum cmd_wol_cfg_opts {
211 CMD_ACT_ACTION_NONE = 0,
212 CMD_ACT_SET_WOL_RULE,
213 CMD_ACT_GET_WOL_RULE,
214 CMD_ACT_RESET_WOL_RULE,
215};
216
Dan Williams0aef64d2007-08-02 11:31:18 -0400217/* Define action or option for CMD_MESH_ACCESS */
Dan Williamsffcae952007-08-02 11:35:46 -0400218enum cmd_mesh_access_opts {
Dan Williams0aef64d2007-08-02 11:31:18 -0400219 CMD_ACT_MESH_GET_TTL = 1,
220 CMD_ACT_MESH_SET_TTL,
221 CMD_ACT_MESH_GET_STATS,
222 CMD_ACT_MESH_GET_ANYCAST,
223 CMD_ACT_MESH_SET_ANYCAST,
Dan Williams276c0152007-08-02 11:34:24 -0400224 CMD_ACT_MESH_SET_LINK_COSTS,
225 CMD_ACT_MESH_GET_LINK_COSTS,
226 CMD_ACT_MESH_SET_BCAST_RATE,
227 CMD_ACT_MESH_GET_BCAST_RATE,
228 CMD_ACT_MESH_SET_RREQ_DELAY,
229 CMD_ACT_MESH_GET_RREQ_DELAY,
230 CMD_ACT_MESH_SET_ROUTE_EXP,
231 CMD_ACT_MESH_GET_ROUTE_EXP,
Luis Carlos Coboa9f38d02007-08-02 11:52:29 -0400232 CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
233 CMD_ACT_MESH_GET_AUTOSTART_ENABLED,
Anna Neal6fb53252008-12-09 13:23:45 -0800234 CMD_ACT_MESH_SET_GET_PRB_RSP_LIMIT = 17,
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200235};
236
Javier Cardonaedaea5c2008-05-17 00:55:10 -0700237/* Define actions and types for CMD_MESH_CONFIG */
238enum cmd_mesh_config_actions {
239 CMD_ACT_MESH_CONFIG_STOP = 0,
240 CMD_ACT_MESH_CONFIG_START,
241 CMD_ACT_MESH_CONFIG_SET,
242 CMD_ACT_MESH_CONFIG_GET,
243};
244
245enum cmd_mesh_config_types {
246 CMD_TYPE_MESH_SET_BOOTFLAG = 1,
247 CMD_TYPE_MESH_SET_BOOTTIME,
248 CMD_TYPE_MESH_SET_DEF_CHANNEL,
249 CMD_TYPE_MESH_SET_MESH_IE,
250 CMD_TYPE_MESH_GET_DEFAULTS,
251 CMD_TYPE_MESH_GET_MESH_IE, /* GET_DEFAULTS is superset of GET_MESHIE */
252};
253
Randy Dunlap8973a6e2011-04-26 15:25:29 -0700254/* Card Event definition */
David Woodhouse387a1f02007-12-11 18:53:20 -0500255#define MACREG_INT_CODE_TX_PPA_FREE 0
256#define MACREG_INT_CODE_TX_DMA_DONE 1
257#define MACREG_INT_CODE_LINK_LOST_W_SCAN 2
258#define MACREG_INT_CODE_LINK_LOST_NO_SCAN 3
259#define MACREG_INT_CODE_LINK_SENSED 4
260#define MACREG_INT_CODE_CMD_FINISHED 5
261#define MACREG_INT_CODE_MIB_CHANGED 6
262#define MACREG_INT_CODE_INIT_DONE 7
263#define MACREG_INT_CODE_DEAUTHENTICATED 8
264#define MACREG_INT_CODE_DISASSOCIATED 9
265#define MACREG_INT_CODE_PS_AWAKE 10
266#define MACREG_INT_CODE_PS_SLEEP 11
267#define MACREG_INT_CODE_MIC_ERR_MULTICAST 13
268#define MACREG_INT_CODE_MIC_ERR_UNICAST 14
269#define MACREG_INT_CODE_WM_AWAKE 15
270#define MACREG_INT_CODE_DEEP_SLEEP_AWAKE 16
271#define MACREG_INT_CODE_ADHOC_BCN_LOST 17
272#define MACREG_INT_CODE_HOST_AWAKE 18
273#define MACREG_INT_CODE_STOP_TX 19
274#define MACREG_INT_CODE_START_TX 20
275#define MACREG_INT_CODE_CHANNEL_SWITCH 21
276#define MACREG_INT_CODE_MEASUREMENT_RDY 22
277#define MACREG_INT_CODE_WMM_CHANGE 23
278#define MACREG_INT_CODE_BG_SCAN_REPORT 24
279#define MACREG_INT_CODE_RSSI_LOW 25
280#define MACREG_INT_CODE_SNR_LOW 26
281#define MACREG_INT_CODE_MAX_FAIL 27
282#define MACREG_INT_CODE_RSSI_HIGH 28
283#define MACREG_INT_CODE_SNR_HIGH 29
284#define MACREG_INT_CODE_MESH_AUTO_STARTED 35
285#define MACREG_INT_CODE_FIRMWARE_READY 48
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200286
Holger Schurig9e66e702009-10-16 17:32:16 +0200287
288/* 802.11-related definitions */
289
290/* TxPD descriptor */
291struct txpd {
292 /* union to cope up with later FW revisions */
293 union {
294 /* Current Tx packet status */
295 __le32 tx_status;
296 struct {
297 /* BSS type: client, AP, etc. */
298 u8 bss_type;
299 /* BSS number */
300 u8 bss_num;
301 /* Reserved */
302 __le16 reserved;
303 } bss;
304 } u;
305 /* Tx control */
306 __le32 tx_control;
307 __le32 tx_packet_location;
308 /* Tx packet length */
309 __le16 tx_packet_length;
310 /* First 2 byte of destination MAC address */
311 u8 tx_dest_addr_high[2];
312 /* Last 4 byte of destination MAC address */
313 u8 tx_dest_addr_low[4];
314 /* Pkt Priority */
315 u8 priority;
316 /* Pkt Trasnit Power control */
317 u8 powermgmt;
318 /* Amount of time the packet has been queued (units = 2ms) */
319 u8 pktdelay_2ms;
320 /* reserved */
321 u8 reserved1;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000322} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200323
324/* RxPD Descriptor */
325struct rxpd {
326 /* union to cope up with later FW revisions */
327 union {
328 /* Current Rx packet status */
329 __le16 status;
330 struct {
331 /* BSS type: client, AP, etc. */
332 u8 bss_type;
333 /* BSS number */
334 u8 bss_num;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000335 } __packed bss;
336 } __packed u;
Holger Schurig9e66e702009-10-16 17:32:16 +0200337
338 /* SNR */
339 u8 snr;
340
341 /* Tx control */
342 u8 rx_control;
343
344 /* Pkt length */
345 __le16 pkt_len;
346
347 /* Noise Floor */
348 u8 nf;
349
350 /* Rx Packet Rate */
351 u8 rx_rate;
352
353 /* Pkt addr */
354 __le32 pkt_ptr;
355
356 /* Next Rx RxPD addr */
357 __le32 next_rxpd_ptr;
358
359 /* Pkt Priority */
360 u8 priority;
361 u8 reserved[3];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000362} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200363
364struct cmd_header {
365 __le16 command;
366 __le16 size;
367 __le16 seqnum;
368 __le16 result;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000369} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200370
Holger Schurig9e66e702009-10-16 17:32:16 +0200371/* Generic structure to hold all key types. */
372struct enc_key {
373 u16 len;
374 u16 flags; /* KEY_INFO_* from defs.h */
375 u16 type; /* KEY_TYPE_* from defs.h */
376 u8 key[32];
377};
378
379/* lbs_offset_value */
380struct lbs_offset_value {
381 u32 offset;
382 u32 value;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000383} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200384
Dan Williamscc4b9d32010-07-27 12:56:05 -0700385#define MAX_11D_TRIPLETS 83
Kiran Divekar1047d5e2010-06-04 23:20:42 -0700386
387struct mrvl_ie_domain_param_set {
388 struct mrvl_ie_header header;
389
Bing Zhao80751e22011-03-07 11:14:23 -0800390 u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
Dan Williamscc4b9d32010-07-27 12:56:05 -0700391 struct ieee80211_country_ie_triplet triplet[MAX_11D_TRIPLETS];
John W. Linvillebeabe912010-07-14 10:37:03 -0400392} __packed;
Kiran Divekar1047d5e2010-06-04 23:20:42 -0700393
394struct cmd_ds_802_11d_domain_info {
Dan Williamscc4b9d32010-07-27 12:56:05 -0700395 struct cmd_header hdr;
396
Kiran Divekar1047d5e2010-06-04 23:20:42 -0700397 __le16 action;
398 struct mrvl_ie_domain_param_set domain;
John W. Linvillebeabe912010-07-14 10:37:03 -0400399} __packed;
Kiran Divekar1047d5e2010-06-04 23:20:42 -0700400
Holger Schurig9e66e702009-10-16 17:32:16 +0200401/*
402 * Define data structure for CMD_GET_HW_SPEC
403 * This structure defines the response for the GET_HW_SPEC command
404 */
405struct cmd_ds_get_hw_spec {
406 struct cmd_header hdr;
407
408 /* HW Interface version number */
409 __le16 hwifversion;
410 /* HW version number */
411 __le16 version;
412 /* Max number of TxPD FW can handle */
413 __le16 nr_txpd;
414 /* Max no of Multicast address */
415 __le16 nr_mcast_adr;
416 /* MAC address */
417 u8 permanentaddr[6];
418
419 /* region Code */
420 __le16 regioncode;
421
422 /* Number of antenna used */
423 __le16 nr_antenna;
424
425 /* FW release number, example 0x01030304 = 2.3.4p1 */
426 __le32 fwrelease;
427
428 /* Base Address of TxPD queue */
429 __le32 wcb_base;
430 /* Read Pointer of RxPd queue */
431 __le32 rxpd_rdptr;
432
433 /* Write Pointer of RxPd queue */
434 __le32 rxpd_wrptr;
435
436 /*FW/HW capability */
437 __le32 fwcapinfo;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000438} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200439
440struct cmd_ds_802_11_subscribe_event {
441 struct cmd_header hdr;
442
443 __le16 action;
444 __le16 events;
445
446 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
447 * number of TLVs. From the v5.1 manual, those TLVs would add up to
448 * 40 bytes. However, future firmware might add additional TLVs, so I
449 * bump this up a bit.
450 */
451 uint8_t tlv[128];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000452} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200453
454/*
455 * This scan handle Country Information IE(802.11d compliant)
456 * Define data structure for CMD_802_11_SCAN
457 */
458struct cmd_ds_802_11_scan {
459 struct cmd_header hdr;
460
461 uint8_t bsstype;
462 uint8_t bssid[ETH_ALEN];
463 uint8_t tlvbuffer[0];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000464} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200465
466struct cmd_ds_802_11_scan_rsp {
467 struct cmd_header hdr;
468
469 __le16 bssdescriptsize;
470 uint8_t nr_sets;
471 uint8_t bssdesc_and_tlvbuffer[0];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000472} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200473
474struct cmd_ds_802_11_get_log {
475 struct cmd_header hdr;
476
477 __le32 mcasttxframe;
478 __le32 failed;
479 __le32 retry;
480 __le32 multiretry;
481 __le32 framedup;
482 __le32 rtssuccess;
483 __le32 rtsfailure;
484 __le32 ackfailure;
485 __le32 rxfrag;
486 __le32 mcastrxframe;
487 __le32 fcserror;
488 __le32 txframe;
489 __le32 wepundecryptable;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000490} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200491
492struct cmd_ds_mac_control {
493 struct cmd_header hdr;
494 __le16 action;
495 u16 reserved;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000496} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200497
498struct cmd_ds_mac_multicast_adr {
499 struct cmd_header hdr;
500 __le16 action;
501 __le16 nr_of_adrs;
502 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000503} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200504
505struct cmd_ds_802_11_authenticate {
506 struct cmd_header hdr;
507
508 u8 bssid[ETH_ALEN];
509 u8 authtype;
510 u8 reserved[10];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000511} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200512
513struct cmd_ds_802_11_deauthenticate {
514 struct cmd_header hdr;
515
516 u8 macaddr[ETH_ALEN];
517 __le16 reasoncode;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000518} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200519
520struct cmd_ds_802_11_associate {
521 struct cmd_header hdr;
522
523 u8 bssid[6];
524 __le16 capability;
525 __le16 listeninterval;
526 __le16 bcnperiod;
527 u8 dtimperiod;
528 u8 iebuf[512]; /* Enough for required and most optional IEs */
Eric Dumazetba2d3582010-06-02 18:10:09 +0000529} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200530
531struct cmd_ds_802_11_associate_response {
532 struct cmd_header hdr;
533
534 __le16 capability;
535 __le16 statuscode;
536 __le16 aid;
537 u8 iebuf[512];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000538} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200539
540struct cmd_ds_802_11_set_wep {
541 struct cmd_header hdr;
542
543 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
544 __le16 action;
545
546 /* key Index selected for Tx */
547 __le16 keyindex;
548
549 /* 40, 128bit or TXWEP */
550 uint8_t keytype[4];
551 uint8_t keymaterial[4][16];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000552} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200553
554struct cmd_ds_802_11_snmp_mib {
555 struct cmd_header hdr;
556
557 __le16 action;
558 __le16 oid;
559 __le16 bufsize;
560 u8 value[128];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000561} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200562
Dan Williams4c7c6e002010-07-27 13:01:07 -0700563struct cmd_ds_reg_access {
564 struct cmd_header hdr;
Holger Schurig9e66e702009-10-16 17:32:16 +0200565
Holger Schurig9e66e702009-10-16 17:32:16 +0200566 __le16 action;
567 __le16 offset;
Dan Williams4c7c6e002010-07-27 13:01:07 -0700568 union {
569 u8 bbp_rf; /* for BBP and RF registers */
570 __le32 mac; /* for MAC registers */
571 } value;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000572} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200573
574struct cmd_ds_802_11_radio_control {
575 struct cmd_header hdr;
576
577 __le16 action;
578 __le16 control;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000579} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200580
581struct cmd_ds_802_11_beacon_control {
Dan Williamsd6541c72010-07-27 12:58:08 -0700582 struct cmd_header hdr;
583
Holger Schurig9e66e702009-10-16 17:32:16 +0200584 __le16 action;
585 __le16 beacon_enable;
586 __le16 beacon_period;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000587} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200588
589struct cmd_ds_802_11_sleep_params {
590 struct cmd_header hdr;
591
592 /* ACT_GET/ACT_SET */
593 __le16 action;
594
595 /* Sleep clock error in ppm */
596 __le16 error;
597
598 /* Wakeup offset in usec */
599 __le16 offset;
600
601 /* Clock stabilization time in usec */
602 __le16 stabletime;
603
604 /* control periodic calibration */
605 uint8_t calcontrol;
606
607 /* control the use of external sleep clock */
608 uint8_t externalsleepclk;
609
610 /* reserved field, should be set to zero */
611 __le16 reserved;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000612} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200613
Holger Schurig9e66e702009-10-16 17:32:16 +0200614struct cmd_ds_802_11_rf_channel {
615 struct cmd_header hdr;
616
617 __le16 action;
618 __le16 channel;
619 __le16 rftype; /* unused */
620 __le16 reserved; /* unused */
621 u8 channellist[32]; /* unused */
Eric Dumazetba2d3582010-06-02 18:10:09 +0000622} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200623
624struct cmd_ds_802_11_rssi {
Dan Williams9fb76632010-07-27 12:55:21 -0700625 struct cmd_header hdr;
Holger Schurig9e66e702009-10-16 17:32:16 +0200626
Randy Dunlap8973a6e2011-04-26 15:25:29 -0700627 /*
628 * request: number of beacons (N) to average the SNR and NF over
Dan Williams9fb76632010-07-27 12:55:21 -0700629 * response: SNR of most recent beacon
630 */
631 __le16 n_or_snr;
Holger Schurig9e66e702009-10-16 17:32:16 +0200632
Randy Dunlap8973a6e2011-04-26 15:25:29 -0700633 /*
634 * The following fields are only set in the response.
Dan Williams9fb76632010-07-27 12:55:21 -0700635 * In the request these are reserved and should be set to 0.
636 */
637 __le16 nf; /* most recent beacon noise floor */
638 __le16 avg_snr; /* average SNR weighted by N from request */
639 __le16 avg_nf; /* average noise floor weighted by N from request */
Eric Dumazetba2d3582010-06-02 18:10:09 +0000640} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200641
642struct cmd_ds_802_11_mac_address {
643 struct cmd_header hdr;
644
645 __le16 action;
646 u8 macadd[ETH_ALEN];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000647} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200648
649struct cmd_ds_802_11_rf_tx_power {
650 struct cmd_header hdr;
651
652 __le16 action;
653 __le16 curlevel;
654 s8 maxlevel;
655 s8 minlevel;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000656} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200657
Dan Williamsa45b6f42010-07-27 12:54:34 -0700658/* MONITOR_MODE only exists in OLPC v5 firmware */
Holger Schurig9e66e702009-10-16 17:32:16 +0200659struct cmd_ds_802_11_monitor_mode {
Dan Williamsa45b6f42010-07-27 12:54:34 -0700660 struct cmd_header hdr;
661
Holger Schurig9e66e702009-10-16 17:32:16 +0200662 __le16 action;
663 __le16 mode;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000664} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200665
666struct cmd_ds_set_boot2_ver {
667 struct cmd_header hdr;
668
669 __le16 action;
670 __le16 version;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000671} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200672
673struct cmd_ds_802_11_fw_wake_method {
674 struct cmd_header hdr;
675
676 __le16 action;
677 __le16 method;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000678} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200679
680struct cmd_ds_802_11_ps_mode {
Dan Williams0bb64082010-07-27 13:08:08 -0700681 struct cmd_header hdr;
682
Holger Schurig9e66e702009-10-16 17:32:16 +0200683 __le16 action;
Dan Williams0bb64082010-07-27 13:08:08 -0700684
Randy Dunlap8973a6e2011-04-26 15:25:29 -0700685 /*
686 * Interval for keepalive in PS mode:
Dan Williams0bb64082010-07-27 13:08:08 -0700687 * 0x0000 = don't change
688 * 0x001E = firmware default
689 * 0xFFFF = disable
690 */
Holger Schurig9e66e702009-10-16 17:32:16 +0200691 __le16 nullpktinterval;
Dan Williams0bb64082010-07-27 13:08:08 -0700692
Randy Dunlap8973a6e2011-04-26 15:25:29 -0700693 /*
694 * Number of DTIM intervals to wake up for:
Dan Williams0bb64082010-07-27 13:08:08 -0700695 * 0 = don't change
696 * 1 = firmware default
697 * 5 = max
698 */
Holger Schurig9e66e702009-10-16 17:32:16 +0200699 __le16 multipledtim;
Dan Williams0bb64082010-07-27 13:08:08 -0700700
Holger Schurig9e66e702009-10-16 17:32:16 +0200701 __le16 reserved;
702 __le16 locallisteninterval;
Dan Williams0bb64082010-07-27 13:08:08 -0700703
Randy Dunlap8973a6e2011-04-26 15:25:29 -0700704 /*
705 * AdHoc awake period (FW v9+ only):
Dan Williams0bb64082010-07-27 13:08:08 -0700706 * 0 = don't change
707 * 1 = always awake (IEEE standard behavior)
708 * 2 - 31 = sleep for (n - 1) periods and awake for 1 period
709 * 32 - 254 = invalid
710 * 255 = sleep at each ATIM
711 */
712 __le16 adhoc_awake_period;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000713} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200714
715struct cmd_confirm_sleep {
716 struct cmd_header hdr;
717
718 __le16 action;
719 __le16 nullpktinterval;
720 __le16 multipledtim;
721 __le16 reserved;
722 __le16 locallisteninterval;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000723} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200724
725struct cmd_ds_802_11_data_rate {
726 struct cmd_header hdr;
727
728 __le16 action;
729 __le16 reserved;
730 u8 rates[MAX_RATES];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000731} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200732
733struct cmd_ds_802_11_rate_adapt_rateset {
734 struct cmd_header hdr;
735 __le16 action;
736 __le16 enablehwauto;
737 __le16 bitmap;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000738} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200739
740struct cmd_ds_802_11_ad_hoc_start {
741 struct cmd_header hdr;
742
Holger Schurig243e84e2009-10-22 15:30:47 +0200743 u8 ssid[IEEE80211_MAX_SSID_LEN];
Holger Schurig9e66e702009-10-16 17:32:16 +0200744 u8 bsstype;
745 __le16 beaconperiod;
746 u8 dtimperiod; /* Reserved on v9 and later */
747 struct ieee_ie_ibss_param_set ibss;
748 u8 reserved1[4];
749 struct ieee_ie_ds_param_set ds;
750 u8 reserved2[4];
751 __le16 probedelay; /* Reserved on v9 and later */
752 __le16 capability;
753 u8 rates[MAX_RATES];
754 u8 tlv_memory_size_pad[100];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000755} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200756
757struct cmd_ds_802_11_ad_hoc_result {
758 struct cmd_header hdr;
759
760 u8 pad[3];
761 u8 bssid[ETH_ALEN];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000762} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200763
764struct adhoc_bssdesc {
765 u8 bssid[ETH_ALEN];
Holger Schurig243e84e2009-10-22 15:30:47 +0200766 u8 ssid[IEEE80211_MAX_SSID_LEN];
Holger Schurig9e66e702009-10-16 17:32:16 +0200767 u8 type;
768 __le16 beaconperiod;
769 u8 dtimperiod;
770 __le64 timestamp;
771 __le64 localtime;
772 struct ieee_ie_ds_param_set ds;
773 u8 reserved1[4];
774 struct ieee_ie_ibss_param_set ibss;
775 u8 reserved2[4];
776 __le16 capability;
777 u8 rates[MAX_RATES];
778
Randy Dunlap8973a6e2011-04-26 15:25:29 -0700779 /*
780 * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
Holger Schurig9e66e702009-10-16 17:32:16 +0200781 * Adhoc join command and will cause a binary layout mismatch with
782 * the firmware
783 */
Eric Dumazetba2d3582010-06-02 18:10:09 +0000784} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200785
786struct cmd_ds_802_11_ad_hoc_join {
787 struct cmd_header hdr;
788
789 struct adhoc_bssdesc bss;
790 __le16 failtimeout; /* Reserved on v9 and later */
791 __le16 probedelay; /* Reserved on v9 and later */
Eric Dumazetba2d3582010-06-02 18:10:09 +0000792} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200793
794struct cmd_ds_802_11_ad_hoc_stop {
795 struct cmd_header hdr;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000796} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200797
798struct cmd_ds_802_11_enable_rsn {
799 struct cmd_header hdr;
800
801 __le16 action;
802 __le16 enable;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000803} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200804
805struct MrvlIEtype_keyParamSet {
806 /* type ID */
807 __le16 type;
808
809 /* length of Payload */
810 __le16 length;
811
812 /* type of key: WEP=0, TKIP=1, AES=2 */
813 __le16 keytypeid;
814
815 /* key control Info specific to a keytypeid */
816 __le16 keyinfo;
817
818 /* length of key */
819 __le16 keylen;
820
821 /* key material of size keylen */
822 u8 key[32];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000823} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200824
825#define MAX_WOL_RULES 16
826
827struct host_wol_rule {
828 uint8_t rule_no;
829 uint8_t rule_ops;
830 __le16 sig_offset;
831 __le16 sig_length;
832 __le16 reserve;
833 __be32 sig_mask;
834 __be32 signature;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000835} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200836
837struct wol_config {
838 uint8_t action;
839 uint8_t pattern;
840 uint8_t no_rules_in_cmd;
841 uint8_t result;
842 struct host_wol_rule rule[MAX_WOL_RULES];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000843} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200844
845struct cmd_ds_host_sleep {
846 struct cmd_header hdr;
847 __le32 criteria;
848 uint8_t gpio;
849 uint16_t gap;
850 struct wol_config wol_conf;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000851} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200852
853
854
855struct cmd_ds_802_11_key_material {
856 struct cmd_header hdr;
857
858 __le16 action;
859 struct MrvlIEtype_keyParamSet keyParamSet[2];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000860} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200861
862struct cmd_ds_802_11_eeprom_access {
863 struct cmd_header hdr;
864 __le16 action;
865 __le16 offset;
866 __le16 len;
867 /* firmware says it returns a maximum of 20 bytes */
868#define LBS_EEPROM_READ_LEN 20
869 u8 value[LBS_EEPROM_READ_LEN];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000870} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200871
872struct cmd_ds_802_11_tpc_cfg {
873 struct cmd_header hdr;
874
875 __le16 action;
876 uint8_t enable;
877 int8_t P0;
878 int8_t P1;
879 int8_t P2;
880 uint8_t usesnr;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000881} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200882
883
884struct cmd_ds_802_11_pa_cfg {
885 struct cmd_header hdr;
886
887 __le16 action;
888 uint8_t enable;
889 int8_t P0;
890 int8_t P1;
891 int8_t P2;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000892} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200893
894
895struct cmd_ds_802_11_led_ctrl {
Dan Williams85dfbfe2010-07-27 12:59:44 -0700896 struct cmd_header hdr;
897
Holger Schurig9e66e702009-10-16 17:32:16 +0200898 __le16 action;
899 __le16 numled;
900 u8 data[256];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000901} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200902
Dan Williamsdb080062010-07-27 12:57:27 -0700903/* Automatic Frequency Control */
Holger Schurig9e66e702009-10-16 17:32:16 +0200904struct cmd_ds_802_11_afc {
Dan Williamsdb080062010-07-27 12:57:27 -0700905 struct cmd_header hdr;
906
Holger Schurig9e66e702009-10-16 17:32:16 +0200907 __le16 afc_auto;
908 union {
909 struct {
910 __le16 threshold;
911 __le16 period;
912 };
913 struct {
914 __le16 timing_offset; /* signed */
915 __le16 carrier_offset; /* signed */
916 };
917 };
Eric Dumazetba2d3582010-06-02 18:10:09 +0000918} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200919
920struct cmd_tx_rate_query {
921 __le16 txrate;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000922} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200923
924struct cmd_ds_get_tsf {
925 __le64 tsfvalue;
Eric Dumazetba2d3582010-06-02 18:10:09 +0000926} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200927
928struct cmd_ds_bt_access {
Dan Williams52148652010-07-27 13:01:47 -0700929 struct cmd_header hdr;
930
Holger Schurig9e66e702009-10-16 17:32:16 +0200931 __le16 action;
932 __le32 id;
933 u8 addr1[ETH_ALEN];
934 u8 addr2[ETH_ALEN];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000935} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200936
937struct cmd_ds_fwt_access {
Dan Williamsa6bb1bc2010-07-27 13:03:46 -0700938 struct cmd_header hdr;
939
Holger Schurig9e66e702009-10-16 17:32:16 +0200940 __le16 action;
941 __le32 id;
942 u8 valid;
943 u8 da[ETH_ALEN];
944 u8 dir;
945 u8 ra[ETH_ALEN];
946 __le32 ssn;
947 __le32 dsn;
948 __le32 metric;
949 u8 rate;
950 u8 hopcount;
951 u8 ttl;
952 __le32 expiration;
953 u8 sleepmode;
954 __le32 snr;
955 __le32 references;
956 u8 prec[ETH_ALEN];
Eric Dumazetba2d3582010-06-02 18:10:09 +0000957} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200958
959struct cmd_ds_mesh_config {
960 struct cmd_header hdr;
961
962 __le16 action;
963 __le16 channel;
964 __le16 type;
965 __le16 length;
966 u8 data[128]; /* last position reserved */
Eric Dumazetba2d3582010-06-02 18:10:09 +0000967} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200968
969struct cmd_ds_mesh_access {
970 struct cmd_header hdr;
971
972 __le16 action;
973 __le32 data[32]; /* last position reserved */
Eric Dumazetba2d3582010-06-02 18:10:09 +0000974} __packed;
Holger Schurig9e66e702009-10-16 17:32:16 +0200975
976/* Number of stats counters returned by the firmware */
977#define MESH_STATS_NUM 8
Holger Schurig10078322007-11-15 18:05:47 -0500978#endif