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 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 {
469 struct cmd_ds_802_11_rate_adapt_rateset {
475 struct cmd_ds_802_11_ad_hoc_start {
476 u8 ssid[IW_ESSID_MAX_SIZE];
480 union IEEEtypes_ssparamset ssparamset;
481 union ieeetypes_phyparamset phyparamset;
485 u8 tlv_memory_size_pad[100];
486 } __attribute__ ((packed));
488 struct adhoc_bssdesc {
496 union ieeetypes_phyparamset phyparamset;
497 union IEEEtypes_ssparamset ssparamset;
501 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
502 * Adhoc join command and will cause a binary layout mismatch with
505 } __attribute__ ((packed));
507 struct cmd_ds_802_11_ad_hoc_join {
508 struct adhoc_bssdesc bss;
512 } __attribute__ ((packed));
514 struct cmd_ds_802_11_enable_rsn {
517 } __attribute__ ((packed));
519 struct MrvlIEtype_keyParamSet {
523 /* length of Payload */
526 /* type of key: WEP=0, TKIP=1, AES=2 */
529 /* key control Info specific to a keytypeid */
535 /* key material of size keylen */
539 struct cmd_ds_802_11_key_material {
541 struct MrvlIEtype_keyParamSet keyParamSet[2];
542 } __attribute__ ((packed));
544 struct cmd_ds_802_11_eeprom_access {
551 } __attribute__ ((packed));
553 struct cmd_ds_802_11_tpc_cfg {
560 } __attribute__ ((packed));
562 struct cmd_ds_802_11_led_ctrl {
566 } __attribute__ ((packed));
568 struct cmd_ds_802_11_pwr_cfg {
574 } __attribute__ ((packed));
576 struct cmd_ds_802_11_afc {
584 __le16 timing_offset; /* signed */
585 __le16 carrier_offset; /* signed */
588 } __attribute__ ((packed));
590 struct cmd_tx_rate_query {
592 } __attribute__ ((packed));
594 struct cmd_ds_get_tsf {
596 } __attribute__ ((packed));
598 struct cmd_ds_bt_access {
603 } __attribute__ ((packed));
605 struct cmd_ds_fwt_access {
623 } __attribute__ ((packed));
625 struct cmd_ds_mesh_access {
627 __le32 data[32]; /* last position reserved */
628 } __attribute__ ((packed));
630 /* Number of stats counters returned by the firmware */
631 #define MESH_STATS_NUM 8
633 struct cmd_ds_command {
642 struct cmd_ds_802_11_ps_mode psmode;
643 struct cmd_ds_802_11_scan scan;
644 struct cmd_ds_802_11_scan_rsp scanresp;
645 struct cmd_ds_mac_control macctrl;
646 struct cmd_ds_802_11_associate associate;
647 struct cmd_ds_802_11_deauthenticate deauth;
648 struct cmd_ds_802_11_set_wep wep;
649 struct cmd_ds_802_11_ad_hoc_start ads;
650 struct cmd_ds_802_11_reset reset;
651 struct cmd_ds_802_11_ad_hoc_result result;
652 struct cmd_ds_802_11_get_log glog;
653 struct cmd_ds_802_11_authenticate auth;
654 struct cmd_ds_802_11_get_stat gstat;
655 struct cmd_ds_802_3_get_stat gstat_8023;
656 struct cmd_ds_802_11_snmp_mib smib;
657 struct cmd_ds_802_11_rf_tx_power txp;
658 struct cmd_ds_802_11_rf_antenna rant;
659 struct cmd_ds_802_11_monitor_mode monitor;
660 struct cmd_ds_802_11_data_rate drate;
661 struct cmd_ds_802_11_rate_adapt_rateset rateset;
662 struct cmd_ds_mac_multicast_adr madr;
663 struct cmd_ds_802_11_ad_hoc_join adj;
664 struct cmd_ds_802_11_radio_control radio;
665 struct cmd_ds_802_11_rf_channel rfchannel;
666 struct cmd_ds_802_11_rssi rssi;
667 struct cmd_ds_802_11_rssi_rsp rssirsp;
668 struct cmd_ds_802_11_disassociate dassociate;
669 struct cmd_ds_802_11_mac_address macadd;
670 struct cmd_ds_802_11_enable_rsn enbrsn;
671 struct cmd_ds_802_11_key_material keymaterial;
672 struct cmd_ds_mac_reg_access macreg;
673 struct cmd_ds_bbp_reg_access bbpreg;
674 struct cmd_ds_rf_reg_access rfreg;
675 struct cmd_ds_802_11_eeprom_access rdeeprom;
677 struct cmd_ds_802_11d_domain_info domaininfo;
678 struct cmd_ds_802_11d_domain_info domaininforesp;
680 struct cmd_ds_802_11_sleep_params sleep_params;
681 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
682 struct cmd_ds_802_11_tpc_cfg tpccfg;
683 struct cmd_ds_802_11_pwr_cfg pwrcfg;
684 struct cmd_ds_802_11_afc afc;
685 struct cmd_ds_802_11_led_ctrl ledgpio;
687 struct cmd_tx_rate_query txrate;
688 struct cmd_ds_bt_access bt;
689 struct cmd_ds_fwt_access fwt;
690 struct cmd_ds_mesh_access mesh;
691 struct cmd_ds_get_tsf gettsf;
692 struct cmd_ds_802_11_subscribe_event subscribe_event;
693 struct cmd_ds_802_11_beacon_control bcn_ctrl;
695 } __attribute__ ((packed));