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 struct WPA_SUPPLICANT {
110 /* wlan_offset_value */
111 struct wlan_offset_value {
116 struct WLAN_802_11_FIXED_IEs {
118 __le16 beaconinterval;
119 u16 capabilities; /* Actually struct ieeetypes_capinfo */
122 struct WLAN_802_11_VARIABLE_IEs {
128 /* Define general data structure */
137 #define S_DS_GEN sizeof(struct cmd_ds_gen)
139 * Define data structure for cmd_get_hw_spec
140 * This structure defines the response for the GET_HW_SPEC command
142 struct cmd_ds_get_hw_spec {
143 /* HW Interface version number */
145 /* HW version number */
147 /* Max number of TxPD FW can handle */
149 /* Max no of Multicast address */
157 /* Number of antenna used */
160 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
161 u8 fwreleasenumber[4];
163 /* Base Address of TxPD queue */
165 /* Read Pointer of RxPd queue */
168 /* Write Pointer of RxPd queue */
171 /*FW/HW capability */
173 } __attribute__ ((packed));
175 struct cmd_ds_802_11_reset {
179 struct cmd_ds_802_11_subscribe_event {
185 * This scan handle Country Information IE(802.11d compliant)
186 * Define data structure for cmd_802_11_scan
188 struct cmd_ds_802_11_scan {
193 mrvlietypes_ssidparamset_t ssidParamSet;
194 mrvlietypes_chanlistparamset_t ChanListParamSet;
195 mrvlietypes_ratesparamset_t OpRateSet;
199 struct cmd_ds_802_11_scan_rsp {
200 __le16 bssdescriptsize;
202 u8 bssdesc_and_tlvbuffer[1];
205 struct cmd_ds_802_11_get_log {
218 __le32 wepundecryptable;
221 struct cmd_ds_mac_control {
226 struct cmd_ds_mac_multicast_adr {
229 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
232 struct cmd_ds_802_11_authenticate {
233 u8 macaddr[ETH_ALEN];
238 struct cmd_ds_802_11_deauthenticate {
243 struct cmd_ds_802_11_associate {
245 struct ieeetypes_capinfo capinfo;
246 __le16 listeninterval;
251 mrvlietypes_ssidparamset_t ssidParamSet;
252 mrvlietypes_phyparamset_t phyparamset;
253 mrvlietypes_ssparamset_t ssparamset;
254 mrvlietypes_ratesparamset_t ratesParamSet;
256 } __attribute__ ((packed));
258 struct cmd_ds_802_11_disassociate {
263 struct cmd_ds_802_11_associate_rsp {
264 struct ieeetypes_assocrsp assocRsp;
267 struct cmd_ds_802_11_ad_hoc_result {
272 struct cmd_ds_802_11_set_wep {
273 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
276 /* key Index selected for Tx */
279 /* 40, 128bit or TXWEP */
281 u8 keymaterial[4][16];
284 struct cmd_ds_802_3_get_stat {
293 struct cmd_ds_802_11_get_stat {
294 __le32 txfragmentcnt;
295 __le32 mcasttxframecnt;
298 __le32 Multipleretrycnt;
299 __le32 rtssuccesscnt;
300 __le32 rtsfailurecnt;
301 __le32 ackfailurecnt;
302 __le32 frameduplicatecnt;
303 __le32 rxfragmentcnt;
304 __le32 mcastrxframecnt;
306 __le32 bcasttxframecnt;
307 __le32 bcastrxframecnt;
310 __le32 wepundecryptable;
313 struct cmd_ds_802_11_snmp_mib {
320 struct cmd_ds_mac_reg_map {
326 struct cmd_ds_bbp_reg_map {
332 struct cmd_ds_rf_reg_map {
338 struct cmd_ds_mac_reg_access {
344 struct cmd_ds_bbp_reg_access {
351 struct cmd_ds_rf_reg_access {
358 struct cmd_ds_802_11_radio_control {
363 struct cmd_ds_802_11_sleep_params {
364 /* ACT_GET/ACT_SET */
367 /* Sleep clock error in ppm */
370 /* Wakeup offset in usec */
373 /* Clock stabilization time in usec */
376 /* control periodic calibration */
379 /* control the use of external sleep clock */
382 /* reserved field, should be set to zero */
386 struct cmd_ds_802_11_inactivity_timeout {
387 /* ACT_GET/ACT_SET */
390 /* Inactivity timeout in msec */
394 struct cmd_ds_802_11_rf_channel {
396 __le16 currentchannel;
402 struct cmd_ds_802_11_rssi {
403 /* weighting factor */
411 struct cmd_ds_802_11_rssi_rsp {
415 __le16 avgnoisefloor;
418 struct cmd_ds_802_11_mac_address {
423 struct cmd_ds_802_11_rf_tx_power {
428 struct cmd_ds_802_11_rf_antenna {
431 /* Number of antennas or 0xffff(diversity) */
436 struct cmd_ds_802_11_ps_mode {
438 __le16 nullpktinterval;
441 __le16 locallisteninterval;
444 struct PS_CMD_ConfirmSleep {
454 __le16 locallisteninterval;
457 struct cmd_ds_802_11_data_rate {
460 u8 datarate[G_SUPPORTED_RATES];
463 struct cmd_ds_802_11_rate_adapt_rateset {
469 struct cmd_ds_802_11_ad_hoc_start {
470 u8 SSID[IW_ESSID_MAX_SIZE];
474 union IEEEtypes_ssparamset ssparamset;
475 union ieeetypes_phyparamset phyparamset;
477 struct ieeetypes_capinfo cap;
478 u8 datarate[G_SUPPORTED_RATES];
479 u8 tlv_memory_size_pad[100];
480 } __attribute__ ((packed));
482 struct adhoc_bssdesc {
490 union ieeetypes_phyparamset phyparamset;
491 union IEEEtypes_ssparamset ssparamset;
492 struct ieeetypes_capinfo cap;
493 u8 datarates[G_SUPPORTED_RATES];
495 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
496 * Adhoc join command and will cause a binary layout mismatch with
499 } __attribute__ ((packed));
501 struct cmd_ds_802_11_ad_hoc_join {
502 struct adhoc_bssdesc bssdescriptor;
506 } __attribute__ ((packed));
508 struct cmd_ds_802_11_enable_rsn {
513 struct MrvlIEtype_keyParamSet {
517 /* length of Payload */
520 /* type of key: WEP=0, TKIP=1, AES=2 */
523 /* key control Info specific to a keytypeid */
529 /* key material of size keylen */
533 struct cmd_ds_802_11_key_material {
535 struct MrvlIEtype_keyParamSet keyParamSet[2];
536 } __attribute__ ((packed));
538 struct cmd_ds_802_11_eeprom_access {
545 } __attribute__ ((packed));
547 struct cmd_ds_802_11_tpc_cfg {
554 } __attribute__ ((packed));
556 struct cmd_ds_802_11_led_ctrl {
560 } __attribute__ ((packed));
562 struct cmd_ds_802_11_pwr_cfg {
568 } __attribute__ ((packed));
570 struct cmd_ds_802_11_afc {
578 __le16 timing_offset; /* signed */
579 __le16 carrier_offset; /* signed */
582 } __attribute__ ((packed));
584 struct cmd_tx_rate_query {
586 } __attribute__ ((packed));
588 struct cmd_ds_get_tsf {
590 } __attribute__ ((packed));
592 struct cmd_ds_bt_access {
597 } __attribute__ ((packed));
599 struct cmd_ds_fwt_access {
617 } __attribute__ ((packed));
619 struct cmd_ds_mesh_access {
621 __le32 data[32]; /* last position reserved */
622 } __attribute__ ((packed));
624 /* Number of stats counters returned by the firmware */
625 #define MESH_STATS_NUM 8
627 struct cmd_ds_command {
636 struct cmd_ds_get_hw_spec hwspec;
637 struct cmd_ds_802_11_ps_mode psmode;
638 struct cmd_ds_802_11_scan scan;
639 struct cmd_ds_802_11_scan_rsp scanresp;
640 struct cmd_ds_mac_control macctrl;
641 struct cmd_ds_802_11_associate associate;
642 struct cmd_ds_802_11_deauthenticate deauth;
643 struct cmd_ds_802_11_set_wep wep;
644 struct cmd_ds_802_11_ad_hoc_start ads;
645 struct cmd_ds_802_11_reset reset;
646 struct cmd_ds_802_11_ad_hoc_result result;
647 struct cmd_ds_802_11_get_log glog;
648 struct cmd_ds_802_11_authenticate auth;
649 struct cmd_ds_802_11_get_stat gstat;
650 struct cmd_ds_802_3_get_stat gstat_8023;
651 struct cmd_ds_802_11_snmp_mib smib;
652 struct cmd_ds_802_11_rf_tx_power txp;
653 struct cmd_ds_802_11_rf_antenna rant;
654 struct cmd_ds_802_11_data_rate drate;
655 struct cmd_ds_802_11_rate_adapt_rateset rateset;
656 struct cmd_ds_mac_multicast_adr madr;
657 struct cmd_ds_802_11_ad_hoc_join adj;
658 struct cmd_ds_802_11_radio_control radio;
659 struct cmd_ds_802_11_rf_channel rfchannel;
660 struct cmd_ds_802_11_rssi rssi;
661 struct cmd_ds_802_11_rssi_rsp rssirsp;
662 struct cmd_ds_802_11_disassociate dassociate;
663 struct cmd_ds_802_11_mac_address macadd;
664 struct cmd_ds_802_11_enable_rsn enbrsn;
665 struct cmd_ds_802_11_key_material keymaterial;
666 struct cmd_ds_mac_reg_access macreg;
667 struct cmd_ds_bbp_reg_access bbpreg;
668 struct cmd_ds_rf_reg_access rfreg;
669 struct cmd_ds_802_11_eeprom_access rdeeprom;
671 struct cmd_ds_802_11d_domain_info domaininfo;
672 struct cmd_ds_802_11d_domain_info domaininforesp;
674 struct cmd_ds_802_11_sleep_params sleep_params;
675 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
676 struct cmd_ds_802_11_tpc_cfg tpccfg;
677 struct cmd_ds_802_11_pwr_cfg pwrcfg;
678 struct cmd_ds_802_11_afc afc;
679 struct cmd_ds_802_11_led_ctrl ledgpio;
681 struct cmd_tx_rate_query txrate;
682 struct cmd_ds_bt_access bt;
683 struct cmd_ds_fwt_access fwt;
684 struct cmd_ds_mesh_access mesh;
685 struct cmd_ds_get_tsf gettsf;
686 struct cmd_ds_802_11_subscribe_event subscribe_event;
688 } __attribute__ ((packed));