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_ps_mode {
410 __le16 nullpktinterval;
413 __le16 locallisteninterval;
416 struct PS_CMD_ConfirmSleep {
426 __le16 locallisteninterval;
429 struct cmd_ds_802_11_data_rate {
432 u8 datarate[G_SUPPORTED_RATES];
435 struct cmd_ds_802_11_rate_adapt_rateset {
441 struct cmd_ds_802_11_ad_hoc_start {
442 u8 SSID[IW_ESSID_MAX_SIZE];
446 union IEEEtypes_ssparamset ssparamset;
447 union ieeetypes_phyparamset phyparamset;
450 u8 datarate[G_SUPPORTED_RATES];
451 u8 tlv_memory_size_pad[100];
452 } __attribute__ ((packed));
454 struct adhoc_bssdesc {
462 union ieeetypes_phyparamset phyparamset;
463 union IEEEtypes_ssparamset ssparamset;
465 u8 datarates[G_SUPPORTED_RATES];
467 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
468 * Adhoc join command and will cause a binary layout mismatch with
471 } __attribute__ ((packed));
473 struct cmd_ds_802_11_ad_hoc_join {
474 struct adhoc_bssdesc bss;
478 } __attribute__ ((packed));
480 struct cmd_ds_802_11_enable_rsn {
483 } __attribute__ ((packed));
485 struct MrvlIEtype_keyParamSet {
489 /* length of Payload */
492 /* type of key: WEP=0, TKIP=1, AES=2 */
495 /* key control Info specific to a keytypeid */
501 /* key material of size keylen */
505 struct cmd_ds_802_11_key_material {
507 struct MrvlIEtype_keyParamSet keyParamSet[2];
508 } __attribute__ ((packed));
510 struct cmd_ds_802_11_eeprom_access {
517 } __attribute__ ((packed));
519 struct cmd_ds_802_11_tpc_cfg {
526 } __attribute__ ((packed));
528 struct cmd_ds_802_11_led_ctrl {
532 } __attribute__ ((packed));
534 struct cmd_ds_802_11_pwr_cfg {
540 } __attribute__ ((packed));
542 struct cmd_ds_802_11_afc {
550 __le16 timing_offset; /* signed */
551 __le16 carrier_offset; /* signed */
554 } __attribute__ ((packed));
556 struct cmd_tx_rate_query {
558 } __attribute__ ((packed));
560 struct cmd_ds_get_tsf {
562 } __attribute__ ((packed));
564 struct cmd_ds_bt_access {
569 } __attribute__ ((packed));
571 struct cmd_ds_fwt_access {
589 } __attribute__ ((packed));
591 struct cmd_ds_mesh_access {
593 __le32 data[32]; /* last position reserved */
594 } __attribute__ ((packed));
596 /* Number of stats counters returned by the firmware */
597 #define MESH_STATS_NUM 8
599 struct cmd_ds_command {
608 struct cmd_ds_get_hw_spec hwspec;
609 struct cmd_ds_802_11_ps_mode psmode;
610 struct cmd_ds_802_11_scan scan;
611 struct cmd_ds_802_11_scan_rsp scanresp;
612 struct cmd_ds_mac_control macctrl;
613 struct cmd_ds_802_11_associate associate;
614 struct cmd_ds_802_11_deauthenticate deauth;
615 struct cmd_ds_802_11_set_wep wep;
616 struct cmd_ds_802_11_ad_hoc_start ads;
617 struct cmd_ds_802_11_reset reset;
618 struct cmd_ds_802_11_ad_hoc_result result;
619 struct cmd_ds_802_11_get_log glog;
620 struct cmd_ds_802_11_authenticate auth;
621 struct cmd_ds_802_11_get_stat gstat;
622 struct cmd_ds_802_3_get_stat gstat_8023;
623 struct cmd_ds_802_11_snmp_mib smib;
624 struct cmd_ds_802_11_rf_tx_power txp;
625 struct cmd_ds_802_11_rf_antenna rant;
626 struct cmd_ds_802_11_data_rate drate;
627 struct cmd_ds_802_11_rate_adapt_rateset rateset;
628 struct cmd_ds_mac_multicast_adr madr;
629 struct cmd_ds_802_11_ad_hoc_join adj;
630 struct cmd_ds_802_11_radio_control radio;
631 struct cmd_ds_802_11_rf_channel rfchannel;
632 struct cmd_ds_802_11_rssi rssi;
633 struct cmd_ds_802_11_rssi_rsp rssirsp;
634 struct cmd_ds_802_11_disassociate dassociate;
635 struct cmd_ds_802_11_mac_address macadd;
636 struct cmd_ds_802_11_enable_rsn enbrsn;
637 struct cmd_ds_802_11_key_material keymaterial;
638 struct cmd_ds_mac_reg_access macreg;
639 struct cmd_ds_bbp_reg_access bbpreg;
640 struct cmd_ds_rf_reg_access rfreg;
641 struct cmd_ds_802_11_eeprom_access rdeeprom;
643 struct cmd_ds_802_11d_domain_info domaininfo;
644 struct cmd_ds_802_11d_domain_info domaininforesp;
646 struct cmd_ds_802_11_sleep_params sleep_params;
647 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
648 struct cmd_ds_802_11_tpc_cfg tpccfg;
649 struct cmd_ds_802_11_pwr_cfg pwrcfg;
650 struct cmd_ds_802_11_afc afc;
651 struct cmd_ds_802_11_led_ctrl ledgpio;
653 struct cmd_tx_rate_query txrate;
654 struct cmd_ds_bt_access bt;
655 struct cmd_ds_fwt_access fwt;
656 struct cmd_ds_mesh_access mesh;
657 struct cmd_ds_get_tsf gettsf;
658 struct cmd_ds_802_11_subscribe_event subscribe_event;
660 } __attribute__ ((packed));