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 {
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 struct cmd_header hdr;
261 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
264 /* key Index selected for Tx */
267 /* 40, 128bit or TXWEP */
269 uint8_t 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 {
347 struct cmd_header hdr;
353 struct cmd_ds_802_11_beacon_control {
355 __le16 beacon_enable;
356 __le16 beacon_period;
359 struct cmd_ds_802_11_sleep_params {
360 struct cmd_header hdr;
362 /* ACT_GET/ACT_SET */
365 /* Sleep clock error in ppm */
368 /* Wakeup offset in usec */
371 /* Clock stabilization time in usec */
374 /* control periodic calibration */
377 /* control the use of external sleep clock */
378 uint8_t externalsleepclk;
380 /* reserved field, should be set to zero */
384 struct cmd_ds_802_11_inactivity_timeout {
385 struct cmd_header hdr;
387 /* ACT_GET/ACT_SET */
390 /* Inactivity timeout in msec */
394 struct cmd_ds_802_11_rf_channel {
395 struct cmd_header hdr;
399 __le16 rftype; /* unused */
400 __le16 reserved; /* unused */
401 u8 channellist[32]; /* unused */
404 struct cmd_ds_802_11_rssi {
405 /* weighting factor */
413 struct cmd_ds_802_11_rssi_rsp {
417 __le16 avgnoisefloor;
420 struct cmd_ds_802_11_mac_address {
425 struct cmd_ds_802_11_rf_tx_power {
430 struct cmd_ds_802_11_rf_antenna {
433 /* Number of antennas or 0xffff(diversity) */
438 struct cmd_ds_802_11_monitor_mode {
443 struct cmd_ds_set_boot2_ver {
444 struct cmd_header hdr;
450 struct cmd_ds_802_11_fw_wake_method {
451 struct cmd_header hdr;
457 struct cmd_ds_802_11_sleep_period {
458 struct cmd_header hdr;
464 struct cmd_ds_802_11_ps_mode {
466 __le16 nullpktinterval;
469 __le16 locallisteninterval;
472 struct PS_CMD_ConfirmSleep {
482 __le16 locallisteninterval;
485 struct cmd_ds_802_11_data_rate {
486 struct cmd_header hdr;
493 struct cmd_ds_802_11_rate_adapt_rateset {
499 struct cmd_ds_802_11_ad_hoc_start {
500 u8 ssid[IW_ESSID_MAX_SIZE];
504 union IEEEtypes_ssparamset ssparamset;
505 union ieeetypes_phyparamset phyparamset;
509 u8 tlv_memory_size_pad[100];
510 } __attribute__ ((packed));
512 struct adhoc_bssdesc {
520 union ieeetypes_phyparamset phyparamset;
521 union IEEEtypes_ssparamset ssparamset;
525 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
526 * Adhoc join command and will cause a binary layout mismatch with
529 } __attribute__ ((packed));
531 struct cmd_ds_802_11_ad_hoc_join {
532 struct adhoc_bssdesc bss;
536 } __attribute__ ((packed));
538 struct cmd_ds_802_11_enable_rsn {
541 } __attribute__ ((packed));
543 struct MrvlIEtype_keyParamSet {
547 /* length of Payload */
550 /* type of key: WEP=0, TKIP=1, AES=2 */
553 /* key control Info specific to a keytypeid */
559 /* key material of size keylen */
563 struct cmd_ds_host_sleep {
564 struct cmd_header hdr;
568 } __attribute__ ((packed));
570 struct cmd_ds_802_11_key_material {
572 struct MrvlIEtype_keyParamSet keyParamSet[2];
573 } __attribute__ ((packed));
575 struct cmd_ds_802_11_eeprom_access {
582 } __attribute__ ((packed));
584 struct cmd_ds_802_11_tpc_cfg {
591 } __attribute__ ((packed));
593 struct cmd_ds_802_11_led_ctrl {
597 } __attribute__ ((packed));
599 struct cmd_ds_802_11_pwr_cfg {
605 } __attribute__ ((packed));
607 struct cmd_ds_802_11_afc {
615 __le16 timing_offset; /* signed */
616 __le16 carrier_offset; /* signed */
619 } __attribute__ ((packed));
621 struct cmd_tx_rate_query {
623 } __attribute__ ((packed));
625 struct cmd_ds_get_tsf {
627 } __attribute__ ((packed));
629 struct cmd_ds_bt_access {
634 } __attribute__ ((packed));
636 struct cmd_ds_fwt_access {
654 } __attribute__ ((packed));
657 struct cmd_ds_mesh_config {
658 struct cmd_header hdr;
664 u8 data[128]; /* last position reserved */
665 } __attribute__ ((packed));
668 struct cmd_ds_mesh_access {
669 struct cmd_header hdr;
672 __le32 data[32]; /* last position reserved */
673 } __attribute__ ((packed));
675 /* Number of stats counters returned by the firmware */
676 #define MESH_STATS_NUM 8
678 struct cmd_ds_command {
687 struct cmd_ds_802_11_ps_mode psmode;
688 struct cmd_ds_802_11_scan scan;
689 struct cmd_ds_802_11_scan_rsp scanresp;
690 struct cmd_ds_mac_control macctrl;
691 struct cmd_ds_802_11_associate associate;
692 struct cmd_ds_802_11_deauthenticate deauth;
693 struct cmd_ds_802_11_ad_hoc_start ads;
694 struct cmd_ds_802_11_reset reset;
695 struct cmd_ds_802_11_ad_hoc_result result;
696 struct cmd_ds_802_11_get_log glog;
697 struct cmd_ds_802_11_authenticate auth;
698 struct cmd_ds_802_11_get_stat gstat;
699 struct cmd_ds_802_3_get_stat gstat_8023;
700 struct cmd_ds_802_11_snmp_mib smib;
701 struct cmd_ds_802_11_rf_tx_power txp;
702 struct cmd_ds_802_11_rf_antenna rant;
703 struct cmd_ds_802_11_monitor_mode monitor;
704 struct cmd_ds_802_11_rate_adapt_rateset rateset;
705 struct cmd_ds_mac_multicast_adr madr;
706 struct cmd_ds_802_11_ad_hoc_join adj;
707 struct cmd_ds_802_11_rssi rssi;
708 struct cmd_ds_802_11_rssi_rsp rssirsp;
709 struct cmd_ds_802_11_disassociate dassociate;
710 struct cmd_ds_802_11_mac_address macadd;
711 struct cmd_ds_802_11_enable_rsn enbrsn;
712 struct cmd_ds_802_11_key_material keymaterial;
713 struct cmd_ds_mac_reg_access macreg;
714 struct cmd_ds_bbp_reg_access bbpreg;
715 struct cmd_ds_rf_reg_access rfreg;
716 struct cmd_ds_802_11_eeprom_access rdeeprom;
718 struct cmd_ds_802_11d_domain_info domaininfo;
719 struct cmd_ds_802_11d_domain_info domaininforesp;
721 struct cmd_ds_802_11_tpc_cfg tpccfg;
722 struct cmd_ds_802_11_pwr_cfg pwrcfg;
723 struct cmd_ds_802_11_afc afc;
724 struct cmd_ds_802_11_led_ctrl ledgpio;
726 struct cmd_tx_rate_query txrate;
727 struct cmd_ds_bt_access bt;
728 struct cmd_ds_fwt_access fwt;
729 struct cmd_ds_get_tsf gettsf;
730 struct cmd_ds_802_11_subscribe_event subscribe_event;
731 struct cmd_ds_802_11_beacon_control bcn_ctrl;
733 } __attribute__ ((packed));