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 */
81 wait_queue_head_t cmdwait_q;
84 /* Generic structure to hold all key types. */
87 u16 flags; /* KEY_INFO_* from defs.h */
88 u16 type; /* KEY_TYPE_* from defs.h */
92 /* lbs_offset_value */
93 struct lbs_offset_value {
98 /* Define general data structure */
107 #define S_DS_GEN sizeof(struct cmd_ds_gen)
109 * Define data structure for CMD_GET_HW_SPEC
110 * This structure defines the response for the GET_HW_SPEC command
112 struct cmd_ds_get_hw_spec {
113 /* HW Interface version number */
115 /* HW version number */
117 /* Max number of TxPD FW can handle */
119 /* Max no of Multicast address */
127 /* Number of antenna used */
130 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
131 u8 fwreleasenumber[4];
133 /* Base Address of TxPD queue */
135 /* Read Pointer of RxPd queue */
138 /* Write Pointer of RxPd queue */
141 /*FW/HW capability */
143 } __attribute__ ((packed));
145 struct cmd_ds_802_11_reset {
149 struct cmd_ds_802_11_subscribe_event {
153 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
154 * number of TLVs. From the v5.1 manual, those TLVs would add up to
155 * 40 bytes. However, future firmware might add additional TLVs, so I
156 * bump this up a bit.
162 * This scan handle Country Information IE(802.11d compliant)
163 * Define data structure for CMD_802_11_SCAN
165 struct cmd_ds_802_11_scan {
170 mrvlietypes_ssidparamset_t ssidParamSet;
171 mrvlietypes_chanlistparamset_t ChanListParamSet;
172 mrvlietypes_ratesparamset_t OpRateSet;
176 struct cmd_ds_802_11_scan_rsp {
177 __le16 bssdescriptsize;
179 u8 bssdesc_and_tlvbuffer[1];
182 struct cmd_ds_802_11_get_log {
195 __le32 wepundecryptable;
198 struct cmd_ds_mac_control {
203 struct cmd_ds_mac_multicast_adr {
206 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
209 struct cmd_ds_802_11_authenticate {
210 u8 macaddr[ETH_ALEN];
215 struct cmd_ds_802_11_deauthenticate {
220 struct cmd_ds_802_11_associate {
223 __le16 listeninterval;
228 mrvlietypes_ssidparamset_t ssidParamSet;
229 mrvlietypes_phyparamset_t phyparamset;
230 mrvlietypes_ssparamset_t ssparamset;
231 mrvlietypes_ratesparamset_t ratesParamSet;
233 } __attribute__ ((packed));
235 struct cmd_ds_802_11_disassociate {
240 struct cmd_ds_802_11_associate_rsp {
241 struct ieeetypes_assocrsp assocRsp;
244 struct cmd_ds_802_11_ad_hoc_result {
249 struct cmd_ds_802_11_set_wep {
250 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
253 /* key Index selected for Tx */
256 /* 40, 128bit or TXWEP */
258 u8 keymaterial[4][16];
261 struct cmd_ds_802_3_get_stat {
270 struct cmd_ds_802_11_get_stat {
271 __le32 txfragmentcnt;
272 __le32 mcasttxframecnt;
275 __le32 Multipleretrycnt;
276 __le32 rtssuccesscnt;
277 __le32 rtsfailurecnt;
278 __le32 ackfailurecnt;
279 __le32 frameduplicatecnt;
280 __le32 rxfragmentcnt;
281 __le32 mcastrxframecnt;
283 __le32 bcasttxframecnt;
284 __le32 bcastrxframecnt;
287 __le32 wepundecryptable;
290 struct cmd_ds_802_11_snmp_mib {
297 struct cmd_ds_mac_reg_map {
303 struct cmd_ds_bbp_reg_map {
309 struct cmd_ds_rf_reg_map {
315 struct cmd_ds_mac_reg_access {
321 struct cmd_ds_bbp_reg_access {
328 struct cmd_ds_rf_reg_access {
335 struct cmd_ds_802_11_radio_control {
340 struct cmd_ds_802_11_beacon_control {
342 __le16 beacon_enable;
343 __le16 beacon_period;
346 struct cmd_ds_802_11_sleep_params {
347 /* ACT_GET/ACT_SET */
350 /* Sleep clock error in ppm */
353 /* Wakeup offset in usec */
356 /* Clock stabilization time in usec */
359 /* control periodic calibration */
362 /* control the use of external sleep clock */
365 /* reserved field, should be set to zero */
369 struct cmd_ds_802_11_inactivity_timeout {
370 /* ACT_GET/ACT_SET */
373 /* Inactivity timeout in msec */
377 struct cmd_ds_802_11_rf_channel {
379 __le16 currentchannel;
385 struct cmd_ds_802_11_rssi {
386 /* weighting factor */
394 struct cmd_ds_802_11_rssi_rsp {
398 __le16 avgnoisefloor;
401 struct cmd_ds_802_11_mac_address {
406 struct cmd_ds_802_11_rf_tx_power {
411 struct cmd_ds_802_11_rf_antenna {
414 /* Number of antennas or 0xffff(diversity) */
419 struct cmd_ds_802_11_monitor_mode {
424 struct cmd_ds_set_boot2_ver {
429 struct cmd_ds_802_11_ps_mode {
431 __le16 nullpktinterval;
434 __le16 locallisteninterval;
437 struct PS_CMD_ConfirmSleep {
447 __le16 locallisteninterval;
450 struct cmd_ds_802_11_data_rate {
456 struct cmd_ds_802_11_rate_adapt_rateset {
462 struct cmd_ds_802_11_ad_hoc_start {
463 u8 ssid[IW_ESSID_MAX_SIZE];
467 union IEEEtypes_ssparamset ssparamset;
468 union ieeetypes_phyparamset phyparamset;
472 u8 tlv_memory_size_pad[100];
473 } __attribute__ ((packed));
475 struct adhoc_bssdesc {
483 union ieeetypes_phyparamset phyparamset;
484 union IEEEtypes_ssparamset ssparamset;
488 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
489 * Adhoc join command and will cause a binary layout mismatch with
492 } __attribute__ ((packed));
494 struct cmd_ds_802_11_ad_hoc_join {
495 struct adhoc_bssdesc bss;
499 } __attribute__ ((packed));
501 struct cmd_ds_802_11_enable_rsn {
504 } __attribute__ ((packed));
506 struct MrvlIEtype_keyParamSet {
510 /* length of Payload */
513 /* type of key: WEP=0, TKIP=1, AES=2 */
516 /* key control Info specific to a keytypeid */
522 /* key material of size keylen */
526 struct cmd_ds_802_11_key_material {
528 struct MrvlIEtype_keyParamSet keyParamSet[2];
529 } __attribute__ ((packed));
531 struct cmd_ds_802_11_eeprom_access {
538 } __attribute__ ((packed));
540 struct cmd_ds_802_11_tpc_cfg {
547 } __attribute__ ((packed));
549 struct cmd_ds_802_11_led_ctrl {
553 } __attribute__ ((packed));
555 struct cmd_ds_802_11_pwr_cfg {
561 } __attribute__ ((packed));
563 struct cmd_ds_802_11_afc {
571 __le16 timing_offset; /* signed */
572 __le16 carrier_offset; /* signed */
575 } __attribute__ ((packed));
577 struct cmd_tx_rate_query {
579 } __attribute__ ((packed));
581 struct cmd_ds_get_tsf {
583 } __attribute__ ((packed));
585 struct cmd_ds_bt_access {
590 } __attribute__ ((packed));
592 struct cmd_ds_fwt_access {
610 } __attribute__ ((packed));
612 struct cmd_ds_mesh_access {
614 __le32 data[32]; /* last position reserved */
615 } __attribute__ ((packed));
617 /* Number of stats counters returned by the firmware */
618 #define MESH_STATS_NUM 8
620 struct cmd_ds_command {
629 struct cmd_ds_get_hw_spec hwspec;
630 struct cmd_ds_802_11_ps_mode psmode;
631 struct cmd_ds_802_11_scan scan;
632 struct cmd_ds_802_11_scan_rsp scanresp;
633 struct cmd_ds_mac_control macctrl;
634 struct cmd_ds_802_11_associate associate;
635 struct cmd_ds_802_11_deauthenticate deauth;
636 struct cmd_ds_802_11_set_wep wep;
637 struct cmd_ds_802_11_ad_hoc_start ads;
638 struct cmd_ds_802_11_reset reset;
639 struct cmd_ds_802_11_ad_hoc_result result;
640 struct cmd_ds_802_11_get_log glog;
641 struct cmd_ds_802_11_authenticate auth;
642 struct cmd_ds_802_11_get_stat gstat;
643 struct cmd_ds_802_3_get_stat gstat_8023;
644 struct cmd_ds_802_11_snmp_mib smib;
645 struct cmd_ds_802_11_rf_tx_power txp;
646 struct cmd_ds_802_11_rf_antenna rant;
647 struct cmd_ds_802_11_monitor_mode monitor;
648 struct cmd_ds_802_11_data_rate drate;
649 struct cmd_ds_802_11_rate_adapt_rateset rateset;
650 struct cmd_ds_mac_multicast_adr madr;
651 struct cmd_ds_802_11_ad_hoc_join adj;
652 struct cmd_ds_802_11_radio_control radio;
653 struct cmd_ds_802_11_rf_channel rfchannel;
654 struct cmd_ds_802_11_rssi rssi;
655 struct cmd_ds_802_11_rssi_rsp rssirsp;
656 struct cmd_ds_802_11_disassociate dassociate;
657 struct cmd_ds_802_11_mac_address macadd;
658 struct cmd_ds_802_11_enable_rsn enbrsn;
659 struct cmd_ds_802_11_key_material keymaterial;
660 struct cmd_ds_mac_reg_access macreg;
661 struct cmd_ds_bbp_reg_access bbpreg;
662 struct cmd_ds_rf_reg_access rfreg;
663 struct cmd_ds_802_11_eeprom_access rdeeprom;
665 struct cmd_ds_802_11d_domain_info domaininfo;
666 struct cmd_ds_802_11d_domain_info domaininforesp;
668 struct cmd_ds_802_11_sleep_params sleep_params;
669 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
670 struct cmd_ds_802_11_tpc_cfg tpccfg;
671 struct cmd_ds_802_11_pwr_cfg pwrcfg;
672 struct cmd_ds_802_11_afc afc;
673 struct cmd_ds_802_11_led_ctrl ledgpio;
675 struct cmd_tx_rate_query txrate;
676 struct cmd_ds_bt_access bt;
677 struct cmd_ds_fwt_access fwt;
678 struct cmd_ds_mesh_access mesh;
679 struct cmd_ds_set_boot2_ver boot2_ver;
680 struct cmd_ds_get_tsf gettsf;
681 struct cmd_ds_802_11_subscribe_event subscribe_event;
682 struct cmd_ds_802_11_beacon_control bcn_ctrl;
684 } __attribute__ ((packed));