1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
4 * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
6 ******************************************************************************/
7 /*-----------------------------------------------------------------------------
9 For type defines and data structure defines
11 ------------------------------------------------------------------------------*/
14 #ifndef __DRV_TYPES_H__
15 #define __DRV_TYPES_H__
17 #define DRV_NAME "r8188eu"
19 #include <osdep_service.h>
20 #include <wlan_bssdef.h>
28 #include <rtw_security.h>
29 #include <rtw_pwrctrl.h>
30 #include <rtw_eeprom.h>
33 #include <rtw_debug.h>
35 #include <rtw_event.h>
37 #include <rtw_mlme_ext.h>
40 #define SPEC_DEV_ID_NONE BIT(0)
41 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
42 #define SPEC_DEV_ID_ENABLE_PS BIT(2)
43 #define SPEC_DEV_ID_RF_CONFIG_1T1R BIT(3)
44 #define SPEC_DEV_ID_RF_CONFIG_2T2R BIT(4)
45 #define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
47 struct registry_priv {
48 struct ndis_802_11_ssid ssid;
49 u8 channel;/* ad-hoc support requirement */
50 u8 wireless_mode;/* A, B, G, auto */
51 u8 preamble;/* long, short, auto */
52 u8 vrtl_carrier_sense;/* Enable, Disable, Auto */
53 u8 vcs_type;/* RTS/CTS, CTS-to-self */
65 struct wlan_bssid_ex dev_network;
69 u8 ampdu_enable;/* for tx */
71 u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
73 u8 wifi_spec;/* !turbo_mode */
76 bool accept_addba_req; /* true = accept AP's Add BA req */
81 u8 usbss_enable;/* 0:disable,1:enable */
82 u8 hwpdn_mode;/* 0:disable,1:enable,2:decide by EFUSE config */
84 u8 max_roaming_times; /* the max number driver will try */
86 u8 fw_iol; /* enable iol without other concern */
97 #define MAX_CONTINUAL_URB_ERR 4
101 /* For 92D, DMDP have 2 interface. */
105 /* In /Out Pipe information */
108 u8 Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
110 /*-------- below is for USB INTERFACE --------*/
114 struct mutex usb_vendor_req_mutex;
116 struct usb_interface *pusbintf;
117 struct usb_device *pusbdev;
120 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
122 /* todo: get interface type from dvobj and the return
123 * the dev accordingly
125 return &dvobj->pusbintf->dev;
129 struct dvobj_priv *dvobj;
130 struct mlme_priv mlmepriv;
131 struct mlme_ext_priv mlmeextpriv;
132 struct cmd_priv cmdpriv;
133 struct xmit_priv xmitpriv;
134 struct recv_priv recvpriv;
135 struct sta_priv stapriv;
136 struct security_priv securitypriv;
137 struct registry_priv registrypriv;
138 struct pwrctrl_priv pwrctrlpriv;
139 struct eeprom_priv eeprompriv;
140 struct led_priv ledpriv;
142 struct hal_data_8188e *HalData;
145 s32 bSurpriseRemoved;
147 u8 hw_init_completed;
150 struct net_device *pnetdev;
151 struct net_device *pmondev;
154 struct net_device_stats stats;
155 struct iw_statistics iwstats;
156 struct proc_dir_entry *dir_dev;/* for proc directory */
163 struct mutex hw_init_mutex;
166 #define adapter_to_dvobj(adapter) (adapter->dvobj)
168 static inline u8 *myid(struct eeprom_priv *peepriv)
170 return peepriv->mac_addr;
173 #endif /* __DRV_TYPES_H__ */