blob: b5361b3393d9d03943aab0757b8b333a03928b34 [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
Dan Williams7ad994d2007-12-11 12:33:30 -050068struct cmd_header {
69 __le16 command;
70 __le16 size;
71 __le16 seqnum;
72 __le16 result;
73} __attribute__ ((packed));
74
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020075struct cmd_ctrl_node {
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020076 struct list_head list;
David Woodhouseae125bf2007-12-15 04:22:52 -050077 int result;
Holger Schurig675787e2007-12-05 17:58:11 +010078 /* command response */
Dan Williams7ad994d2007-12-11 12:33:30 -050079 int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *);
David Woodhouse1309b552007-12-10 13:36:10 -050080 unsigned long callback_arg;
Holger Schurig675787e2007-12-05 17:58:11 +010081 /* command data */
Dan Williamsddac4522007-12-11 13:49:39 -050082 struct cmd_header *cmdbuf;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020083 /* wait queue */
84 u16 cmdwaitqwoken;
85 wait_queue_head_t cmdwait_q;
86};
87
Dan Williams1443b652007-08-02 10:45:55 -040088/* Generic structure to hold all key types. */
89struct enc_key {
90 u16 len;
Holger Schurig10078322007-11-15 18:05:47 -050091 u16 flags; /* KEY_INFO_* from defs.h */
92 u16 type; /* KEY_TYPE_* from defs.h */
Dan Williams1443b652007-08-02 10:45:55 -040093 u8 key[32];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020094};
95
Holger Schurig10078322007-11-15 18:05:47 -050096/* lbs_offset_value */
97struct lbs_offset_value {
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020098 u32 offset;
99 u32 value;
100};
101
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200102/* Define general data structure */
103/* cmd_DS_GEN */
104struct cmd_ds_gen {
David Woodhouse981f1872007-05-25 23:36:54 -0400105 __le16 command;
106 __le16 size;
107 __le16 seqnum;
108 __le16 result;
Holger Schurig675787e2007-12-05 17:58:11 +0100109 void *cmdresp[0];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200110};
111
112#define S_DS_GEN sizeof(struct cmd_ds_gen)
Holger Schurig675787e2007-12-05 17:58:11 +0100113
114
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200115/*
Dan Williams0aef64d2007-08-02 11:31:18 -0400116 * Define data structure for CMD_GET_HW_SPEC
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200117 * This structure defines the response for the GET_HW_SPEC command
118 */
119struct cmd_ds_get_hw_spec {
Dan Williams6e66f032007-12-11 12:42:16 -0500120 struct cmd_header hdr;
121
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200122 /* HW Interface version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400123 __le16 hwifversion;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200124 /* HW version number */
David Woodhouse981f1872007-05-25 23:36:54 -0400125 __le16 version;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200126 /* Max number of TxPD FW can handle */
David Woodhouse981f1872007-05-25 23:36:54 -0400127 __le16 nr_txpd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200128 /* Max no of Multicast address */
David Woodhouse981f1872007-05-25 23:36:54 -0400129 __le16 nr_mcast_adr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200130 /* MAC address */
131 u8 permanentaddr[6];
132
133 /* region Code */
David Woodhouse981f1872007-05-25 23:36:54 -0400134 __le16 regioncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200135
136 /* Number of antenna used */
David Woodhouse981f1872007-05-25 23:36:54 -0400137 __le16 nr_antenna;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200138
Holger Schurigdac10a92008-01-16 15:55:22 +0100139 /* FW release number, example 0x01030304 = 2.3.4p1 */
140 __le32 fwrelease;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200141
142 /* Base Address of TxPD queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400143 __le32 wcb_base;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200144 /* Read Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400145 __le32 rxpd_rdptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200146
147 /* Write Pointer of RxPd queue */
David Woodhouse981f1872007-05-25 23:36:54 -0400148 __le32 rxpd_wrptr;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200149
150 /*FW/HW capability */
David Woodhouse981f1872007-05-25 23:36:54 -0400151 __le32 fwcapinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200152} __attribute__ ((packed));
153
154struct cmd_ds_802_11_reset {
David Woodhouse981f1872007-05-25 23:36:54 -0400155 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200156};
157
158struct cmd_ds_802_11_subscribe_event {
David Woodhouse5844d122007-12-18 02:01:37 -0500159 struct cmd_header hdr;
160
David Woodhouse981f1872007-05-25 23:36:54 -0400161 __le16 action;
162 __le16 events;
Holger Schurig3a188642007-11-26 10:07:14 +0100163
164 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
165 * number of TLVs. From the v5.1 manual, those TLVs would add up to
166 * 40 bytes. However, future firmware might add additional TLVs, so I
167 * bump this up a bit.
168 */
David Woodhouse5844d122007-12-18 02:01:37 -0500169 uint8_t tlv[128];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200170};
171
172/*
173 * This scan handle Country Information IE(802.11d compliant)
Dan Williams0aef64d2007-08-02 11:31:18 -0400174 * Define data structure for CMD_802_11_SCAN
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200175 */
176struct cmd_ds_802_11_scan {
David Woodhousefa62f992008-03-03 12:18:03 +0100177 struct cmd_header hdr;
178
179 uint8_t bsstype;
180 uint8_t bssid[ETH_ALEN];
181 uint8_t tlvbuffer[0];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200182#if 0
183 mrvlietypes_ssidparamset_t ssidParamSet;
184 mrvlietypes_chanlistparamset_t ChanListParamSet;
185 mrvlietypes_ratesparamset_t OpRateSet;
186#endif
187};
188
189struct cmd_ds_802_11_scan_rsp {
David Woodhousefa62f992008-03-03 12:18:03 +0100190 struct cmd_header hdr;
191
David Woodhouse981f1872007-05-25 23:36:54 -0400192 __le16 bssdescriptsize;
David Woodhousefa62f992008-03-03 12:18:03 +0100193 uint8_t nr_sets;
194 uint8_t bssdesc_and_tlvbuffer[0];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200195};
196
197struct cmd_ds_802_11_get_log {
David Woodhouse981f1872007-05-25 23:36:54 -0400198 __le32 mcasttxframe;
199 __le32 failed;
200 __le32 retry;
201 __le32 multiretry;
202 __le32 framedup;
203 __le32 rtssuccess;
204 __le32 rtsfailure;
205 __le32 ackfailure;
206 __le32 rxfrag;
207 __le32 mcastrxframe;
208 __le32 fcserror;
209 __le32 txframe;
210 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200211};
212
213struct cmd_ds_mac_control {
Holger Schurig835d3ac2008-03-12 16:05:40 +0100214 struct cmd_header hdr;
David Woodhouse981f1872007-05-25 23:36:54 -0400215 __le16 action;
Holger Schurig835d3ac2008-03-12 16:05:40 +0100216 u16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200217};
218
219struct cmd_ds_mac_multicast_adr {
David Woodhouse981f1872007-05-25 23:36:54 -0400220 __le16 action;
221 __le16 nr_of_adrs;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200222 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
223};
224
225struct cmd_ds_802_11_authenticate {
226 u8 macaddr[ETH_ALEN];
227 u8 authtype;
228 u8 reserved[10];
229};
230
231struct cmd_ds_802_11_deauthenticate {
232 u8 macaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400233 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200234};
235
236struct cmd_ds_802_11_associate {
237 u8 peerstaaddr[6];
Dan Williams0c9ca692007-08-02 10:43:44 -0400238 __le16 capability;
David Woodhouse981f1872007-05-25 23:36:54 -0400239 __le16 listeninterval;
240 __le16 bcnperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200241 u8 dtimperiod;
242
243#if 0
244 mrvlietypes_ssidparamset_t ssidParamSet;
245 mrvlietypes_phyparamset_t phyparamset;
246 mrvlietypes_ssparamset_t ssparamset;
247 mrvlietypes_ratesparamset_t ratesParamSet;
248#endif
249} __attribute__ ((packed));
250
251struct cmd_ds_802_11_disassociate {
252 u8 destmacaddr[6];
David Woodhouse981f1872007-05-25 23:36:54 -0400253 __le16 reasoncode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200254};
255
256struct cmd_ds_802_11_associate_rsp {
257 struct ieeetypes_assocrsp assocRsp;
258};
259
260struct cmd_ds_802_11_ad_hoc_result {
Dan Williamsea8da922007-08-02 11:18:23 -0400261 u8 pad[3];
262 u8 bssid[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200263};
264
265struct cmd_ds_802_11_set_wep {
David Woodhousef70dd452007-12-18 00:18:05 -0500266 struct cmd_header hdr;
267
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200268 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
David Woodhouse981f1872007-05-25 23:36:54 -0400269 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200270
271 /* key Index selected for Tx */
David Woodhouse981f1872007-05-25 23:36:54 -0400272 __le16 keyindex;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200273
274 /* 40, 128bit or TXWEP */
David Woodhousef70dd452007-12-18 00:18:05 -0500275 uint8_t keytype[4];
276 uint8_t keymaterial[4][16];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200277};
278
279struct cmd_ds_802_3_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400280 __le32 xmitok;
281 __le32 rcvok;
282 __le32 xmiterror;
283 __le32 rcverror;
284 __le32 rcvnobuffer;
285 __le32 rcvcrcerror;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200286};
287
288struct cmd_ds_802_11_get_stat {
David Woodhouse981f1872007-05-25 23:36:54 -0400289 __le32 txfragmentcnt;
290 __le32 mcasttxframecnt;
291 __le32 failedcnt;
292 __le32 retrycnt;
293 __le32 Multipleretrycnt;
294 __le32 rtssuccesscnt;
295 __le32 rtsfailurecnt;
296 __le32 ackfailurecnt;
297 __le32 frameduplicatecnt;
298 __le32 rxfragmentcnt;
299 __le32 mcastrxframecnt;
300 __le32 fcserrorcnt;
301 __le32 bcasttxframecnt;
302 __le32 bcastrxframecnt;
303 __le32 txbeacon;
304 __le32 rxbeacon;
305 __le32 wepundecryptable;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200306};
307
308struct cmd_ds_802_11_snmp_mib {
David Woodhouse981f1872007-05-25 23:36:54 -0400309 __le16 querytype;
310 __le16 oid;
311 __le16 bufsize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200312 u8 value[128];
313};
314
315struct cmd_ds_mac_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400316 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200317 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400318 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200319};
320
321struct cmd_ds_bbp_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400322 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200323 u8 regmap[128];
David Woodhouse981f1872007-05-25 23:36:54 -0400324 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200325};
326
327struct cmd_ds_rf_reg_map {
David Woodhouse981f1872007-05-25 23:36:54 -0400328 __le16 buffersize;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200329 u8 regmap[64];
David Woodhouse981f1872007-05-25 23:36:54 -0400330 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200331};
332
333struct cmd_ds_mac_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400334 __le16 action;
335 __le16 offset;
336 __le32 value;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200337};
338
339struct cmd_ds_bbp_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400340 __le16 action;
341 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200342 u8 value;
343 u8 reserved[3];
344};
345
346struct cmd_ds_rf_reg_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400347 __le16 action;
348 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200349 u8 value;
350 u8 reserved[3];
351};
352
353struct cmd_ds_802_11_radio_control {
David Woodhousea7c45892007-12-17 22:43:48 -0500354 struct cmd_header hdr;
355
David Woodhouse981f1872007-05-25 23:36:54 -0400356 __le16 action;
357 __le16 control;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200358};
359
Brajesh Dave96287ac2007-11-20 17:44:28 -0500360struct cmd_ds_802_11_beacon_control {
361 __le16 action;
362 __le16 beacon_enable;
363 __le16 beacon_period;
364};
365
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200366struct cmd_ds_802_11_sleep_params {
David Woodhouse3fbe1042007-12-17 23:48:31 -0500367 struct cmd_header hdr;
368
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200369 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400370 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200371
372 /* Sleep clock error in ppm */
David Woodhouse981f1872007-05-25 23:36:54 -0400373 __le16 error;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200374
375 /* Wakeup offset in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400376 __le16 offset;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200377
378 /* Clock stabilization time in usec */
David Woodhouse981f1872007-05-25 23:36:54 -0400379 __le16 stabletime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200380
381 /* control periodic calibration */
David Woodhouse3fbe1042007-12-17 23:48:31 -0500382 uint8_t calcontrol;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200383
384 /* control the use of external sleep clock */
David Woodhouse3fbe1042007-12-17 23:48:31 -0500385 uint8_t externalsleepclk;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200386
387 /* reserved field, should be set to zero */
David Woodhouse981f1872007-05-25 23:36:54 -0400388 __le16 reserved;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200389};
390
391struct cmd_ds_802_11_inactivity_timeout {
David Woodhouse6e5cc4f2007-12-17 23:04:37 -0500392 struct cmd_header hdr;
393
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200394 /* ACT_GET/ACT_SET */
David Woodhouse981f1872007-05-25 23:36:54 -0400395 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200396
397 /* Inactivity timeout in msec */
David Woodhouse981f1872007-05-25 23:36:54 -0400398 __le16 timeout;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200399};
400
401struct cmd_ds_802_11_rf_channel {
Dan Williams2dd4b262007-12-11 16:54:15 -0500402 struct cmd_header hdr;
403
David Woodhouse981f1872007-05-25 23:36:54 -0400404 __le16 action;
Dan Williams2dd4b262007-12-11 16:54:15 -0500405 __le16 channel;
406 __le16 rftype; /* unused */
407 __le16 reserved; /* unused */
408 u8 channellist[32]; /* unused */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200409};
410
411struct cmd_ds_802_11_rssi {
412 /* weighting factor */
David Woodhouse981f1872007-05-25 23:36:54 -0400413 __le16 N;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200414
David Woodhouse981f1872007-05-25 23:36:54 -0400415 __le16 reserved_0;
416 __le16 reserved_1;
417 __le16 reserved_2;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200418};
419
420struct cmd_ds_802_11_rssi_rsp {
David Woodhouse981f1872007-05-25 23:36:54 -0400421 __le16 SNR;
422 __le16 noisefloor;
423 __le16 avgSNR;
424 __le16 avgnoisefloor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200425};
426
427struct cmd_ds_802_11_mac_address {
David Woodhouse981f1872007-05-25 23:36:54 -0400428 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200429 u8 macadd[ETH_ALEN];
430};
431
432struct cmd_ds_802_11_rf_tx_power {
David Woodhouse981f1872007-05-25 23:36:54 -0400433 __le16 action;
434 __le16 currentlevel;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200435};
436
437struct cmd_ds_802_11_rf_antenna {
David Woodhouse981f1872007-05-25 23:36:54 -0400438 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200439
440 /* Number of antennas or 0xffff(diversity) */
David Woodhouse981f1872007-05-25 23:36:54 -0400441 __le16 antennamode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200442
443};
444
Luis Carlos Cobo965f8bb2007-08-02 13:16:55 -0400445struct cmd_ds_802_11_monitor_mode {
Holger Schurigc2df2ef2007-12-07 15:30:44 +0000446 __le16 action;
447 __le16 mode;
Luis Carlos Cobo965f8bb2007-08-02 13:16:55 -0400448};
449
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400450struct cmd_ds_set_boot2_ver {
Dan Williams7ad994d2007-12-11 12:33:30 -0500451 struct cmd_header hdr;
452
Holger Schurigc2df2ef2007-12-07 15:30:44 +0000453 __le16 action;
454 __le16 version;
Luis Carlos Cobo63f00232007-08-02 13:19:24 -0400455};
456
David Woodhousec6ad3732007-12-16 21:43:40 -0500457struct cmd_ds_802_11_fw_wake_method {
458 struct cmd_header hdr;
459
460 __le16 action;
461 __le16 method;
462};
463
464struct cmd_ds_802_11_sleep_period {
465 struct cmd_header hdr;
466
467 __le16 action;
468 __le16 period;
469};
470
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200471struct cmd_ds_802_11_ps_mode {
David Woodhouse981f1872007-05-25 23:36:54 -0400472 __le16 action;
473 __le16 nullpktinterval;
474 __le16 multipledtim;
475 __le16 reserved;
476 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200477};
478
479struct PS_CMD_ConfirmSleep {
David Woodhouse981f1872007-05-25 23:36:54 -0400480 __le16 command;
481 __le16 size;
482 __le16 seqnum;
483 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200484
David Woodhouse981f1872007-05-25 23:36:54 -0400485 __le16 action;
486 __le16 reserved1;
487 __le16 multipledtim;
488 __le16 reserved;
489 __le16 locallisteninterval;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200490};
491
492struct cmd_ds_802_11_data_rate {
Dan Williams8e3c91b2007-12-11 15:50:59 -0500493 struct cmd_header hdr;
494
David Woodhouse981f1872007-05-25 23:36:54 -0400495 __le16 action;
Dan Williams8c512762007-08-02 11:40:45 -0400496 __le16 reserved;
497 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200498};
499
500struct cmd_ds_802_11_rate_adapt_rateset {
David Woodhouse981f1872007-05-25 23:36:54 -0400501 __le16 action;
502 __le16 enablehwauto;
503 __le16 bitmap;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200504};
505
506struct cmd_ds_802_11_ad_hoc_start {
Dan Williamsb44898e2007-08-02 11:18:40 -0400507 u8 ssid[IW_ESSID_MAX_SIZE];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200508 u8 bsstype;
David Woodhouse981f1872007-05-25 23:36:54 -0400509 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200510 u8 dtimperiod;
511 union IEEEtypes_ssparamset ssparamset;
512 union ieeetypes_phyparamset phyparamset;
David Woodhouse981f1872007-05-25 23:36:54 -0400513 __le16 probedelay;
Dan Williams0c9ca692007-08-02 10:43:44 -0400514 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400515 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200516 u8 tlv_memory_size_pad[100];
517} __attribute__ ((packed));
518
519struct adhoc_bssdesc {
Dan Williams0c9ca692007-08-02 10:43:44 -0400520 u8 bssid[6];
521 u8 ssid[32];
522 u8 type;
David Woodhouse981f1872007-05-25 23:36:54 -0400523 __le16 beaconperiod;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200524 u8 dtimperiod;
David Woodhouse981f1872007-05-25 23:36:54 -0400525 __le64 timestamp;
526 __le64 localtime;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200527 union ieeetypes_phyparamset phyparamset;
528 union IEEEtypes_ssparamset ssparamset;
Dan Williams0c9ca692007-08-02 10:43:44 -0400529 __le16 capability;
Dan Williams8c512762007-08-02 11:40:45 -0400530 u8 rates[MAX_RATES];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200531
532 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
533 * Adhoc join command and will cause a binary layout mismatch with
534 * the firmware
535 */
536} __attribute__ ((packed));
537
538struct cmd_ds_802_11_ad_hoc_join {
Dan Williams0c9ca692007-08-02 10:43:44 -0400539 struct adhoc_bssdesc bss;
David Woodhouse981f1872007-05-25 23:36:54 -0400540 __le16 failtimeout;
541 __le16 probedelay;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200542
543} __attribute__ ((packed));
544
545struct cmd_ds_802_11_enable_rsn {
David Woodhouse4f59abf2007-12-18 00:47:17 -0500546 struct cmd_header hdr;
547
David Woodhouse981f1872007-05-25 23:36:54 -0400548 __le16 action;
549 __le16 enable;
Dan Williams18c96c342007-06-18 12:01:12 -0400550} __attribute__ ((packed));
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200551
552struct MrvlIEtype_keyParamSet {
553 /* type ID */
David Woodhouse981f1872007-05-25 23:36:54 -0400554 __le16 type;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200555
556 /* length of Payload */
David Woodhouse981f1872007-05-25 23:36:54 -0400557 __le16 length;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200558
559 /* type of key: WEP=0, TKIP=1, AES=2 */
David Woodhouse981f1872007-05-25 23:36:54 -0400560 __le16 keytypeid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200561
562 /* key control Info specific to a keytypeid */
David Woodhouse981f1872007-05-25 23:36:54 -0400563 __le16 keyinfo;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200564
565 /* length of key */
David Woodhouse981f1872007-05-25 23:36:54 -0400566 __le16 keylen;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200567
568 /* key material of size keylen */
569 u8 key[32];
570};
571
David Woodhouse6ce4fd22007-12-12 15:19:29 -0500572struct cmd_ds_host_sleep {
573 struct cmd_header hdr;
574 __le32 criteria;
575 uint8_t gpio;
576 uint8_t gap;
577} __attribute__ ((packed));
578
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200579struct cmd_ds_802_11_key_material {
David Woodhouse9e1228d2008-03-03 12:15:39 +0100580 struct cmd_header hdr;
581
David Woodhouse981f1872007-05-25 23:36:54 -0400582 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200583 struct MrvlIEtype_keyParamSet keyParamSet[2];
584} __attribute__ ((packed));
585
586struct cmd_ds_802_11_eeprom_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400587 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200588
589 /* multiple 4 */
David Woodhouse981f1872007-05-25 23:36:54 -0400590 __le16 offset;
591 __le16 bytecount;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200592 u8 value;
593} __attribute__ ((packed));
594
595struct cmd_ds_802_11_tpc_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400596 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200597 u8 enable;
598 s8 P0;
599 s8 P1;
600 s8 P2;
601 u8 usesnr;
602} __attribute__ ((packed));
603
604struct cmd_ds_802_11_led_ctrl {
David Woodhouse981f1872007-05-25 23:36:54 -0400605 __le16 action;
606 __le16 numled;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200607 u8 data[256];
608} __attribute__ ((packed));
609
610struct cmd_ds_802_11_pwr_cfg {
David Woodhouse981f1872007-05-25 23:36:54 -0400611 __le16 action;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200612 u8 enable;
613 s8 PA_P0;
614 s8 PA_P1;
615 s8 PA_P2;
616} __attribute__ ((packed));
617
618struct cmd_ds_802_11_afc {
David Woodhouse981f1872007-05-25 23:36:54 -0400619 __le16 afc_auto;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200620 union {
621 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400622 __le16 threshold;
623 __le16 period;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200624 };
625 struct {
David Woodhouse981f1872007-05-25 23:36:54 -0400626 __le16 timing_offset; /* signed */
627 __le16 carrier_offset; /* signed */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200628 };
629 };
630} __attribute__ ((packed));
631
632struct cmd_tx_rate_query {
David Woodhouse981f1872007-05-25 23:36:54 -0400633 __le16 txrate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200634} __attribute__ ((packed));
635
636struct cmd_ds_get_tsf {
637 __le64 tsfvalue;
638} __attribute__ ((packed));
639
640struct cmd_ds_bt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400641 __le16 action;
642 __le32 id;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200643 u8 addr1[ETH_ALEN];
644 u8 addr2[ETH_ALEN];
645} __attribute__ ((packed));
646
647struct cmd_ds_fwt_access {
David Woodhouse981f1872007-05-25 23:36:54 -0400648 __le16 action;
649 __le32 id;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400650 u8 valid;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200651 u8 da[ETH_ALEN];
652 u8 dir;
653 u8 ra[ETH_ALEN];
David Woodhouse981f1872007-05-25 23:36:54 -0400654 __le32 ssn;
655 __le32 dsn;
656 __le32 metric;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400657 u8 rate;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200658 u8 hopcount;
659 u8 ttl;
David Woodhouse981f1872007-05-25 23:36:54 -0400660 __le32 expiration;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200661 u8 sleepmode;
David Woodhouse981f1872007-05-25 23:36:54 -0400662 __le32 snr;
663 __le32 references;
Luis Carlos Cobo90e8eaf2007-05-25 13:53:26 -0400664 u8 prec[ETH_ALEN];
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200665} __attribute__ ((packed));
666
David Woodhouse23a397a2007-12-11 18:56:42 -0500667
668struct cmd_ds_mesh_config {
669 struct cmd_header hdr;
670
671 __le16 action;
672 __le16 channel;
673 __le16 type;
674 __le16 length;
675 u8 data[128]; /* last position reserved */
676} __attribute__ ((packed));
677
678
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200679struct cmd_ds_mesh_access {
David Woodhouse301eacb2007-12-11 15:23:59 -0500680 struct cmd_header hdr;
681
David Woodhouse981f1872007-05-25 23:36:54 -0400682 __le16 action;
683 __le32 data[32]; /* last position reserved */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200684} __attribute__ ((packed));
685
Javier Cardona0601e7e2007-05-25 12:12:06 -0400686/* Number of stats counters returned by the firmware */
687#define MESH_STATS_NUM 8
688
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200689struct cmd_ds_command {
690 /* command header */
David Woodhouse981f1872007-05-25 23:36:54 -0400691 __le16 command;
692 __le16 size;
693 __le16 seqnum;
694 __le16 result;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200695
696 /* command Body */
697 union {
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200698 struct cmd_ds_802_11_ps_mode psmode;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200699 struct cmd_ds_802_11_associate associate;
700 struct cmd_ds_802_11_deauthenticate deauth;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200701 struct cmd_ds_802_11_ad_hoc_start ads;
702 struct cmd_ds_802_11_reset reset;
703 struct cmd_ds_802_11_ad_hoc_result result;
704 struct cmd_ds_802_11_get_log glog;
705 struct cmd_ds_802_11_authenticate auth;
706 struct cmd_ds_802_11_get_stat gstat;
707 struct cmd_ds_802_3_get_stat gstat_8023;
708 struct cmd_ds_802_11_snmp_mib smib;
709 struct cmd_ds_802_11_rf_tx_power txp;
710 struct cmd_ds_802_11_rf_antenna rant;
Luis Carlos Cobo965f8bb2007-08-02 13:16:55 -0400711 struct cmd_ds_802_11_monitor_mode monitor;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200712 struct cmd_ds_802_11_rate_adapt_rateset rateset;
713 struct cmd_ds_mac_multicast_adr madr;
714 struct cmd_ds_802_11_ad_hoc_join adj;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200715 struct cmd_ds_802_11_rssi rssi;
716 struct cmd_ds_802_11_rssi_rsp rssirsp;
717 struct cmd_ds_802_11_disassociate dassociate;
718 struct cmd_ds_802_11_mac_address macadd;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200719 struct cmd_ds_mac_reg_access macreg;
720 struct cmd_ds_bbp_reg_access bbpreg;
721 struct cmd_ds_rf_reg_access rfreg;
722 struct cmd_ds_802_11_eeprom_access rdeeprom;
723
724 struct cmd_ds_802_11d_domain_info domaininfo;
725 struct cmd_ds_802_11d_domain_info domaininforesp;
726
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200727 struct cmd_ds_802_11_tpc_cfg tpccfg;
728 struct cmd_ds_802_11_pwr_cfg pwrcfg;
729 struct cmd_ds_802_11_afc afc;
730 struct cmd_ds_802_11_led_ctrl ledgpio;
731
732 struct cmd_tx_rate_query txrate;
733 struct cmd_ds_bt_access bt;
734 struct cmd_ds_fwt_access fwt;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200735 struct cmd_ds_get_tsf gettsf;
Brajesh Dave96287ac2007-11-20 17:44:28 -0500736 struct cmd_ds_802_11_beacon_control bcn_ctrl;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -0200737 } params;
738} __attribute__ ((packed));
739
740#endif