1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
4 * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
6 * Modifications for inclusion into the Linux staging tree are
7 * Copyright(c) 2010 Larry Finger. All rights reserved.
10 * WLAN FAE <wlanfae@realtek.com>
11 * Larry Finger <Larry.Finger@lwfinger.net>
13 ******************************************************************************/
14 /* ---------------------------------------------------------------------
16 * For type defines and data structure defines
18 * ---------------------------------------------------------------------
20 #ifndef __DRV_TYPES_H__
21 #define __DRV_TYPES_H__
25 #include "osdep_service.h"
26 #include "wlan_bssdef.h"
27 #include "rtl8712_spec.h"
28 #include "rtl8712_hal.h"
29 #include <linux/mutex.h>
30 #include <linux/completion.h>
42 /* bit mask option: u-apsd, s-apsd, ts, block ack... */
43 unsigned int qos_option;
46 #include "rtl871x_ht.h"
47 #include "rtl871x_cmd.h"
48 #include "rtl871x_xmit.h"
49 #include "rtl871x_recv.h"
50 #include "rtl871x_security.h"
51 #include "rtl871x_pwrctrl.h"
52 #include "rtl871x_io.h"
53 #include "rtl871x_eeprom.h"
55 #include "rtl871x_mlme.h"
56 #include "rtl871x_mp.h"
57 #include "rtl871x_debug.h"
58 #include "rtl871x_rf.h"
59 #include "rtl871x_event.h"
60 #include "rtl871x_led.h"
62 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
64 struct specific_device_id {
71 struct registry_priv {
76 u8 network_mode; /*infra, ad-hoc, auto*/
77 struct ndis_802_11_ssid ssid;
78 u8 channel;/* ad-hoc support requirement */
79 u8 wireless_mode;/* A, B, G, auto */
80 u8 vrtl_carrier_sense; /*Enable, Disable, Auto*/
81 u8 vcs_type;/*RTS/CTS, CTS-to-self*/
84 u8 preamble;/*long, short, auto*/
85 u8 scan_mode;/*active, passive*/
107 struct wlan_bssid_ex dev_network;
111 u8 ampdu_enable;/*for tx*/
118 struct _adapter *padapter;
121 uint (*inirp_init)(struct _adapter *adapter);
122 uint (*inirp_deinit)(struct _adapter *adapter);
123 struct usb_device *pusbdev;
127 * struct _adapter - the main adapter structure for this device.
129 * bup: True indicates that the interface is up.
132 struct dvobj_priv dvobjpriv;
133 struct mlme_priv mlmepriv;
134 struct cmd_priv cmdpriv;
135 struct evt_priv evtpriv;
136 struct io_queue *pio_queue;
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 wlan_acl_pool acl_list;
143 struct pwrctrl_priv pwrctrlpriv;
144 struct eeprom_priv eeprompriv;
145 struct hal_priv halpriv;
146 struct led_priv ledpriv;
147 struct mp_priv mppriv;
149 bool surprise_removed;
151 u8 eeprom_address_size;
152 u8 hw_init_completed;
153 struct task_struct *cmd_thread;
154 uint (*dvobj_init)(struct _adapter *adapter);
155 void (*dvobj_deinit)(struct _adapter *adapter);
156 struct net_device *pnetdev;
158 struct net_device_stats stats;
159 struct iw_statistics iwstats;
160 int pid; /*process id from UI*/
161 struct work_struct wk_filter_rx_ff0;
162 u8 blnEnableRxFF0Filter;
163 spinlock_t lock_rx_ff0_filter;
164 const struct firmware *fw;
165 struct usb_interface *pusb_intf;
166 struct mutex mutex_start;
167 struct completion rtl8712_fw_ready;
170 static inline u8 *myid(struct eeprom_priv *peepriv)
172 return peepriv->mac_addr;
175 u8 r8712_usb_hal_bus_init(struct _adapter *adapter);
177 #endif /*__DRV_TYPES_H__*/