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 /* command response */
78 int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *);
79 unsigned long callback_arg;
81 struct cmd_header *cmdbuf;
84 wait_queue_head_t cmdwait_q;
87 /* Generic structure to hold all key types. */
90 u16 flags; /* KEY_INFO_* from defs.h */
91 u16 type; /* KEY_TYPE_* from defs.h */
95 /* lbs_offset_value */
96 struct lbs_offset_value {
101 /* Define general data structure */
111 #define S_DS_GEN sizeof(struct cmd_ds_gen)
115 * Define data structure for CMD_GET_HW_SPEC
116 * This structure defines the response for the GET_HW_SPEC command
118 struct cmd_ds_get_hw_spec {
119 struct cmd_header hdr;
121 /* HW Interface version number */
123 /* HW version number */
125 /* Max number of TxPD FW can handle */
127 /* Max no of Multicast address */
135 /* Number of antenna used */
138 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
139 u8 fwreleasenumber[4];
141 /* Base Address of TxPD queue */
143 /* Read Pointer of RxPd queue */
146 /* Write Pointer of RxPd queue */
149 /*FW/HW capability */
151 } __attribute__ ((packed));
153 struct cmd_ds_802_11_reset {
157 struct cmd_ds_802_11_subscribe_event {
161 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
162 * number of TLVs. From the v5.1 manual, those TLVs would add up to
163 * 40 bytes. However, future firmware might add additional TLVs, so I
164 * bump this up a bit.
170 * This scan handle Country Information IE(802.11d compliant)
171 * Define data structure for CMD_802_11_SCAN
173 struct cmd_ds_802_11_scan {
178 mrvlietypes_ssidparamset_t ssidParamSet;
179 mrvlietypes_chanlistparamset_t ChanListParamSet;
180 mrvlietypes_ratesparamset_t OpRateSet;
184 struct cmd_ds_802_11_scan_rsp {
185 __le16 bssdescriptsize;
187 u8 bssdesc_and_tlvbuffer[1];
190 struct cmd_ds_802_11_get_log {
203 __le32 wepundecryptable;
206 struct cmd_ds_mac_control {
211 struct cmd_ds_mac_multicast_adr {
214 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
217 struct cmd_ds_802_11_authenticate {
218 u8 macaddr[ETH_ALEN];
223 struct cmd_ds_802_11_deauthenticate {
228 struct cmd_ds_802_11_associate {
231 __le16 listeninterval;
236 mrvlietypes_ssidparamset_t ssidParamSet;
237 mrvlietypes_phyparamset_t phyparamset;
238 mrvlietypes_ssparamset_t ssparamset;
239 mrvlietypes_ratesparamset_t ratesParamSet;
241 } __attribute__ ((packed));
243 struct cmd_ds_802_11_disassociate {
248 struct cmd_ds_802_11_associate_rsp {
249 struct ieeetypes_assocrsp assocRsp;
252 struct cmd_ds_802_11_ad_hoc_result {
257 struct cmd_ds_802_11_set_wep {
258 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
261 /* key Index selected for Tx */
264 /* 40, 128bit or TXWEP */
266 u8 keymaterial[4][16];
269 struct cmd_ds_802_3_get_stat {
278 struct cmd_ds_802_11_get_stat {
279 __le32 txfragmentcnt;
280 __le32 mcasttxframecnt;
283 __le32 Multipleretrycnt;
284 __le32 rtssuccesscnt;
285 __le32 rtsfailurecnt;
286 __le32 ackfailurecnt;
287 __le32 frameduplicatecnt;
288 __le32 rxfragmentcnt;
289 __le32 mcastrxframecnt;
291 __le32 bcasttxframecnt;
292 __le32 bcastrxframecnt;
295 __le32 wepundecryptable;
298 struct cmd_ds_802_11_snmp_mib {
305 struct cmd_ds_mac_reg_map {
311 struct cmd_ds_bbp_reg_map {
317 struct cmd_ds_rf_reg_map {
323 struct cmd_ds_mac_reg_access {
329 struct cmd_ds_bbp_reg_access {
336 struct cmd_ds_rf_reg_access {
343 struct cmd_ds_802_11_radio_control {
348 struct cmd_ds_802_11_beacon_control {
350 __le16 beacon_enable;
351 __le16 beacon_period;
354 struct cmd_ds_802_11_sleep_params {
355 /* ACT_GET/ACT_SET */
358 /* Sleep clock error in ppm */
361 /* Wakeup offset in usec */
364 /* Clock stabilization time in usec */
367 /* control periodic calibration */
370 /* control the use of external sleep clock */
373 /* reserved field, should be set to zero */
377 struct cmd_ds_802_11_inactivity_timeout {
378 /* ACT_GET/ACT_SET */
381 /* Inactivity timeout in msec */
385 struct cmd_ds_802_11_rf_channel {
386 struct cmd_header hdr;
390 __le16 rftype; /* unused */
391 __le16 reserved; /* unused */
392 u8 channellist[32]; /* unused */
395 struct cmd_ds_802_11_rssi {
396 /* weighting factor */
404 struct cmd_ds_802_11_rssi_rsp {
408 __le16 avgnoisefloor;
411 struct cmd_ds_802_11_mac_address {
416 struct cmd_ds_802_11_rf_tx_power {
421 struct cmd_ds_802_11_rf_antenna {
424 /* Number of antennas or 0xffff(diversity) */
429 struct cmd_ds_802_11_monitor_mode {
434 struct cmd_ds_set_boot2_ver {
435 struct cmd_header hdr;
441 struct cmd_ds_802_11_ps_mode {
443 __le16 nullpktinterval;
446 __le16 locallisteninterval;
449 struct PS_CMD_ConfirmSleep {
459 __le16 locallisteninterval;
462 struct cmd_ds_802_11_data_rate {
463 struct cmd_header hdr;
470 struct cmd_ds_802_11_rate_adapt_rateset {
476 struct cmd_ds_802_11_ad_hoc_start {
477 u8 ssid[IW_ESSID_MAX_SIZE];
481 union IEEEtypes_ssparamset ssparamset;
482 union ieeetypes_phyparamset phyparamset;
486 u8 tlv_memory_size_pad[100];
487 } __attribute__ ((packed));
489 struct adhoc_bssdesc {
497 union ieeetypes_phyparamset phyparamset;
498 union IEEEtypes_ssparamset ssparamset;
502 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
503 * Adhoc join command and will cause a binary layout mismatch with
506 } __attribute__ ((packed));
508 struct cmd_ds_802_11_ad_hoc_join {
509 struct adhoc_bssdesc bss;
513 } __attribute__ ((packed));
515 struct cmd_ds_802_11_enable_rsn {
518 } __attribute__ ((packed));
520 struct MrvlIEtype_keyParamSet {
524 /* length of Payload */
527 /* type of key: WEP=0, TKIP=1, AES=2 */
530 /* key control Info specific to a keytypeid */
536 /* key material of size keylen */
540 struct cmd_ds_host_sleep {
541 struct cmd_header hdr;
545 } __attribute__ ((packed));
547 struct cmd_ds_802_11_key_material {
549 struct MrvlIEtype_keyParamSet keyParamSet[2];
550 } __attribute__ ((packed));
552 struct cmd_ds_802_11_eeprom_access {
559 } __attribute__ ((packed));
561 struct cmd_ds_802_11_tpc_cfg {
568 } __attribute__ ((packed));
570 struct cmd_ds_802_11_led_ctrl {
574 } __attribute__ ((packed));
576 struct cmd_ds_802_11_pwr_cfg {
582 } __attribute__ ((packed));
584 struct cmd_ds_802_11_afc {
592 __le16 timing_offset; /* signed */
593 __le16 carrier_offset; /* signed */
596 } __attribute__ ((packed));
598 struct cmd_tx_rate_query {
600 } __attribute__ ((packed));
602 struct cmd_ds_get_tsf {
604 } __attribute__ ((packed));
606 struct cmd_ds_bt_access {
611 } __attribute__ ((packed));
613 struct cmd_ds_fwt_access {
631 } __attribute__ ((packed));
634 struct cmd_ds_mesh_config {
635 struct cmd_header hdr;
641 u8 data[128]; /* last position reserved */
642 } __attribute__ ((packed));
645 struct cmd_ds_mesh_access {
646 struct cmd_header hdr;
649 __le32 data[32]; /* last position reserved */
650 } __attribute__ ((packed));
652 /* Number of stats counters returned by the firmware */
653 #define MESH_STATS_NUM 8
655 struct cmd_ds_command {
664 struct cmd_ds_802_11_ps_mode psmode;
665 struct cmd_ds_802_11_scan scan;
666 struct cmd_ds_802_11_scan_rsp scanresp;
667 struct cmd_ds_mac_control macctrl;
668 struct cmd_ds_802_11_associate associate;
669 struct cmd_ds_802_11_deauthenticate deauth;
670 struct cmd_ds_802_11_set_wep wep;
671 struct cmd_ds_802_11_ad_hoc_start ads;
672 struct cmd_ds_802_11_reset reset;
673 struct cmd_ds_802_11_ad_hoc_result result;
674 struct cmd_ds_802_11_get_log glog;
675 struct cmd_ds_802_11_authenticate auth;
676 struct cmd_ds_802_11_get_stat gstat;
677 struct cmd_ds_802_3_get_stat gstat_8023;
678 struct cmd_ds_802_11_snmp_mib smib;
679 struct cmd_ds_802_11_rf_tx_power txp;
680 struct cmd_ds_802_11_rf_antenna rant;
681 struct cmd_ds_802_11_monitor_mode monitor;
682 struct cmd_ds_802_11_rate_adapt_rateset rateset;
683 struct cmd_ds_mac_multicast_adr madr;
684 struct cmd_ds_802_11_ad_hoc_join adj;
685 struct cmd_ds_802_11_radio_control radio;
686 struct cmd_ds_802_11_rf_channel rfchannel;
687 struct cmd_ds_802_11_rssi rssi;
688 struct cmd_ds_802_11_rssi_rsp rssirsp;
689 struct cmd_ds_802_11_disassociate dassociate;
690 struct cmd_ds_802_11_mac_address macadd;
691 struct cmd_ds_802_11_enable_rsn enbrsn;
692 struct cmd_ds_802_11_key_material keymaterial;
693 struct cmd_ds_mac_reg_access macreg;
694 struct cmd_ds_bbp_reg_access bbpreg;
695 struct cmd_ds_rf_reg_access rfreg;
696 struct cmd_ds_802_11_eeprom_access rdeeprom;
698 struct cmd_ds_802_11d_domain_info domaininfo;
699 struct cmd_ds_802_11d_domain_info domaininforesp;
701 struct cmd_ds_802_11_sleep_params sleep_params;
702 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
703 struct cmd_ds_802_11_tpc_cfg tpccfg;
704 struct cmd_ds_802_11_pwr_cfg pwrcfg;
705 struct cmd_ds_802_11_afc afc;
706 struct cmd_ds_802_11_led_ctrl ledgpio;
708 struct cmd_tx_rate_query txrate;
709 struct cmd_ds_bt_access bt;
710 struct cmd_ds_fwt_access fwt;
711 struct cmd_ds_get_tsf gettsf;
712 struct cmd_ds_802_11_subscribe_event subscribe_event;
713 struct cmd_ds_802_11_beacon_control bcn_ctrl;
715 } __attribute__ ((packed));