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 {
70 struct list_head list;
74 /*CMD wait option: wait for finish or no wait */
76 /* command parameter */
83 wait_queue_head_t cmdwait_q;
86 /* Generic structure to hold all key types. */
89 u16 flags; /* KEY_INFO_* from wlan_defs.h */
90 u16 type; /* KEY_TYPE_* from wlan_defs.h */
94 /* wlan_offset_value */
95 struct wlan_offset_value {
100 /* Define general data structure */
109 #define S_DS_GEN sizeof(struct cmd_ds_gen)
111 * Define data structure for CMD_GET_HW_SPEC
112 * This structure defines the response for the GET_HW_SPEC command
114 struct cmd_ds_get_hw_spec {
115 /* HW Interface version number */
117 /* HW version number */
119 /* Max number of TxPD FW can handle */
121 /* Max no of Multicast address */
129 /* Number of antenna used */
132 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
133 u8 fwreleasenumber[4];
135 /* Base Address of TxPD queue */
137 /* Read Pointer of RxPd queue */
140 /* Write Pointer of RxPd queue */
143 /*FW/HW capability */
145 } __attribute__ ((packed));
147 struct cmd_ds_802_11_reset {
151 struct cmd_ds_802_11_subscribe_event {
157 * This scan handle Country Information IE(802.11d compliant)
158 * Define data structure for CMD_802_11_SCAN
160 struct cmd_ds_802_11_scan {
165 mrvlietypes_ssidparamset_t ssidParamSet;
166 mrvlietypes_chanlistparamset_t ChanListParamSet;
167 mrvlietypes_ratesparamset_t OpRateSet;
171 struct cmd_ds_802_11_scan_rsp {
172 __le16 bssdescriptsize;
174 u8 bssdesc_and_tlvbuffer[1];
177 struct cmd_ds_802_11_get_log {
190 __le32 wepundecryptable;
193 struct cmd_ds_mac_control {
198 struct cmd_ds_mac_multicast_adr {
201 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
204 struct cmd_ds_802_11_authenticate {
205 u8 macaddr[ETH_ALEN];
210 struct cmd_ds_802_11_deauthenticate {
215 struct cmd_ds_802_11_associate {
218 __le16 listeninterval;
223 mrvlietypes_ssidparamset_t ssidParamSet;
224 mrvlietypes_phyparamset_t phyparamset;
225 mrvlietypes_ssparamset_t ssparamset;
226 mrvlietypes_ratesparamset_t ratesParamSet;
228 } __attribute__ ((packed));
230 struct cmd_ds_802_11_disassociate {
235 struct cmd_ds_802_11_associate_rsp {
236 struct ieeetypes_assocrsp assocRsp;
239 struct cmd_ds_802_11_ad_hoc_result {
244 struct cmd_ds_802_11_set_wep {
245 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
248 /* key Index selected for Tx */
251 /* 40, 128bit or TXWEP */
253 u8 keymaterial[4][16];
256 struct cmd_ds_802_3_get_stat {
265 struct cmd_ds_802_11_get_stat {
266 __le32 txfragmentcnt;
267 __le32 mcasttxframecnt;
270 __le32 Multipleretrycnt;
271 __le32 rtssuccesscnt;
272 __le32 rtsfailurecnt;
273 __le32 ackfailurecnt;
274 __le32 frameduplicatecnt;
275 __le32 rxfragmentcnt;
276 __le32 mcastrxframecnt;
278 __le32 bcasttxframecnt;
279 __le32 bcastrxframecnt;
282 __le32 wepundecryptable;
285 struct cmd_ds_802_11_snmp_mib {
292 struct cmd_ds_mac_reg_map {
298 struct cmd_ds_bbp_reg_map {
304 struct cmd_ds_rf_reg_map {
310 struct cmd_ds_mac_reg_access {
316 struct cmd_ds_bbp_reg_access {
323 struct cmd_ds_rf_reg_access {
330 struct cmd_ds_802_11_radio_control {
335 struct cmd_ds_802_11_sleep_params {
336 /* ACT_GET/ACT_SET */
339 /* Sleep clock error in ppm */
342 /* Wakeup offset in usec */
345 /* Clock stabilization time in usec */
348 /* control periodic calibration */
351 /* control the use of external sleep clock */
354 /* reserved field, should be set to zero */
358 struct cmd_ds_802_11_inactivity_timeout {
359 /* ACT_GET/ACT_SET */
362 /* Inactivity timeout in msec */
366 struct cmd_ds_802_11_rf_channel {
368 __le16 currentchannel;
374 struct cmd_ds_802_11_rssi {
375 /* weighting factor */
383 struct cmd_ds_802_11_rssi_rsp {
387 __le16 avgnoisefloor;
390 struct cmd_ds_802_11_mac_address {
395 struct cmd_ds_802_11_rf_tx_power {
400 struct cmd_ds_802_11_rf_antenna {
403 /* Number of antennas or 0xffff(diversity) */
408 struct cmd_ds_802_11_monitor_mode {
413 struct cmd_ds_802_11_ps_mode {
415 __le16 nullpktinterval;
418 __le16 locallisteninterval;
421 struct PS_CMD_ConfirmSleep {
431 __le16 locallisteninterval;
434 struct cmd_ds_802_11_data_rate {
440 struct cmd_ds_802_11_rate_adapt_rateset {
446 struct cmd_ds_802_11_ad_hoc_start {
447 u8 ssid[IW_ESSID_MAX_SIZE];
451 union IEEEtypes_ssparamset ssparamset;
452 union ieeetypes_phyparamset phyparamset;
456 u8 tlv_memory_size_pad[100];
457 } __attribute__ ((packed));
459 struct adhoc_bssdesc {
467 union ieeetypes_phyparamset phyparamset;
468 union IEEEtypes_ssparamset ssparamset;
472 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
473 * Adhoc join command and will cause a binary layout mismatch with
476 } __attribute__ ((packed));
478 struct cmd_ds_802_11_ad_hoc_join {
479 struct adhoc_bssdesc bss;
483 } __attribute__ ((packed));
485 struct cmd_ds_802_11_enable_rsn {
488 } __attribute__ ((packed));
490 struct MrvlIEtype_keyParamSet {
494 /* length of Payload */
497 /* type of key: WEP=0, TKIP=1, AES=2 */
500 /* key control Info specific to a keytypeid */
506 /* key material of size keylen */
510 struct cmd_ds_802_11_key_material {
512 struct MrvlIEtype_keyParamSet keyParamSet[2];
513 } __attribute__ ((packed));
515 struct cmd_ds_802_11_eeprom_access {
522 } __attribute__ ((packed));
524 struct cmd_ds_802_11_tpc_cfg {
531 } __attribute__ ((packed));
533 struct cmd_ds_802_11_led_ctrl {
537 } __attribute__ ((packed));
539 struct cmd_ds_802_11_pwr_cfg {
545 } __attribute__ ((packed));
547 struct cmd_ds_802_11_afc {
555 __le16 timing_offset; /* signed */
556 __le16 carrier_offset; /* signed */
559 } __attribute__ ((packed));
561 struct cmd_tx_rate_query {
563 } __attribute__ ((packed));
565 struct cmd_ds_get_tsf {
567 } __attribute__ ((packed));
569 struct cmd_ds_bt_access {
574 } __attribute__ ((packed));
576 struct cmd_ds_fwt_access {
594 } __attribute__ ((packed));
596 struct cmd_ds_mesh_access {
598 __le32 data[32]; /* last position reserved */
599 } __attribute__ ((packed));
601 /* Number of stats counters returned by the firmware */
602 #define MESH_STATS_NUM 8
604 struct cmd_ds_command {
613 struct cmd_ds_get_hw_spec hwspec;
614 struct cmd_ds_802_11_ps_mode psmode;
615 struct cmd_ds_802_11_scan scan;
616 struct cmd_ds_802_11_scan_rsp scanresp;
617 struct cmd_ds_mac_control macctrl;
618 struct cmd_ds_802_11_associate associate;
619 struct cmd_ds_802_11_deauthenticate deauth;
620 struct cmd_ds_802_11_set_wep wep;
621 struct cmd_ds_802_11_ad_hoc_start ads;
622 struct cmd_ds_802_11_reset reset;
623 struct cmd_ds_802_11_ad_hoc_result result;
624 struct cmd_ds_802_11_get_log glog;
625 struct cmd_ds_802_11_authenticate auth;
626 struct cmd_ds_802_11_get_stat gstat;
627 struct cmd_ds_802_3_get_stat gstat_8023;
628 struct cmd_ds_802_11_snmp_mib smib;
629 struct cmd_ds_802_11_rf_tx_power txp;
630 struct cmd_ds_802_11_rf_antenna rant;
631 struct cmd_ds_802_11_monitor_mode monitor;
632 struct cmd_ds_802_11_data_rate drate;
633 struct cmd_ds_802_11_rate_adapt_rateset rateset;
634 struct cmd_ds_mac_multicast_adr madr;
635 struct cmd_ds_802_11_ad_hoc_join adj;
636 struct cmd_ds_802_11_radio_control radio;
637 struct cmd_ds_802_11_rf_channel rfchannel;
638 struct cmd_ds_802_11_rssi rssi;
639 struct cmd_ds_802_11_rssi_rsp rssirsp;
640 struct cmd_ds_802_11_disassociate dassociate;
641 struct cmd_ds_802_11_mac_address macadd;
642 struct cmd_ds_802_11_enable_rsn enbrsn;
643 struct cmd_ds_802_11_key_material keymaterial;
644 struct cmd_ds_mac_reg_access macreg;
645 struct cmd_ds_bbp_reg_access bbpreg;
646 struct cmd_ds_rf_reg_access rfreg;
647 struct cmd_ds_802_11_eeprom_access rdeeprom;
649 struct cmd_ds_802_11d_domain_info domaininfo;
650 struct cmd_ds_802_11d_domain_info domaininforesp;
652 struct cmd_ds_802_11_sleep_params sleep_params;
653 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
654 struct cmd_ds_802_11_tpc_cfg tpccfg;
655 struct cmd_ds_802_11_pwr_cfg pwrcfg;
656 struct cmd_ds_802_11_afc afc;
657 struct cmd_ds_802_11_led_ctrl ledgpio;
659 struct cmd_tx_rate_query txrate;
660 struct cmd_ds_bt_access bt;
661 struct cmd_ds_fwt_access fwt;
662 struct cmd_ds_mesh_access mesh;
663 struct cmd_ds_get_tsf gettsf;
664 struct cmd_ds_802_11_subscribe_event subscribe_event;
666 } __attribute__ ((packed));