1 /******************************************************************************
3 * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
15 /*-----------------------------------------------------------------------------
17 For type defines and data structure defines
19 ------------------------------------------------------------------------------*/
22 #ifndef __DRV_TYPES_H__
23 #define __DRV_TYPES_H__
25 #define DRV_NAME "r8188eu"
27 #include <osdep_service.h>
28 #include <wlan_bssdef.h>
36 #include <rtw_security.h>
37 #include <rtw_pwrctrl.h>
38 #include <rtw_eeprom.h>
41 #include <rtw_debug.h>
43 #include <rtw_event.h>
45 #include <rtw_mlme_ext.h>
48 #define SPEC_DEV_ID_NONE BIT(0)
49 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
50 #define SPEC_DEV_ID_ENABLE_PS BIT(2)
51 #define SPEC_DEV_ID_RF_CONFIG_1T1R BIT(3)
52 #define SPEC_DEV_ID_RF_CONFIG_2T2R BIT(4)
53 #define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
55 struct registry_priv {
56 struct ndis_802_11_ssid ssid;
57 u8 channel;/* ad-hoc support requirement */
58 u8 wireless_mode;/* A, B, G, auto */
59 u8 preamble;/* long, short, auto */
60 u8 vrtl_carrier_sense;/* Enable, Disable, Auto */
61 u8 vcs_type;/* RTS/CTS, CTS-to-self */
73 struct wlan_bssid_ex dev_network;
77 u8 ampdu_enable;/* for tx */
79 u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
81 u8 wifi_spec;/* !turbo_mode */
84 bool accept_addba_req; /* true = accept AP's Add BA req */
89 u8 usbss_enable;/* 0:disable,1:enable */
90 u8 hwpdn_mode;/* 0:disable,1:enable,2:decide by EFUSE config */
92 u8 max_roaming_times; /* the max number driver will try */
94 u8 fw_iol; /* enable iol without other concern */
105 #define MAX_CONTINUAL_URB_ERR 4
109 /* For 92D, DMDP have 2 interface. */
113 /* In /Out Pipe information */
116 u8 Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
118 /*-------- below is for USB INTERFACE --------*/
122 struct mutex usb_vendor_req_mutex;
124 struct usb_interface *pusbintf;
125 struct usb_device *pusbdev;
128 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
130 /* todo: get interface type from dvobj and the return
131 * the dev accordingly */
132 return &dvobj->pusbintf->dev;
136 struct dvobj_priv *dvobj;
137 struct mlme_priv mlmepriv;
138 struct mlme_ext_priv mlmeextpriv;
139 struct cmd_priv cmdpriv;
140 struct xmit_priv xmitpriv;
141 struct recv_priv recvpriv;
142 struct sta_priv stapriv;
143 struct security_priv securitypriv;
144 struct registry_priv registrypriv;
145 struct pwrctrl_priv pwrctrlpriv;
146 struct eeprom_priv eeprompriv;
147 struct led_priv ledpriv;
149 struct hal_data_8188e *HalData;
152 s32 bSurpriseRemoved;
154 u8 hw_init_completed;
157 struct net_device *pnetdev;
158 struct net_device *pmondev;
161 struct net_device_stats stats;
162 struct iw_statistics iwstats;
163 struct proc_dir_entry *dir_dev;/* for proc directory */
170 struct mutex hw_init_mutex;
173 #define adapter_to_dvobj(adapter) (adapter->dvobj)
175 static inline u8 *myid(struct eeprom_priv *peepriv)
177 return peepriv->mac_addr;
180 #endif /* __DRV_TYPES_H__ */