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 {
390 __le16 currentchannel;
396 struct cmd_ds_802_11_rssi {
397 /* weighting factor */
405 struct cmd_ds_802_11_rssi_rsp {
409 __le16 avgnoisefloor;
412 struct cmd_ds_802_11_mac_address {
417 struct cmd_ds_802_11_rf_tx_power {
422 struct cmd_ds_802_11_rf_antenna {
425 /* Number of antennas or 0xffff(diversity) */
430 struct cmd_ds_802_11_monitor_mode {
435 struct cmd_ds_set_boot2_ver {
436 struct cmd_header hdr;
442 struct cmd_ds_802_11_ps_mode {
444 __le16 nullpktinterval;
447 __le16 locallisteninterval;
450 struct PS_CMD_ConfirmSleep {
460 __le16 locallisteninterval;
463 struct cmd_ds_802_11_data_rate {
464 struct cmd_header hdr;
471 struct cmd_ds_802_11_rate_adapt_rateset {
477 struct cmd_ds_802_11_ad_hoc_start {
478 u8 ssid[IW_ESSID_MAX_SIZE];
482 union IEEEtypes_ssparamset ssparamset;
483 union ieeetypes_phyparamset phyparamset;
487 u8 tlv_memory_size_pad[100];
488 } __attribute__ ((packed));
490 struct adhoc_bssdesc {
498 union ieeetypes_phyparamset phyparamset;
499 union IEEEtypes_ssparamset ssparamset;
503 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
504 * Adhoc join command and will cause a binary layout mismatch with
507 } __attribute__ ((packed));
509 struct cmd_ds_802_11_ad_hoc_join {
510 struct adhoc_bssdesc bss;
514 } __attribute__ ((packed));
516 struct cmd_ds_802_11_enable_rsn {
519 } __attribute__ ((packed));
521 struct MrvlIEtype_keyParamSet {
525 /* length of Payload */
528 /* type of key: WEP=0, TKIP=1, AES=2 */
531 /* key control Info specific to a keytypeid */
537 /* key material of size keylen */
541 struct cmd_ds_802_11_key_material {
543 struct MrvlIEtype_keyParamSet keyParamSet[2];
544 } __attribute__ ((packed));
546 struct cmd_ds_802_11_eeprom_access {
553 } __attribute__ ((packed));
555 struct cmd_ds_802_11_tpc_cfg {
562 } __attribute__ ((packed));
564 struct cmd_ds_802_11_led_ctrl {
568 } __attribute__ ((packed));
570 struct cmd_ds_802_11_pwr_cfg {
576 } __attribute__ ((packed));
578 struct cmd_ds_802_11_afc {
586 __le16 timing_offset; /* signed */
587 __le16 carrier_offset; /* signed */
590 } __attribute__ ((packed));
592 struct cmd_tx_rate_query {
594 } __attribute__ ((packed));
596 struct cmd_ds_get_tsf {
598 } __attribute__ ((packed));
600 struct cmd_ds_bt_access {
605 } __attribute__ ((packed));
607 struct cmd_ds_fwt_access {
625 } __attribute__ ((packed));
627 struct cmd_ds_mesh_access {
628 struct cmd_header hdr;
631 __le32 data[32]; /* last position reserved */
632 } __attribute__ ((packed));
634 /* Number of stats counters returned by the firmware */
635 #define MESH_STATS_NUM 8
637 struct cmd_ds_command {
646 struct cmd_ds_802_11_ps_mode psmode;
647 struct cmd_ds_802_11_scan scan;
648 struct cmd_ds_802_11_scan_rsp scanresp;
649 struct cmd_ds_mac_control macctrl;
650 struct cmd_ds_802_11_associate associate;
651 struct cmd_ds_802_11_deauthenticate deauth;
652 struct cmd_ds_802_11_set_wep wep;
653 struct cmd_ds_802_11_ad_hoc_start ads;
654 struct cmd_ds_802_11_reset reset;
655 struct cmd_ds_802_11_ad_hoc_result result;
656 struct cmd_ds_802_11_get_log glog;
657 struct cmd_ds_802_11_authenticate auth;
658 struct cmd_ds_802_11_get_stat gstat;
659 struct cmd_ds_802_3_get_stat gstat_8023;
660 struct cmd_ds_802_11_snmp_mib smib;
661 struct cmd_ds_802_11_rf_tx_power txp;
662 struct cmd_ds_802_11_rf_antenna rant;
663 struct cmd_ds_802_11_monitor_mode monitor;
664 struct cmd_ds_802_11_rate_adapt_rateset rateset;
665 struct cmd_ds_mac_multicast_adr madr;
666 struct cmd_ds_802_11_ad_hoc_join adj;
667 struct cmd_ds_802_11_radio_control radio;
668 struct cmd_ds_802_11_rf_channel rfchannel;
669 struct cmd_ds_802_11_rssi rssi;
670 struct cmd_ds_802_11_rssi_rsp rssirsp;
671 struct cmd_ds_802_11_disassociate dassociate;
672 struct cmd_ds_802_11_mac_address macadd;
673 struct cmd_ds_802_11_enable_rsn enbrsn;
674 struct cmd_ds_802_11_key_material keymaterial;
675 struct cmd_ds_mac_reg_access macreg;
676 struct cmd_ds_bbp_reg_access bbpreg;
677 struct cmd_ds_rf_reg_access rfreg;
678 struct cmd_ds_802_11_eeprom_access rdeeprom;
680 struct cmd_ds_802_11d_domain_info domaininfo;
681 struct cmd_ds_802_11d_domain_info domaininforesp;
683 struct cmd_ds_802_11_sleep_params sleep_params;
684 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
685 struct cmd_ds_802_11_tpc_cfg tpccfg;
686 struct cmd_ds_802_11_pwr_cfg pwrcfg;
687 struct cmd_ds_802_11_afc afc;
688 struct cmd_ds_802_11_led_ctrl ledgpio;
690 struct cmd_tx_rate_query txrate;
691 struct cmd_ds_bt_access bt;
692 struct cmd_ds_fwt_access fwt;
693 struct cmd_ds_get_tsf gettsf;
694 struct cmd_ds_802_11_subscribe_event subscribe_event;
695 struct cmd_ds_802_11_beacon_control bcn_ctrl;
697 } __attribute__ ((packed));