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 */
68 struct cmd_ctrl_node {
69 struct list_head list;
70 /* wait for finish or not */
72 /* command response */
74 int (*callback)(struct lbs_private *priv, unsigned long arg, struct cmd_ds_command *resp);
75 unsigned long callback_arg;
80 wait_queue_head_t cmdwait_q;
83 /* Generic structure to hold all key types. */
86 u16 flags; /* KEY_INFO_* from defs.h */
87 u16 type; /* KEY_TYPE_* from defs.h */
91 /* lbs_offset_value */
92 struct lbs_offset_value {
97 /* Define general data structure */
107 #define S_DS_GEN sizeof(struct cmd_ds_gen)
111 * Define data structure for CMD_GET_HW_SPEC
112 * This structure defines the response for the GET_HW_SPEC command
114 struct cmd_ds_get_hw_spec {
115 /* HW Interface version number */
117 /* HW version number */
119 /* Max number of TxPD FW can handle */
121 /* Max no of Multicast address */
129 /* Number of antenna used */
132 /* FW release number, example 1,2,3,4 = 3.2.1p4 */
133 u8 fwreleasenumber[4];
135 /* Base Address of TxPD queue */
137 /* Read Pointer of RxPd queue */
140 /* Write Pointer of RxPd queue */
143 /*FW/HW capability */
145 } __attribute__ ((packed));
147 struct cmd_ds_802_11_reset {
151 struct cmd_ds_802_11_subscribe_event {
155 /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a
156 * number of TLVs. From the v5.1 manual, those TLVs would add up to
157 * 40 bytes. However, future firmware might add additional TLVs, so I
158 * bump this up a bit.
164 * This scan handle Country Information IE(802.11d compliant)
165 * Define data structure for CMD_802_11_SCAN
167 struct cmd_ds_802_11_scan {
172 mrvlietypes_ssidparamset_t ssidParamSet;
173 mrvlietypes_chanlistparamset_t ChanListParamSet;
174 mrvlietypes_ratesparamset_t OpRateSet;
178 struct cmd_ds_802_11_scan_rsp {
179 __le16 bssdescriptsize;
181 u8 bssdesc_and_tlvbuffer[1];
184 struct cmd_ds_802_11_get_log {
197 __le32 wepundecryptable;
200 struct cmd_ds_mac_control {
205 struct cmd_ds_mac_multicast_adr {
208 u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE];
211 struct cmd_ds_802_11_authenticate {
212 u8 macaddr[ETH_ALEN];
217 struct cmd_ds_802_11_deauthenticate {
222 struct cmd_ds_802_11_associate {
225 __le16 listeninterval;
230 mrvlietypes_ssidparamset_t ssidParamSet;
231 mrvlietypes_phyparamset_t phyparamset;
232 mrvlietypes_ssparamset_t ssparamset;
233 mrvlietypes_ratesparamset_t ratesParamSet;
235 } __attribute__ ((packed));
237 struct cmd_ds_802_11_disassociate {
242 struct cmd_ds_802_11_associate_rsp {
243 struct ieeetypes_assocrsp assocRsp;
246 struct cmd_ds_802_11_ad_hoc_result {
251 struct cmd_ds_802_11_set_wep {
252 /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
255 /* key Index selected for Tx */
258 /* 40, 128bit or TXWEP */
260 u8 keymaterial[4][16];
263 struct cmd_ds_802_3_get_stat {
272 struct cmd_ds_802_11_get_stat {
273 __le32 txfragmentcnt;
274 __le32 mcasttxframecnt;
277 __le32 Multipleretrycnt;
278 __le32 rtssuccesscnt;
279 __le32 rtsfailurecnt;
280 __le32 ackfailurecnt;
281 __le32 frameduplicatecnt;
282 __le32 rxfragmentcnt;
283 __le32 mcastrxframecnt;
285 __le32 bcasttxframecnt;
286 __le32 bcastrxframecnt;
289 __le32 wepundecryptable;
292 struct cmd_ds_802_11_snmp_mib {
299 struct cmd_ds_mac_reg_map {
305 struct cmd_ds_bbp_reg_map {
311 struct cmd_ds_rf_reg_map {
317 struct cmd_ds_mac_reg_access {
323 struct cmd_ds_bbp_reg_access {
330 struct cmd_ds_rf_reg_access {
337 struct cmd_ds_802_11_radio_control {
342 struct cmd_ds_802_11_beacon_control {
344 __le16 beacon_enable;
345 __le16 beacon_period;
348 struct cmd_ds_802_11_sleep_params {
349 /* ACT_GET/ACT_SET */
352 /* Sleep clock error in ppm */
355 /* Wakeup offset in usec */
358 /* Clock stabilization time in usec */
361 /* control periodic calibration */
364 /* control the use of external sleep clock */
367 /* reserved field, should be set to zero */
371 struct cmd_ds_802_11_inactivity_timeout {
372 /* ACT_GET/ACT_SET */
375 /* Inactivity timeout in msec */
379 struct cmd_ds_802_11_rf_channel {
381 __le16 currentchannel;
387 struct cmd_ds_802_11_rssi {
388 /* weighting factor */
396 struct cmd_ds_802_11_rssi_rsp {
400 __le16 avgnoisefloor;
403 struct cmd_ds_802_11_mac_address {
408 struct cmd_ds_802_11_rf_tx_power {
413 struct cmd_ds_802_11_rf_antenna {
416 /* Number of antennas or 0xffff(diversity) */
421 struct cmd_ds_802_11_monitor_mode {
426 struct cmd_ds_set_boot2_ver {
431 struct cmd_ds_802_11_ps_mode {
433 __le16 nullpktinterval;
436 __le16 locallisteninterval;
439 struct PS_CMD_ConfirmSleep {
449 __le16 locallisteninterval;
452 struct cmd_ds_802_11_data_rate {
458 struct cmd_ds_802_11_rate_adapt_rateset {
464 struct cmd_ds_802_11_ad_hoc_start {
465 u8 ssid[IW_ESSID_MAX_SIZE];
469 union IEEEtypes_ssparamset ssparamset;
470 union ieeetypes_phyparamset phyparamset;
474 u8 tlv_memory_size_pad[100];
475 } __attribute__ ((packed));
477 struct adhoc_bssdesc {
485 union ieeetypes_phyparamset phyparamset;
486 union IEEEtypes_ssparamset ssparamset;
490 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
491 * Adhoc join command and will cause a binary layout mismatch with
494 } __attribute__ ((packed));
496 struct cmd_ds_802_11_ad_hoc_join {
497 struct adhoc_bssdesc bss;
501 } __attribute__ ((packed));
503 struct cmd_ds_802_11_enable_rsn {
506 } __attribute__ ((packed));
508 struct MrvlIEtype_keyParamSet {
512 /* length of Payload */
515 /* type of key: WEP=0, TKIP=1, AES=2 */
518 /* key control Info specific to a keytypeid */
524 /* key material of size keylen */
528 struct cmd_ds_802_11_key_material {
530 struct MrvlIEtype_keyParamSet keyParamSet[2];
531 } __attribute__ ((packed));
533 struct cmd_ds_802_11_eeprom_access {
540 } __attribute__ ((packed));
542 struct cmd_ds_802_11_tpc_cfg {
549 } __attribute__ ((packed));
551 struct cmd_ds_802_11_led_ctrl {
555 } __attribute__ ((packed));
557 struct cmd_ds_802_11_pwr_cfg {
563 } __attribute__ ((packed));
565 struct cmd_ds_802_11_afc {
573 __le16 timing_offset; /* signed */
574 __le16 carrier_offset; /* signed */
577 } __attribute__ ((packed));
579 struct cmd_tx_rate_query {
581 } __attribute__ ((packed));
583 struct cmd_ds_get_tsf {
585 } __attribute__ ((packed));
587 struct cmd_ds_bt_access {
592 } __attribute__ ((packed));
594 struct cmd_ds_fwt_access {
612 } __attribute__ ((packed));
614 struct cmd_ds_mesh_access {
616 __le32 data[32]; /* last position reserved */
617 } __attribute__ ((packed));
619 /* Number of stats counters returned by the firmware */
620 #define MESH_STATS_NUM 8
622 struct cmd_ds_command {
631 struct cmd_ds_get_hw_spec hwspec;
632 struct cmd_ds_802_11_ps_mode psmode;
633 struct cmd_ds_802_11_scan scan;
634 struct cmd_ds_802_11_scan_rsp scanresp;
635 struct cmd_ds_mac_control macctrl;
636 struct cmd_ds_802_11_associate associate;
637 struct cmd_ds_802_11_deauthenticate deauth;
638 struct cmd_ds_802_11_set_wep wep;
639 struct cmd_ds_802_11_ad_hoc_start ads;
640 struct cmd_ds_802_11_reset reset;
641 struct cmd_ds_802_11_ad_hoc_result result;
642 struct cmd_ds_802_11_get_log glog;
643 struct cmd_ds_802_11_authenticate auth;
644 struct cmd_ds_802_11_get_stat gstat;
645 struct cmd_ds_802_3_get_stat gstat_8023;
646 struct cmd_ds_802_11_snmp_mib smib;
647 struct cmd_ds_802_11_rf_tx_power txp;
648 struct cmd_ds_802_11_rf_antenna rant;
649 struct cmd_ds_802_11_monitor_mode monitor;
650 struct cmd_ds_802_11_data_rate drate;
651 struct cmd_ds_802_11_rate_adapt_rateset rateset;
652 struct cmd_ds_mac_multicast_adr madr;
653 struct cmd_ds_802_11_ad_hoc_join adj;
654 struct cmd_ds_802_11_radio_control radio;
655 struct cmd_ds_802_11_rf_channel rfchannel;
656 struct cmd_ds_802_11_rssi rssi;
657 struct cmd_ds_802_11_rssi_rsp rssirsp;
658 struct cmd_ds_802_11_disassociate dassociate;
659 struct cmd_ds_802_11_mac_address macadd;
660 struct cmd_ds_802_11_enable_rsn enbrsn;
661 struct cmd_ds_802_11_key_material keymaterial;
662 struct cmd_ds_mac_reg_access macreg;
663 struct cmd_ds_bbp_reg_access bbpreg;
664 struct cmd_ds_rf_reg_access rfreg;
665 struct cmd_ds_802_11_eeprom_access rdeeprom;
667 struct cmd_ds_802_11d_domain_info domaininfo;
668 struct cmd_ds_802_11d_domain_info domaininforesp;
670 struct cmd_ds_802_11_sleep_params sleep_params;
671 struct cmd_ds_802_11_inactivity_timeout inactivity_timeout;
672 struct cmd_ds_802_11_tpc_cfg tpccfg;
673 struct cmd_ds_802_11_pwr_cfg pwrcfg;
674 struct cmd_ds_802_11_afc afc;
675 struct cmd_ds_802_11_led_ctrl ledgpio;
677 struct cmd_tx_rate_query txrate;
678 struct cmd_ds_bt_access bt;
679 struct cmd_ds_fwt_access fwt;
680 struct cmd_ds_mesh_access mesh;
681 struct cmd_ds_set_boot2_ver boot2_ver;
682 struct cmd_ds_get_tsf gettsf;
683 struct cmd_ds_802_11_subscribe_event subscribe_event;
684 struct cmd_ds_802_11_beacon_control bcn_ctrl;
686 } __attribute__ ((packed));