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;
88 * Generic structure to hold all key types. key type (WEP40, WEP104, TKIP, AES)
89 * is determined from the keylength field.
91 struct WLAN_802_11_KEY {
93 __le32 flags; /* KEY_INFO_* from wlan_defs.h */
94 u8 key[MRVL_MAX_KEY_WPA_KEY_LENGTH];
95 __le16 type; /* KEY_TYPE_* from wlan_defs.h */
105 /* wlan_offset_value */
106 struct wlan_offset_value {
111 struct WLAN_802_11_VARIABLE_IEs {
117 /* Define general data structure */
126 #define S_DS_GEN sizeof(struct cmd_ds_gen)
128 * Define data structure for cmd_get_hw_spec
129 * This structure defines the response for the GET_HW_SPEC command
131 struct cmd_ds_get_hw_spec {
132 /* HW Interface version number */
134 /* HW version number */
136 /* Max number of TxPD FW can handle */
138 /* Max no of Multicast address */
146 /* Number of antenna used */
149 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
150 u8 fwreleasenumber[4];
152 /* Base Address of TxPD queue */
154 /* Read Pointer of RxPd queue */
157 /* Write Pointer of RxPd queue */
160 /*FW/HW capability */
162 } __attribute__ ((packed));
164 struct cmd_ds_802_11_reset {
168 struct cmd_ds_802_11_subscribe_event {
174 * This scan handle Country Information IE(802.11d compliant)
175 * Define data structure for cmd_802_11_scan
177 struct cmd_ds_802_11_scan {
182 mrvlietypes_ssidparamset_t ssidParamSet;
183 mrvlietypes_chanlistparamset_t ChanListParamSet;
184 mrvlietypes_ratesparamset_t OpRateSet;
188 struct cmd_ds_802_11_scan_rsp {
189 __le16 bssdescriptsize;
191 u8 bssdesc_and_tlvbuffer[1];
194 struct cmd_ds_802_11_get_log {
207 __le32 wepundecryptable;
210 struct cmd_ds_mac_control {
215 struct cmd_ds_mac_multicast_adr {
218 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
221 struct cmd_ds_802_11_authenticate {
222 u8 macaddr[ETH_ALEN];
227 struct cmd_ds_802_11_deauthenticate {
232 struct cmd_ds_802_11_associate {
235 __le16 listeninterval;
240 mrvlietypes_ssidparamset_t ssidParamSet;
241 mrvlietypes_phyparamset_t phyparamset;
242 mrvlietypes_ssparamset_t ssparamset;
243 mrvlietypes_ratesparamset_t ratesParamSet;
245 } __attribute__ ((packed));
247 struct cmd_ds_802_11_disassociate {
252 struct cmd_ds_802_11_associate_rsp {
253 struct ieeetypes_assocrsp assocRsp;
256 struct cmd_ds_802_11_ad_hoc_result {
261 struct cmd_ds_802_11_set_wep {
262 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
265 /* key Index selected for Tx */
268 /* 40, 128bit or TXWEP */
270 u8 keymaterial[4][16];
273 struct cmd_ds_802_3_get_stat {
282 struct cmd_ds_802_11_get_stat {
283 __le32 txfragmentcnt;
284 __le32 mcasttxframecnt;
287 __le32 Multipleretrycnt;
288 __le32 rtssuccesscnt;
289 __le32 rtsfailurecnt;
290 __le32 ackfailurecnt;
291 __le32 frameduplicatecnt;
292 __le32 rxfragmentcnt;
293 __le32 mcastrxframecnt;
295 __le32 bcasttxframecnt;
296 __le32 bcastrxframecnt;
299 __le32 wepundecryptable;
302 struct cmd_ds_802_11_snmp_mib {
309 struct cmd_ds_mac_reg_map {
315 struct cmd_ds_bbp_reg_map {
321 struct cmd_ds_rf_reg_map {
327 struct cmd_ds_mac_reg_access {
333 struct cmd_ds_bbp_reg_access {
340 struct cmd_ds_rf_reg_access {
347 struct cmd_ds_802_11_radio_control {
352 struct cmd_ds_802_11_sleep_params {
353 /* ACT_GET/ACT_SET */
356 /* Sleep clock error in ppm */
359 /* Wakeup offset in usec */
362 /* Clock stabilization time in usec */
365 /* control periodic calibration */
368 /* control the use of external sleep clock */
371 /* reserved field, should be set to zero */
375 struct cmd_ds_802_11_inactivity_timeout {
376 /* ACT_GET/ACT_SET */
379 /* Inactivity timeout in msec */
383 struct cmd_ds_802_11_rf_channel {
385 __le16 currentchannel;
391 struct cmd_ds_802_11_rssi {
392 /* weighting factor */
400 struct cmd_ds_802_11_rssi_rsp {
404 __le16 avgnoisefloor;
407 struct cmd_ds_802_11_mac_address {
412 struct cmd_ds_802_11_rf_tx_power {
417 struct cmd_ds_802_11_rf_antenna {
420 /* Number of antennas or 0xffff(diversity) */
425 struct cmd_ds_802_11_ps_mode {
427 __le16 nullpktinterval;
430 __le16 locallisteninterval;
433 struct PS_CMD_ConfirmSleep {
443 __le16 locallisteninterval;
446 struct cmd_ds_802_11_data_rate {
449 u8 datarate[G_SUPPORTED_RATES];
452 struct cmd_ds_802_11_rate_adapt_rateset {
458 struct cmd_ds_802_11_ad_hoc_start {
459 u8 SSID[IW_ESSID_MAX_SIZE];
463 union IEEEtypes_ssparamset ssparamset;
464 union ieeetypes_phyparamset phyparamset;
467 u8 datarate[G_SUPPORTED_RATES];
468 u8 tlv_memory_size_pad[100];
469 } __attribute__ ((packed));
471 struct adhoc_bssdesc {
479 union ieeetypes_phyparamset phyparamset;
480 union IEEEtypes_ssparamset ssparamset;
482 u8 datarates[G_SUPPORTED_RATES];
484 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
485 * Adhoc join command and will cause a binary layout mismatch with
488 } __attribute__ ((packed));
490 struct cmd_ds_802_11_ad_hoc_join {
491 struct adhoc_bssdesc bss;
495 } __attribute__ ((packed));
497 struct cmd_ds_802_11_enable_rsn {
500 } __attribute__ ((packed));
502 struct MrvlIEtype_keyParamSet {
506 /* length of Payload */
509 /* type of key: WEP=0, TKIP=1, AES=2 */
512 /* key control Info specific to a keytypeid */
518 /* key material of size keylen */
522 struct cmd_ds_802_11_key_material {
524 struct MrvlIEtype_keyParamSet keyParamSet[2];
525 } __attribute__ ((packed));
527 struct cmd_ds_802_11_eeprom_access {
534 } __attribute__ ((packed));
536 struct cmd_ds_802_11_tpc_cfg {
543 } __attribute__ ((packed));
545 struct cmd_ds_802_11_led_ctrl {
549 } __attribute__ ((packed));
551 struct cmd_ds_802_11_pwr_cfg {
557 } __attribute__ ((packed));
559 struct cmd_ds_802_11_afc {
567 __le16 timing_offset; /* signed */
568 __le16 carrier_offset; /* signed */
571 } __attribute__ ((packed));
573 struct cmd_tx_rate_query {
575 } __attribute__ ((packed));
577 struct cmd_ds_get_tsf {
579 } __attribute__ ((packed));
581 struct cmd_ds_bt_access {
586 } __attribute__ ((packed));
588 struct cmd_ds_fwt_access {
606 } __attribute__ ((packed));
608 struct cmd_ds_mesh_access {
610 __le32 data[32]; /* last position reserved */
611 } __attribute__ ((packed));
613 /* Number of stats counters returned by the firmware */
614 #define MESH_STATS_NUM 8
616 struct cmd_ds_command {
625 struct cmd_ds_get_hw_spec hwspec;
626 struct cmd_ds_802_11_ps_mode psmode;
627 struct cmd_ds_802_11_scan scan;
628 struct cmd_ds_802_11_scan_rsp scanresp;
629 struct cmd_ds_mac_control macctrl;
630 struct cmd_ds_802_11_associate associate;
631 struct cmd_ds_802_11_deauthenticate deauth;
632 struct cmd_ds_802_11_set_wep wep;
633 struct cmd_ds_802_11_ad_hoc_start ads;
634 struct cmd_ds_802_11_reset reset;
635 struct cmd_ds_802_11_ad_hoc_result result;
636 struct cmd_ds_802_11_get_log glog;
637 struct cmd_ds_802_11_authenticate auth;
638 struct cmd_ds_802_11_get_stat gstat;
639 struct cmd_ds_802_3_get_stat gstat_8023;
640 struct cmd_ds_802_11_snmp_mib smib;
641 struct cmd_ds_802_11_rf_tx_power txp;
642 struct cmd_ds_802_11_rf_antenna rant;
643 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;
660 struct cmd_ds_802_11d_domain_info domaininfo;
661 struct cmd_ds_802_11d_domain_info domaininforesp;
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;
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;
674 struct cmd_ds_get_tsf gettsf;
675 struct cmd_ds_802_11_subscribe_event subscribe_event;
677 } __attribute__ ((packed));