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 ------------------------------------------------------------------------------*/
13 #ifndef __DRV_TYPES_H__
14 #define __DRV_TYPES_H__
16 #define DRV_NAME "r8188eu"
18 #include <osdep_service.h>
19 #include <wlan_bssdef.h>
26 #include <rtw_security.h>
27 #include <rtw_pwrctrl.h>
28 #include <rtw_eeprom.h>
32 /* bit mask option: u-apsd, s-apsd, ts, block ack... */
33 unsigned int qos_option;
37 #include <rtw_debug.h>
39 #include <rtw_event.h>
41 #include <rtw_mlme_ext.h>
44 #define SPEC_DEV_ID_NONE BIT(0)
45 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
46 #define SPEC_DEV_ID_ENABLE_PS BIT(2)
47 #define SPEC_DEV_ID_RF_CONFIG_1T1R BIT(3)
48 #define SPEC_DEV_ID_RF_CONFIG_2T2R BIT(4)
49 #define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
51 struct registry_priv {
52 struct ndis_802_11_ssid ssid;
53 u8 channel;/* ad-hoc support requirement */
54 u8 wireless_mode;/* A, B, G, auto */
55 u8 preamble;/* long, short, auto */
56 u8 vrtl_carrier_sense;/* Enable, Disable, Auto */
57 u8 vcs_type;/* RTS/CTS, CTS-to-self */
69 struct wlan_bssid_ex dev_network;
73 u8 ampdu_enable;/* for tx */
75 u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
77 u8 wifi_spec;/* !turbo_mode */
80 bool accept_addba_req; /* true = accept AP's Add BA req */
85 u8 usbss_enable;/* 0:disable,1:enable */
86 u8 hwpdn_mode;/* 0:disable,1:enable,2:decide by EFUSE config */
88 u8 max_roaming_times; /* the max number driver will try */
90 u8 fw_iol; /* enable iol without other concern */
101 #define MAX_CONTINUAL_URB_ERR 4
105 /* For 92D, DMDP have 2 interface. */
109 /* In /Out Pipe information */
112 u8 Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
114 /*-------- below is for USB INTERFACE --------*/
118 struct mutex usb_vendor_req_mutex;
120 struct usb_interface *pusbintf;
121 struct usb_device *pusbdev;
124 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
126 /* todo: get interface type from dvobj and the return
127 * the dev accordingly
129 return &dvobj->pusbintf->dev;
133 struct dvobj_priv *dvobj;
134 struct mlme_priv mlmepriv;
135 struct mlme_ext_priv mlmeextpriv;
136 struct cmd_priv cmdpriv;
137 struct xmit_priv xmitpriv;
138 struct recv_priv recvpriv;
139 struct sta_priv stapriv;
140 struct security_priv securitypriv;
141 struct registry_priv registrypriv;
142 struct pwrctrl_priv pwrctrlpriv;
143 struct eeprom_priv eeprompriv;
144 struct led_priv ledpriv;
146 struct hal_data_8188e *HalData;
149 s32 bSurpriseRemoved;
151 u8 hw_init_completed;
154 struct net_device *pnetdev;
155 struct net_device *pmondev;
158 struct net_device_stats stats;
159 struct iw_statistics iwstats;
160 struct proc_dir_entry *dir_dev;/* for proc directory */
167 struct mutex hw_init_mutex;
170 #define adapter_to_dvobj(adapter) (adapter->dvobj)
172 static inline u8 *myid(struct eeprom_priv *peepriv)
174 return peepriv->mac_addr;
177 #endif /* __DRV_TYPES_H__ */