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>
27 #include <rtw_security.h>
28 #include <rtw_pwrctrl.h>
29 #include <rtw_eeprom.h>
33 /* bit mask option: u-apsd, s-apsd, ts, block ack... */
34 unsigned int qos_option;
38 #include <rtw_debug.h>
40 #include <rtw_event.h>
42 #include <rtw_mlme_ext.h>
45 #define SPEC_DEV_ID_NONE BIT(0)
46 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
47 #define SPEC_DEV_ID_ENABLE_PS BIT(2)
48 #define SPEC_DEV_ID_RF_CONFIG_1T1R BIT(3)
49 #define SPEC_DEV_ID_RF_CONFIG_2T2R BIT(4)
50 #define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
52 struct registry_priv {
53 struct ndis_802_11_ssid ssid;
54 u8 channel;/* ad-hoc support requirement */
55 u8 wireless_mode;/* A, B, G, auto */
56 u8 preamble;/* long, short, auto */
57 u8 vrtl_carrier_sense;/* Enable, Disable, Auto */
58 u8 vcs_type;/* RTS/CTS, CTS-to-self */
70 struct wlan_bssid_ex dev_network;
74 u8 ampdu_enable;/* for tx */
76 u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
78 u8 wifi_spec;/* !turbo_mode */
81 bool accept_addba_req; /* true = accept AP's Add BA req */
86 u8 usbss_enable;/* 0:disable,1:enable */
87 u8 hwpdn_mode;/* 0:disable,1:enable,2:decide by EFUSE config */
89 u8 max_roaming_times; /* the max number driver will try */
91 u8 fw_iol; /* enable iol without other concern */
102 #define MAX_CONTINUAL_URB_ERR 4
106 /* For 92D, DMDP have 2 interface. */
110 /* In /Out Pipe information */
113 u8 Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
115 /*-------- below is for USB INTERFACE --------*/
119 struct mutex usb_vendor_req_mutex;
121 struct usb_interface *pusbintf;
122 struct usb_device *pusbdev;
125 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
127 /* todo: get interface type from dvobj and the return
128 * the dev accordingly
130 return &dvobj->pusbintf->dev;
134 struct dvobj_priv *dvobj;
135 struct mlme_priv mlmepriv;
136 struct mlme_ext_priv mlmeextpriv;
137 struct cmd_priv cmdpriv;
138 struct xmit_priv xmitpriv;
139 struct recv_priv recvpriv;
140 struct sta_priv stapriv;
141 struct security_priv securitypriv;
142 struct registry_priv registrypriv;
143 struct pwrctrl_priv pwrctrlpriv;
144 struct eeprom_priv eeprompriv;
145 struct led_priv ledpriv;
147 struct hal_data_8188e *HalData;
150 s32 bSurpriseRemoved;
152 u8 hw_init_completed;
155 struct net_device *pnetdev;
156 struct net_device *pmondev;
159 struct net_device_stats stats;
160 struct iw_statistics iwstats;
161 struct proc_dir_entry *dir_dev;/* for proc directory */
168 struct mutex hw_init_mutex;
171 #define adapter_to_dvobj(adapter) (adapter->dvobj)
173 static inline u8 *myid(struct eeprom_priv *peepriv)
175 return peepriv->mac_addr;
178 #endif /* __DRV_TYPES_H__ */