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_monitor_mode
{
413 struct cmd_ds_set_boot2_ver
{
418 struct cmd_ds_802_11_ps_mode
{
420 __le16 nullpktinterval
;
423 __le16 locallisteninterval
;
426 struct PS_CMD_ConfirmSleep
{
436 __le16 locallisteninterval
;
439 struct cmd_ds_802_11_data_rate
{
445 struct cmd_ds_802_11_rate_adapt_rateset
{
451 struct cmd_ds_802_11_ad_hoc_start
{
452 u8 ssid
[IW_ESSID_MAX_SIZE
];
456 union IEEEtypes_ssparamset ssparamset
;
457 union ieeetypes_phyparamset phyparamset
;
461 u8 tlv_memory_size_pad
[100];
462 } __attribute__ ((packed
));
464 struct adhoc_bssdesc
{
472 union ieeetypes_phyparamset phyparamset
;
473 union IEEEtypes_ssparamset ssparamset
;
477 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
478 * Adhoc join command and will cause a binary layout mismatch with
481 } __attribute__ ((packed
));
483 struct cmd_ds_802_11_ad_hoc_join
{
484 struct adhoc_bssdesc bss
;
488 } __attribute__ ((packed
));
490 struct cmd_ds_802_11_enable_rsn
{
493 } __attribute__ ((packed
));
495 struct MrvlIEtype_keyParamSet
{
499 /* length of Payload */
502 /* type of key: WEP=0, TKIP=1, AES=2 */
505 /* key control Info specific to a keytypeid */
511 /* key material of size keylen */
515 struct cmd_ds_802_11_key_material
{
517 struct MrvlIEtype_keyParamSet keyParamSet
[2];
518 } __attribute__ ((packed
));
520 struct cmd_ds_802_11_eeprom_access
{
527 } __attribute__ ((packed
));
529 struct cmd_ds_802_11_tpc_cfg
{
536 } __attribute__ ((packed
));
538 struct cmd_ds_802_11_led_ctrl
{
542 } __attribute__ ((packed
));
544 struct cmd_ds_802_11_pwr_cfg
{
550 } __attribute__ ((packed
));
552 struct cmd_ds_802_11_afc
{
560 __le16 timing_offset
; /* signed */
561 __le16 carrier_offset
; /* signed */
564 } __attribute__ ((packed
));
566 struct cmd_tx_rate_query
{
568 } __attribute__ ((packed
));
570 struct cmd_ds_get_tsf
{
572 } __attribute__ ((packed
));
574 struct cmd_ds_bt_access
{
579 } __attribute__ ((packed
));
581 struct cmd_ds_fwt_access
{
599 } __attribute__ ((packed
));
601 struct cmd_ds_mesh_access
{
603 __le32 data
[32]; /* last position reserved */
604 } __attribute__ ((packed
));
606 /* Number of stats counters returned by the firmware */
607 #define MESH_STATS_NUM 8
609 struct cmd_ds_command
{
618 struct cmd_ds_get_hw_spec hwspec
;
619 struct cmd_ds_802_11_ps_mode psmode
;
620 struct cmd_ds_802_11_scan scan
;
621 struct cmd_ds_802_11_scan_rsp scanresp
;
622 struct cmd_ds_mac_control macctrl
;
623 struct cmd_ds_802_11_associate associate
;
624 struct cmd_ds_802_11_deauthenticate deauth
;
625 struct cmd_ds_802_11_set_wep wep
;
626 struct cmd_ds_802_11_ad_hoc_start ads
;
627 struct cmd_ds_802_11_reset reset
;
628 struct cmd_ds_802_11_ad_hoc_result result
;
629 struct cmd_ds_802_11_get_log glog
;
630 struct cmd_ds_802_11_authenticate auth
;
631 struct cmd_ds_802_11_get_stat gstat
;
632 struct cmd_ds_802_3_get_stat gstat_8023
;
633 struct cmd_ds_802_11_snmp_mib smib
;
634 struct cmd_ds_802_11_rf_tx_power txp
;
635 struct cmd_ds_802_11_rf_antenna rant
;
636 struct cmd_ds_802_11_monitor_mode monitor
;
637 struct cmd_ds_802_11_data_rate drate
;
638 struct cmd_ds_802_11_rate_adapt_rateset rateset
;
639 struct cmd_ds_mac_multicast_adr madr
;
640 struct cmd_ds_802_11_ad_hoc_join adj
;
641 struct cmd_ds_802_11_radio_control radio
;
642 struct cmd_ds_802_11_rf_channel rfchannel
;
643 struct cmd_ds_802_11_rssi rssi
;
644 struct cmd_ds_802_11_rssi_rsp rssirsp
;
645 struct cmd_ds_802_11_disassociate dassociate
;
646 struct cmd_ds_802_11_mac_address macadd
;
647 struct cmd_ds_802_11_enable_rsn enbrsn
;
648 struct cmd_ds_802_11_key_material keymaterial
;
649 struct cmd_ds_mac_reg_access macreg
;
650 struct cmd_ds_bbp_reg_access bbpreg
;
651 struct cmd_ds_rf_reg_access rfreg
;
652 struct cmd_ds_802_11_eeprom_access rdeeprom
;
654 struct cmd_ds_802_11d_domain_info domaininfo
;
655 struct cmd_ds_802_11d_domain_info domaininforesp
;
657 struct cmd_ds_802_11_sleep_params sleep_params
;
658 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout
;
659 struct cmd_ds_802_11_tpc_cfg tpccfg
;
660 struct cmd_ds_802_11_pwr_cfg pwrcfg
;
661 struct cmd_ds_802_11_afc afc
;
662 struct cmd_ds_802_11_led_ctrl ledgpio
;
664 struct cmd_tx_rate_query txrate
;
665 struct cmd_ds_bt_access bt
;
666 struct cmd_ds_fwt_access fwt
;
667 struct cmd_ds_mesh_access mesh
;
668 struct cmd_ds_set_boot2_ver boot2_ver
;
669 struct cmd_ds_get_tsf gettsf
;
670 struct cmd_ds_802_11_subscribe_event subscribe_event
;
672 } __attribute__ ((packed
));