blob: f4a265daff2cd9427c873db8f0a15e74247b1cdd [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;
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
Dan Williams1443b652007-08-02 10:45:55 -040086/* Generic structure to hold all key types. */
87struct enc_key {
88 u16 len;
Holger Schurig10078322007-11-15 18:05:47 -050089 u16 flags; /* KEY_INFO_* from defs.h */
90 u16 type; /* KEY_TYPE_* from defs.h */
Dan Williams1443b652007-08-02 10:45:55 -040091 u8 key[32];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020092};
93
Holger Schurig10078322007-11-15 18:05:47 -050094/* lbs_offset_value */
95struct lbs_offset_value {
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020096 u32 offset;
97 u32 value;
98};
99
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200100/* Define general data structure */
101/* cmd_DS_GEN */
102struct cmd_ds_gen {
David Woodhouse981f1872007-05-25 23:36:54 -0400103 __le16 command;
104 __le16 size;
105 __le16 seqnum;
106 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200107};
108
109#define S_DS_GEN sizeof(struct cmd_ds_gen)
110/*
Dan Williams0aef64d2007-08-02 11:31:18 -0400111 * Define data structure for CMD_GET_HW_SPEC
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200112 * This structure defines the response for the GET_HW_SPEC command
113 */
114struct cmd_ds_get_hw_spec {
115 /* HW Interface version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400116 __le16 hwifversion;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200117 /* HW version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400118 __le16 version;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200119 /* Max number of TxPD FW can handle */
David Woodhouse981f1872007-05-25 23:36:54 -0400120 __le16 nr_txpd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200121 /* Max no of Multicast address */
David Woodhouse981f1872007-05-25 23:36:54 -0400122 __le16 nr_mcast_adr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200123 /* MAC address */
124 u8 permanentaddr[6];
125
126 /* region Code */
David Woodhouse981f1872007-05-25 23:36:54 -0400127 __le16 regioncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200128
129 /* Number of antenna used */
David Woodhouse981f1872007-05-25 23:36:54 -0400130 __le16 nr_antenna;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200131
David Woodhousee5b3d472007-05-25 23:40:21 -0400132 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
133 u8 fwreleasenumber[4];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200134
135 /* Base Address of TxPD queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400136 __le32 wcb_base;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200137 /* Read Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400138 __le32 rxpd_rdptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200139
140 /* Write Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400141 __le32 rxpd_wrptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200142
143 /*FW/HW capability */
David Woodhouse981f1872007-05-25 23:36:54 -0400144 __le32 fwcapinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200145} __attribute__ ((packed));
146
147struct cmd_ds_802_11_reset {
David Woodhouse981f1872007-05-25 23:36:54 -0400148 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200149};
150
151struct cmd_ds_802_11_subscribe_event {
David Woodhouse981f1872007-05-25 23:36:54 -0400152 __le16 action;
153 __le16 events;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200154};
155
156/*
157 * This scan handle Country Information IE(802.11d compliant)
Dan Williams0aef64d2007-08-02 11:31:18 -0400158 * Define data structure for CMD_802_11_SCAN
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200159 */
160struct cmd_ds_802_11_scan {
161 u8 bsstype;
Dan Williams492b6da2007-08-02 11:16:07 -0400162 u8 bssid[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200163 u8 tlvbuffer[1];
164#if 0
165 mrvlietypes_ssidparamset_t ssidParamSet;
166 mrvlietypes_chanlistparamset_t ChanListParamSet;
167 mrvlietypes_ratesparamset_t OpRateSet;
168#endif
169};
170
171struct cmd_ds_802_11_scan_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400172 __le16 bssdescriptsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200173 u8 nr_sets;
174 u8 bssdesc_and_tlvbuffer[1];
175};
176
177struct cmd_ds_802_11_get_log {
David Woodhouse981f1872007-05-25 23:36:54 -0400178 __le32 mcasttxframe;
179 __le32 failed;
180 __le32 retry;
181 __le32 multiretry;
182 __le32 framedup;
183 __le32 rtssuccess;
184 __le32 rtsfailure;
185 __le32 ackfailure;
186 __le32 rxfrag;
187 __le32 mcastrxframe;
188 __le32 fcserror;
189 __le32 txframe;
190 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200191};
192
193struct cmd_ds_mac_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400194 __le16 action;
195 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200196};
197
198struct cmd_ds_mac_multicast_adr {
David Woodhouse981f1872007-05-25 23:36:54 -0400199 __le16 action;
200 __le16 nr_of_adrs;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200201 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
202};
203
204struct cmd_ds_802_11_authenticate {
205 u8 macaddr[ETH_ALEN];
206 u8 authtype;
207 u8 reserved[10];
208};
209
210struct cmd_ds_802_11_deauthenticate {
211 u8 macaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400212 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200213};
214
215struct cmd_ds_802_11_associate {
216 u8 peerstaaddr[6];
Dan Williams0c9ca6902007-08-02 10:43:44 -0400217 __le16 capability;
David Woodhouse981f1872007-05-25 23:36:54 -0400218 __le16 listeninterval;
219 __le16 bcnperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200220 u8 dtimperiod;
221
222#if 0
223 mrvlietypes_ssidparamset_t ssidParamSet;
224 mrvlietypes_phyparamset_t phyparamset;
225 mrvlietypes_ssparamset_t ssparamset;
226 mrvlietypes_ratesparamset_t ratesParamSet;
227#endif
228} __attribute__ ((packed));
229
230struct cmd_ds_802_11_disassociate {
231 u8 destmacaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400232 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200233};
234
235struct cmd_ds_802_11_associate_rsp {
236 struct ieeetypes_assocrsp assocRsp;
237};
238
239struct cmd_ds_802_11_ad_hoc_result {
Dan Williamsea8da922007-08-02 11:18:23 -0400240 u8 pad[3];
241 u8 bssid[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200242};
243
244struct cmd_ds_802_11_set_wep {
245 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
David Woodhouse981f1872007-05-25 23:36:54 -0400246 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200247
248 /* key Index selected for Tx */
David Woodhouse981f1872007-05-25 23:36:54 -0400249 __le16 keyindex;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200250
251 /* 40, 128bit or TXWEP */
252 u8 keytype[4];
253 u8 keymaterial[4][16];
254};
255
256struct cmd_ds_802_3_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400257 __le32 xmitok;
258 __le32 rcvok;
259 __le32 xmiterror;
260 __le32 rcverror;
261 __le32 rcvnobuffer;
262 __le32 rcvcrcerror;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200263};
264
265struct cmd_ds_802_11_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400266 __le32 txfragmentcnt;
267 __le32 mcasttxframecnt;
268 __le32 failedcnt;
269 __le32 retrycnt;
270 __le32 Multipleretrycnt;
271 __le32 rtssuccesscnt;
272 __le32 rtsfailurecnt;
273 __le32 ackfailurecnt;
274 __le32 frameduplicatecnt;
275 __le32 rxfragmentcnt;
276 __le32 mcastrxframecnt;
277 __le32 fcserrorcnt;
278 __le32 bcasttxframecnt;
279 __le32 bcastrxframecnt;
280 __le32 txbeacon;
281 __le32 rxbeacon;
282 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200283};
284
285struct cmd_ds_802_11_snmp_mib {
David Woodhouse981f1872007-05-25 23:36:54 -0400286 __le16 querytype;
287 __le16 oid;
288 __le16 bufsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200289 u8 value[128];
290};
291
292struct cmd_ds_mac_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400293 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200294 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400295 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200296};
297
298struct cmd_ds_bbp_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_rf_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400305 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200306 u8 regmap[64];
David Woodhouse981f1872007-05-25 23:36:54 -0400307 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200308};
309
310struct cmd_ds_mac_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400311 __le16 action;
312 __le16 offset;
313 __le32 value;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200314};
315
316struct cmd_ds_bbp_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400317 __le16 action;
318 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200319 u8 value;
320 u8 reserved[3];
321};
322
323struct cmd_ds_rf_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400324 __le16 action;
325 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200326 u8 value;
327 u8 reserved[3];
328};
329
330struct cmd_ds_802_11_radio_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400331 __le16 action;
332 __le16 control;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200333};
334
Brajesh Dave96287ac2007-11-20 17:44:28 -0500335struct cmd_ds_802_11_beacon_control {
336 __le16 action;
337 __le16 beacon_enable;
338 __le16 beacon_period;
339};
340
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200341struct cmd_ds_802_11_sleep_params {
342 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400343 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200344
345 /* Sleep clock error in ppm */
David Woodhouse981f1872007-05-25 23:36:54 -0400346 __le16 error;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200347
348 /* Wakeup offset in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400349 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200350
351 /* Clock stabilization time in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400352 __le16 stabletime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200353
354 /* control periodic calibration */
355 u8 calcontrol;
356
357 /* control the use of external sleep clock */
358 u8 externalsleepclk;
359
360 /* reserved field, should be set to zero */
David Woodhouse981f1872007-05-25 23:36:54 -0400361 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200362};
363
364struct cmd_ds_802_11_inactivity_timeout {
365 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400366 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200367
368 /* Inactivity timeout in msec */
David Woodhouse981f1872007-05-25 23:36:54 -0400369 __le16 timeout;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200370};
371
372struct cmd_ds_802_11_rf_channel {
David Woodhouse981f1872007-05-25 23:36:54 -0400373 __le16 action;
374 __le16 currentchannel;
375 __le16 rftype;
376 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200377 u8 channellist[32];
378};
379
380struct cmd_ds_802_11_rssi {
381 /* weighting factor */
David Woodhouse981f1872007-05-25 23:36:54 -0400382 __le16 N;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200383
David Woodhouse981f1872007-05-25 23:36:54 -0400384 __le16 reserved_0;
385 __le16 reserved_1;
386 __le16 reserved_2;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200387};
388
389struct cmd_ds_802_11_rssi_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400390 __le16 SNR;
391 __le16 noisefloor;
392 __le16 avgSNR;
393 __le16 avgnoisefloor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200394};
395
396struct cmd_ds_802_11_mac_address {
David Woodhouse981f1872007-05-25 23:36:54 -0400397 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200398 u8 macadd[ETH_ALEN];
399};
400
401struct cmd_ds_802_11_rf_tx_power {
David Woodhouse981f1872007-05-25 23:36:54 -0400402 __le16 action;
403 __le16 currentlevel;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200404};
405
406struct cmd_ds_802_11_rf_antenna {
David Woodhouse981f1872007-05-25 23:36:54 -0400407 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200408
409 /* Number of antennas or 0xffff(diversity) */
David Woodhouse981f1872007-05-25 23:36:54 -0400410 __le16 antennamode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200411
412};
413
Luis Carlos Cobo965f8bbc2007-08-02 13:16:55 -0400414struct cmd_ds_802_11_monitor_mode {
415 u16 action;
416 u16 mode;
417};
418
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400419struct cmd_ds_set_boot2_ver {
420 u16 action;
421 u16 version;
422};
423
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200424struct cmd_ds_802_11_ps_mode {
David Woodhouse981f1872007-05-25 23:36:54 -0400425 __le16 action;
426 __le16 nullpktinterval;
427 __le16 multipledtim;
428 __le16 reserved;
429 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200430};
431
432struct PS_CMD_ConfirmSleep {
David Woodhouse981f1872007-05-25 23:36:54 -0400433 __le16 command;
434 __le16 size;
435 __le16 seqnum;
436 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200437
David Woodhouse981f1872007-05-25 23:36:54 -0400438 __le16 action;
439 __le16 reserved1;
440 __le16 multipledtim;
441 __le16 reserved;
442 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200443};
444
445struct cmd_ds_802_11_data_rate {
David Woodhouse981f1872007-05-25 23:36:54 -0400446 __le16 action;
Dan Williams8c512762007-08-02 11:40:45 -0400447 __le16 reserved;
448 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200449};
450
451struct cmd_ds_802_11_rate_adapt_rateset {
David Woodhouse981f1872007-05-25 23:36:54 -0400452 __le16 action;
453 __le16 enablehwauto;
454 __le16 bitmap;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200455};
456
457struct cmd_ds_802_11_ad_hoc_start {
Dan Williamsb44898e2007-08-02 11:18:40 -0400458 u8 ssid[IW_ESSID_MAX_SIZE];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200459 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400460 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200461 u8 dtimperiod;
462 union IEEEtypes_ssparamset ssparamset;
463 union ieeetypes_phyparamset phyparamset;
David Woodhouse981f1872007-05-25 23:36:54 -0400464 __le16 probedelay;
Dan Williams0c9ca6902007-08-02 10:43:44 -0400465 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400466 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200467 u8 tlv_memory_size_pad[100];
468} __attribute__ ((packed));
469
470struct adhoc_bssdesc {
Dan Williams0c9ca6902007-08-02 10:43:44 -0400471 u8 bssid[6];
472 u8 ssid[32];
473 u8 type;
David Woodhouse981f1872007-05-25 23:36:54 -0400474 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200475 u8 dtimperiod;
David Woodhouse981f1872007-05-25 23:36:54 -0400476 __le64 timestamp;
477 __le64 localtime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200478 union ieeetypes_phyparamset phyparamset;
479 union IEEEtypes_ssparamset ssparamset;
Dan Williams0c9ca6902007-08-02 10:43:44 -0400480 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400481 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200482
483 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
484 * Adhoc join command and will cause a binary layout mismatch with
485 * the firmware
486 */
487} __attribute__ ((packed));
488
489struct cmd_ds_802_11_ad_hoc_join {
Dan Williams0c9ca6902007-08-02 10:43:44 -0400490 struct adhoc_bssdesc bss;
David Woodhouse981f1872007-05-25 23:36:54 -0400491 __le16 failtimeout;
492 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200493
494} __attribute__ ((packed));
495
496struct cmd_ds_802_11_enable_rsn {
David Woodhouse981f1872007-05-25 23:36:54 -0400497 __le16 action;
498 __le16 enable;
Dan Williams18c96c342007-06-18 12:01:12 -0400499} __attribute__ ((packed));
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200500
501struct MrvlIEtype_keyParamSet {
502 /* type ID */
David Woodhouse981f1872007-05-25 23:36:54 -0400503 __le16 type;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200504
505 /* length of Payload */
David Woodhouse981f1872007-05-25 23:36:54 -0400506 __le16 length;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200507
508 /* type of key: WEP=0, TKIP=1, AES=2 */
David Woodhouse981f1872007-05-25 23:36:54 -0400509 __le16 keytypeid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200510
511 /* key control Info specific to a keytypeid */
David Woodhouse981f1872007-05-25 23:36:54 -0400512 __le16 keyinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200513
514 /* length of key */
David Woodhouse981f1872007-05-25 23:36:54 -0400515 __le16 keylen;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200516
517 /* key material of size keylen */
518 u8 key[32];
519};
520
521struct cmd_ds_802_11_key_material {
David Woodhouse981f1872007-05-25 23:36:54 -0400522 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200523 struct MrvlIEtype_keyParamSet keyParamSet[2];
524} __attribute__ ((packed));
525
526struct cmd_ds_802_11_eeprom_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400527 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200528
529 /* multiple 4 */
David Woodhouse981f1872007-05-25 23:36:54 -0400530 __le16 offset;
531 __le16 bytecount;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200532 u8 value;
533} __attribute__ ((packed));
534
535struct cmd_ds_802_11_tpc_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400536 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200537 u8 enable;
538 s8 P0;
539 s8 P1;
540 s8 P2;
541 u8 usesnr;
542} __attribute__ ((packed));
543
544struct cmd_ds_802_11_led_ctrl {
David Woodhouse981f1872007-05-25 23:36:54 -0400545 __le16 action;
546 __le16 numled;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200547 u8 data[256];
548} __attribute__ ((packed));
549
550struct cmd_ds_802_11_pwr_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400551 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200552 u8 enable;
553 s8 PA_P0;
554 s8 PA_P1;
555 s8 PA_P2;
556} __attribute__ ((packed));
557
558struct cmd_ds_802_11_afc {
David Woodhouse981f1872007-05-25 23:36:54 -0400559 __le16 afc_auto;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200560 union {
561 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400562 __le16 threshold;
563 __le16 period;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200564 };
565 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400566 __le16 timing_offset; /* signed */
567 __le16 carrier_offset; /* signed */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200568 };
569 };
570} __attribute__ ((packed));
571
572struct cmd_tx_rate_query {
David Woodhouse981f1872007-05-25 23:36:54 -0400573 __le16 txrate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200574} __attribute__ ((packed));
575
576struct cmd_ds_get_tsf {
577 __le64 tsfvalue;
578} __attribute__ ((packed));
579
580struct cmd_ds_bt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400581 __le16 action;
582 __le32 id;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200583 u8 addr1[ETH_ALEN];
584 u8 addr2[ETH_ALEN];
585} __attribute__ ((packed));
586
587struct cmd_ds_fwt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400588 __le16 action;
589 __le32 id;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400590 u8 valid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200591 u8 da[ETH_ALEN];
592 u8 dir;
593 u8 ra[ETH_ALEN];
David Woodhouse981f1872007-05-25 23:36:54 -0400594 __le32 ssn;
595 __le32 dsn;
596 __le32 metric;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400597 u8 rate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200598 u8 hopcount;
599 u8 ttl;
David Woodhouse981f1872007-05-25 23:36:54 -0400600 __le32 expiration;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200601 u8 sleepmode;
David Woodhouse981f1872007-05-25 23:36:54 -0400602 __le32 snr;
603 __le32 references;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400604 u8 prec[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200605} __attribute__ ((packed));
606
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200607struct cmd_ds_mesh_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400608 __le16 action;
609 __le32 data[32]; /* last position reserved */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200610} __attribute__ ((packed));
611
Javier Cardona0601e7e2007-05-25 12:12:06 -0400612/* Number of stats counters returned by the firmware */
613#define MESH_STATS_NUM 8
614
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200615struct cmd_ds_command {
616 /* command header */
David Woodhouse981f1872007-05-25 23:36:54 -0400617 __le16 command;
618 __le16 size;
619 __le16 seqnum;
620 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200621
622 /* command Body */
623 union {
624 struct cmd_ds_get_hw_spec hwspec;
625 struct cmd_ds_802_11_ps_mode psmode;
626 struct cmd_ds_802_11_scan scan;
627 struct cmd_ds_802_11_scan_rsp scanresp;
628 struct cmd_ds_mac_control macctrl;
629 struct cmd_ds_802_11_associate associate;
630 struct cmd_ds_802_11_deauthenticate deauth;
631 struct cmd_ds_802_11_set_wep wep;
632 struct cmd_ds_802_11_ad_hoc_start ads;
633 struct cmd_ds_802_11_reset reset;
634 struct cmd_ds_802_11_ad_hoc_result result;
635 struct cmd_ds_802_11_get_log glog;
636 struct cmd_ds_802_11_authenticate auth;
637 struct cmd_ds_802_11_get_stat gstat;
638 struct cmd_ds_802_3_get_stat gstat_8023;
639 struct cmd_ds_802_11_snmp_mib smib;
640 struct cmd_ds_802_11_rf_tx_power txp;
641 struct cmd_ds_802_11_rf_antenna rant;
Luis Carlos Cobo965f8bbc2007-08-02 13:16:55 -0400642 struct cmd_ds_802_11_monitor_mode monitor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200643 struct cmd_ds_802_11_data_rate drate;
644 struct cmd_ds_802_11_rate_adapt_rateset rateset;
645 struct cmd_ds_mac_multicast_adr madr;
646 struct cmd_ds_802_11_ad_hoc_join adj;
647 struct cmd_ds_802_11_radio_control radio;
648 struct cmd_ds_802_11_rf_channel rfchannel;
649 struct cmd_ds_802_11_rssi rssi;
650 struct cmd_ds_802_11_rssi_rsp rssirsp;
651 struct cmd_ds_802_11_disassociate dassociate;
652 struct cmd_ds_802_11_mac_address macadd;
653 struct cmd_ds_802_11_enable_rsn enbrsn;
654 struct cmd_ds_802_11_key_material keymaterial;
655 struct cmd_ds_mac_reg_access macreg;
656 struct cmd_ds_bbp_reg_access bbpreg;
657 struct cmd_ds_rf_reg_access rfreg;
658 struct cmd_ds_802_11_eeprom_access rdeeprom;
659
660 struct cmd_ds_802_11d_domain_info domaininfo;
661 struct cmd_ds_802_11d_domain_info domaininforesp;
662
663 struct cmd_ds_802_11_sleep_params sleep_params;
664 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
665 struct cmd_ds_802_11_tpc_cfg tpccfg;
666 struct cmd_ds_802_11_pwr_cfg pwrcfg;
667 struct cmd_ds_802_11_afc afc;
668 struct cmd_ds_802_11_led_ctrl ledgpio;
669
670 struct cmd_tx_rate_query txrate;
671 struct cmd_ds_bt_access bt;
672 struct cmd_ds_fwt_access fwt;
673 struct cmd_ds_mesh_access mesh;
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400674 struct cmd_ds_set_boot2_ver boot2_ver;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200675 struct cmd_ds_get_tsf gettsf;
676 struct cmd_ds_802_11_subscribe_event subscribe_event;
Brajesh Dave96287ac2007-11-20 17:44:28 -0500677 struct cmd_ds_802_11_beacon_control bcn_ctrl;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200678 } params;
679} __attribute__ ((packed));
680
681#endif