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
;
88 * Generic structure to hold all key types. key type (WEP40, WEP104, TKIP, AES)
89 * is determined from the keylength field.
91 struct WLAN_802_11_KEY
{
93 __le32 flags
; /* KEY_INFO_* from wlan_defs.h */
94 u8 key
[MRVL_MAX_KEY_WPA_KEY_LENGTH
];
95 __le16 type
; /* KEY_TYPE_* from wlan_defs.h */
105 /* wlan_offset_value */
106 struct wlan_offset_value
{
111 struct WLAN_802_11_FIXED_IEs
{
113 __le16 beaconinterval
;
114 u16 capabilities
; /* Actually struct ieeetypes_capinfo */
117 struct WLAN_802_11_VARIABLE_IEs
{
123 /* Define general data structure */
132 #define S_DS_GEN sizeof(struct cmd_ds_gen)
134 * Define data structure for cmd_get_hw_spec
135 * This structure defines the response for the GET_HW_SPEC command
137 struct cmd_ds_get_hw_spec
{
138 /* HW Interface version number */
140 /* HW version number */
142 /* Max number of TxPD FW can handle */
144 /* Max no of Multicast address */
152 /* Number of antenna used */
155 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
156 u8 fwreleasenumber
[4];
158 /* Base Address of TxPD queue */
160 /* Read Pointer of RxPd queue */
163 /* Write Pointer of RxPd queue */
166 /*FW/HW capability */
168 } __attribute__ ((packed
));
170 struct cmd_ds_802_11_reset
{
174 struct cmd_ds_802_11_subscribe_event
{
180 * This scan handle Country Information IE(802.11d compliant)
181 * Define data structure for cmd_802_11_scan
183 struct cmd_ds_802_11_scan
{
188 mrvlietypes_ssidparamset_t ssidParamSet
;
189 mrvlietypes_chanlistparamset_t ChanListParamSet
;
190 mrvlietypes_ratesparamset_t OpRateSet
;
194 struct cmd_ds_802_11_scan_rsp
{
195 __le16 bssdescriptsize
;
197 u8 bssdesc_and_tlvbuffer
[1];
200 struct cmd_ds_802_11_get_log
{
213 __le32 wepundecryptable
;
216 struct cmd_ds_mac_control
{
221 struct cmd_ds_mac_multicast_adr
{
224 u8 maclist
[ETH_ALEN
* MRVDRV_MAX_MULTICAST_LIST_SIZE
];
227 struct cmd_ds_802_11_authenticate
{
228 u8 macaddr
[ETH_ALEN
];
233 struct cmd_ds_802_11_deauthenticate
{
238 struct cmd_ds_802_11_associate
{
240 struct ieeetypes_capinfo capinfo
;
241 __le16 listeninterval
;
246 mrvlietypes_ssidparamset_t ssidParamSet
;
247 mrvlietypes_phyparamset_t phyparamset
;
248 mrvlietypes_ssparamset_t ssparamset
;
249 mrvlietypes_ratesparamset_t ratesParamSet
;
251 } __attribute__ ((packed
));
253 struct cmd_ds_802_11_disassociate
{
258 struct cmd_ds_802_11_associate_rsp
{
259 struct ieeetypes_assocrsp assocRsp
;
262 struct cmd_ds_802_11_ad_hoc_result
{
267 struct cmd_ds_802_11_set_wep
{
268 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
271 /* key Index selected for Tx */
274 /* 40, 128bit or TXWEP */
276 u8 keymaterial
[4][16];
279 struct cmd_ds_802_3_get_stat
{
288 struct cmd_ds_802_11_get_stat
{
289 __le32 txfragmentcnt
;
290 __le32 mcasttxframecnt
;
293 __le32 Multipleretrycnt
;
294 __le32 rtssuccesscnt
;
295 __le32 rtsfailurecnt
;
296 __le32 ackfailurecnt
;
297 __le32 frameduplicatecnt
;
298 __le32 rxfragmentcnt
;
299 __le32 mcastrxframecnt
;
301 __le32 bcasttxframecnt
;
302 __le32 bcastrxframecnt
;
305 __le32 wepundecryptable
;
308 struct cmd_ds_802_11_snmp_mib
{
315 struct cmd_ds_mac_reg_map
{
321 struct cmd_ds_bbp_reg_map
{
327 struct cmd_ds_rf_reg_map
{
333 struct cmd_ds_mac_reg_access
{
339 struct cmd_ds_bbp_reg_access
{
346 struct cmd_ds_rf_reg_access
{
353 struct cmd_ds_802_11_radio_control
{
358 struct cmd_ds_802_11_sleep_params
{
359 /* ACT_GET/ACT_SET */
362 /* Sleep clock error in ppm */
365 /* Wakeup offset in usec */
368 /* Clock stabilization time in usec */
371 /* control periodic calibration */
374 /* control the use of external sleep clock */
377 /* reserved field, should be set to zero */
381 struct cmd_ds_802_11_inactivity_timeout
{
382 /* ACT_GET/ACT_SET */
385 /* Inactivity timeout in msec */
389 struct cmd_ds_802_11_rf_channel
{
391 __le16 currentchannel
;
397 struct cmd_ds_802_11_rssi
{
398 /* weighting factor */
406 struct cmd_ds_802_11_rssi_rsp
{
410 __le16 avgnoisefloor
;
413 struct cmd_ds_802_11_mac_address
{
418 struct cmd_ds_802_11_rf_tx_power
{
423 struct cmd_ds_802_11_rf_antenna
{
426 /* Number of antennas or 0xffff(diversity) */
431 struct cmd_ds_802_11_ps_mode
{
433 __le16 nullpktinterval
;
436 __le16 locallisteninterval
;
439 struct PS_CMD_ConfirmSleep
{
449 __le16 locallisteninterval
;
452 struct cmd_ds_802_11_data_rate
{
455 u8 datarate
[G_SUPPORTED_RATES
];
458 struct cmd_ds_802_11_rate_adapt_rateset
{
464 struct cmd_ds_802_11_ad_hoc_start
{
465 u8 SSID
[IW_ESSID_MAX_SIZE
];
469 union IEEEtypes_ssparamset ssparamset
;
470 union ieeetypes_phyparamset phyparamset
;
472 struct ieeetypes_capinfo cap
;
473 u8 datarate
[G_SUPPORTED_RATES
];
474 u8 tlv_memory_size_pad
[100];
475 } __attribute__ ((packed
));
477 struct adhoc_bssdesc
{
485 union ieeetypes_phyparamset phyparamset
;
486 union IEEEtypes_ssparamset ssparamset
;
487 struct ieeetypes_capinfo cap
;
488 u8 datarates
[G_SUPPORTED_RATES
];
490 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
491 * Adhoc join command and will cause a binary layout mismatch with
494 } __attribute__ ((packed
));
496 struct cmd_ds_802_11_ad_hoc_join
{
497 struct adhoc_bssdesc bssdescriptor
;
501 } __attribute__ ((packed
));
503 struct cmd_ds_802_11_enable_rsn
{
506 } __attribute__ ((packed
));
508 struct MrvlIEtype_keyParamSet
{
512 /* length of Payload */
515 /* type of key: WEP=0, TKIP=1, AES=2 */
518 /* key control Info specific to a keytypeid */
524 /* key material of size keylen */
528 struct cmd_ds_802_11_key_material
{
530 struct MrvlIEtype_keyParamSet keyParamSet
[2];
531 } __attribute__ ((packed
));
533 struct cmd_ds_802_11_eeprom_access
{
540 } __attribute__ ((packed
));
542 struct cmd_ds_802_11_tpc_cfg
{
549 } __attribute__ ((packed
));
551 struct cmd_ds_802_11_led_ctrl
{
555 } __attribute__ ((packed
));
557 struct cmd_ds_802_11_pwr_cfg
{
563 } __attribute__ ((packed
));
565 struct cmd_ds_802_11_afc
{
573 __le16 timing_offset
; /* signed */
574 __le16 carrier_offset
; /* signed */
577 } __attribute__ ((packed
));
579 struct cmd_tx_rate_query
{
581 } __attribute__ ((packed
));
583 struct cmd_ds_get_tsf
{
585 } __attribute__ ((packed
));
587 struct cmd_ds_bt_access
{
592 } __attribute__ ((packed
));
594 struct cmd_ds_fwt_access
{
612 } __attribute__ ((packed
));
614 struct cmd_ds_mesh_access
{
616 __le32 data
[32]; /* last position reserved */
617 } __attribute__ ((packed
));
619 /* Number of stats counters returned by the firmware */
620 #define MESH_STATS_NUM 8
622 struct cmd_ds_command
{
631 struct cmd_ds_get_hw_spec hwspec
;
632 struct cmd_ds_802_11_ps_mode psmode
;
633 struct cmd_ds_802_11_scan scan
;
634 struct cmd_ds_802_11_scan_rsp scanresp
;
635 struct cmd_ds_mac_control macctrl
;
636 struct cmd_ds_802_11_associate associate
;
637 struct cmd_ds_802_11_deauthenticate deauth
;
638 struct cmd_ds_802_11_set_wep wep
;
639 struct cmd_ds_802_11_ad_hoc_start ads
;
640 struct cmd_ds_802_11_reset reset
;
641 struct cmd_ds_802_11_ad_hoc_result result
;
642 struct cmd_ds_802_11_get_log glog
;
643 struct cmd_ds_802_11_authenticate auth
;
644 struct cmd_ds_802_11_get_stat gstat
;
645 struct cmd_ds_802_3_get_stat gstat_8023
;
646 struct cmd_ds_802_11_snmp_mib smib
;
647 struct cmd_ds_802_11_rf_tx_power txp
;
648 struct cmd_ds_802_11_rf_antenna rant
;
649 struct cmd_ds_802_11_data_rate drate
;
650 struct cmd_ds_802_11_rate_adapt_rateset rateset
;
651 struct cmd_ds_mac_multicast_adr madr
;
652 struct cmd_ds_802_11_ad_hoc_join adj
;
653 struct cmd_ds_802_11_radio_control radio
;
654 struct cmd_ds_802_11_rf_channel rfchannel
;
655 struct cmd_ds_802_11_rssi rssi
;
656 struct cmd_ds_802_11_rssi_rsp rssirsp
;
657 struct cmd_ds_802_11_disassociate dassociate
;
658 struct cmd_ds_802_11_mac_address macadd
;
659 struct cmd_ds_802_11_enable_rsn enbrsn
;
660 struct cmd_ds_802_11_key_material keymaterial
;
661 struct cmd_ds_mac_reg_access macreg
;
662 struct cmd_ds_bbp_reg_access bbpreg
;
663 struct cmd_ds_rf_reg_access rfreg
;
664 struct cmd_ds_802_11_eeprom_access rdeeprom
;
666 struct cmd_ds_802_11d_domain_info domaininfo
;
667 struct cmd_ds_802_11d_domain_info domaininforesp
;
669 struct cmd_ds_802_11_sleep_params sleep_params
;
670 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout
;
671 struct cmd_ds_802_11_tpc_cfg tpccfg
;
672 struct cmd_ds_802_11_pwr_cfg pwrcfg
;
673 struct cmd_ds_802_11_afc afc
;
674 struct cmd_ds_802_11_led_ctrl ledgpio
;
676 struct cmd_tx_rate_query txrate
;
677 struct cmd_ds_bt_access bt
;
678 struct cmd_ds_fwt_access fwt
;
679 struct cmd_ds_mesh_access mesh
;
680 struct cmd_ds_get_tsf gettsf
;
681 struct cmd_ds_802_11_subscribe_event subscribe_event
;
683 } __attribute__ ((packed
));