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 struct WLAN_802_11_SSID
{
109 /* SSID information field */
110 u8 ssid
[IW_ESSID_MAX_SIZE
];
113 struct WPA_SUPPLICANT
{
118 /* wlan_offset_value */
119 struct wlan_offset_value
{
124 struct WLAN_802_11_FIXED_IEs
{
126 __le16 beaconinterval
;
127 u16 capabilities
; /* Actually struct ieeetypes_capinfo */
130 struct WLAN_802_11_VARIABLE_IEs
{
136 /* Define general data structure */
145 #define S_DS_GEN sizeof(struct cmd_ds_gen)
147 * Define data structure for cmd_get_hw_spec
148 * This structure defines the response for the GET_HW_SPEC command
150 struct cmd_ds_get_hw_spec
{
151 /* HW Interface version number */
153 /* HW version number */
155 /* Max number of TxPD FW can handle */
157 /* Max no of Multicast address */
165 /* Number of antenna used */
168 /* FW release number, example 0x1234=1.2.3.4 */
169 __le32 fwreleasenumber
;
171 /* Base Address of TxPD queue */
173 /* Read Pointer of RxPd queue */
176 /* Write Pointer of RxPd queue */
179 /*FW/HW capability */
181 } __attribute__ ((packed
));
183 struct cmd_ds_802_11_reset
{
187 struct cmd_ds_802_11_subscribe_event
{
193 * This scan handle Country Information IE(802.11d compliant)
194 * Define data structure for cmd_802_11_scan
196 struct cmd_ds_802_11_scan
{
201 mrvlietypes_ssidparamset_t ssidParamSet
;
202 mrvlietypes_chanlistparamset_t ChanListParamSet
;
203 mrvlietypes_ratesparamset_t OpRateSet
;
207 struct cmd_ds_802_11_scan_rsp
{
208 __le16 bssdescriptsize
;
210 u8 bssdesc_and_tlvbuffer
[1];
213 struct cmd_ds_802_11_get_log
{
226 __le32 wepundecryptable
;
229 struct cmd_ds_mac_control
{
234 struct cmd_ds_mac_multicast_adr
{
237 u8 maclist
[ETH_ALEN
* MRVDRV_MAX_MULTICAST_LIST_SIZE
];
240 struct cmd_ds_802_11_authenticate
{
241 u8 macaddr
[ETH_ALEN
];
246 struct cmd_ds_802_11_deauthenticate
{
251 struct cmd_ds_802_11_associate
{
253 struct ieeetypes_capinfo capinfo
;
254 __le16 listeninterval
;
259 mrvlietypes_ssidparamset_t ssidParamSet
;
260 mrvlietypes_phyparamset_t phyparamset
;
261 mrvlietypes_ssparamset_t ssparamset
;
262 mrvlietypes_ratesparamset_t ratesParamSet
;
264 } __attribute__ ((packed
));
266 struct cmd_ds_802_11_disassociate
{
271 struct cmd_ds_802_11_associate_rsp
{
272 struct ieeetypes_assocrsp assocRsp
;
275 struct cmd_ds_802_11_ad_hoc_result
{
280 struct cmd_ds_802_11_set_wep
{
281 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
284 /* key Index selected for Tx */
287 /* 40, 128bit or TXWEP */
289 u8 keymaterial
[4][16];
292 struct cmd_ds_802_3_get_stat
{
301 struct cmd_ds_802_11_get_stat
{
302 __le32 txfragmentcnt
;
303 __le32 mcasttxframecnt
;
306 __le32 Multipleretrycnt
;
307 __le32 rtssuccesscnt
;
308 __le32 rtsfailurecnt
;
309 __le32 ackfailurecnt
;
310 __le32 frameduplicatecnt
;
311 __le32 rxfragmentcnt
;
312 __le32 mcastrxframecnt
;
314 __le32 bcasttxframecnt
;
315 __le32 bcastrxframecnt
;
318 __le32 wepundecryptable
;
321 struct cmd_ds_802_11_snmp_mib
{
328 struct cmd_ds_mac_reg_map
{
334 struct cmd_ds_bbp_reg_map
{
340 struct cmd_ds_rf_reg_map
{
346 struct cmd_ds_mac_reg_access
{
352 struct cmd_ds_bbp_reg_access
{
359 struct cmd_ds_rf_reg_access
{
366 struct cmd_ds_802_11_radio_control
{
371 struct cmd_ds_802_11_sleep_params
{
372 /* ACT_GET/ACT_SET */
375 /* Sleep clock error in ppm */
378 /* Wakeup offset in usec */
381 /* Clock stabilization time in usec */
384 /* control periodic calibration */
387 /* control the use of external sleep clock */
390 /* reserved field, should be set to zero */
394 struct cmd_ds_802_11_inactivity_timeout
{
395 /* ACT_GET/ACT_SET */
398 /* Inactivity timeout in msec */
402 struct cmd_ds_802_11_rf_channel
{
404 __le16 currentchannel
;
410 struct cmd_ds_802_11_rssi
{
411 /* weighting factor */
419 struct cmd_ds_802_11_rssi_rsp
{
423 __le16 avgnoisefloor
;
426 struct cmd_ds_802_11_mac_address
{
431 struct cmd_ds_802_11_rf_tx_power
{
436 struct cmd_ds_802_11_rf_antenna
{
439 /* Number of antennas or 0xffff(diversity) */
444 struct cmd_ds_802_11_ps_mode
{
446 __le16 nullpktinterval
;
449 __le16 locallisteninterval
;
452 struct PS_CMD_ConfirmSleep
{
462 __le16 locallisteninterval
;
465 struct cmd_ds_802_11_data_rate
{
468 u8 datarate
[G_SUPPORTED_RATES
];
471 struct cmd_ds_802_11_rate_adapt_rateset
{
477 struct cmd_ds_802_11_ad_hoc_start
{
478 u8 SSID
[IW_ESSID_MAX_SIZE
];
482 union IEEEtypes_ssparamset ssparamset
;
483 union ieeetypes_phyparamset phyparamset
;
485 struct ieeetypes_capinfo cap
;
486 u8 datarate
[G_SUPPORTED_RATES
];
487 u8 tlv_memory_size_pad
[100];
488 } __attribute__ ((packed
));
490 struct adhoc_bssdesc
{
498 union ieeetypes_phyparamset phyparamset
;
499 union IEEEtypes_ssparamset ssparamset
;
500 struct ieeetypes_capinfo cap
;
501 u8 datarates
[G_SUPPORTED_RATES
];
503 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
504 * Adhoc join command and will cause a binary layout mismatch with
507 } __attribute__ ((packed
));
509 struct cmd_ds_802_11_ad_hoc_join
{
510 struct adhoc_bssdesc bssdescriptor
;
514 } __attribute__ ((packed
));
516 struct cmd_ds_802_11_enable_rsn
{
521 struct MrvlIEtype_keyParamSet
{
525 /* length of Payload */
528 /* type of key: WEP=0, TKIP=1, AES=2 */
531 /* key control Info specific to a keytypeid */
537 /* key material of size keylen */
541 struct cmd_ds_802_11_key_material
{
543 struct MrvlIEtype_keyParamSet keyParamSet
[2];
544 } __attribute__ ((packed
));
546 struct cmd_ds_802_11_eeprom_access
{
553 } __attribute__ ((packed
));
555 struct cmd_ds_802_11_tpc_cfg
{
562 } __attribute__ ((packed
));
564 struct cmd_ds_802_11_led_ctrl
{
568 } __attribute__ ((packed
));
570 struct cmd_ds_802_11_pwr_cfg
{
576 } __attribute__ ((packed
));
578 struct cmd_ds_802_11_afc
{
586 __le16 timing_offset
; /* signed */
587 __le16 carrier_offset
; /* signed */
590 } __attribute__ ((packed
));
592 struct cmd_tx_rate_query
{
594 } __attribute__ ((packed
));
596 struct cmd_ds_get_tsf
{
598 } __attribute__ ((packed
));
600 struct cmd_ds_bt_access
{
605 } __attribute__ ((packed
));
607 struct cmd_ds_fwt_access
{
625 } __attribute__ ((packed
));
627 struct cmd_ds_mesh_access
{
629 __le32 data
[32]; /* last position reserved */
630 } __attribute__ ((packed
));
632 /* Number of stats counters returned by the firmware */
633 #define MESH_STATS_NUM 8
635 struct cmd_ds_command
{
644 struct cmd_ds_get_hw_spec hwspec
;
645 struct cmd_ds_802_11_ps_mode psmode
;
646 struct cmd_ds_802_11_scan scan
;
647 struct cmd_ds_802_11_scan_rsp scanresp
;
648 struct cmd_ds_mac_control macctrl
;
649 struct cmd_ds_802_11_associate associate
;
650 struct cmd_ds_802_11_deauthenticate deauth
;
651 struct cmd_ds_802_11_set_wep wep
;
652 struct cmd_ds_802_11_ad_hoc_start ads
;
653 struct cmd_ds_802_11_reset reset
;
654 struct cmd_ds_802_11_ad_hoc_result result
;
655 struct cmd_ds_802_11_get_log glog
;
656 struct cmd_ds_802_11_authenticate auth
;
657 struct cmd_ds_802_11_get_stat gstat
;
658 struct cmd_ds_802_3_get_stat gstat_8023
;
659 struct cmd_ds_802_11_snmp_mib smib
;
660 struct cmd_ds_802_11_rf_tx_power txp
;
661 struct cmd_ds_802_11_rf_antenna rant
;
662 struct cmd_ds_802_11_data_rate drate
;
663 struct cmd_ds_802_11_rate_adapt_rateset rateset
;
664 struct cmd_ds_mac_multicast_adr madr
;
665 struct cmd_ds_802_11_ad_hoc_join adj
;
666 struct cmd_ds_802_11_radio_control radio
;
667 struct cmd_ds_802_11_rf_channel rfchannel
;
668 struct cmd_ds_802_11_rssi rssi
;
669 struct cmd_ds_802_11_rssi_rsp rssirsp
;
670 struct cmd_ds_802_11_disassociate dassociate
;
671 struct cmd_ds_802_11_mac_address macadd
;
672 struct cmd_ds_802_11_enable_rsn enbrsn
;
673 struct cmd_ds_802_11_key_material keymaterial
;
674 struct cmd_ds_mac_reg_access macreg
;
675 struct cmd_ds_bbp_reg_access bbpreg
;
676 struct cmd_ds_rf_reg_access rfreg
;
677 struct cmd_ds_802_11_eeprom_access rdeeprom
;
679 struct cmd_ds_802_11d_domain_info domaininfo
;
680 struct cmd_ds_802_11d_domain_info domaininforesp
;
682 struct cmd_ds_802_11_sleep_params sleep_params
;
683 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout
;
684 struct cmd_ds_802_11_tpc_cfg tpccfg
;
685 struct cmd_ds_802_11_pwr_cfg pwrcfg
;
686 struct cmd_ds_802_11_afc afc
;
687 struct cmd_ds_802_11_led_ctrl ledgpio
;
689 struct cmd_tx_rate_query txrate
;
690 struct cmd_ds_bt_access bt
;
691 struct cmd_ds_fwt_access fwt
;
692 struct cmd_ds_mesh_access mesh
;
693 struct cmd_ds_get_tsf gettsf
;
694 struct cmd_ds_802_11_subscribe_event subscribe_event
;
696 } __attribute__ ((packed
));