blob: dc66cf5253395a841c7595f88a366d5b80c1ac9b [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
105struct WLAN_802_11_SSID {
106 /* SSID length */
David Woodhouse981f1872007-05-25 23:36:54 -0400107 __le32 ssidlength;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200108
109 /* SSID information field */
110 u8 ssid[IW_ESSID_MAX_SIZE];
111};
112
113struct WPA_SUPPLICANT {
114 u8 wpa_ie[256];
115 u8 wpa_ie_len;
116};
117
118/* wlan_offset_value */
119struct wlan_offset_value {
120 u32 offset;
121 u32 value;
122};
123
124struct WLAN_802_11_FIXED_IEs {
David Woodhouse981f1872007-05-25 23:36:54 -0400125 __le64 timestamp;
126 __le16 beaconinterval;
127 u16 capabilities; /* Actually struct ieeetypes_capinfo */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200128};
129
130struct WLAN_802_11_VARIABLE_IEs {
131 u8 elementid;
132 u8 length;
133 u8 data[1];
134};
135
136/* Define general data structure */
137/* cmd_DS_GEN */
138struct cmd_ds_gen {
David Woodhouse981f1872007-05-25 23:36:54 -0400139 __le16 command;
140 __le16 size;
141 __le16 seqnum;
142 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200143};
144
145#define S_DS_GEN sizeof(struct cmd_ds_gen)
146/*
147 * Define data structure for cmd_get_hw_spec
148 * This structure defines the response for the GET_HW_SPEC command
149 */
150struct cmd_ds_get_hw_spec {
151 /* HW Interface version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400152 __le16 hwifversion;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200153 /* HW version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400154 __le16 version;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200155 /* Max number of TxPD FW can handle */
David Woodhouse981f1872007-05-25 23:36:54 -0400156 __le16 nr_txpd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200157 /* Max no of Multicast address */
David Woodhouse981f1872007-05-25 23:36:54 -0400158 __le16 nr_mcast_adr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200159 /* MAC address */
160 u8 permanentaddr[6];
161
162 /* region Code */
David Woodhouse981f1872007-05-25 23:36:54 -0400163 __le16 regioncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200164
165 /* Number of antenna used */
David Woodhouse981f1872007-05-25 23:36:54 -0400166 __le16 nr_antenna;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200167
David Woodhousee5b3d472007-05-25 23:40:21 -0400168 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
169 u8 fwreleasenumber[4];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200170
171 /* Base Address of TxPD queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400172 __le32 wcb_base;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200173 /* Read Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400174 __le32 rxpd_rdptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200175
176 /* Write Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400177 __le32 rxpd_wrptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200178
179 /*FW/HW capability */
David Woodhouse981f1872007-05-25 23:36:54 -0400180 __le32 fwcapinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200181} __attribute__ ((packed));
182
183struct cmd_ds_802_11_reset {
David Woodhouse981f1872007-05-25 23:36:54 -0400184 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200185};
186
187struct cmd_ds_802_11_subscribe_event {
David Woodhouse981f1872007-05-25 23:36:54 -0400188 __le16 action;
189 __le16 events;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200190};
191
192/*
193 * This scan handle Country Information IE(802.11d compliant)
194 * Define data structure for cmd_802_11_scan
195 */
196struct cmd_ds_802_11_scan {
197 u8 bsstype;
198 u8 BSSID[ETH_ALEN];
199 u8 tlvbuffer[1];
200#if 0
201 mrvlietypes_ssidparamset_t ssidParamSet;
202 mrvlietypes_chanlistparamset_t ChanListParamSet;
203 mrvlietypes_ratesparamset_t OpRateSet;
204#endif
205};
206
207struct cmd_ds_802_11_scan_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400208 __le16 bssdescriptsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200209 u8 nr_sets;
210 u8 bssdesc_and_tlvbuffer[1];
211};
212
213struct cmd_ds_802_11_get_log {
David Woodhouse981f1872007-05-25 23:36:54 -0400214 __le32 mcasttxframe;
215 __le32 failed;
216 __le32 retry;
217 __le32 multiretry;
218 __le32 framedup;
219 __le32 rtssuccess;
220 __le32 rtsfailure;
221 __le32 ackfailure;
222 __le32 rxfrag;
223 __le32 mcastrxframe;
224 __le32 fcserror;
225 __le32 txframe;
226 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200227};
228
229struct cmd_ds_mac_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400230 __le16 action;
231 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200232};
233
234struct cmd_ds_mac_multicast_adr {
David Woodhouse981f1872007-05-25 23:36:54 -0400235 __le16 action;
236 __le16 nr_of_adrs;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200237 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
238};
239
240struct cmd_ds_802_11_authenticate {
241 u8 macaddr[ETH_ALEN];
242 u8 authtype;
243 u8 reserved[10];
244};
245
246struct cmd_ds_802_11_deauthenticate {
247 u8 macaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400248 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200249};
250
251struct cmd_ds_802_11_associate {
252 u8 peerstaaddr[6];
253 struct ieeetypes_capinfo capinfo;
David Woodhouse981f1872007-05-25 23:36:54 -0400254 __le16 listeninterval;
255 __le16 bcnperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200256 u8 dtimperiod;
257
258#if 0
259 mrvlietypes_ssidparamset_t ssidParamSet;
260 mrvlietypes_phyparamset_t phyparamset;
261 mrvlietypes_ssparamset_t ssparamset;
262 mrvlietypes_ratesparamset_t ratesParamSet;
263#endif
264} __attribute__ ((packed));
265
266struct cmd_ds_802_11_disassociate {
267 u8 destmacaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400268 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200269};
270
271struct cmd_ds_802_11_associate_rsp {
272 struct ieeetypes_assocrsp assocRsp;
273};
274
275struct cmd_ds_802_11_ad_hoc_result {
276 u8 PAD[3];
277 u8 BSSID[ETH_ALEN];
278};
279
280struct cmd_ds_802_11_set_wep {
281 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
David Woodhouse981f1872007-05-25 23:36:54 -0400282 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200283
284 /* key Index selected for Tx */
David Woodhouse981f1872007-05-25 23:36:54 -0400285 __le16 keyindex;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200286
287 /* 40, 128bit or TXWEP */
288 u8 keytype[4];
289 u8 keymaterial[4][16];
290};
291
292struct cmd_ds_802_3_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400293 __le32 xmitok;
294 __le32 rcvok;
295 __le32 xmiterror;
296 __le32 rcverror;
297 __le32 rcvnobuffer;
298 __le32 rcvcrcerror;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200299};
300
301struct cmd_ds_802_11_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400302 __le32 txfragmentcnt;
303 __le32 mcasttxframecnt;
304 __le32 failedcnt;
305 __le32 retrycnt;
306 __le32 Multipleretrycnt;
307 __le32 rtssuccesscnt;
308 __le32 rtsfailurecnt;
309 __le32 ackfailurecnt;
310 __le32 frameduplicatecnt;
311 __le32 rxfragmentcnt;
312 __le32 mcastrxframecnt;
313 __le32 fcserrorcnt;
314 __le32 bcasttxframecnt;
315 __le32 bcastrxframecnt;
316 __le32 txbeacon;
317 __le32 rxbeacon;
318 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200319};
320
321struct cmd_ds_802_11_snmp_mib {
David Woodhouse981f1872007-05-25 23:36:54 -0400322 __le16 querytype;
323 __le16 oid;
324 __le16 bufsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200325 u8 value[128];
326};
327
328struct cmd_ds_mac_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400329 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200330 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400331 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200332};
333
334struct cmd_ds_bbp_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400335 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200336 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400337 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200338};
339
340struct cmd_ds_rf_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400341 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200342 u8 regmap[64];
David Woodhouse981f1872007-05-25 23:36:54 -0400343 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200344};
345
346struct cmd_ds_mac_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400347 __le16 action;
348 __le16 offset;
349 __le32 value;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200350};
351
352struct cmd_ds_bbp_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400353 __le16 action;
354 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200355 u8 value;
356 u8 reserved[3];
357};
358
359struct cmd_ds_rf_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400360 __le16 action;
361 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200362 u8 value;
363 u8 reserved[3];
364};
365
366struct cmd_ds_802_11_radio_control {
David Woodhouse981f1872007-05-25 23:36:54 -0400367 __le16 action;
368 __le16 control;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200369};
370
371struct cmd_ds_802_11_sleep_params {
372 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400373 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200374
375 /* Sleep clock error in ppm */
David Woodhouse981f1872007-05-25 23:36:54 -0400376 __le16 error;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200377
378 /* Wakeup offset in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400379 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200380
381 /* Clock stabilization time in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400382 __le16 stabletime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200383
384 /* control periodic calibration */
385 u8 calcontrol;
386
387 /* control the use of external sleep clock */
388 u8 externalsleepclk;
389
390 /* reserved field, should be set to zero */
David Woodhouse981f1872007-05-25 23:36:54 -0400391 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200392};
393
394struct cmd_ds_802_11_inactivity_timeout {
395 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400396 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200397
398 /* Inactivity timeout in msec */
David Woodhouse981f1872007-05-25 23:36:54 -0400399 __le16 timeout;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200400};
401
402struct cmd_ds_802_11_rf_channel {
David Woodhouse981f1872007-05-25 23:36:54 -0400403 __le16 action;
404 __le16 currentchannel;
405 __le16 rftype;
406 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200407 u8 channellist[32];
408};
409
410struct cmd_ds_802_11_rssi {
411 /* weighting factor */
David Woodhouse981f1872007-05-25 23:36:54 -0400412 __le16 N;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200413
David Woodhouse981f1872007-05-25 23:36:54 -0400414 __le16 reserved_0;
415 __le16 reserved_1;
416 __le16 reserved_2;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200417};
418
419struct cmd_ds_802_11_rssi_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400420 __le16 SNR;
421 __le16 noisefloor;
422 __le16 avgSNR;
423 __le16 avgnoisefloor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200424};
425
426struct cmd_ds_802_11_mac_address {
David Woodhouse981f1872007-05-25 23:36:54 -0400427 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200428 u8 macadd[ETH_ALEN];
429};
430
431struct cmd_ds_802_11_rf_tx_power {
David Woodhouse981f1872007-05-25 23:36:54 -0400432 __le16 action;
433 __le16 currentlevel;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200434};
435
436struct cmd_ds_802_11_rf_antenna {
David Woodhouse981f1872007-05-25 23:36:54 -0400437 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200438
439 /* Number of antennas or 0xffff(diversity) */
David Woodhouse981f1872007-05-25 23:36:54 -0400440 __le16 antennamode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200441
442};
443
444struct cmd_ds_802_11_ps_mode {
David Woodhouse981f1872007-05-25 23:36:54 -0400445 __le16 action;
446 __le16 nullpktinterval;
447 __le16 multipledtim;
448 __le16 reserved;
449 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200450};
451
452struct PS_CMD_ConfirmSleep {
David Woodhouse981f1872007-05-25 23:36:54 -0400453 __le16 command;
454 __le16 size;
455 __le16 seqnum;
456 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200457
David Woodhouse981f1872007-05-25 23:36:54 -0400458 __le16 action;
459 __le16 reserved1;
460 __le16 multipledtim;
461 __le16 reserved;
462 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200463};
464
465struct cmd_ds_802_11_data_rate {
David Woodhouse981f1872007-05-25 23:36:54 -0400466 __le16 action;
467 __le16 reserverd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200468 u8 datarate[G_SUPPORTED_RATES];
469};
470
471struct cmd_ds_802_11_rate_adapt_rateset {
David Woodhouse981f1872007-05-25 23:36:54 -0400472 __le16 action;
473 __le16 enablehwauto;
474 __le16 bitmap;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200475};
476
477struct cmd_ds_802_11_ad_hoc_start {
478 u8 SSID[IW_ESSID_MAX_SIZE];
479 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400480 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200481 u8 dtimperiod;
482 union IEEEtypes_ssparamset ssparamset;
483 union ieeetypes_phyparamset phyparamset;
David Woodhouse981f1872007-05-25 23:36:54 -0400484 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200485 struct ieeetypes_capinfo cap;
486 u8 datarate[G_SUPPORTED_RATES];
487 u8 tlv_memory_size_pad[100];
488} __attribute__ ((packed));
489
490struct adhoc_bssdesc {
491 u8 BSSID[6];
492 u8 SSID[32];
493 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400494 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200495 u8 dtimperiod;
David Woodhouse981f1872007-05-25 23:36:54 -0400496 __le64 timestamp;
497 __le64 localtime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200498 union ieeetypes_phyparamset phyparamset;
499 union IEEEtypes_ssparamset ssparamset;
500 struct ieeetypes_capinfo cap;
501 u8 datarates[G_SUPPORTED_RATES];
502
503 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
504 * Adhoc join command and will cause a binary layout mismatch with
505 * the firmware
506 */
507} __attribute__ ((packed));
508
509struct cmd_ds_802_11_ad_hoc_join {
510 struct adhoc_bssdesc bssdescriptor;
David Woodhouse981f1872007-05-25 23:36:54 -0400511 __le16 failtimeout;
512 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200513
514} __attribute__ ((packed));
515
516struct cmd_ds_802_11_enable_rsn {
David Woodhouse981f1872007-05-25 23:36:54 -0400517 __le16 action;
518 __le16 enable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200519};
520
521struct MrvlIEtype_keyParamSet {
522 /* type ID */
David Woodhouse981f1872007-05-25 23:36:54 -0400523 __le16 type;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200524
525 /* length of Payload */
David Woodhouse981f1872007-05-25 23:36:54 -0400526 __le16 length;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200527
528 /* type of key: WEP=0, TKIP=1, AES=2 */
David Woodhouse981f1872007-05-25 23:36:54 -0400529 __le16 keytypeid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200530
531 /* key control Info specific to a keytypeid */
David Woodhouse981f1872007-05-25 23:36:54 -0400532 __le16 keyinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200533
534 /* length of key */
David Woodhouse981f1872007-05-25 23:36:54 -0400535 __le16 keylen;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200536
537 /* key material of size keylen */
538 u8 key[32];
539};
540
541struct cmd_ds_802_11_key_material {
David Woodhouse981f1872007-05-25 23:36:54 -0400542 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200543 struct MrvlIEtype_keyParamSet keyParamSet[2];
544} __attribute__ ((packed));
545
546struct cmd_ds_802_11_eeprom_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400547 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200548
549 /* multiple 4 */
David Woodhouse981f1872007-05-25 23:36:54 -0400550 __le16 offset;
551 __le16 bytecount;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200552 u8 value;
553} __attribute__ ((packed));
554
555struct cmd_ds_802_11_tpc_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400556 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200557 u8 enable;
558 s8 P0;
559 s8 P1;
560 s8 P2;
561 u8 usesnr;
562} __attribute__ ((packed));
563
564struct cmd_ds_802_11_led_ctrl {
David Woodhouse981f1872007-05-25 23:36:54 -0400565 __le16 action;
566 __le16 numled;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200567 u8 data[256];
568} __attribute__ ((packed));
569
570struct cmd_ds_802_11_pwr_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400571 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200572 u8 enable;
573 s8 PA_P0;
574 s8 PA_P1;
575 s8 PA_P2;
576} __attribute__ ((packed));
577
578struct cmd_ds_802_11_afc {
David Woodhouse981f1872007-05-25 23:36:54 -0400579 __le16 afc_auto;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200580 union {
581 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400582 __le16 threshold;
583 __le16 period;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200584 };
585 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400586 __le16 timing_offset; /* signed */
587 __le16 carrier_offset; /* signed */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200588 };
589 };
590} __attribute__ ((packed));
591
592struct cmd_tx_rate_query {
David Woodhouse981f1872007-05-25 23:36:54 -0400593 __le16 txrate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200594} __attribute__ ((packed));
595
596struct cmd_ds_get_tsf {
597 __le64 tsfvalue;
598} __attribute__ ((packed));
599
600struct cmd_ds_bt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400601 __le16 action;
602 __le32 id;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200603 u8 addr1[ETH_ALEN];
604 u8 addr2[ETH_ALEN];
605} __attribute__ ((packed));
606
607struct cmd_ds_fwt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400608 __le16 action;
609 __le32 id;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400610 u8 valid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200611 u8 da[ETH_ALEN];
612 u8 dir;
613 u8 ra[ETH_ALEN];
David Woodhouse981f1872007-05-25 23:36:54 -0400614 __le32 ssn;
615 __le32 dsn;
616 __le32 metric;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400617 u8 rate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200618 u8 hopcount;
619 u8 ttl;
David Woodhouse981f1872007-05-25 23:36:54 -0400620 __le32 expiration;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200621 u8 sleepmode;
David Woodhouse981f1872007-05-25 23:36:54 -0400622 __le32 snr;
623 __le32 references;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400624 u8 prec[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200625} __attribute__ ((packed));
626
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200627struct cmd_ds_mesh_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400628 __le16 action;
629 __le32 data[32]; /* last position reserved */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200630} __attribute__ ((packed));
631
Javier Cardona0601e7e2007-05-25 12:12:06 -0400632/* Number of stats counters returned by the firmware */
633#define MESH_STATS_NUM 8
634
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200635struct cmd_ds_command {
636 /* command header */
David Woodhouse981f1872007-05-25 23:36:54 -0400637 __le16 command;
638 __le16 size;
639 __le16 seqnum;
640 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200641
642 /* command Body */
643 union {
644 struct cmd_ds_get_hw_spec hwspec;
645 struct cmd_ds_802_11_ps_mode psmode;
646 struct cmd_ds_802_11_scan scan;
647 struct cmd_ds_802_11_scan_rsp scanresp;
648 struct cmd_ds_mac_control macctrl;
649 struct cmd_ds_802_11_associate associate;
650 struct cmd_ds_802_11_deauthenticate deauth;
651 struct cmd_ds_802_11_set_wep wep;
652 struct cmd_ds_802_11_ad_hoc_start ads;
653 struct cmd_ds_802_11_reset reset;
654 struct cmd_ds_802_11_ad_hoc_result result;
655 struct cmd_ds_802_11_get_log glog;
656 struct cmd_ds_802_11_authenticate auth;
657 struct cmd_ds_802_11_get_stat gstat;
658 struct cmd_ds_802_3_get_stat gstat_8023;
659 struct cmd_ds_802_11_snmp_mib smib;
660 struct cmd_ds_802_11_rf_tx_power txp;
661 struct cmd_ds_802_11_rf_antenna rant;
662 struct cmd_ds_802_11_data_rate drate;
663 struct cmd_ds_802_11_rate_adapt_rateset rateset;
664 struct cmd_ds_mac_multicast_adr madr;
665 struct cmd_ds_802_11_ad_hoc_join adj;
666 struct cmd_ds_802_11_radio_control radio;
667 struct cmd_ds_802_11_rf_channel rfchannel;
668 struct cmd_ds_802_11_rssi rssi;
669 struct cmd_ds_802_11_rssi_rsp rssirsp;
670 struct cmd_ds_802_11_disassociate dassociate;
671 struct cmd_ds_802_11_mac_address macadd;
672 struct cmd_ds_802_11_enable_rsn enbrsn;
673 struct cmd_ds_802_11_key_material keymaterial;
674 struct cmd_ds_mac_reg_access macreg;
675 struct cmd_ds_bbp_reg_access bbpreg;
676 struct cmd_ds_rf_reg_access rfreg;
677 struct cmd_ds_802_11_eeprom_access rdeeprom;
678
679 struct cmd_ds_802_11d_domain_info domaininfo;
680 struct cmd_ds_802_11d_domain_info domaininforesp;
681
682 struct cmd_ds_802_11_sleep_params sleep_params;
683 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
684 struct cmd_ds_802_11_tpc_cfg tpccfg;
685 struct cmd_ds_802_11_pwr_cfg pwrcfg;
686 struct cmd_ds_802_11_afc afc;
687 struct cmd_ds_802_11_led_ctrl ledgpio;
688
689 struct cmd_tx_rate_query txrate;
690 struct cmd_ds_bt_access bt;
691 struct cmd_ds_fwt_access fwt;
692 struct cmd_ds_mesh_access mesh;
693 struct cmd_ds_get_tsf gettsf;
694 struct cmd_ds_802_11_subscribe_event subscribe_event;
695 } params;
696} __attribute__ ((packed));
697
698#endif