2 * This file contains the function prototypes, data structure
3 * and defines for all the host/station commands
8 #include <linux/wireless.h>
12 /* 802.11-related definitions */
16 /* Current Tx packet status */
20 __le32 tx_packet_location;
21 /* Tx packet length */
22 __le16 tx_packet_length;
23 /* 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];
29 /* Pkt Trasnit Power control */
31 /* Amount of time the packet has been queued in the driver (units = 2ms) */
39 /* Current Rx packet status */
60 /* Next Rx RxPD addr */
68 struct cmd_ctrl_node {
69 struct list_head list;
70 /* wait for finish or not */
72 /* command response */
79 wait_queue_head_t cmdwait_q;
82 /* Generic structure to hold all key types. */
85 u16 flags; /* KEY_INFO_* from defs.h */
86 u16 type; /* KEY_TYPE_* from defs.h */
90 /* lbs_offset_value */
91 struct lbs_offset_value {
96 /* Define general data structure */
106 #define S_DS_GEN sizeof(struct cmd_ds_gen)
110 * Define data structure for CMD_GET_HW_SPEC
111 * This structure defines the response for the GET_HW_SPEC command
113 struct cmd_ds_get_hw_spec {
114 /* HW Interface version number */
116 /* HW version number */
118 /* Max number of TxPD FW can handle */
120 /* Max no of Multicast address */
128 /* Number of antenna used */
131 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
132 u8 fwreleasenumber[4];
134 /* Base Address of TxPD queue */
136 /* Read Pointer of RxPd queue */
139 /* Write Pointer of RxPd queue */
142 /*FW/HW capability */
144 } __attribute__ ((packed));
146 struct cmd_ds_802_11_reset {
150 struct cmd_ds_802_11_subscribe_event {
154 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
155 * number of TLVs. From the v5.1 manual, those TLVs would add up to
156 * 40 bytes. However, future firmware might add additional TLVs, so I
157 * bump this up a bit.
163 * This scan handle Country Information IE(802.11d compliant)
164 * Define data structure for CMD_802_11_SCAN
166 struct cmd_ds_802_11_scan {
171 mrvlietypes_ssidparamset_t ssidParamSet;
172 mrvlietypes_chanlistparamset_t ChanListParamSet;
173 mrvlietypes_ratesparamset_t OpRateSet;
177 struct cmd_ds_802_11_scan_rsp {
178 __le16 bssdescriptsize;
180 u8 bssdesc_and_tlvbuffer[1];
183 struct cmd_ds_802_11_get_log {
196 __le32 wepundecryptable;
199 struct cmd_ds_mac_control {
204 struct cmd_ds_mac_multicast_adr {
207 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
210 struct cmd_ds_802_11_authenticate {
211 u8 macaddr[ETH_ALEN];
216 struct cmd_ds_802_11_deauthenticate {
221 struct cmd_ds_802_11_associate {
224 __le16 listeninterval;
229 mrvlietypes_ssidparamset_t ssidParamSet;
230 mrvlietypes_phyparamset_t phyparamset;
231 mrvlietypes_ssparamset_t ssparamset;
232 mrvlietypes_ratesparamset_t ratesParamSet;
234 } __attribute__ ((packed));
236 struct cmd_ds_802_11_disassociate {
241 struct cmd_ds_802_11_associate_rsp {
242 struct ieeetypes_assocrsp assocRsp;
245 struct cmd_ds_802_11_ad_hoc_result {
250 struct cmd_ds_802_11_set_wep {
251 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
254 /* key Index selected for Tx */
257 /* 40, 128bit or TXWEP */
259 u8 keymaterial[4][16];
262 struct cmd_ds_802_3_get_stat {
271 struct cmd_ds_802_11_get_stat {
272 __le32 txfragmentcnt;
273 __le32 mcasttxframecnt;
276 __le32 Multipleretrycnt;
277 __le32 rtssuccesscnt;
278 __le32 rtsfailurecnt;
279 __le32 ackfailurecnt;
280 __le32 frameduplicatecnt;
281 __le32 rxfragmentcnt;
282 __le32 mcastrxframecnt;
284 __le32 bcasttxframecnt;
285 __le32 bcastrxframecnt;
288 __le32 wepundecryptable;
291 struct cmd_ds_802_11_snmp_mib {
298 struct cmd_ds_mac_reg_map {
304 struct cmd_ds_bbp_reg_map {
310 struct cmd_ds_rf_reg_map {
316 struct cmd_ds_mac_reg_access {
322 struct cmd_ds_bbp_reg_access {
329 struct cmd_ds_rf_reg_access {
336 struct cmd_ds_802_11_radio_control {
341 struct cmd_ds_802_11_beacon_control {
343 __le16 beacon_enable;
344 __le16 beacon_period;
347 struct cmd_ds_802_11_sleep_params {
348 /* ACT_GET/ACT_SET */
351 /* Sleep clock error in ppm */
354 /* Wakeup offset in usec */
357 /* Clock stabilization time in usec */
360 /* control periodic calibration */
363 /* control the use of external sleep clock */
366 /* reserved field, should be set to zero */
370 struct cmd_ds_802_11_inactivity_timeout {
371 /* ACT_GET/ACT_SET */
374 /* Inactivity timeout in msec */
378 struct cmd_ds_802_11_rf_channel {
380 __le16 currentchannel;
386 struct cmd_ds_802_11_rssi {
387 /* weighting factor */
395 struct cmd_ds_802_11_rssi_rsp {
399 __le16 avgnoisefloor;
402 struct cmd_ds_802_11_mac_address {
407 struct cmd_ds_802_11_rf_tx_power {
412 struct cmd_ds_802_11_rf_antenna {
415 /* Number of antennas or 0xffff(diversity) */
420 struct cmd_ds_802_11_monitor_mode {
425 struct cmd_ds_set_boot2_ver {
430 struct cmd_ds_802_11_ps_mode {
432 __le16 nullpktinterval;
435 __le16 locallisteninterval;
438 struct PS_CMD_ConfirmSleep {
448 __le16 locallisteninterval;
451 struct cmd_ds_802_11_data_rate {
457 struct cmd_ds_802_11_rate_adapt_rateset {
463 struct cmd_ds_802_11_ad_hoc_start {
464 u8 ssid[IW_ESSID_MAX_SIZE];
468 union IEEEtypes_ssparamset ssparamset;
469 union ieeetypes_phyparamset phyparamset;
473 u8 tlv_memory_size_pad[100];
474 } __attribute__ ((packed));
476 struct adhoc_bssdesc {
484 union ieeetypes_phyparamset phyparamset;
485 union IEEEtypes_ssparamset ssparamset;
489 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
490 * Adhoc join command and will cause a binary layout mismatch with
493 } __attribute__ ((packed));
495 struct cmd_ds_802_11_ad_hoc_join {
496 struct adhoc_bssdesc bss;
500 } __attribute__ ((packed));
502 struct cmd_ds_802_11_enable_rsn {
505 } __attribute__ ((packed));
507 struct MrvlIEtype_keyParamSet {
511 /* length of Payload */
514 /* type of key: WEP=0, TKIP=1, AES=2 */
517 /* key control Info specific to a keytypeid */
523 /* key material of size keylen */
527 struct cmd_ds_802_11_key_material {
529 struct MrvlIEtype_keyParamSet keyParamSet[2];
530 } __attribute__ ((packed));
532 struct cmd_ds_802_11_eeprom_access {
539 } __attribute__ ((packed));
541 struct cmd_ds_802_11_tpc_cfg {
548 } __attribute__ ((packed));
550 struct cmd_ds_802_11_led_ctrl {
554 } __attribute__ ((packed));
556 struct cmd_ds_802_11_pwr_cfg {
562 } __attribute__ ((packed));
564 struct cmd_ds_802_11_afc {
572 __le16 timing_offset; /* signed */
573 __le16 carrier_offset; /* signed */
576 } __attribute__ ((packed));
578 struct cmd_tx_rate_query {
580 } __attribute__ ((packed));
582 struct cmd_ds_get_tsf {
584 } __attribute__ ((packed));
586 struct cmd_ds_bt_access {
591 } __attribute__ ((packed));
593 struct cmd_ds_fwt_access {
611 } __attribute__ ((packed));
613 struct cmd_ds_mesh_access {
615 __le32 data[32]; /* last position reserved */
616 } __attribute__ ((packed));
618 /* Number of stats counters returned by the firmware */
619 #define MESH_STATS_NUM 8
621 struct cmd_ds_command {
630 struct cmd_ds_get_hw_spec hwspec;
631 struct cmd_ds_802_11_ps_mode psmode;
632 struct cmd_ds_802_11_scan scan;
633 struct cmd_ds_802_11_scan_rsp scanresp;
634 struct cmd_ds_mac_control macctrl;
635 struct cmd_ds_802_11_associate associate;
636 struct cmd_ds_802_11_deauthenticate deauth;
637 struct cmd_ds_802_11_set_wep wep;
638 struct cmd_ds_802_11_ad_hoc_start ads;
639 struct cmd_ds_802_11_reset reset;
640 struct cmd_ds_802_11_ad_hoc_result result;
641 struct cmd_ds_802_11_get_log glog;
642 struct cmd_ds_802_11_authenticate auth;
643 struct cmd_ds_802_11_get_stat gstat;
644 struct cmd_ds_802_3_get_stat gstat_8023;
645 struct cmd_ds_802_11_snmp_mib smib;
646 struct cmd_ds_802_11_rf_tx_power txp;
647 struct cmd_ds_802_11_rf_antenna rant;
648 struct cmd_ds_802_11_monitor_mode monitor;
649 struct cmd_ds_802_11_data_rate drate;
650 struct cmd_ds_802_11_rate_adapt_rateset rateset;
651 struct cmd_ds_mac_multicast_adr madr;
652 struct cmd_ds_802_11_ad_hoc_join adj;
653 struct cmd_ds_802_11_radio_control radio;
654 struct cmd_ds_802_11_rf_channel rfchannel;
655 struct cmd_ds_802_11_rssi rssi;
656 struct cmd_ds_802_11_rssi_rsp rssirsp;
657 struct cmd_ds_802_11_disassociate dassociate;
658 struct cmd_ds_802_11_mac_address macadd;
659 struct cmd_ds_802_11_enable_rsn enbrsn;
660 struct cmd_ds_802_11_key_material keymaterial;
661 struct cmd_ds_mac_reg_access macreg;
662 struct cmd_ds_bbp_reg_access bbpreg;
663 struct cmd_ds_rf_reg_access rfreg;
664 struct cmd_ds_802_11_eeprom_access rdeeprom;
666 struct cmd_ds_802_11d_domain_info domaininfo;
667 struct cmd_ds_802_11d_domain_info domaininforesp;
669 struct cmd_ds_802_11_sleep_params sleep_params;
670 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
671 struct cmd_ds_802_11_tpc_cfg tpccfg;
672 struct cmd_ds_802_11_pwr_cfg pwrcfg;
673 struct cmd_ds_802_11_afc afc;
674 struct cmd_ds_802_11_led_ctrl ledgpio;
676 struct cmd_tx_rate_query txrate;
677 struct cmd_ds_bt_access bt;
678 struct cmd_ds_fwt_access fwt;
679 struct cmd_ds_mesh_access mesh;
680 struct cmd_ds_set_boot2_ver boot2_ver;
681 struct cmd_ds_get_tsf gettsf;
682 struct cmd_ds_802_11_subscribe_event subscribe_event;
683 struct cmd_ds_802_11_beacon_control bcn_ctrl;
685 } __attribute__ ((packed));