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 */
101 /* wlan_offset_value */
102 struct wlan_offset_value {
107 struct WLAN_802_11_VARIABLE_IEs {
113 /* Define general data structure */
122 #define S_DS_GEN sizeof(struct cmd_ds_gen)
124 * Define data structure for cmd_get_hw_spec
125 * This structure defines the response for the GET_HW_SPEC command
127 struct cmd_ds_get_hw_spec {
128 /* HW Interface version number */
130 /* HW version number */
132 /* Max number of TxPD FW can handle */
134 /* Max no of Multicast address */
142 /* Number of antenna used */
145 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
146 u8 fwreleasenumber[4];
148 /* Base Address of TxPD queue */
150 /* Read Pointer of RxPd queue */
153 /* Write Pointer of RxPd queue */
156 /*FW/HW capability */
158 } __attribute__ ((packed));
160 struct cmd_ds_802_11_reset {
164 struct cmd_ds_802_11_subscribe_event {
170 * This scan handle Country Information IE(802.11d compliant)
171 * Define data structure for cmd_802_11_scan
173 struct cmd_ds_802_11_scan {
178 mrvlietypes_ssidparamset_t ssidParamSet;
179 mrvlietypes_chanlistparamset_t ChanListParamSet;
180 mrvlietypes_ratesparamset_t OpRateSet;
184 struct cmd_ds_802_11_scan_rsp {
185 __le16 bssdescriptsize;
187 u8 bssdesc_and_tlvbuffer[1];
190 struct cmd_ds_802_11_get_log {
203 __le32 wepundecryptable;
206 struct cmd_ds_mac_control {
211 struct cmd_ds_mac_multicast_adr {
214 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
217 struct cmd_ds_802_11_authenticate {
218 u8 macaddr[ETH_ALEN];
223 struct cmd_ds_802_11_deauthenticate {
228 struct cmd_ds_802_11_associate {
231 __le16 listeninterval;
236 mrvlietypes_ssidparamset_t ssidParamSet;
237 mrvlietypes_phyparamset_t phyparamset;
238 mrvlietypes_ssparamset_t ssparamset;
239 mrvlietypes_ratesparamset_t ratesParamSet;
241 } __attribute__ ((packed));
243 struct cmd_ds_802_11_disassociate {
248 struct cmd_ds_802_11_associate_rsp {
249 struct ieeetypes_assocrsp assocRsp;
252 struct cmd_ds_802_11_ad_hoc_result {
257 struct cmd_ds_802_11_set_wep {
258 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
261 /* key Index selected for Tx */
264 /* 40, 128bit or TXWEP */
266 u8 keymaterial[4][16];
269 struct cmd_ds_802_3_get_stat {
278 struct cmd_ds_802_11_get_stat {
279 __le32 txfragmentcnt;
280 __le32 mcasttxframecnt;
283 __le32 Multipleretrycnt;
284 __le32 rtssuccesscnt;
285 __le32 rtsfailurecnt;
286 __le32 ackfailurecnt;
287 __le32 frameduplicatecnt;
288 __le32 rxfragmentcnt;
289 __le32 mcastrxframecnt;
291 __le32 bcasttxframecnt;
292 __le32 bcastrxframecnt;
295 __le32 wepundecryptable;
298 struct cmd_ds_802_11_snmp_mib {
305 struct cmd_ds_mac_reg_map {
311 struct cmd_ds_bbp_reg_map {
317 struct cmd_ds_rf_reg_map {
323 struct cmd_ds_mac_reg_access {
329 struct cmd_ds_bbp_reg_access {
336 struct cmd_ds_rf_reg_access {
343 struct cmd_ds_802_11_radio_control {
348 struct cmd_ds_802_11_sleep_params {
349 /* ACT_GET/ACT_SET */
352 /* Sleep clock error in ppm */
355 /* Wakeup offset in usec */
358 /* Clock stabilization time in usec */
361 /* control periodic calibration */
364 /* control the use of external sleep clock */
367 /* reserved field, should be set to zero */
371 struct cmd_ds_802_11_inactivity_timeout {
372 /* ACT_GET/ACT_SET */
375 /* Inactivity timeout in msec */
379 struct cmd_ds_802_11_rf_channel {
381 __le16 currentchannel;
387 struct cmd_ds_802_11_rssi {
388 /* weighting factor */
396 struct cmd_ds_802_11_rssi_rsp {
400 __le16 avgnoisefloor;
403 struct cmd_ds_802_11_mac_address {
408 struct cmd_ds_802_11_rf_tx_power {
413 struct cmd_ds_802_11_rf_antenna {
416 /* Number of antennas or 0xffff(diversity) */
421 struct cmd_ds_802_11_ps_mode {
423 __le16 nullpktinterval;
426 __le16 locallisteninterval;
429 struct PS_CMD_ConfirmSleep {
439 __le16 locallisteninterval;
442 struct cmd_ds_802_11_data_rate {
445 u8 datarate[G_SUPPORTED_RATES];
448 struct cmd_ds_802_11_rate_adapt_rateset {
454 struct cmd_ds_802_11_ad_hoc_start {
455 u8 SSID[IW_ESSID_MAX_SIZE];
459 union IEEEtypes_ssparamset ssparamset;
460 union ieeetypes_phyparamset phyparamset;
463 u8 datarate[G_SUPPORTED_RATES];
464 u8 tlv_memory_size_pad[100];
465 } __attribute__ ((packed));
467 struct adhoc_bssdesc {
475 union ieeetypes_phyparamset phyparamset;
476 union IEEEtypes_ssparamset ssparamset;
478 u8 datarates[G_SUPPORTED_RATES];
480 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
481 * Adhoc join command and will cause a binary layout mismatch with
484 } __attribute__ ((packed));
486 struct cmd_ds_802_11_ad_hoc_join {
487 struct adhoc_bssdesc bss;
491 } __attribute__ ((packed));
493 struct cmd_ds_802_11_enable_rsn {
496 } __attribute__ ((packed));
498 struct MrvlIEtype_keyParamSet {
502 /* length of Payload */
505 /* type of key: WEP=0, TKIP=1, AES=2 */
508 /* key control Info specific to a keytypeid */
514 /* key material of size keylen */
518 struct cmd_ds_802_11_key_material {
520 struct MrvlIEtype_keyParamSet keyParamSet[2];
521 } __attribute__ ((packed));
523 struct cmd_ds_802_11_eeprom_access {
530 } __attribute__ ((packed));
532 struct cmd_ds_802_11_tpc_cfg {
539 } __attribute__ ((packed));
541 struct cmd_ds_802_11_led_ctrl {
545 } __attribute__ ((packed));
547 struct cmd_ds_802_11_pwr_cfg {
553 } __attribute__ ((packed));
555 struct cmd_ds_802_11_afc {
563 __le16 timing_offset; /* signed */
564 __le16 carrier_offset; /* signed */
567 } __attribute__ ((packed));
569 struct cmd_tx_rate_query {
571 } __attribute__ ((packed));
573 struct cmd_ds_get_tsf {
575 } __attribute__ ((packed));
577 struct cmd_ds_bt_access {
582 } __attribute__ ((packed));
584 struct cmd_ds_fwt_access {
602 } __attribute__ ((packed));
604 struct cmd_ds_mesh_access {
606 __le32 data[32]; /* last position reserved */
607 } __attribute__ ((packed));
609 /* Number of stats counters returned by the firmware */
610 #define MESH_STATS_NUM 8
612 struct cmd_ds_command {
621 struct cmd_ds_get_hw_spec hwspec;
622 struct cmd_ds_802_11_ps_mode psmode;
623 struct cmd_ds_802_11_scan scan;
624 struct cmd_ds_802_11_scan_rsp scanresp;
625 struct cmd_ds_mac_control macctrl;
626 struct cmd_ds_802_11_associate associate;
627 struct cmd_ds_802_11_deauthenticate deauth;
628 struct cmd_ds_802_11_set_wep wep;
629 struct cmd_ds_802_11_ad_hoc_start ads;
630 struct cmd_ds_802_11_reset reset;
631 struct cmd_ds_802_11_ad_hoc_result result;
632 struct cmd_ds_802_11_get_log glog;
633 struct cmd_ds_802_11_authenticate auth;
634 struct cmd_ds_802_11_get_stat gstat;
635 struct cmd_ds_802_3_get_stat gstat_8023;
636 struct cmd_ds_802_11_snmp_mib smib;
637 struct cmd_ds_802_11_rf_tx_power txp;
638 struct cmd_ds_802_11_rf_antenna rant;
639 struct cmd_ds_802_11_data_rate drate;
640 struct cmd_ds_802_11_rate_adapt_rateset rateset;
641 struct cmd_ds_mac_multicast_adr madr;
642 struct cmd_ds_802_11_ad_hoc_join adj;
643 struct cmd_ds_802_11_radio_control radio;
644 struct cmd_ds_802_11_rf_channel rfchannel;
645 struct cmd_ds_802_11_rssi rssi;
646 struct cmd_ds_802_11_rssi_rsp rssirsp;
647 struct cmd_ds_802_11_disassociate dassociate;
648 struct cmd_ds_802_11_mac_address macadd;
649 struct cmd_ds_802_11_enable_rsn enbrsn;
650 struct cmd_ds_802_11_key_material keymaterial;
651 struct cmd_ds_mac_reg_access macreg;
652 struct cmd_ds_bbp_reg_access bbpreg;
653 struct cmd_ds_rf_reg_access rfreg;
654 struct cmd_ds_802_11_eeprom_access rdeeprom;
656 struct cmd_ds_802_11d_domain_info domaininfo;
657 struct cmd_ds_802_11d_domain_info domaininforesp;
659 struct cmd_ds_802_11_sleep_params sleep_params;
660 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
661 struct cmd_ds_802_11_tpc_cfg tpccfg;
662 struct cmd_ds_802_11_pwr_cfg pwrcfg;
663 struct cmd_ds_802_11_afc afc;
664 struct cmd_ds_802_11_led_ctrl ledgpio;
666 struct cmd_tx_rate_query txrate;
667 struct cmd_ds_bt_access bt;
668 struct cmd_ds_fwt_access fwt;
669 struct cmd_ds_mesh_access mesh;
670 struct cmd_ds_get_tsf gettsf;
671 struct cmd_ds_802_11_subscribe_event subscribe_event;
673 } __attribute__ ((packed));