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>
40 /* bit mask option: u-apsd, s-apsd, ts, block ack... */
41 unsigned int qos_option;
44 #include "rtl871x_ht.h"
45 #include "rtl871x_cmd.h"
46 #include "rtl871x_xmit.h"
47 #include "rtl871x_recv.h"
48 #include "rtl871x_security.h"
49 #include "rtl871x_pwrctrl.h"
50 #include "rtl871x_io.h"
51 #include "rtl871x_eeprom.h"
53 #include "rtl871x_mlme.h"
54 #include "rtl871x_mp.h"
55 #include "rtl871x_debug.h"
56 #include "rtl871x_rf.h"
57 #include "rtl871x_event.h"
58 #include "rtl871x_led.h"
60 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
62 struct specific_device_id {
69 struct registry_priv {
74 u8 network_mode; /*infra, ad-hoc, auto*/
75 struct ndis_802_11_ssid ssid;
76 u8 channel;/* ad-hoc support requirement */
77 u8 wireless_mode;/* A, B, G, auto */
78 u8 vrtl_carrier_sense; /*Enable, Disable, Auto*/
79 u8 vcs_type;/*RTS/CTS, CTS-to-self*/
82 u8 preamble;/*long, short, auto*/
83 u8 scan_mode;/*active, passive*/
105 struct wlan_bssid_ex dev_network;
109 u8 ampdu_enable;/*for tx*/
116 struct _adapter *padapter;
119 uint (*inirp_init)(struct _adapter *adapter);
120 uint (*inirp_deinit)(struct _adapter *adapter);
121 struct usb_device *pusbdev;
125 * struct _adapter - the main adapter structure for this device.
127 * bup: True indicates that the interface is up.
130 struct dvobj_priv dvobjpriv;
131 struct mlme_priv mlmepriv;
132 struct cmd_priv cmdpriv;
133 struct evt_priv evtpriv;
134 struct io_queue *pio_queue;
135 struct xmit_priv xmitpriv;
136 struct recv_priv recvpriv;
137 struct sta_priv stapriv;
138 struct security_priv securitypriv;
139 struct registry_priv registrypriv;
140 struct wlan_acl_pool acl_list;
141 struct pwrctrl_priv pwrctrlpriv;
142 struct eeprom_priv eeprompriv;
143 struct hal_priv halpriv;
144 struct led_priv ledpriv;
145 struct mp_priv mppriv;
147 bool surprise_removed;
149 u8 eeprom_address_size;
150 u8 hw_init_completed;
151 struct task_struct *cmd_thread;
152 uint (*dvobj_init)(struct _adapter *adapter);
153 void (*dvobj_deinit)(struct _adapter *adapter);
154 struct net_device *pnetdev;
156 struct net_device_stats stats;
157 struct iw_statistics iwstats;
158 int pid; /*process id from UI*/
159 struct work_struct wk_filter_rx_ff0;
160 u8 blnEnableRxFF0Filter;
161 spinlock_t lock_rx_ff0_filter;
162 const struct firmware *fw;
163 struct usb_interface *pusb_intf;
164 struct mutex mutex_start;
165 struct completion rtl8712_fw_ready;
168 static inline u8 *myid(struct eeprom_priv *peepriv)
170 return peepriv->mac_addr;
173 u8 r8712_usb_hal_bus_init(struct _adapter *adapter);
175 #endif /*__DRV_TYPES_H__*/