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 */
75 struct wlan_bssid_ex dev_network;
79 u8 ampdu_enable;/* for tx */
81 u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
83 u8 wifi_spec;/* !turbo_mode */
86 bool accept_addba_req; /* true = accept AP's Add BA req */
91 u8 usbss_enable;/* 0:disable,1:enable */
92 u8 hwpdn_mode;/* 0:disable,1:enable,2:decide by EFUSE config */
94 u8 max_roaming_times; /* the max number driver will try */
96 u8 fw_iol; /* enable iol without other concern */
107 #define MAX_CONTINUAL_URB_ERR 4
111 /* For 92D, DMDP have 2 interface. */
115 /* In /Out Pipe information */
118 u8 Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
120 /*-------- below is for USB INTERFACE --------*/
124 struct mutex usb_vendor_req_mutex;
126 struct usb_interface *pusbintf;
127 struct usb_device *pusbdev;
130 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
132 /* todo: get interface type from dvobj and the return
133 * the dev accordingly */
134 return &dvobj->pusbintf->dev;
138 struct dvobj_priv *dvobj;
139 struct mlme_priv mlmepriv;
140 struct mlme_ext_priv mlmeextpriv;
141 struct cmd_priv cmdpriv;
142 struct xmit_priv xmitpriv;
143 struct recv_priv recvpriv;
144 struct sta_priv stapriv;
145 struct security_priv securitypriv;
146 struct registry_priv registrypriv;
147 struct pwrctrl_priv pwrctrlpriv;
148 struct eeprom_priv eeprompriv;
149 struct led_priv ledpriv;
151 struct hal_data_8188e *HalData;
154 s32 bSurpriseRemoved;
156 u8 hw_init_completed;
159 void (*intf_start)(struct adapter *adapter);
160 void (*intf_stop)(struct adapter *adapter);
161 struct net_device *pnetdev;
162 struct net_device *pmondev;
165 struct net_device_stats stats;
166 struct iw_statistics iwstats;
167 struct proc_dir_entry *dir_dev;/* for proc directory */
175 struct mutex hw_init_mutex;
178 #define adapter_to_dvobj(adapter) (adapter->dvobj)
180 static inline u8 *myid(struct eeprom_priv *peepriv)
182 return peepriv->mac_addr;
185 #endif /* __DRV_TYPES_H__ */