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
;
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 /* HW Interface version number */
124 /* HW version number */
126 /* Max number of TxPD FW can handle */
128 /* Max no of Multicast address */
136 /* Number of antenna used */
139 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
140 u8 fwreleasenumber
[4];
142 /* Base Address of TxPD queue */
144 /* Read Pointer of RxPd queue */
147 /* Write Pointer of RxPd queue */
150 /*FW/HW capability */
152 } __attribute__ ((packed
));
154 struct cmd_ds_802_11_reset
{
158 struct cmd_ds_802_11_subscribe_event
{
162 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
163 * number of TLVs. From the v5.1 manual, those TLVs would add up to
164 * 40 bytes. However, future firmware might add additional TLVs, so I
165 * bump this up a bit.
171 * This scan handle Country Information IE(802.11d compliant)
172 * Define data structure for CMD_802_11_SCAN
174 struct cmd_ds_802_11_scan
{
179 mrvlietypes_ssidparamset_t ssidParamSet
;
180 mrvlietypes_chanlistparamset_t ChanListParamSet
;
181 mrvlietypes_ratesparamset_t OpRateSet
;
185 struct cmd_ds_802_11_scan_rsp
{
186 __le16 bssdescriptsize
;
188 u8 bssdesc_and_tlvbuffer
[1];
191 struct cmd_ds_802_11_get_log
{
204 __le32 wepundecryptable
;
207 struct cmd_ds_mac_control
{
212 struct cmd_ds_mac_multicast_adr
{
215 u8 maclist
[ETH_ALEN
* MRVDRV_MAX_MULTICAST_LIST_SIZE
];
218 struct cmd_ds_802_11_authenticate
{
219 u8 macaddr
[ETH_ALEN
];
224 struct cmd_ds_802_11_deauthenticate
{
229 struct cmd_ds_802_11_associate
{
232 __le16 listeninterval
;
237 mrvlietypes_ssidparamset_t ssidParamSet
;
238 mrvlietypes_phyparamset_t phyparamset
;
239 mrvlietypes_ssparamset_t ssparamset
;
240 mrvlietypes_ratesparamset_t ratesParamSet
;
242 } __attribute__ ((packed
));
244 struct cmd_ds_802_11_disassociate
{
249 struct cmd_ds_802_11_associate_rsp
{
250 struct ieeetypes_assocrsp assocRsp
;
253 struct cmd_ds_802_11_ad_hoc_result
{
258 struct cmd_ds_802_11_set_wep
{
259 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
262 /* key Index selected for Tx */
265 /* 40, 128bit or TXWEP */
267 u8 keymaterial
[4][16];
270 struct cmd_ds_802_3_get_stat
{
279 struct cmd_ds_802_11_get_stat
{
280 __le32 txfragmentcnt
;
281 __le32 mcasttxframecnt
;
284 __le32 Multipleretrycnt
;
285 __le32 rtssuccesscnt
;
286 __le32 rtsfailurecnt
;
287 __le32 ackfailurecnt
;
288 __le32 frameduplicatecnt
;
289 __le32 rxfragmentcnt
;
290 __le32 mcastrxframecnt
;
292 __le32 bcasttxframecnt
;
293 __le32 bcastrxframecnt
;
296 __le32 wepundecryptable
;
299 struct cmd_ds_802_11_snmp_mib
{
306 struct cmd_ds_mac_reg_map
{
312 struct cmd_ds_bbp_reg_map
{
318 struct cmd_ds_rf_reg_map
{
324 struct cmd_ds_mac_reg_access
{
330 struct cmd_ds_bbp_reg_access
{
337 struct cmd_ds_rf_reg_access
{
344 struct cmd_ds_802_11_radio_control
{
349 struct cmd_ds_802_11_beacon_control
{
351 __le16 beacon_enable
;
352 __le16 beacon_period
;
355 struct cmd_ds_802_11_sleep_params
{
356 /* ACT_GET/ACT_SET */
359 /* Sleep clock error in ppm */
362 /* Wakeup offset in usec */
365 /* Clock stabilization time in usec */
368 /* control periodic calibration */
371 /* control the use of external sleep clock */
374 /* reserved field, should be set to zero */
378 struct cmd_ds_802_11_inactivity_timeout
{
379 /* ACT_GET/ACT_SET */
382 /* Inactivity timeout in msec */
386 struct cmd_ds_802_11_rf_channel
{
388 __le16 currentchannel
;
394 struct cmd_ds_802_11_rssi
{
395 /* weighting factor */
403 struct cmd_ds_802_11_rssi_rsp
{
407 __le16 avgnoisefloor
;
410 struct cmd_ds_802_11_mac_address
{
415 struct cmd_ds_802_11_rf_tx_power
{
420 struct cmd_ds_802_11_rf_antenna
{
423 /* Number of antennas or 0xffff(diversity) */
428 struct cmd_ds_802_11_monitor_mode
{
433 struct cmd_ds_set_boot2_ver
{
434 struct cmd_header hdr
;
440 struct cmd_ds_802_11_ps_mode
{
442 __le16 nullpktinterval
;
445 __le16 locallisteninterval
;
448 struct PS_CMD_ConfirmSleep
{
458 __le16 locallisteninterval
;
461 struct cmd_ds_802_11_data_rate
{
467 struct cmd_ds_802_11_rate_adapt_rateset
{
473 struct cmd_ds_802_11_ad_hoc_start
{
474 u8 ssid
[IW_ESSID_MAX_SIZE
];
478 union IEEEtypes_ssparamset ssparamset
;
479 union ieeetypes_phyparamset phyparamset
;
483 u8 tlv_memory_size_pad
[100];
484 } __attribute__ ((packed
));
486 struct adhoc_bssdesc
{
494 union ieeetypes_phyparamset phyparamset
;
495 union IEEEtypes_ssparamset ssparamset
;
499 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
500 * Adhoc join command and will cause a binary layout mismatch with
503 } __attribute__ ((packed
));
505 struct cmd_ds_802_11_ad_hoc_join
{
506 struct adhoc_bssdesc bss
;
510 } __attribute__ ((packed
));
512 struct cmd_ds_802_11_enable_rsn
{
515 } __attribute__ ((packed
));
517 struct MrvlIEtype_keyParamSet
{
521 /* length of Payload */
524 /* type of key: WEP=0, TKIP=1, AES=2 */
527 /* key control Info specific to a keytypeid */
533 /* key material of size keylen */
537 struct cmd_ds_802_11_key_material
{
539 struct MrvlIEtype_keyParamSet keyParamSet
[2];
540 } __attribute__ ((packed
));
542 struct cmd_ds_802_11_eeprom_access
{
549 } __attribute__ ((packed
));
551 struct cmd_ds_802_11_tpc_cfg
{
558 } __attribute__ ((packed
));
560 struct cmd_ds_802_11_led_ctrl
{
564 } __attribute__ ((packed
));
566 struct cmd_ds_802_11_pwr_cfg
{
572 } __attribute__ ((packed
));
574 struct cmd_ds_802_11_afc
{
582 __le16 timing_offset
; /* signed */
583 __le16 carrier_offset
; /* signed */
586 } __attribute__ ((packed
));
588 struct cmd_tx_rate_query
{
590 } __attribute__ ((packed
));
592 struct cmd_ds_get_tsf
{
594 } __attribute__ ((packed
));
596 struct cmd_ds_bt_access
{
601 } __attribute__ ((packed
));
603 struct cmd_ds_fwt_access
{
621 } __attribute__ ((packed
));
623 struct cmd_ds_mesh_access
{
625 __le32 data
[32]; /* last position reserved */
626 } __attribute__ ((packed
));
628 /* Number of stats counters returned by the firmware */
629 #define MESH_STATS_NUM 8
631 struct cmd_ds_command
{
640 struct cmd_ds_get_hw_spec hwspec
;
641 struct cmd_ds_802_11_ps_mode psmode
;
642 struct cmd_ds_802_11_scan scan
;
643 struct cmd_ds_802_11_scan_rsp scanresp
;
644 struct cmd_ds_mac_control macctrl
;
645 struct cmd_ds_802_11_associate associate
;
646 struct cmd_ds_802_11_deauthenticate deauth
;
647 struct cmd_ds_802_11_set_wep wep
;
648 struct cmd_ds_802_11_ad_hoc_start ads
;
649 struct cmd_ds_802_11_reset reset
;
650 struct cmd_ds_802_11_ad_hoc_result result
;
651 struct cmd_ds_802_11_get_log glog
;
652 struct cmd_ds_802_11_authenticate auth
;
653 struct cmd_ds_802_11_get_stat gstat
;
654 struct cmd_ds_802_3_get_stat gstat_8023
;
655 struct cmd_ds_802_11_snmp_mib smib
;
656 struct cmd_ds_802_11_rf_tx_power txp
;
657 struct cmd_ds_802_11_rf_antenna rant
;
658 struct cmd_ds_802_11_monitor_mode monitor
;
659 struct cmd_ds_802_11_data_rate drate
;
660 struct cmd_ds_802_11_rate_adapt_rateset rateset
;
661 struct cmd_ds_mac_multicast_adr madr
;
662 struct cmd_ds_802_11_ad_hoc_join adj
;
663 struct cmd_ds_802_11_radio_control radio
;
664 struct cmd_ds_802_11_rf_channel rfchannel
;
665 struct cmd_ds_802_11_rssi rssi
;
666 struct cmd_ds_802_11_rssi_rsp rssirsp
;
667 struct cmd_ds_802_11_disassociate dassociate
;
668 struct cmd_ds_802_11_mac_address macadd
;
669 struct cmd_ds_802_11_enable_rsn enbrsn
;
670 struct cmd_ds_802_11_key_material keymaterial
;
671 struct cmd_ds_mac_reg_access macreg
;
672 struct cmd_ds_bbp_reg_access bbpreg
;
673 struct cmd_ds_rf_reg_access rfreg
;
674 struct cmd_ds_802_11_eeprom_access rdeeprom
;
676 struct cmd_ds_802_11d_domain_info domaininfo
;
677 struct cmd_ds_802_11d_domain_info domaininforesp
;
679 struct cmd_ds_802_11_sleep_params sleep_params
;
680 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout
;
681 struct cmd_ds_802_11_tpc_cfg tpccfg
;
682 struct cmd_ds_802_11_pwr_cfg pwrcfg
;
683 struct cmd_ds_802_11_afc afc
;
684 struct cmd_ds_802_11_led_ctrl ledgpio
;
686 struct cmd_tx_rate_query txrate
;
687 struct cmd_ds_bt_access bt
;
688 struct cmd_ds_fwt_access fwt
;
689 struct cmd_ds_mesh_access mesh
;
690 struct cmd_ds_get_tsf gettsf
;
691 struct cmd_ds_802_11_subscribe_event subscribe_event
;
692 struct cmd_ds_802_11_beacon_control bcn_ctrl
;
694 } __attribute__ ((packed
));