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
;
78 /* command response */
79 int (*callback
)(struct lbs_private
*, unsigned long, struct cmd_header
*);
80 unsigned long callback_arg
;
82 struct cmd_header
*cmdbuf
;
85 wait_queue_head_t cmdwait_q
;
88 /* Generic structure to hold all key types. */
91 u16 flags
; /* KEY_INFO_* from defs.h */
92 u16 type
; /* KEY_TYPE_* from defs.h */
96 /* lbs_offset_value */
97 struct lbs_offset_value
{
102 /* Define general data structure */
112 #define S_DS_GEN sizeof(struct cmd_ds_gen)
116 * Define data structure for CMD_GET_HW_SPEC
117 * This structure defines the response for the GET_HW_SPEC command
119 struct cmd_ds_get_hw_spec
{
120 struct cmd_header hdr
;
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
{
159 struct cmd_header hdr
;
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 struct cmd_header hdr
;
263 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
266 /* key Index selected for Tx */
269 /* 40, 128bit or TXWEP */
271 uint8_t keymaterial
[4][16];
274 struct cmd_ds_802_3_get_stat
{
283 struct cmd_ds_802_11_get_stat
{
284 __le32 txfragmentcnt
;
285 __le32 mcasttxframecnt
;
288 __le32 Multipleretrycnt
;
289 __le32 rtssuccesscnt
;
290 __le32 rtsfailurecnt
;
291 __le32 ackfailurecnt
;
292 __le32 frameduplicatecnt
;
293 __le32 rxfragmentcnt
;
294 __le32 mcastrxframecnt
;
296 __le32 bcasttxframecnt
;
297 __le32 bcastrxframecnt
;
300 __le32 wepundecryptable
;
303 struct cmd_ds_802_11_snmp_mib
{
310 struct cmd_ds_mac_reg_map
{
316 struct cmd_ds_bbp_reg_map
{
322 struct cmd_ds_rf_reg_map
{
328 struct cmd_ds_mac_reg_access
{
334 struct cmd_ds_bbp_reg_access
{
341 struct cmd_ds_rf_reg_access
{
348 struct cmd_ds_802_11_radio_control
{
349 struct cmd_header hdr
;
355 struct cmd_ds_802_11_beacon_control
{
357 __le16 beacon_enable
;
358 __le16 beacon_period
;
361 struct cmd_ds_802_11_sleep_params
{
362 struct cmd_header hdr
;
364 /* ACT_GET/ACT_SET */
367 /* Sleep clock error in ppm */
370 /* Wakeup offset in usec */
373 /* Clock stabilization time in usec */
376 /* control periodic calibration */
379 /* control the use of external sleep clock */
380 uint8_t externalsleepclk
;
382 /* reserved field, should be set to zero */
386 struct cmd_ds_802_11_inactivity_timeout
{
387 struct cmd_header hdr
;
389 /* ACT_GET/ACT_SET */
392 /* Inactivity timeout in msec */
396 struct cmd_ds_802_11_rf_channel
{
397 struct cmd_header hdr
;
401 __le16 rftype
; /* unused */
402 __le16 reserved
; /* unused */
403 u8 channellist
[32]; /* unused */
406 struct cmd_ds_802_11_rssi
{
407 /* weighting factor */
415 struct cmd_ds_802_11_rssi_rsp
{
419 __le16 avgnoisefloor
;
422 struct cmd_ds_802_11_mac_address
{
427 struct cmd_ds_802_11_rf_tx_power
{
432 struct cmd_ds_802_11_rf_antenna
{
435 /* Number of antennas or 0xffff(diversity) */
440 struct cmd_ds_802_11_monitor_mode
{
445 struct cmd_ds_set_boot2_ver
{
446 struct cmd_header hdr
;
452 struct cmd_ds_802_11_fw_wake_method
{
453 struct cmd_header hdr
;
459 struct cmd_ds_802_11_sleep_period
{
460 struct cmd_header hdr
;
466 struct cmd_ds_802_11_ps_mode
{
468 __le16 nullpktinterval
;
471 __le16 locallisteninterval
;
474 struct PS_CMD_ConfirmSleep
{
484 __le16 locallisteninterval
;
487 struct cmd_ds_802_11_data_rate
{
488 struct cmd_header hdr
;
495 struct cmd_ds_802_11_rate_adapt_rateset
{
501 struct cmd_ds_802_11_ad_hoc_start
{
502 u8 ssid
[IW_ESSID_MAX_SIZE
];
506 union IEEEtypes_ssparamset ssparamset
;
507 union ieeetypes_phyparamset phyparamset
;
511 u8 tlv_memory_size_pad
[100];
512 } __attribute__ ((packed
));
514 struct adhoc_bssdesc
{
522 union ieeetypes_phyparamset phyparamset
;
523 union IEEEtypes_ssparamset ssparamset
;
527 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
528 * Adhoc join command and will cause a binary layout mismatch with
531 } __attribute__ ((packed
));
533 struct cmd_ds_802_11_ad_hoc_join
{
534 struct adhoc_bssdesc bss
;
538 } __attribute__ ((packed
));
540 struct cmd_ds_802_11_enable_rsn
{
541 struct cmd_header hdr
;
545 } __attribute__ ((packed
));
547 struct MrvlIEtype_keyParamSet
{
551 /* length of Payload */
554 /* type of key: WEP=0, TKIP=1, AES=2 */
557 /* key control Info specific to a keytypeid */
563 /* key material of size keylen */
567 struct cmd_ds_host_sleep
{
568 struct cmd_header hdr
;
572 } __attribute__ ((packed
));
574 struct cmd_ds_802_11_key_material
{
576 struct MrvlIEtype_keyParamSet keyParamSet
[2];
577 } __attribute__ ((packed
));
579 struct cmd_ds_802_11_eeprom_access
{
586 } __attribute__ ((packed
));
588 struct cmd_ds_802_11_tpc_cfg
{
595 } __attribute__ ((packed
));
597 struct cmd_ds_802_11_led_ctrl
{
601 } __attribute__ ((packed
));
603 struct cmd_ds_802_11_pwr_cfg
{
609 } __attribute__ ((packed
));
611 struct cmd_ds_802_11_afc
{
619 __le16 timing_offset
; /* signed */
620 __le16 carrier_offset
; /* signed */
623 } __attribute__ ((packed
));
625 struct cmd_tx_rate_query
{
627 } __attribute__ ((packed
));
629 struct cmd_ds_get_tsf
{
631 } __attribute__ ((packed
));
633 struct cmd_ds_bt_access
{
638 } __attribute__ ((packed
));
640 struct cmd_ds_fwt_access
{
658 } __attribute__ ((packed
));
661 struct cmd_ds_mesh_config
{
662 struct cmd_header hdr
;
668 u8 data
[128]; /* last position reserved */
669 } __attribute__ ((packed
));
672 struct cmd_ds_mesh_access
{
673 struct cmd_header hdr
;
676 __le32 data
[32]; /* last position reserved */
677 } __attribute__ ((packed
));
679 /* Number of stats counters returned by the firmware */
680 #define MESH_STATS_NUM 8
682 struct cmd_ds_command
{
691 struct cmd_ds_802_11_ps_mode psmode
;
692 struct cmd_ds_802_11_scan scan
;
693 struct cmd_ds_802_11_scan_rsp scanresp
;
694 struct cmd_ds_mac_control macctrl
;
695 struct cmd_ds_802_11_associate associate
;
696 struct cmd_ds_802_11_deauthenticate deauth
;
697 struct cmd_ds_802_11_ad_hoc_start ads
;
698 struct cmd_ds_802_11_reset reset
;
699 struct cmd_ds_802_11_ad_hoc_result result
;
700 struct cmd_ds_802_11_get_log glog
;
701 struct cmd_ds_802_11_authenticate auth
;
702 struct cmd_ds_802_11_get_stat gstat
;
703 struct cmd_ds_802_3_get_stat gstat_8023
;
704 struct cmd_ds_802_11_snmp_mib smib
;
705 struct cmd_ds_802_11_rf_tx_power txp
;
706 struct cmd_ds_802_11_rf_antenna rant
;
707 struct cmd_ds_802_11_monitor_mode monitor
;
708 struct cmd_ds_802_11_rate_adapt_rateset rateset
;
709 struct cmd_ds_mac_multicast_adr madr
;
710 struct cmd_ds_802_11_ad_hoc_join adj
;
711 struct cmd_ds_802_11_rssi rssi
;
712 struct cmd_ds_802_11_rssi_rsp rssirsp
;
713 struct cmd_ds_802_11_disassociate dassociate
;
714 struct cmd_ds_802_11_mac_address macadd
;
715 struct cmd_ds_802_11_key_material keymaterial
;
716 struct cmd_ds_mac_reg_access macreg
;
717 struct cmd_ds_bbp_reg_access bbpreg
;
718 struct cmd_ds_rf_reg_access rfreg
;
719 struct cmd_ds_802_11_eeprom_access rdeeprom
;
721 struct cmd_ds_802_11d_domain_info domaininfo
;
722 struct cmd_ds_802_11d_domain_info domaininforesp
;
724 struct cmd_ds_802_11_tpc_cfg tpccfg
;
725 struct cmd_ds_802_11_pwr_cfg pwrcfg
;
726 struct cmd_ds_802_11_afc afc
;
727 struct cmd_ds_802_11_led_ctrl ledgpio
;
729 struct cmd_tx_rate_query txrate
;
730 struct cmd_ds_bt_access bt
;
731 struct cmd_ds_fwt_access fwt
;
732 struct cmd_ds_get_tsf gettsf
;
733 struct cmd_ds_802_11_beacon_control bcn_ctrl
;
735 } __attribute__ ((packed
));