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 */
73 } __attribute__ ((packed
));
75 struct cmd_ctrl_node
{
76 struct list_head list
;
77 /* wait for finish or not */
79 /* command response */
81 int (*callback
)(struct lbs_private
*, unsigned long, struct cmd_header
*);
82 unsigned long callback_arg
;
84 struct cmd_header
*cmdbuf
;
87 wait_queue_head_t cmdwait_q
;
90 /* Generic structure to hold all key types. */
93 u16 flags
; /* KEY_INFO_* from defs.h */
94 u16 type
; /* KEY_TYPE_* from defs.h */
98 /* lbs_offset_value */
99 struct lbs_offset_value
{
104 /* Define general data structure */
114 #define S_DS_GEN sizeof(struct cmd_ds_gen)
118 * Define data structure for CMD_GET_HW_SPEC
119 * This structure defines the response for the GET_HW_SPEC command
121 struct cmd_ds_get_hw_spec
{
122 struct cmd_header hdr
;
124 /* HW Interface version number */
126 /* HW version number */
128 /* Max number of TxPD FW can handle */
130 /* Max no of Multicast address */
138 /* Number of antenna used */
141 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
142 u8 fwreleasenumber
[4];
144 /* Base Address of TxPD queue */
146 /* Read Pointer of RxPd queue */
149 /* Write Pointer of RxPd queue */
152 /*FW/HW capability */
154 } __attribute__ ((packed
));
156 struct cmd_ds_802_11_reset
{
160 struct cmd_ds_802_11_subscribe_event
{
164 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
165 * number of TLVs. From the v5.1 manual, those TLVs would add up to
166 * 40 bytes. However, future firmware might add additional TLVs, so I
167 * bump this up a bit.
173 * This scan handle Country Information IE(802.11d compliant)
174 * Define data structure for CMD_802_11_SCAN
176 struct cmd_ds_802_11_scan
{
181 mrvlietypes_ssidparamset_t ssidParamSet
;
182 mrvlietypes_chanlistparamset_t ChanListParamSet
;
183 mrvlietypes_ratesparamset_t OpRateSet
;
187 struct cmd_ds_802_11_scan_rsp
{
188 __le16 bssdescriptsize
;
190 u8 bssdesc_and_tlvbuffer
[1];
193 struct cmd_ds_802_11_get_log
{
206 __le32 wepundecryptable
;
209 struct cmd_ds_mac_control
{
214 struct cmd_ds_mac_multicast_adr
{
217 u8 maclist
[ETH_ALEN
* MRVDRV_MAX_MULTICAST_LIST_SIZE
];
220 struct cmd_ds_802_11_authenticate
{
221 u8 macaddr
[ETH_ALEN
];
226 struct cmd_ds_802_11_deauthenticate
{
231 struct cmd_ds_802_11_associate
{
234 __le16 listeninterval
;
239 mrvlietypes_ssidparamset_t ssidParamSet
;
240 mrvlietypes_phyparamset_t phyparamset
;
241 mrvlietypes_ssparamset_t ssparamset
;
242 mrvlietypes_ratesparamset_t ratesParamSet
;
244 } __attribute__ ((packed
));
246 struct cmd_ds_802_11_disassociate
{
251 struct cmd_ds_802_11_associate_rsp
{
252 struct ieeetypes_assocrsp assocRsp
;
255 struct cmd_ds_802_11_ad_hoc_result
{
260 struct cmd_ds_802_11_set_wep
{
261 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
264 /* key Index selected for Tx */
267 /* 40, 128bit or TXWEP */
269 u8 keymaterial
[4][16];
272 struct cmd_ds_802_3_get_stat
{
281 struct cmd_ds_802_11_get_stat
{
282 __le32 txfragmentcnt
;
283 __le32 mcasttxframecnt
;
286 __le32 Multipleretrycnt
;
287 __le32 rtssuccesscnt
;
288 __le32 rtsfailurecnt
;
289 __le32 ackfailurecnt
;
290 __le32 frameduplicatecnt
;
291 __le32 rxfragmentcnt
;
292 __le32 mcastrxframecnt
;
294 __le32 bcasttxframecnt
;
295 __le32 bcastrxframecnt
;
298 __le32 wepundecryptable
;
301 struct cmd_ds_802_11_snmp_mib
{
308 struct cmd_ds_mac_reg_map
{
314 struct cmd_ds_bbp_reg_map
{
320 struct cmd_ds_rf_reg_map
{
326 struct cmd_ds_mac_reg_access
{
332 struct cmd_ds_bbp_reg_access
{
339 struct cmd_ds_rf_reg_access
{
346 struct cmd_ds_802_11_radio_control
{
351 struct cmd_ds_802_11_beacon_control
{
353 __le16 beacon_enable
;
354 __le16 beacon_period
;
357 struct cmd_ds_802_11_sleep_params
{
358 /* ACT_GET/ACT_SET */
361 /* Sleep clock error in ppm */
364 /* Wakeup offset in usec */
367 /* Clock stabilization time in usec */
370 /* control periodic calibration */
373 /* control the use of external sleep clock */
376 /* reserved field, should be set to zero */
380 struct cmd_ds_802_11_inactivity_timeout
{
381 /* ACT_GET/ACT_SET */
384 /* Inactivity timeout in msec */
388 struct cmd_ds_802_11_rf_channel
{
389 struct cmd_header hdr
;
393 __le16 rftype
; /* unused */
394 __le16 reserved
; /* unused */
395 u8 channellist
[32]; /* unused */
398 struct cmd_ds_802_11_rssi
{
399 /* weighting factor */
407 struct cmd_ds_802_11_rssi_rsp
{
411 __le16 avgnoisefloor
;
414 struct cmd_ds_802_11_mac_address
{
419 struct cmd_ds_802_11_rf_tx_power
{
424 struct cmd_ds_802_11_rf_antenna
{
427 /* Number of antennas or 0xffff(diversity) */
432 struct cmd_ds_802_11_monitor_mode
{
437 struct cmd_ds_set_boot2_ver
{
438 struct cmd_header hdr
;
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
{
466 struct cmd_header hdr
;
473 struct cmd_ds_802_11_rate_adapt_rateset
{
479 struct cmd_ds_802_11_ad_hoc_start
{
480 u8 ssid
[IW_ESSID_MAX_SIZE
];
484 union IEEEtypes_ssparamset ssparamset
;
485 union ieeetypes_phyparamset phyparamset
;
489 u8 tlv_memory_size_pad
[100];
490 } __attribute__ ((packed
));
492 struct adhoc_bssdesc
{
500 union ieeetypes_phyparamset phyparamset
;
501 union IEEEtypes_ssparamset ssparamset
;
505 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
506 * Adhoc join command and will cause a binary layout mismatch with
509 } __attribute__ ((packed
));
511 struct cmd_ds_802_11_ad_hoc_join
{
512 struct adhoc_bssdesc bss
;
516 } __attribute__ ((packed
));
518 struct cmd_ds_802_11_enable_rsn
{
521 } __attribute__ ((packed
));
523 struct MrvlIEtype_keyParamSet
{
527 /* length of Payload */
530 /* type of key: WEP=0, TKIP=1, AES=2 */
533 /* key control Info specific to a keytypeid */
539 /* key material of size keylen */
543 struct cmd_ds_802_11_key_material
{
545 struct MrvlIEtype_keyParamSet keyParamSet
[2];
546 } __attribute__ ((packed
));
548 struct cmd_ds_802_11_eeprom_access
{
555 } __attribute__ ((packed
));
557 struct cmd_ds_802_11_tpc_cfg
{
564 } __attribute__ ((packed
));
566 struct cmd_ds_802_11_led_ctrl
{
570 } __attribute__ ((packed
));
572 struct cmd_ds_802_11_pwr_cfg
{
578 } __attribute__ ((packed
));
580 struct cmd_ds_802_11_afc
{
588 __le16 timing_offset
; /* signed */
589 __le16 carrier_offset
; /* signed */
592 } __attribute__ ((packed
));
594 struct cmd_tx_rate_query
{
596 } __attribute__ ((packed
));
598 struct cmd_ds_get_tsf
{
600 } __attribute__ ((packed
));
602 struct cmd_ds_bt_access
{
607 } __attribute__ ((packed
));
609 struct cmd_ds_fwt_access
{
627 } __attribute__ ((packed
));
630 struct cmd_ds_mesh_config
{
631 struct cmd_header hdr
;
637 u8 data
[128]; /* last position reserved */
638 } __attribute__ ((packed
));
641 struct cmd_ds_mesh_access
{
642 struct cmd_header hdr
;
645 __le32 data
[32]; /* last position reserved */
646 } __attribute__ ((packed
));
648 /* Number of stats counters returned by the firmware */
649 #define MESH_STATS_NUM 8
651 struct cmd_ds_command
{
660 struct cmd_ds_802_11_ps_mode psmode
;
661 struct cmd_ds_802_11_scan scan
;
662 struct cmd_ds_802_11_scan_rsp scanresp
;
663 struct cmd_ds_mac_control macctrl
;
664 struct cmd_ds_802_11_associate associate
;
665 struct cmd_ds_802_11_deauthenticate deauth
;
666 struct cmd_ds_802_11_set_wep wep
;
667 struct cmd_ds_802_11_ad_hoc_start ads
;
668 struct cmd_ds_802_11_reset reset
;
669 struct cmd_ds_802_11_ad_hoc_result result
;
670 struct cmd_ds_802_11_get_log glog
;
671 struct cmd_ds_802_11_authenticate auth
;
672 struct cmd_ds_802_11_get_stat gstat
;
673 struct cmd_ds_802_3_get_stat gstat_8023
;
674 struct cmd_ds_802_11_snmp_mib smib
;
675 struct cmd_ds_802_11_rf_tx_power txp
;
676 struct cmd_ds_802_11_rf_antenna rant
;
677 struct cmd_ds_802_11_monitor_mode monitor
;
678 struct cmd_ds_802_11_rate_adapt_rateset rateset
;
679 struct cmd_ds_mac_multicast_adr madr
;
680 struct cmd_ds_802_11_ad_hoc_join adj
;
681 struct cmd_ds_802_11_radio_control radio
;
682 struct cmd_ds_802_11_rf_channel rfchannel
;
683 struct cmd_ds_802_11_rssi rssi
;
684 struct cmd_ds_802_11_rssi_rsp rssirsp
;
685 struct cmd_ds_802_11_disassociate dassociate
;
686 struct cmd_ds_802_11_mac_address macadd
;
687 struct cmd_ds_802_11_enable_rsn enbrsn
;
688 struct cmd_ds_802_11_key_material keymaterial
;
689 struct cmd_ds_mac_reg_access macreg
;
690 struct cmd_ds_bbp_reg_access bbpreg
;
691 struct cmd_ds_rf_reg_access rfreg
;
692 struct cmd_ds_802_11_eeprom_access rdeeprom
;
694 struct cmd_ds_802_11d_domain_info domaininfo
;
695 struct cmd_ds_802_11d_domain_info domaininforesp
;
697 struct cmd_ds_802_11_sleep_params sleep_params
;
698 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout
;
699 struct cmd_ds_802_11_tpc_cfg tpccfg
;
700 struct cmd_ds_802_11_pwr_cfg pwrcfg
;
701 struct cmd_ds_802_11_afc afc
;
702 struct cmd_ds_802_11_led_ctrl ledgpio
;
704 struct cmd_tx_rate_query txrate
;
705 struct cmd_ds_bt_access bt
;
706 struct cmd_ds_fwt_access fwt
;
707 struct cmd_ds_get_tsf gettsf
;
708 struct cmd_ds_802_11_subscribe_event subscribe_event
;
709 struct cmd_ds_802_11_beacon_control bcn_ctrl
;
711 } __attribute__ ((packed
));