blob: be69ae6529232309634dc79f6a4a6a38206ff518 [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 */
Holger Schurig10078322007-11-15 18:05:47 -05005#ifndef _LBS_HOSTCMD_H
6#define _LBS_HOSTCMD_H
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02007
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 {
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020069 struct list_head list;
Holger Schurig675787e2007-12-05 17:58:11 +010070 /* wait for finish or not */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020071 u16 wait_option;
Holger Schurig675787e2007-12-05 17:58:11 +010072 /* command response */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020073 void *pdata_buf;
Holger Schurig675787e2007-12-05 17:58:11 +010074 int *pdata_size;
75 /* command data */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020076 u8 *bufvirtualaddr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020077 /* wait queue */
78 u16 cmdwaitqwoken;
79 wait_queue_head_t cmdwait_q;
80};
81
Dan Williams1443b652007-08-02 10:45:55 -040082/* Generic structure to hold all key types. */
83struct enc_key {
84 u16 len;
Holger Schurig10078322007-11-15 18:05:47 -050085 u16 flags; /* KEY_INFO_* from defs.h */
86 u16 type; /* KEY_TYPE_* from defs.h */
Dan Williams1443b652007-08-02 10:45:55 -040087 u8 key[32];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020088};
89
Holger Schurig10078322007-11-15 18:05:47 -050090/* lbs_offset_value */
91struct lbs_offset_value {
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020092 u32 offset;
93 u32 value;
94};
95
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020096/* Define general data structure */
97/* cmd_DS_GEN */
98struct cmd_ds_gen {
David Woodhouse981f1872007-05-25 23:36:54 -040099 __le16 command;
100 __le16 size;
101 __le16 seqnum;
102 __le16 result;
Holger Schurig675787e2007-12-05 17:58:11 +0100103 void *cmdresp[0];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200104};
105
106#define S_DS_GEN sizeof(struct cmd_ds_gen)
Holger Schurig675787e2007-12-05 17:58:11 +0100107
108
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200109/*
Dan Williams0aef64d2007-08-02 11:31:18 -0400110 * Define data structure for CMD_GET_HW_SPEC
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200111 * This structure defines the response for the GET_HW_SPEC command
112 */
113struct cmd_ds_get_hw_spec {
114 /* HW Interface version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400115 __le16 hwifversion;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200116 /* HW version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400117 __le16 version;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200118 /* Max number of TxPD FW can handle */
David Woodhouse981f1872007-05-25 23:36:54 -0400119 __le16 nr_txpd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200120 /* Max no of Multicast address */
David Woodhouse981f1872007-05-25 23:36:54 -0400121 __le16 nr_mcast_adr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200122 /* MAC address */
123 u8 permanentaddr[6];
124
125 /* region Code */
David Woodhouse981f1872007-05-25 23:36:54 -0400126 __le16 regioncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200127
128 /* Number of antenna used */
David Woodhouse981f1872007-05-25 23:36:54 -0400129 __le16 nr_antenna;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200130
David Woodhousee5b3d472007-05-25 23:40:21 -0400131 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
132 u8 fwreleasenumber[4];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200133
134 /* Base Address of TxPD queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400135 __le32 wcb_base;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200136 /* Read Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400137 __le32 rxpd_rdptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200138
139 /* Write Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400140 __le32 rxpd_wrptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200141
142 /*FW/HW capability */
David Woodhouse981f1872007-05-25 23:36:54 -0400143 __le32 fwcapinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200144} __attribute__ ((packed));
145
146struct cmd_ds_802_11_reset {
David Woodhouse981f1872007-05-25 23:36:54 -0400147 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200148};
149
150struct cmd_ds_802_11_subscribe_event {
David Woodhouse981f1872007-05-25 23:36:54 -0400151 __le16 action;
152 __le16 events;
Holger Schurig3a188642007-11-26 10:07:14 +0100153
154 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
155 * number of TLVs. From the v5.1 manual, those TLVs would add up to
156 * 40 bytes. However, future firmware might add additional TLVs, so I
157 * bump this up a bit.
158 */
159 u8 tlv[128];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200160};
161
162/*
163 * This scan handle Country Information IE(802.11d compliant)
Dan Williams0aef64d2007-08-02 11:31:18 -0400164 * Define data structure for CMD_802_11_SCAN
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200165 */
166struct cmd_ds_802_11_scan {
167 u8 bsstype;
Dan Williams492b6da2007-08-02 11:16:07 -0400168 u8 bssid[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200169 u8 tlvbuffer[1];
170#if 0
171 mrvlietypes_ssidparamset_t ssidParamSet;
172 mrvlietypes_chanlistparamset_t ChanListParamSet;
173 mrvlietypes_ratesparamset_t OpRateSet;
174#endif
175};
176
177struct cmd_ds_802_11_scan_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400178 __le16 bssdescriptsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200179 u8 nr_sets;
180 u8 bssdesc_and_tlvbuffer[1];
181};
182
183struct cmd_ds_802_11_get_log {
David Woodhouse981f1872007-05-25 23:36:54 -0400184 __le32 mcasttxframe;
185 __le32 failed;
186 __le32 retry;
187 __le32 multiretry;
188 __le32 framedup;
189 __le32 rtssuccess;
190 __le32 rtsfailure;
191 __le32 ackfailure;
192 __le32 rxfrag;
193 __le32 mcastrxframe;
194 __le32 fcserror;
195 __le32 txframe;
196 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200197};
198
199struct cmd_ds_mac_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400200 __le16 action;
201 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200202};
203
204struct cmd_ds_mac_multicast_adr {
David Woodhouse981f1872007-05-25 23:36:54 -0400205 __le16 action;
206 __le16 nr_of_adrs;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200207 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
208};
209
210struct cmd_ds_802_11_authenticate {
211 u8 macaddr[ETH_ALEN];
212 u8 authtype;
213 u8 reserved[10];
214};
215
216struct cmd_ds_802_11_deauthenticate {
217 u8 macaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400218 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200219};
220
221struct cmd_ds_802_11_associate {
222 u8 peerstaaddr[6];
Dan Williams0c9ca692007-08-02 10:43:44 -0400223 __le16 capability;
David Woodhouse981f1872007-05-25 23:36:54 -0400224 __le16 listeninterval;
225 __le16 bcnperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200226 u8 dtimperiod;
227
228#if 0
229 mrvlietypes_ssidparamset_t ssidParamSet;
230 mrvlietypes_phyparamset_t phyparamset;
231 mrvlietypes_ssparamset_t ssparamset;
232 mrvlietypes_ratesparamset_t ratesParamSet;
233#endif
234} __attribute__ ((packed));
235
236struct cmd_ds_802_11_disassociate {
237 u8 destmacaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400238 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200239};
240
241struct cmd_ds_802_11_associate_rsp {
242 struct ieeetypes_assocrsp assocRsp;
243};
244
245struct cmd_ds_802_11_ad_hoc_result {
Dan Williamsea8da922007-08-02 11:18:23 -0400246 u8 pad[3];
247 u8 bssid[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200248};
249
250struct cmd_ds_802_11_set_wep {
251 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
David Woodhouse981f1872007-05-25 23:36:54 -0400252 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200253
254 /* key Index selected for Tx */
David Woodhouse981f1872007-05-25 23:36:54 -0400255 __le16 keyindex;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200256
257 /* 40, 128bit or TXWEP */
258 u8 keytype[4];
259 u8 keymaterial[4][16];
260};
261
262struct cmd_ds_802_3_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400263 __le32 xmitok;
264 __le32 rcvok;
265 __le32 xmiterror;
266 __le32 rcverror;
267 __le32 rcvnobuffer;
268 __le32 rcvcrcerror;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200269};
270
271struct cmd_ds_802_11_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400272 __le32 txfragmentcnt;
273 __le32 mcasttxframecnt;
274 __le32 failedcnt;
275 __le32 retrycnt;
276 __le32 Multipleretrycnt;
277 __le32 rtssuccesscnt;
278 __le32 rtsfailurecnt;
279 __le32 ackfailurecnt;
280 __le32 frameduplicatecnt;
281 __le32 rxfragmentcnt;
282 __le32 mcastrxframecnt;
283 __le32 fcserrorcnt;
284 __le32 bcasttxframecnt;
285 __le32 bcastrxframecnt;
286 __le32 txbeacon;
287 __le32 rxbeacon;
288 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200289};
290
291struct cmd_ds_802_11_snmp_mib {
David Woodhouse981f1872007-05-25 23:36:54 -0400292 __le16 querytype;
293 __le16 oid;
294 __le16 bufsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200295 u8 value[128];
296};
297
298struct cmd_ds_mac_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400299 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200300 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400301 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200302};
303
304struct cmd_ds_bbp_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400305 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200306 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400307 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200308};
309
310struct cmd_ds_rf_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400311 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200312 u8 regmap[64];
David Woodhouse981f1872007-05-25 23:36:54 -0400313 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200314};
315
316struct cmd_ds_mac_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400317 __le16 action;
318 __le16 offset;
319 __le32 value;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200320};
321
322struct cmd_ds_bbp_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400323 __le16 action;
324 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200325 u8 value;
326 u8 reserved[3];
327};
328
329struct cmd_ds_rf_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400330 __le16 action;
331 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200332 u8 value;
333 u8 reserved[3];
334};
335
336struct cmd_ds_802_11_radio_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400337 __le16 action;
338 __le16 control;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200339};
340
Brajesh Dave96287ac2007-11-20 17:44:28 -0500341struct cmd_ds_802_11_beacon_control {
342 __le16 action;
343 __le16 beacon_enable;
344 __le16 beacon_period;
345};
346
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200347struct cmd_ds_802_11_sleep_params {
348 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400349 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200350
351 /* Sleep clock error in ppm */
David Woodhouse981f1872007-05-25 23:36:54 -0400352 __le16 error;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200353
354 /* Wakeup offset in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400355 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200356
357 /* Clock stabilization time in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400358 __le16 stabletime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200359
360 /* control periodic calibration */
361 u8 calcontrol;
362
363 /* control the use of external sleep clock */
364 u8 externalsleepclk;
365
366 /* reserved field, should be set to zero */
David Woodhouse981f1872007-05-25 23:36:54 -0400367 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200368};
369
370struct cmd_ds_802_11_inactivity_timeout {
371 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400372 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200373
374 /* Inactivity timeout in msec */
David Woodhouse981f1872007-05-25 23:36:54 -0400375 __le16 timeout;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200376};
377
378struct cmd_ds_802_11_rf_channel {
David Woodhouse981f1872007-05-25 23:36:54 -0400379 __le16 action;
380 __le16 currentchannel;
381 __le16 rftype;
382 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200383 u8 channellist[32];
384};
385
386struct cmd_ds_802_11_rssi {
387 /* weighting factor */
David Woodhouse981f1872007-05-25 23:36:54 -0400388 __le16 N;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200389
David Woodhouse981f1872007-05-25 23:36:54 -0400390 __le16 reserved_0;
391 __le16 reserved_1;
392 __le16 reserved_2;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200393};
394
395struct cmd_ds_802_11_rssi_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400396 __le16 SNR;
397 __le16 noisefloor;
398 __le16 avgSNR;
399 __le16 avgnoisefloor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200400};
401
402struct cmd_ds_802_11_mac_address {
David Woodhouse981f1872007-05-25 23:36:54 -0400403 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200404 u8 macadd[ETH_ALEN];
405};
406
407struct cmd_ds_802_11_rf_tx_power {
David Woodhouse981f1872007-05-25 23:36:54 -0400408 __le16 action;
409 __le16 currentlevel;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200410};
411
412struct cmd_ds_802_11_rf_antenna {
David Woodhouse981f1872007-05-25 23:36:54 -0400413 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200414
415 /* Number of antennas or 0xffff(diversity) */
David Woodhouse981f1872007-05-25 23:36:54 -0400416 __le16 antennamode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200417
418};
419
Luis Carlos Cobo965f8bb2007-08-02 13:16:55 -0400420struct cmd_ds_802_11_monitor_mode {
421 u16 action;
422 u16 mode;
423};
424
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400425struct cmd_ds_set_boot2_ver {
426 u16 action;
427 u16 version;
428};
429
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200430struct cmd_ds_802_11_ps_mode {
David Woodhouse981f1872007-05-25 23:36:54 -0400431 __le16 action;
432 __le16 nullpktinterval;
433 __le16 multipledtim;
434 __le16 reserved;
435 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200436};
437
438struct PS_CMD_ConfirmSleep {
David Woodhouse981f1872007-05-25 23:36:54 -0400439 __le16 command;
440 __le16 size;
441 __le16 seqnum;
442 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200443
David Woodhouse981f1872007-05-25 23:36:54 -0400444 __le16 action;
445 __le16 reserved1;
446 __le16 multipledtim;
447 __le16 reserved;
448 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200449};
450
451struct cmd_ds_802_11_data_rate {
David Woodhouse981f1872007-05-25 23:36:54 -0400452 __le16 action;
Dan Williams8c512762007-08-02 11:40:45 -0400453 __le16 reserved;
454 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200455};
456
457struct cmd_ds_802_11_rate_adapt_rateset {
David Woodhouse981f1872007-05-25 23:36:54 -0400458 __le16 action;
459 __le16 enablehwauto;
460 __le16 bitmap;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200461};
462
463struct cmd_ds_802_11_ad_hoc_start {
Dan Williamsb44898e2007-08-02 11:18:40 -0400464 u8 ssid[IW_ESSID_MAX_SIZE];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200465 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400466 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200467 u8 dtimperiod;
468 union IEEEtypes_ssparamset ssparamset;
469 union ieeetypes_phyparamset phyparamset;
David Woodhouse981f1872007-05-25 23:36:54 -0400470 __le16 probedelay;
Dan Williams0c9ca692007-08-02 10:43:44 -0400471 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400472 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200473 u8 tlv_memory_size_pad[100];
474} __attribute__ ((packed));
475
476struct adhoc_bssdesc {
Dan Williams0c9ca692007-08-02 10:43:44 -0400477 u8 bssid[6];
478 u8 ssid[32];
479 u8 type;
David Woodhouse981f1872007-05-25 23:36:54 -0400480 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200481 u8 dtimperiod;
David Woodhouse981f1872007-05-25 23:36:54 -0400482 __le64 timestamp;
483 __le64 localtime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200484 union ieeetypes_phyparamset phyparamset;
485 union IEEEtypes_ssparamset ssparamset;
Dan Williams0c9ca692007-08-02 10:43:44 -0400486 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400487 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200488
489 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
490 * Adhoc join command and will cause a binary layout mismatch with
491 * the firmware
492 */
493} __attribute__ ((packed));
494
495struct cmd_ds_802_11_ad_hoc_join {
Dan Williams0c9ca692007-08-02 10:43:44 -0400496 struct adhoc_bssdesc bss;
David Woodhouse981f1872007-05-25 23:36:54 -0400497 __le16 failtimeout;
498 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200499
500} __attribute__ ((packed));
501
502struct cmd_ds_802_11_enable_rsn {
David Woodhouse981f1872007-05-25 23:36:54 -0400503 __le16 action;
504 __le16 enable;
Dan Williams18c96c342007-06-18 12:01:12 -0400505} __attribute__ ((packed));
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200506
507struct MrvlIEtype_keyParamSet {
508 /* type ID */
David Woodhouse981f1872007-05-25 23:36:54 -0400509 __le16 type;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200510
511 /* length of Payload */
David Woodhouse981f1872007-05-25 23:36:54 -0400512 __le16 length;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200513
514 /* type of key: WEP=0, TKIP=1, AES=2 */
David Woodhouse981f1872007-05-25 23:36:54 -0400515 __le16 keytypeid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200516
517 /* key control Info specific to a keytypeid */
David Woodhouse981f1872007-05-25 23:36:54 -0400518 __le16 keyinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200519
520 /* length of key */
David Woodhouse981f1872007-05-25 23:36:54 -0400521 __le16 keylen;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200522
523 /* key material of size keylen */
524 u8 key[32];
525};
526
527struct cmd_ds_802_11_key_material {
David Woodhouse981f1872007-05-25 23:36:54 -0400528 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200529 struct MrvlIEtype_keyParamSet keyParamSet[2];
530} __attribute__ ((packed));
531
532struct cmd_ds_802_11_eeprom_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400533 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200534
535 /* multiple 4 */
David Woodhouse981f1872007-05-25 23:36:54 -0400536 __le16 offset;
537 __le16 bytecount;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200538 u8 value;
539} __attribute__ ((packed));
540
541struct cmd_ds_802_11_tpc_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400542 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200543 u8 enable;
544 s8 P0;
545 s8 P1;
546 s8 P2;
547 u8 usesnr;
548} __attribute__ ((packed));
549
550struct cmd_ds_802_11_led_ctrl {
David Woodhouse981f1872007-05-25 23:36:54 -0400551 __le16 action;
552 __le16 numled;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200553 u8 data[256];
554} __attribute__ ((packed));
555
556struct cmd_ds_802_11_pwr_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400557 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200558 u8 enable;
559 s8 PA_P0;
560 s8 PA_P1;
561 s8 PA_P2;
562} __attribute__ ((packed));
563
564struct cmd_ds_802_11_afc {
David Woodhouse981f1872007-05-25 23:36:54 -0400565 __le16 afc_auto;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200566 union {
567 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400568 __le16 threshold;
569 __le16 period;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200570 };
571 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400572 __le16 timing_offset; /* signed */
573 __le16 carrier_offset; /* signed */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200574 };
575 };
576} __attribute__ ((packed));
577
578struct cmd_tx_rate_query {
David Woodhouse981f1872007-05-25 23:36:54 -0400579 __le16 txrate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200580} __attribute__ ((packed));
581
582struct cmd_ds_get_tsf {
583 __le64 tsfvalue;
584} __attribute__ ((packed));
585
586struct cmd_ds_bt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400587 __le16 action;
588 __le32 id;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200589 u8 addr1[ETH_ALEN];
590 u8 addr2[ETH_ALEN];
591} __attribute__ ((packed));
592
593struct cmd_ds_fwt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400594 __le16 action;
595 __le32 id;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400596 u8 valid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200597 u8 da[ETH_ALEN];
598 u8 dir;
599 u8 ra[ETH_ALEN];
David Woodhouse981f1872007-05-25 23:36:54 -0400600 __le32 ssn;
601 __le32 dsn;
602 __le32 metric;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400603 u8 rate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200604 u8 hopcount;
605 u8 ttl;
David Woodhouse981f1872007-05-25 23:36:54 -0400606 __le32 expiration;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200607 u8 sleepmode;
David Woodhouse981f1872007-05-25 23:36:54 -0400608 __le32 snr;
609 __le32 references;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400610 u8 prec[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200611} __attribute__ ((packed));
612
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200613struct cmd_ds_mesh_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400614 __le16 action;
615 __le32 data[32]; /* last position reserved */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200616} __attribute__ ((packed));
617
Javier Cardona0601e7e2007-05-25 12:12:06 -0400618/* Number of stats counters returned by the firmware */
619#define MESH_STATS_NUM 8
620
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200621struct cmd_ds_command {
622 /* command header */
David Woodhouse981f1872007-05-25 23:36:54 -0400623 __le16 command;
624 __le16 size;
625 __le16 seqnum;
626 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200627
628 /* command Body */
629 union {
630 struct cmd_ds_get_hw_spec hwspec;
631 struct cmd_ds_802_11_ps_mode psmode;
632 struct cmd_ds_802_11_scan scan;
633 struct cmd_ds_802_11_scan_rsp scanresp;
634 struct cmd_ds_mac_control macctrl;
635 struct cmd_ds_802_11_associate associate;
636 struct cmd_ds_802_11_deauthenticate deauth;
637 struct cmd_ds_802_11_set_wep wep;
638 struct cmd_ds_802_11_ad_hoc_start ads;
639 struct cmd_ds_802_11_reset reset;
640 struct cmd_ds_802_11_ad_hoc_result result;
641 struct cmd_ds_802_11_get_log glog;
642 struct cmd_ds_802_11_authenticate auth;
643 struct cmd_ds_802_11_get_stat gstat;
644 struct cmd_ds_802_3_get_stat gstat_8023;
645 struct cmd_ds_802_11_snmp_mib smib;
646 struct cmd_ds_802_11_rf_tx_power txp;
647 struct cmd_ds_802_11_rf_antenna rant;
Luis Carlos Cobo965f8bb2007-08-02 13:16:55 -0400648 struct cmd_ds_802_11_monitor_mode monitor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200649 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;
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400680 struct cmd_ds_set_boot2_ver boot2_ver;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200681 struct cmd_ds_get_tsf gettsf;
682 struct cmd_ds_802_11_subscribe_event subscribe_event;
Brajesh Dave96287ac2007-11-20 17:44:28 -0500683 struct cmd_ds_802_11_beacon_control bcn_ctrl;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200684 } params;
685} __attribute__ ((packed));
686
687#endif