blob: f096d995194a00628554bca169eddd5a44efd7f5 [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 {
69 /* CMD link list */
70 struct list_head list;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020071 /*CMD wait option: wait for finish or no wait */
72 u16 wait_option;
73 /* command parameter */
74 void *pdata_buf;
75 /*command data */
76 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;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200103};
104
105#define S_DS_GEN sizeof(struct cmd_ds_gen)
106/*
Dan Williams0aef64d2007-08-02 11:31:18 -0400107 * Define data structure for CMD_GET_HW_SPEC
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200108 * This structure defines the response for the GET_HW_SPEC command
109 */
110struct cmd_ds_get_hw_spec {
111 /* HW Interface version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400112 __le16 hwifversion;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200113 /* HW version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400114 __le16 version;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200115 /* Max number of TxPD FW can handle */
David Woodhouse981f1872007-05-25 23:36:54 -0400116 __le16 nr_txpd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200117 /* Max no of Multicast address */
David Woodhouse981f1872007-05-25 23:36:54 -0400118 __le16 nr_mcast_adr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200119 /* MAC address */
120 u8 permanentaddr[6];
121
122 /* region Code */
David Woodhouse981f1872007-05-25 23:36:54 -0400123 __le16 regioncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200124
125 /* Number of antenna used */
David Woodhouse981f1872007-05-25 23:36:54 -0400126 __le16 nr_antenna;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200127
David Woodhousee5b3d472007-05-25 23:40:21 -0400128 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
129 u8 fwreleasenumber[4];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200130
131 /* Base Address of TxPD queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400132 __le32 wcb_base;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200133 /* Read Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400134 __le32 rxpd_rdptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200135
136 /* Write Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400137 __le32 rxpd_wrptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200138
139 /*FW/HW capability */
David Woodhouse981f1872007-05-25 23:36:54 -0400140 __le32 fwcapinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200141} __attribute__ ((packed));
142
143struct cmd_ds_802_11_reset {
David Woodhouse981f1872007-05-25 23:36:54 -0400144 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200145};
146
147struct cmd_ds_802_11_subscribe_event {
David Woodhouse981f1872007-05-25 23:36:54 -0400148 __le16 action;
149 __le16 events;
Holger Schurig3a188642007-11-26 10:07:14 +0100150
151 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
152 * number of TLVs. From the v5.1 manual, those TLVs would add up to
153 * 40 bytes. However, future firmware might add additional TLVs, so I
154 * bump this up a bit.
155 */
156 u8 tlv[128];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200157};
158
159/*
160 * This scan handle Country Information IE(802.11d compliant)
Dan Williams0aef64d2007-08-02 11:31:18 -0400161 * Define data structure for CMD_802_11_SCAN
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200162 */
163struct cmd_ds_802_11_scan {
164 u8 bsstype;
Dan Williams492b6da2007-08-02 11:16:07 -0400165 u8 bssid[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200166 u8 tlvbuffer[1];
167#if 0
168 mrvlietypes_ssidparamset_t ssidParamSet;
169 mrvlietypes_chanlistparamset_t ChanListParamSet;
170 mrvlietypes_ratesparamset_t OpRateSet;
171#endif
172};
173
174struct cmd_ds_802_11_scan_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400175 __le16 bssdescriptsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200176 u8 nr_sets;
177 u8 bssdesc_and_tlvbuffer[1];
178};
179
180struct cmd_ds_802_11_get_log {
David Woodhouse981f1872007-05-25 23:36:54 -0400181 __le32 mcasttxframe;
182 __le32 failed;
183 __le32 retry;
184 __le32 multiretry;
185 __le32 framedup;
186 __le32 rtssuccess;
187 __le32 rtsfailure;
188 __le32 ackfailure;
189 __le32 rxfrag;
190 __le32 mcastrxframe;
191 __le32 fcserror;
192 __le32 txframe;
193 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200194};
195
196struct cmd_ds_mac_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400197 __le16 action;
198 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200199};
200
201struct cmd_ds_mac_multicast_adr {
David Woodhouse981f1872007-05-25 23:36:54 -0400202 __le16 action;
203 __le16 nr_of_adrs;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200204 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
205};
206
207struct cmd_ds_802_11_authenticate {
208 u8 macaddr[ETH_ALEN];
209 u8 authtype;
210 u8 reserved[10];
211};
212
213struct cmd_ds_802_11_deauthenticate {
214 u8 macaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400215 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200216};
217
218struct cmd_ds_802_11_associate {
219 u8 peerstaaddr[6];
Dan Williams0c9ca6902007-08-02 10:43:44 -0400220 __le16 capability;
David Woodhouse981f1872007-05-25 23:36:54 -0400221 __le16 listeninterval;
222 __le16 bcnperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200223 u8 dtimperiod;
224
225#if 0
226 mrvlietypes_ssidparamset_t ssidParamSet;
227 mrvlietypes_phyparamset_t phyparamset;
228 mrvlietypes_ssparamset_t ssparamset;
229 mrvlietypes_ratesparamset_t ratesParamSet;
230#endif
231} __attribute__ ((packed));
232
233struct cmd_ds_802_11_disassociate {
234 u8 destmacaddr[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_rsp {
239 struct ieeetypes_assocrsp assocRsp;
240};
241
242struct cmd_ds_802_11_ad_hoc_result {
Dan Williamsea8da922007-08-02 11:18:23 -0400243 u8 pad[3];
244 u8 bssid[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200245};
246
247struct cmd_ds_802_11_set_wep {
248 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
David Woodhouse981f1872007-05-25 23:36:54 -0400249 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200250
251 /* key Index selected for Tx */
David Woodhouse981f1872007-05-25 23:36:54 -0400252 __le16 keyindex;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200253
254 /* 40, 128bit or TXWEP */
255 u8 keytype[4];
256 u8 keymaterial[4][16];
257};
258
259struct cmd_ds_802_3_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400260 __le32 xmitok;
261 __le32 rcvok;
262 __le32 xmiterror;
263 __le32 rcverror;
264 __le32 rcvnobuffer;
265 __le32 rcvcrcerror;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200266};
267
268struct cmd_ds_802_11_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400269 __le32 txfragmentcnt;
270 __le32 mcasttxframecnt;
271 __le32 failedcnt;
272 __le32 retrycnt;
273 __le32 Multipleretrycnt;
274 __le32 rtssuccesscnt;
275 __le32 rtsfailurecnt;
276 __le32 ackfailurecnt;
277 __le32 frameduplicatecnt;
278 __le32 rxfragmentcnt;
279 __le32 mcastrxframecnt;
280 __le32 fcserrorcnt;
281 __le32 bcasttxframecnt;
282 __le32 bcastrxframecnt;
283 __le32 txbeacon;
284 __le32 rxbeacon;
285 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200286};
287
288struct cmd_ds_802_11_snmp_mib {
David Woodhouse981f1872007-05-25 23:36:54 -0400289 __le16 querytype;
290 __le16 oid;
291 __le16 bufsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200292 u8 value[128];
293};
294
295struct cmd_ds_mac_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400296 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200297 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400298 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200299};
300
301struct cmd_ds_bbp_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400302 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200303 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400304 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200305};
306
307struct cmd_ds_rf_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400308 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200309 u8 regmap[64];
David Woodhouse981f1872007-05-25 23:36:54 -0400310 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200311};
312
313struct cmd_ds_mac_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400314 __le16 action;
315 __le16 offset;
316 __le32 value;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200317};
318
319struct cmd_ds_bbp_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400320 __le16 action;
321 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200322 u8 value;
323 u8 reserved[3];
324};
325
326struct cmd_ds_rf_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400327 __le16 action;
328 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200329 u8 value;
330 u8 reserved[3];
331};
332
333struct cmd_ds_802_11_radio_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400334 __le16 action;
335 __le16 control;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200336};
337
Brajesh Dave96287ac2007-11-20 17:44:28 -0500338struct cmd_ds_802_11_beacon_control {
339 __le16 action;
340 __le16 beacon_enable;
341 __le16 beacon_period;
342};
343
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200344struct cmd_ds_802_11_sleep_params {
345 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400346 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200347
348 /* Sleep clock error in ppm */
David Woodhouse981f1872007-05-25 23:36:54 -0400349 __le16 error;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200350
351 /* Wakeup offset in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400352 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200353
354 /* Clock stabilization time in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400355 __le16 stabletime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200356
357 /* control periodic calibration */
358 u8 calcontrol;
359
360 /* control the use of external sleep clock */
361 u8 externalsleepclk;
362
363 /* reserved field, should be set to zero */
David Woodhouse981f1872007-05-25 23:36:54 -0400364 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200365};
366
367struct cmd_ds_802_11_inactivity_timeout {
368 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400369 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200370
371 /* Inactivity timeout in msec */
David Woodhouse981f1872007-05-25 23:36:54 -0400372 __le16 timeout;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200373};
374
375struct cmd_ds_802_11_rf_channel {
David Woodhouse981f1872007-05-25 23:36:54 -0400376 __le16 action;
377 __le16 currentchannel;
378 __le16 rftype;
379 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200380 u8 channellist[32];
381};
382
383struct cmd_ds_802_11_rssi {
384 /* weighting factor */
David Woodhouse981f1872007-05-25 23:36:54 -0400385 __le16 N;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200386
David Woodhouse981f1872007-05-25 23:36:54 -0400387 __le16 reserved_0;
388 __le16 reserved_1;
389 __le16 reserved_2;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200390};
391
392struct cmd_ds_802_11_rssi_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400393 __le16 SNR;
394 __le16 noisefloor;
395 __le16 avgSNR;
396 __le16 avgnoisefloor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200397};
398
399struct cmd_ds_802_11_mac_address {
David Woodhouse981f1872007-05-25 23:36:54 -0400400 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200401 u8 macadd[ETH_ALEN];
402};
403
404struct cmd_ds_802_11_rf_tx_power {
David Woodhouse981f1872007-05-25 23:36:54 -0400405 __le16 action;
406 __le16 currentlevel;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200407};
408
409struct cmd_ds_802_11_rf_antenna {
David Woodhouse981f1872007-05-25 23:36:54 -0400410 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200411
412 /* Number of antennas or 0xffff(diversity) */
David Woodhouse981f1872007-05-25 23:36:54 -0400413 __le16 antennamode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200414
415};
416
Luis Carlos Cobo965f8bbc2007-08-02 13:16:55 -0400417struct cmd_ds_802_11_monitor_mode {
418 u16 action;
419 u16 mode;
420};
421
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400422struct cmd_ds_set_boot2_ver {
423 u16 action;
424 u16 version;
425};
426
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200427struct cmd_ds_802_11_ps_mode {
David Woodhouse981f1872007-05-25 23:36:54 -0400428 __le16 action;
429 __le16 nullpktinterval;
430 __le16 multipledtim;
431 __le16 reserved;
432 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200433};
434
435struct PS_CMD_ConfirmSleep {
David Woodhouse981f1872007-05-25 23:36:54 -0400436 __le16 command;
437 __le16 size;
438 __le16 seqnum;
439 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200440
David Woodhouse981f1872007-05-25 23:36:54 -0400441 __le16 action;
442 __le16 reserved1;
443 __le16 multipledtim;
444 __le16 reserved;
445 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200446};
447
448struct cmd_ds_802_11_data_rate {
David Woodhouse981f1872007-05-25 23:36:54 -0400449 __le16 action;
Dan Williams8c512762007-08-02 11:40:45 -0400450 __le16 reserved;
451 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200452};
453
454struct cmd_ds_802_11_rate_adapt_rateset {
David Woodhouse981f1872007-05-25 23:36:54 -0400455 __le16 action;
456 __le16 enablehwauto;
457 __le16 bitmap;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200458};
459
460struct cmd_ds_802_11_ad_hoc_start {
Dan Williamsb44898e2007-08-02 11:18:40 -0400461 u8 ssid[IW_ESSID_MAX_SIZE];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200462 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400463 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200464 u8 dtimperiod;
465 union IEEEtypes_ssparamset ssparamset;
466 union ieeetypes_phyparamset phyparamset;
David Woodhouse981f1872007-05-25 23:36:54 -0400467 __le16 probedelay;
Dan Williams0c9ca6902007-08-02 10:43:44 -0400468 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400469 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200470 u8 tlv_memory_size_pad[100];
471} __attribute__ ((packed));
472
473struct adhoc_bssdesc {
Dan Williams0c9ca6902007-08-02 10:43:44 -0400474 u8 bssid[6];
475 u8 ssid[32];
476 u8 type;
David Woodhouse981f1872007-05-25 23:36:54 -0400477 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200478 u8 dtimperiod;
David Woodhouse981f1872007-05-25 23:36:54 -0400479 __le64 timestamp;
480 __le64 localtime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200481 union ieeetypes_phyparamset phyparamset;
482 union IEEEtypes_ssparamset ssparamset;
Dan Williams0c9ca6902007-08-02 10:43:44 -0400483 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400484 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200485
486 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
487 * Adhoc join command and will cause a binary layout mismatch with
488 * the firmware
489 */
490} __attribute__ ((packed));
491
492struct cmd_ds_802_11_ad_hoc_join {
Dan Williams0c9ca6902007-08-02 10:43:44 -0400493 struct adhoc_bssdesc bss;
David Woodhouse981f1872007-05-25 23:36:54 -0400494 __le16 failtimeout;
495 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200496
497} __attribute__ ((packed));
498
499struct cmd_ds_802_11_enable_rsn {
David Woodhouse981f1872007-05-25 23:36:54 -0400500 __le16 action;
501 __le16 enable;
Dan Williams18c96c342007-06-18 12:01:12 -0400502} __attribute__ ((packed));
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200503
504struct MrvlIEtype_keyParamSet {
505 /* type ID */
David Woodhouse981f1872007-05-25 23:36:54 -0400506 __le16 type;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200507
508 /* length of Payload */
David Woodhouse981f1872007-05-25 23:36:54 -0400509 __le16 length;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200510
511 /* type of key: WEP=0, TKIP=1, AES=2 */
David Woodhouse981f1872007-05-25 23:36:54 -0400512 __le16 keytypeid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200513
514 /* key control Info specific to a keytypeid */
David Woodhouse981f1872007-05-25 23:36:54 -0400515 __le16 keyinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200516
517 /* length of key */
David Woodhouse981f1872007-05-25 23:36:54 -0400518 __le16 keylen;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200519
520 /* key material of size keylen */
521 u8 key[32];
522};
523
524struct cmd_ds_802_11_key_material {
David Woodhouse981f1872007-05-25 23:36:54 -0400525 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200526 struct MrvlIEtype_keyParamSet keyParamSet[2];
527} __attribute__ ((packed));
528
529struct cmd_ds_802_11_eeprom_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400530 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200531
532 /* multiple 4 */
David Woodhouse981f1872007-05-25 23:36:54 -0400533 __le16 offset;
534 __le16 bytecount;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200535 u8 value;
536} __attribute__ ((packed));
537
538struct cmd_ds_802_11_tpc_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400539 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200540 u8 enable;
541 s8 P0;
542 s8 P1;
543 s8 P2;
544 u8 usesnr;
545} __attribute__ ((packed));
546
547struct cmd_ds_802_11_led_ctrl {
David Woodhouse981f1872007-05-25 23:36:54 -0400548 __le16 action;
549 __le16 numled;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200550 u8 data[256];
551} __attribute__ ((packed));
552
553struct cmd_ds_802_11_pwr_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400554 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200555 u8 enable;
556 s8 PA_P0;
557 s8 PA_P1;
558 s8 PA_P2;
559} __attribute__ ((packed));
560
561struct cmd_ds_802_11_afc {
David Woodhouse981f1872007-05-25 23:36:54 -0400562 __le16 afc_auto;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200563 union {
564 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400565 __le16 threshold;
566 __le16 period;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200567 };
568 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400569 __le16 timing_offset; /* signed */
570 __le16 carrier_offset; /* signed */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200571 };
572 };
573} __attribute__ ((packed));
574
575struct cmd_tx_rate_query {
David Woodhouse981f1872007-05-25 23:36:54 -0400576 __le16 txrate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200577} __attribute__ ((packed));
578
579struct cmd_ds_get_tsf {
580 __le64 tsfvalue;
581} __attribute__ ((packed));
582
583struct cmd_ds_bt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400584 __le16 action;
585 __le32 id;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200586 u8 addr1[ETH_ALEN];
587 u8 addr2[ETH_ALEN];
588} __attribute__ ((packed));
589
590struct cmd_ds_fwt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400591 __le16 action;
592 __le32 id;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400593 u8 valid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200594 u8 da[ETH_ALEN];
595 u8 dir;
596 u8 ra[ETH_ALEN];
David Woodhouse981f1872007-05-25 23:36:54 -0400597 __le32 ssn;
598 __le32 dsn;
599 __le32 metric;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400600 u8 rate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200601 u8 hopcount;
602 u8 ttl;
David Woodhouse981f1872007-05-25 23:36:54 -0400603 __le32 expiration;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200604 u8 sleepmode;
David Woodhouse981f1872007-05-25 23:36:54 -0400605 __le32 snr;
606 __le32 references;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400607 u8 prec[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200608} __attribute__ ((packed));
609
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200610struct cmd_ds_mesh_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400611 __le16 action;
612 __le32 data[32]; /* last position reserved */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200613} __attribute__ ((packed));
614
Javier Cardona0601e7e2007-05-25 12:12:06 -0400615/* Number of stats counters returned by the firmware */
616#define MESH_STATS_NUM 8
617
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200618struct cmd_ds_command {
619 /* command header */
David Woodhouse981f1872007-05-25 23:36:54 -0400620 __le16 command;
621 __le16 size;
622 __le16 seqnum;
623 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200624
625 /* command Body */
626 union {
627 struct cmd_ds_get_hw_spec hwspec;
628 struct cmd_ds_802_11_ps_mode psmode;
629 struct cmd_ds_802_11_scan scan;
630 struct cmd_ds_802_11_scan_rsp scanresp;
631 struct cmd_ds_mac_control macctrl;
632 struct cmd_ds_802_11_associate associate;
633 struct cmd_ds_802_11_deauthenticate deauth;
634 struct cmd_ds_802_11_set_wep wep;
635 struct cmd_ds_802_11_ad_hoc_start ads;
636 struct cmd_ds_802_11_reset reset;
637 struct cmd_ds_802_11_ad_hoc_result result;
638 struct cmd_ds_802_11_get_log glog;
639 struct cmd_ds_802_11_authenticate auth;
640 struct cmd_ds_802_11_get_stat gstat;
641 struct cmd_ds_802_3_get_stat gstat_8023;
642 struct cmd_ds_802_11_snmp_mib smib;
643 struct cmd_ds_802_11_rf_tx_power txp;
644 struct cmd_ds_802_11_rf_antenna rant;
Luis Carlos Cobo965f8bbc2007-08-02 13:16:55 -0400645 struct cmd_ds_802_11_monitor_mode monitor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200646 struct cmd_ds_802_11_data_rate drate;
647 struct cmd_ds_802_11_rate_adapt_rateset rateset;
648 struct cmd_ds_mac_multicast_adr madr;
649 struct cmd_ds_802_11_ad_hoc_join adj;
650 struct cmd_ds_802_11_radio_control radio;
651 struct cmd_ds_802_11_rf_channel rfchannel;
652 struct cmd_ds_802_11_rssi rssi;
653 struct cmd_ds_802_11_rssi_rsp rssirsp;
654 struct cmd_ds_802_11_disassociate dassociate;
655 struct cmd_ds_802_11_mac_address macadd;
656 struct cmd_ds_802_11_enable_rsn enbrsn;
657 struct cmd_ds_802_11_key_material keymaterial;
658 struct cmd_ds_mac_reg_access macreg;
659 struct cmd_ds_bbp_reg_access bbpreg;
660 struct cmd_ds_rf_reg_access rfreg;
661 struct cmd_ds_802_11_eeprom_access rdeeprom;
662
663 struct cmd_ds_802_11d_domain_info domaininfo;
664 struct cmd_ds_802_11d_domain_info domaininforesp;
665
666 struct cmd_ds_802_11_sleep_params sleep_params;
667 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
668 struct cmd_ds_802_11_tpc_cfg tpccfg;
669 struct cmd_ds_802_11_pwr_cfg pwrcfg;
670 struct cmd_ds_802_11_afc afc;
671 struct cmd_ds_802_11_led_ctrl ledgpio;
672
673 struct cmd_tx_rate_query txrate;
674 struct cmd_ds_bt_access bt;
675 struct cmd_ds_fwt_access fwt;
676 struct cmd_ds_mesh_access mesh;
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400677 struct cmd_ds_set_boot2_ver boot2_ver;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200678 struct cmd_ds_get_tsf gettsf;
679 struct cmd_ds_802_11_subscribe_event subscribe_event;
Brajesh Dave96287ac2007-11-20 17:44:28 -0500680 struct cmd_ds_802_11_beacon_control bcn_ctrl;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200681 } params;
682} __attribute__ ((packed));
683
684#endif