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;
72 /*CMD wait option: wait for finish or no wait */
74 /* command parameter */
80 wait_queue_head_t cmdwait_q;
83 /* Generic structure to hold all key types. */
86 u16 flags; /* KEY_INFO_* from defs.h */
87 u16 type; /* KEY_TYPE_* from defs.h */
91 /* lbs_offset_value */
92 struct lbs_offset_value {
97 /* Define general data structure */
106 #define S_DS_GEN sizeof(struct cmd_ds_gen)
108 * Define data structure for CMD_GET_HW_SPEC
109 * This structure defines the response for the GET_HW_SPEC command
111 struct cmd_ds_get_hw_spec {
112 /* HW Interface version number */
114 /* HW version number */
116 /* Max number of TxPD FW can handle */
118 /* Max no of Multicast address */
126 /* Number of antenna used */
129 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
130 u8 fwreleasenumber[4];
132 /* Base Address of TxPD queue */
134 /* Read Pointer of RxPd queue */
137 /* Write Pointer of RxPd queue */
140 /*FW/HW capability */
142 } __attribute__ ((packed));
144 struct cmd_ds_802_11_reset {
148 struct cmd_ds_802_11_subscribe_event {
152 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
153 * number of TLVs. From the v5.1 manual, those TLVs would add up to
154 * 40 bytes. However, future firmware might add additional TLVs, so I
155 * bump this up a bit.
161 * This scan handle Country Information IE(802.11d compliant)
162 * Define data structure for CMD_802_11_SCAN
164 struct cmd_ds_802_11_scan {
169 mrvlietypes_ssidparamset_t ssidParamSet;
170 mrvlietypes_chanlistparamset_t ChanListParamSet;
171 mrvlietypes_ratesparamset_t OpRateSet;
175 struct cmd_ds_802_11_scan_rsp {
176 __le16 bssdescriptsize;
178 u8 bssdesc_and_tlvbuffer[1];
181 struct cmd_ds_802_11_get_log {
194 __le32 wepundecryptable;
197 struct cmd_ds_mac_control {
202 struct cmd_ds_mac_multicast_adr {
205 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
208 struct cmd_ds_802_11_authenticate {
209 u8 macaddr[ETH_ALEN];
214 struct cmd_ds_802_11_deauthenticate {
219 struct cmd_ds_802_11_associate {
222 __le16 listeninterval;
227 mrvlietypes_ssidparamset_t ssidParamSet;
228 mrvlietypes_phyparamset_t phyparamset;
229 mrvlietypes_ssparamset_t ssparamset;
230 mrvlietypes_ratesparamset_t ratesParamSet;
232 } __attribute__ ((packed));
234 struct cmd_ds_802_11_disassociate {
239 struct cmd_ds_802_11_associate_rsp {
240 struct ieeetypes_assocrsp assocRsp;
243 struct cmd_ds_802_11_ad_hoc_result {
248 struct cmd_ds_802_11_set_wep {
249 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
252 /* key Index selected for Tx */
255 /* 40, 128bit or TXWEP */
257 u8 keymaterial[4][16];
260 struct cmd_ds_802_3_get_stat {
269 struct cmd_ds_802_11_get_stat {
270 __le32 txfragmentcnt;
271 __le32 mcasttxframecnt;
274 __le32 Multipleretrycnt;
275 __le32 rtssuccesscnt;
276 __le32 rtsfailurecnt;
277 __le32 ackfailurecnt;
278 __le32 frameduplicatecnt;
279 __le32 rxfragmentcnt;
280 __le32 mcastrxframecnt;
282 __le32 bcasttxframecnt;
283 __le32 bcastrxframecnt;
286 __le32 wepundecryptable;
289 struct cmd_ds_802_11_snmp_mib {
296 struct cmd_ds_mac_reg_map {
302 struct cmd_ds_bbp_reg_map {
308 struct cmd_ds_rf_reg_map {
314 struct cmd_ds_mac_reg_access {
320 struct cmd_ds_bbp_reg_access {
327 struct cmd_ds_rf_reg_access {
334 struct cmd_ds_802_11_radio_control {
339 struct cmd_ds_802_11_beacon_control {
341 __le16 beacon_enable;
342 __le16 beacon_period;
345 struct cmd_ds_802_11_sleep_params {
346 /* ACT_GET/ACT_SET */
349 /* Sleep clock error in ppm */
352 /* Wakeup offset in usec */
355 /* Clock stabilization time in usec */
358 /* control periodic calibration */
361 /* control the use of external sleep clock */
364 /* reserved field, should be set to zero */
368 struct cmd_ds_802_11_inactivity_timeout {
369 /* ACT_GET/ACT_SET */
372 /* Inactivity timeout in msec */
376 struct cmd_ds_802_11_rf_channel {
378 __le16 currentchannel;
384 struct cmd_ds_802_11_rssi {
385 /* weighting factor */
393 struct cmd_ds_802_11_rssi_rsp {
397 __le16 avgnoisefloor;
400 struct cmd_ds_802_11_mac_address {
405 struct cmd_ds_802_11_rf_tx_power {
410 struct cmd_ds_802_11_rf_antenna {
413 /* Number of antennas or 0xffff(diversity) */
418 struct cmd_ds_802_11_monitor_mode {
423 struct cmd_ds_set_boot2_ver {
428 struct cmd_ds_802_11_ps_mode {
430 __le16 nullpktinterval;
433 __le16 locallisteninterval;
436 struct PS_CMD_ConfirmSleep {
446 __le16 locallisteninterval;
449 struct cmd_ds_802_11_data_rate {
455 struct cmd_ds_802_11_rate_adapt_rateset {
461 struct cmd_ds_802_11_ad_hoc_start {
462 u8 ssid[IW_ESSID_MAX_SIZE];
466 union IEEEtypes_ssparamset ssparamset;
467 union ieeetypes_phyparamset phyparamset;
471 u8 tlv_memory_size_pad[100];
472 } __attribute__ ((packed));
474 struct adhoc_bssdesc {
482 union ieeetypes_phyparamset phyparamset;
483 union IEEEtypes_ssparamset ssparamset;
487 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
488 * Adhoc join command and will cause a binary layout mismatch with
491 } __attribute__ ((packed));
493 struct cmd_ds_802_11_ad_hoc_join {
494 struct adhoc_bssdesc bss;
498 } __attribute__ ((packed));
500 struct cmd_ds_802_11_enable_rsn {
503 } __attribute__ ((packed));
505 struct MrvlIEtype_keyParamSet {
509 /* length of Payload */
512 /* type of key: WEP=0, TKIP=1, AES=2 */
515 /* key control Info specific to a keytypeid */
521 /* key material of size keylen */
525 struct cmd_ds_802_11_key_material {
527 struct MrvlIEtype_keyParamSet keyParamSet[2];
528 } __attribute__ ((packed));
530 struct cmd_ds_802_11_eeprom_access {
537 } __attribute__ ((packed));
539 struct cmd_ds_802_11_tpc_cfg {
546 } __attribute__ ((packed));
548 struct cmd_ds_802_11_led_ctrl {
552 } __attribute__ ((packed));
554 struct cmd_ds_802_11_pwr_cfg {
560 } __attribute__ ((packed));
562 struct cmd_ds_802_11_afc {
570 __le16 timing_offset; /* signed */
571 __le16 carrier_offset; /* signed */
574 } __attribute__ ((packed));
576 struct cmd_tx_rate_query {
578 } __attribute__ ((packed));
580 struct cmd_ds_get_tsf {
582 } __attribute__ ((packed));
584 struct cmd_ds_bt_access {
589 } __attribute__ ((packed));
591 struct cmd_ds_fwt_access {
609 } __attribute__ ((packed));
611 struct cmd_ds_mesh_access {
613 __le32 data[32]; /* last position reserved */
614 } __attribute__ ((packed));
616 /* Number of stats counters returned by the firmware */
617 #define MESH_STATS_NUM 8
619 struct cmd_ds_command {
628 struct cmd_ds_get_hw_spec hwspec;
629 struct cmd_ds_802_11_ps_mode psmode;
630 struct cmd_ds_802_11_scan scan;
631 struct cmd_ds_802_11_scan_rsp scanresp;
632 struct cmd_ds_mac_control macctrl;
633 struct cmd_ds_802_11_associate associate;
634 struct cmd_ds_802_11_deauthenticate deauth;
635 struct cmd_ds_802_11_set_wep wep;
636 struct cmd_ds_802_11_ad_hoc_start ads;
637 struct cmd_ds_802_11_reset reset;
638 struct cmd_ds_802_11_ad_hoc_result result;
639 struct cmd_ds_802_11_get_log glog;
640 struct cmd_ds_802_11_authenticate auth;
641 struct cmd_ds_802_11_get_stat gstat;
642 struct cmd_ds_802_3_get_stat gstat_8023;
643 struct cmd_ds_802_11_snmp_mib smib;
644 struct cmd_ds_802_11_rf_tx_power txp;
645 struct cmd_ds_802_11_rf_antenna rant;
646 struct cmd_ds_802_11_monitor_mode monitor;
647 struct cmd_ds_802_11_data_rate drate;
648 struct cmd_ds_802_11_rate_adapt_rateset rateset;
649 struct cmd_ds_mac_multicast_adr madr;
650 struct cmd_ds_802_11_ad_hoc_join adj;
651 struct cmd_ds_802_11_radio_control radio;
652 struct cmd_ds_802_11_rf_channel rfchannel;
653 struct cmd_ds_802_11_rssi rssi;
654 struct cmd_ds_802_11_rssi_rsp rssirsp;
655 struct cmd_ds_802_11_disassociate dassociate;
656 struct cmd_ds_802_11_mac_address macadd;
657 struct cmd_ds_802_11_enable_rsn enbrsn;
658 struct cmd_ds_802_11_key_material keymaterial;
659 struct cmd_ds_mac_reg_access macreg;
660 struct cmd_ds_bbp_reg_access bbpreg;
661 struct cmd_ds_rf_reg_access rfreg;
662 struct cmd_ds_802_11_eeprom_access rdeeprom;
664 struct cmd_ds_802_11d_domain_info domaininfo;
665 struct cmd_ds_802_11d_domain_info domaininforesp;
667 struct cmd_ds_802_11_sleep_params sleep_params;
668 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
669 struct cmd_ds_802_11_tpc_cfg tpccfg;
670 struct cmd_ds_802_11_pwr_cfg pwrcfg;
671 struct cmd_ds_802_11_afc afc;
672 struct cmd_ds_802_11_led_ctrl ledgpio;
674 struct cmd_tx_rate_query txrate;
675 struct cmd_ds_bt_access bt;
676 struct cmd_ds_fwt_access fwt;
677 struct cmd_ds_mesh_access mesh;
678 struct cmd_ds_set_boot2_ver boot2_ver;
679 struct cmd_ds_get_tsf gettsf;
680 struct cmd_ds_802_11_subscribe_event subscribe_event;
681 struct cmd_ds_802_11_beacon_control bcn_ctrl;
683 } __attribute__ ((packed));