blob: 09b898f6719c2193d8d9dfe14d9b124b94154911 [file] [log] [blame]
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02001/*
2 * This file contains the function prototypes, data structure
3 * and defines for all the host/station commands
4 */
5#ifndef __HOSTCMD__H
6#define __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 */
15struct txpd {
16 /* Current Tx packet status */
David Woodhouse981f1872007-05-25 23:36:54 -040017 __le32 tx_status;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020018 /* Tx control */
David Woodhouse981f1872007-05-25 23:36:54 -040019 __le32 tx_control;
20 __le32 tx_packet_location;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020021 /* Tx packet length */
David Woodhouse981f1872007-05-25 23:36:54 -040022 __le16 tx_packet_length;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020023 /* First 2 byte of destination MAC address */
24 u8 tx_dest_addr_high[2];
25 /* Last 4 byte of destination MAC address */
26 u8 tx_dest_addr_low[4];
27 /* Pkt Priority */
28 u8 priority;
29 /* Pkt Trasnit Power control */
30 u8 powermgmt;
31 /* Amount of time the packet has been queued in the driver (units = 2ms) */
32 u8 pktdelay_2ms;
33 /* reserved */
34 u8 reserved1;
35};
36
37/* RxPD Descriptor */
38struct rxpd {
39 /* Current Rx packet status */
David Woodhouse981f1872007-05-25 23:36:54 -040040 __le16 status;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020041
42 /* SNR */
43 u8 snr;
44
45 /* Tx control */
46 u8 rx_control;
47
48 /* Pkt length */
David Woodhouse981f1872007-05-25 23:36:54 -040049 __le16 pkt_len;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020050
51 /* Noise Floor */
52 u8 nf;
53
54 /* Rx Packet Rate */
55 u8 rx_rate;
56
57 /* Pkt addr */
David Woodhouse981f1872007-05-25 23:36:54 -040058 __le32 pkt_ptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020059
60 /* Next Rx RxPD addr */
David Woodhouse981f1872007-05-25 23:36:54 -040061 __le32 next_rxpd_ptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020062
63 /* Pkt Priority */
64 u8 priority;
65 u8 reserved[3];
66};
67
68struct cmd_ctrl_node {
69 /* CMD link list */
70 struct list_head list;
71 u32 status;
72 /* CMD ID */
73 u32 cmd_oid;
74 /*CMD wait option: wait for finish or no wait */
75 u16 wait_option;
76 /* command parameter */
77 void *pdata_buf;
78 /*command data */
79 u8 *bufvirtualaddr;
80 u16 cmdflags;
81 /* wait queue */
82 u16 cmdwaitqwoken;
83 wait_queue_head_t cmdwait_q;
84};
85
86/* WLAN_802_11_KEY
87 *
88 * Generic structure to hold all key types. key type (WEP40, WEP104, TKIP, AES)
89 * is determined from the keylength field.
90 */
91struct WLAN_802_11_KEY {
David Woodhouse981f1872007-05-25 23:36:54 -040092 __le32 len;
93 __le32 flags; /* KEY_INFO_* from wlan_defs.h */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020094 u8 key[MRVL_MAX_KEY_WPA_KEY_LENGTH];
David Woodhouse981f1872007-05-25 23:36:54 -040095 __le16 type; /* KEY_TYPE_* from wlan_defs.h */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020096};
97
98struct IE_WPA {
99 u8 elementid;
100 u8 len;
101 u8 oui[4];
David Woodhouse981f1872007-05-25 23:36:54 -0400102 __le16 version;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200103};
104
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200105/* wlan_offset_value */
106struct wlan_offset_value {
107 u32 offset;
108 u32 value;
109};
110
111struct WLAN_802_11_FIXED_IEs {
David Woodhouse981f1872007-05-25 23:36:54 -0400112 __le64 timestamp;
113 __le16 beaconinterval;
114 u16 capabilities; /* Actually struct ieeetypes_capinfo */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200115};
116
117struct WLAN_802_11_VARIABLE_IEs {
118 u8 elementid;
119 u8 length;
120 u8 data[1];
121};
122
123/* Define general data structure */
124/* cmd_DS_GEN */
125struct cmd_ds_gen {
David Woodhouse981f1872007-05-25 23:36:54 -0400126 __le16 command;
127 __le16 size;
128 __le16 seqnum;
129 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200130};
131
132#define S_DS_GEN sizeof(struct cmd_ds_gen)
133/*
134 * Define data structure for cmd_get_hw_spec
135 * This structure defines the response for the GET_HW_SPEC command
136 */
137struct cmd_ds_get_hw_spec {
138 /* HW Interface version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400139 __le16 hwifversion;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200140 /* HW version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400141 __le16 version;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200142 /* Max number of TxPD FW can handle */
David Woodhouse981f1872007-05-25 23:36:54 -0400143 __le16 nr_txpd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200144 /* Max no of Multicast address */
David Woodhouse981f1872007-05-25 23:36:54 -0400145 __le16 nr_mcast_adr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200146 /* MAC address */
147 u8 permanentaddr[6];
148
149 /* region Code */
David Woodhouse981f1872007-05-25 23:36:54 -0400150 __le16 regioncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200151
152 /* Number of antenna used */
David Woodhouse981f1872007-05-25 23:36:54 -0400153 __le16 nr_antenna;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200154
David Woodhousee5b3d472007-05-25 23:40:21 -0400155 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
156 u8 fwreleasenumber[4];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200157
158 /* Base Address of TxPD queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400159 __le32 wcb_base;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200160 /* Read Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400161 __le32 rxpd_rdptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200162
163 /* Write Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400164 __le32 rxpd_wrptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200165
166 /*FW/HW capability */
David Woodhouse981f1872007-05-25 23:36:54 -0400167 __le32 fwcapinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200168} __attribute__ ((packed));
169
170struct cmd_ds_802_11_reset {
David Woodhouse981f1872007-05-25 23:36:54 -0400171 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200172};
173
174struct cmd_ds_802_11_subscribe_event {
David Woodhouse981f1872007-05-25 23:36:54 -0400175 __le16 action;
176 __le16 events;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200177};
178
179/*
180 * This scan handle Country Information IE(802.11d compliant)
181 * Define data structure for cmd_802_11_scan
182 */
183struct cmd_ds_802_11_scan {
184 u8 bsstype;
185 u8 BSSID[ETH_ALEN];
186 u8 tlvbuffer[1];
187#if 0
188 mrvlietypes_ssidparamset_t ssidParamSet;
189 mrvlietypes_chanlistparamset_t ChanListParamSet;
190 mrvlietypes_ratesparamset_t OpRateSet;
191#endif
192};
193
194struct cmd_ds_802_11_scan_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400195 __le16 bssdescriptsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200196 u8 nr_sets;
197 u8 bssdesc_and_tlvbuffer[1];
198};
199
200struct cmd_ds_802_11_get_log {
David Woodhouse981f1872007-05-25 23:36:54 -0400201 __le32 mcasttxframe;
202 __le32 failed;
203 __le32 retry;
204 __le32 multiretry;
205 __le32 framedup;
206 __le32 rtssuccess;
207 __le32 rtsfailure;
208 __le32 ackfailure;
209 __le32 rxfrag;
210 __le32 mcastrxframe;
211 __le32 fcserror;
212 __le32 txframe;
213 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200214};
215
216struct cmd_ds_mac_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400217 __le16 action;
218 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200219};
220
221struct cmd_ds_mac_multicast_adr {
David Woodhouse981f1872007-05-25 23:36:54 -0400222 __le16 action;
223 __le16 nr_of_adrs;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200224 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
225};
226
227struct cmd_ds_802_11_authenticate {
228 u8 macaddr[ETH_ALEN];
229 u8 authtype;
230 u8 reserved[10];
231};
232
233struct cmd_ds_802_11_deauthenticate {
234 u8 macaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400235 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200236};
237
238struct cmd_ds_802_11_associate {
239 u8 peerstaaddr[6];
240 struct ieeetypes_capinfo capinfo;
David Woodhouse981f1872007-05-25 23:36:54 -0400241 __le16 listeninterval;
242 __le16 bcnperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200243 u8 dtimperiod;
244
245#if 0
246 mrvlietypes_ssidparamset_t ssidParamSet;
247 mrvlietypes_phyparamset_t phyparamset;
248 mrvlietypes_ssparamset_t ssparamset;
249 mrvlietypes_ratesparamset_t ratesParamSet;
250#endif
251} __attribute__ ((packed));
252
253struct cmd_ds_802_11_disassociate {
254 u8 destmacaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400255 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200256};
257
258struct cmd_ds_802_11_associate_rsp {
259 struct ieeetypes_assocrsp assocRsp;
260};
261
262struct cmd_ds_802_11_ad_hoc_result {
263 u8 PAD[3];
264 u8 BSSID[ETH_ALEN];
265};
266
267struct cmd_ds_802_11_set_wep {
268 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
David Woodhouse981f1872007-05-25 23:36:54 -0400269 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200270
271 /* key Index selected for Tx */
David Woodhouse981f1872007-05-25 23:36:54 -0400272 __le16 keyindex;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200273
274 /* 40, 128bit or TXWEP */
275 u8 keytype[4];
276 u8 keymaterial[4][16];
277};
278
279struct cmd_ds_802_3_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400280 __le32 xmitok;
281 __le32 rcvok;
282 __le32 xmiterror;
283 __le32 rcverror;
284 __le32 rcvnobuffer;
285 __le32 rcvcrcerror;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200286};
287
288struct cmd_ds_802_11_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400289 __le32 txfragmentcnt;
290 __le32 mcasttxframecnt;
291 __le32 failedcnt;
292 __le32 retrycnt;
293 __le32 Multipleretrycnt;
294 __le32 rtssuccesscnt;
295 __le32 rtsfailurecnt;
296 __le32 ackfailurecnt;
297 __le32 frameduplicatecnt;
298 __le32 rxfragmentcnt;
299 __le32 mcastrxframecnt;
300 __le32 fcserrorcnt;
301 __le32 bcasttxframecnt;
302 __le32 bcastrxframecnt;
303 __le32 txbeacon;
304 __le32 rxbeacon;
305 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200306};
307
308struct cmd_ds_802_11_snmp_mib {
David Woodhouse981f1872007-05-25 23:36:54 -0400309 __le16 querytype;
310 __le16 oid;
311 __le16 bufsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200312 u8 value[128];
313};
314
315struct cmd_ds_mac_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400316 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200317 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400318 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200319};
320
321struct cmd_ds_bbp_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400322 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200323 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400324 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200325};
326
327struct cmd_ds_rf_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400328 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200329 u8 regmap[64];
David Woodhouse981f1872007-05-25 23:36:54 -0400330 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200331};
332
333struct cmd_ds_mac_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400334 __le16 action;
335 __le16 offset;
336 __le32 value;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200337};
338
339struct cmd_ds_bbp_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400340 __le16 action;
341 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200342 u8 value;
343 u8 reserved[3];
344};
345
346struct cmd_ds_rf_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400347 __le16 action;
348 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200349 u8 value;
350 u8 reserved[3];
351};
352
353struct cmd_ds_802_11_radio_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400354 __le16 action;
355 __le16 control;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200356};
357
358struct cmd_ds_802_11_sleep_params {
359 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400360 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200361
362 /* Sleep clock error in ppm */
David Woodhouse981f1872007-05-25 23:36:54 -0400363 __le16 error;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200364
365 /* Wakeup offset in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400366 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200367
368 /* Clock stabilization time in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400369 __le16 stabletime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200370
371 /* control periodic calibration */
372 u8 calcontrol;
373
374 /* control the use of external sleep clock */
375 u8 externalsleepclk;
376
377 /* reserved field, should be set to zero */
David Woodhouse981f1872007-05-25 23:36:54 -0400378 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200379};
380
381struct cmd_ds_802_11_inactivity_timeout {
382 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400383 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200384
385 /* Inactivity timeout in msec */
David Woodhouse981f1872007-05-25 23:36:54 -0400386 __le16 timeout;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200387};
388
389struct cmd_ds_802_11_rf_channel {
David Woodhouse981f1872007-05-25 23:36:54 -0400390 __le16 action;
391 __le16 currentchannel;
392 __le16 rftype;
393 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200394 u8 channellist[32];
395};
396
397struct cmd_ds_802_11_rssi {
398 /* weighting factor */
David Woodhouse981f1872007-05-25 23:36:54 -0400399 __le16 N;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200400
David Woodhouse981f1872007-05-25 23:36:54 -0400401 __le16 reserved_0;
402 __le16 reserved_1;
403 __le16 reserved_2;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200404};
405
406struct cmd_ds_802_11_rssi_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400407 __le16 SNR;
408 __le16 noisefloor;
409 __le16 avgSNR;
410 __le16 avgnoisefloor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200411};
412
413struct cmd_ds_802_11_mac_address {
David Woodhouse981f1872007-05-25 23:36:54 -0400414 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200415 u8 macadd[ETH_ALEN];
416};
417
418struct cmd_ds_802_11_rf_tx_power {
David Woodhouse981f1872007-05-25 23:36:54 -0400419 __le16 action;
420 __le16 currentlevel;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200421};
422
423struct cmd_ds_802_11_rf_antenna {
David Woodhouse981f1872007-05-25 23:36:54 -0400424 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200425
426 /* Number of antennas or 0xffff(diversity) */
David Woodhouse981f1872007-05-25 23:36:54 -0400427 __le16 antennamode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200428
429};
430
431struct cmd_ds_802_11_ps_mode {
David Woodhouse981f1872007-05-25 23:36:54 -0400432 __le16 action;
433 __le16 nullpktinterval;
434 __le16 multipledtim;
435 __le16 reserved;
436 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200437};
438
439struct PS_CMD_ConfirmSleep {
David Woodhouse981f1872007-05-25 23:36:54 -0400440 __le16 command;
441 __le16 size;
442 __le16 seqnum;
443 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200444
David Woodhouse981f1872007-05-25 23:36:54 -0400445 __le16 action;
446 __le16 reserved1;
447 __le16 multipledtim;
448 __le16 reserved;
449 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200450};
451
452struct cmd_ds_802_11_data_rate {
David Woodhouse981f1872007-05-25 23:36:54 -0400453 __le16 action;
454 __le16 reserverd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200455 u8 datarate[G_SUPPORTED_RATES];
456};
457
458struct cmd_ds_802_11_rate_adapt_rateset {
David Woodhouse981f1872007-05-25 23:36:54 -0400459 __le16 action;
460 __le16 enablehwauto;
461 __le16 bitmap;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200462};
463
464struct cmd_ds_802_11_ad_hoc_start {
465 u8 SSID[IW_ESSID_MAX_SIZE];
466 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400467 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200468 u8 dtimperiod;
469 union IEEEtypes_ssparamset ssparamset;
470 union ieeetypes_phyparamset phyparamset;
David Woodhouse981f1872007-05-25 23:36:54 -0400471 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200472 struct ieeetypes_capinfo cap;
473 u8 datarate[G_SUPPORTED_RATES];
474 u8 tlv_memory_size_pad[100];
475} __attribute__ ((packed));
476
477struct adhoc_bssdesc {
478 u8 BSSID[6];
479 u8 SSID[32];
480 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400481 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200482 u8 dtimperiod;
David Woodhouse981f1872007-05-25 23:36:54 -0400483 __le64 timestamp;
484 __le64 localtime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200485 union ieeetypes_phyparamset phyparamset;
486 union IEEEtypes_ssparamset ssparamset;
487 struct ieeetypes_capinfo cap;
488 u8 datarates[G_SUPPORTED_RATES];
489
490 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
491 * Adhoc join command and will cause a binary layout mismatch with
492 * the firmware
493 */
494} __attribute__ ((packed));
495
496struct cmd_ds_802_11_ad_hoc_join {
497 struct adhoc_bssdesc bssdescriptor;
David Woodhouse981f1872007-05-25 23:36:54 -0400498 __le16 failtimeout;
499 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200500
501} __attribute__ ((packed));
502
503struct cmd_ds_802_11_enable_rsn {
David Woodhouse981f1872007-05-25 23:36:54 -0400504 __le16 action;
505 __le16 enable;
Dan Williams18c96c342007-06-18 12:01:12 -0400506} __attribute__ ((packed));
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200507
508struct MrvlIEtype_keyParamSet {
509 /* type ID */
David Woodhouse981f1872007-05-25 23:36:54 -0400510 __le16 type;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200511
512 /* length of Payload */
David Woodhouse981f1872007-05-25 23:36:54 -0400513 __le16 length;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200514
515 /* type of key: WEP=0, TKIP=1, AES=2 */
David Woodhouse981f1872007-05-25 23:36:54 -0400516 __le16 keytypeid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200517
518 /* key control Info specific to a keytypeid */
David Woodhouse981f1872007-05-25 23:36:54 -0400519 __le16 keyinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200520
521 /* length of key */
David Woodhouse981f1872007-05-25 23:36:54 -0400522 __le16 keylen;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200523
524 /* key material of size keylen */
525 u8 key[32];
526};
527
528struct cmd_ds_802_11_key_material {
David Woodhouse981f1872007-05-25 23:36:54 -0400529 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200530 struct MrvlIEtype_keyParamSet keyParamSet[2];
531} __attribute__ ((packed));
532
533struct cmd_ds_802_11_eeprom_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400534 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200535
536 /* multiple 4 */
David Woodhouse981f1872007-05-25 23:36:54 -0400537 __le16 offset;
538 __le16 bytecount;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200539 u8 value;
540} __attribute__ ((packed));
541
542struct cmd_ds_802_11_tpc_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400543 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200544 u8 enable;
545 s8 P0;
546 s8 P1;
547 s8 P2;
548 u8 usesnr;
549} __attribute__ ((packed));
550
551struct cmd_ds_802_11_led_ctrl {
David Woodhouse981f1872007-05-25 23:36:54 -0400552 __le16 action;
553 __le16 numled;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200554 u8 data[256];
555} __attribute__ ((packed));
556
557struct cmd_ds_802_11_pwr_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400558 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200559 u8 enable;
560 s8 PA_P0;
561 s8 PA_P1;
562 s8 PA_P2;
563} __attribute__ ((packed));
564
565struct cmd_ds_802_11_afc {
David Woodhouse981f1872007-05-25 23:36:54 -0400566 __le16 afc_auto;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200567 union {
568 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400569 __le16 threshold;
570 __le16 period;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200571 };
572 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400573 __le16 timing_offset; /* signed */
574 __le16 carrier_offset; /* signed */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200575 };
576 };
577} __attribute__ ((packed));
578
579struct cmd_tx_rate_query {
David Woodhouse981f1872007-05-25 23:36:54 -0400580 __le16 txrate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200581} __attribute__ ((packed));
582
583struct cmd_ds_get_tsf {
584 __le64 tsfvalue;
585} __attribute__ ((packed));
586
587struct cmd_ds_bt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400588 __le16 action;
589 __le32 id;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200590 u8 addr1[ETH_ALEN];
591 u8 addr2[ETH_ALEN];
592} __attribute__ ((packed));
593
594struct cmd_ds_fwt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400595 __le16 action;
596 __le32 id;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400597 u8 valid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200598 u8 da[ETH_ALEN];
599 u8 dir;
600 u8 ra[ETH_ALEN];
David Woodhouse981f1872007-05-25 23:36:54 -0400601 __le32 ssn;
602 __le32 dsn;
603 __le32 metric;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400604 u8 rate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200605 u8 hopcount;
606 u8 ttl;
David Woodhouse981f1872007-05-25 23:36:54 -0400607 __le32 expiration;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200608 u8 sleepmode;
David Woodhouse981f1872007-05-25 23:36:54 -0400609 __le32 snr;
610 __le32 references;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400611 u8 prec[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200612} __attribute__ ((packed));
613
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200614struct cmd_ds_mesh_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400615 __le16 action;
616 __le32 data[32]; /* last position reserved */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200617} __attribute__ ((packed));
618
Javier Cardona0601e7e2007-05-25 12:12:06 -0400619/* Number of stats counters returned by the firmware */
620#define MESH_STATS_NUM 8
621
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200622struct cmd_ds_command {
623 /* command header */
David Woodhouse981f1872007-05-25 23:36:54 -0400624 __le16 command;
625 __le16 size;
626 __le16 seqnum;
627 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200628
629 /* command Body */
630 union {
631 struct cmd_ds_get_hw_spec hwspec;
632 struct cmd_ds_802_11_ps_mode psmode;
633 struct cmd_ds_802_11_scan scan;
634 struct cmd_ds_802_11_scan_rsp scanresp;
635 struct cmd_ds_mac_control macctrl;
636 struct cmd_ds_802_11_associate associate;
637 struct cmd_ds_802_11_deauthenticate deauth;
638 struct cmd_ds_802_11_set_wep wep;
639 struct cmd_ds_802_11_ad_hoc_start ads;
640 struct cmd_ds_802_11_reset reset;
641 struct cmd_ds_802_11_ad_hoc_result result;
642 struct cmd_ds_802_11_get_log glog;
643 struct cmd_ds_802_11_authenticate auth;
644 struct cmd_ds_802_11_get_stat gstat;
645 struct cmd_ds_802_3_get_stat gstat_8023;
646 struct cmd_ds_802_11_snmp_mib smib;
647 struct cmd_ds_802_11_rf_tx_power txp;
648 struct cmd_ds_802_11_rf_antenna rant;
649 struct cmd_ds_802_11_data_rate drate;
650 struct cmd_ds_802_11_rate_adapt_rateset rateset;
651 struct cmd_ds_mac_multicast_adr madr;
652 struct cmd_ds_802_11_ad_hoc_join adj;
653 struct cmd_ds_802_11_radio_control radio;
654 struct cmd_ds_802_11_rf_channel rfchannel;
655 struct cmd_ds_802_11_rssi rssi;
656 struct cmd_ds_802_11_rssi_rsp rssirsp;
657 struct cmd_ds_802_11_disassociate dassociate;
658 struct cmd_ds_802_11_mac_address macadd;
659 struct cmd_ds_802_11_enable_rsn enbrsn;
660 struct cmd_ds_802_11_key_material keymaterial;
661 struct cmd_ds_mac_reg_access macreg;
662 struct cmd_ds_bbp_reg_access bbpreg;
663 struct cmd_ds_rf_reg_access rfreg;
664 struct cmd_ds_802_11_eeprom_access rdeeprom;
665
666 struct cmd_ds_802_11d_domain_info domaininfo;
667 struct cmd_ds_802_11d_domain_info domaininforesp;
668
669 struct cmd_ds_802_11_sleep_params sleep_params;
670 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
671 struct cmd_ds_802_11_tpc_cfg tpccfg;
672 struct cmd_ds_802_11_pwr_cfg pwrcfg;
673 struct cmd_ds_802_11_afc afc;
674 struct cmd_ds_802_11_led_ctrl ledgpio;
675
676 struct cmd_tx_rate_query txrate;
677 struct cmd_ds_bt_access bt;
678 struct cmd_ds_fwt_access fwt;
679 struct cmd_ds_mesh_access mesh;
680 struct cmd_ds_get_tsf gettsf;
681 struct cmd_ds_802_11_subscribe_event subscribe_event;
682 } params;
683} __attribute__ ((packed));
684
685#endif