1 /******************************************************************************
3 * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * Modifications for inclusion into the Linux staging tree are
15 * Copyright(c) 2010 Larry Finger. All rights reserved.
17 * Contact information:
18 * WLAN FAE <wlanfae@realtek.com>
19 * Larry Finger <Larry.Finger@lwfinger.net>
21 ******************************************************************************/
22 /* ---------------------------------------------------------------------
24 * For type defines and data structure defines
26 * ---------------------------------------------------------------------
28 #ifndef __DRV_TYPES_H__
29 #define __DRV_TYPES_H__
33 #include "osdep_service.h"
34 #include "wlan_bssdef.h"
35 #include "rtl8712_spec.h"
36 #include "rtl8712_hal.h"
37 #include <linux/mutex.h>
38 #include <linux/completion.h>
50 /* bit mask option: u-apsd, s-apsd, ts, block ack... */
51 unsigned int qos_option;
54 #include "rtl871x_ht.h"
55 #include "rtl871x_cmd.h"
56 #include "rtl871x_xmit.h"
57 #include "rtl871x_recv.h"
58 #include "rtl871x_security.h"
59 #include "rtl871x_pwrctrl.h"
60 #include "rtl871x_io.h"
61 #include "rtl871x_eeprom.h"
63 #include "rtl871x_mlme.h"
64 #include "rtl871x_mp.h"
65 #include "rtl871x_debug.h"
66 #include "rtl871x_rf.h"
67 #include "rtl871x_event.h"
68 #include "rtl871x_led.h"
70 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
72 struct specific_device_id {
79 struct registry_priv {
84 u8 network_mode; /*infra, ad-hoc, auto*/
85 struct ndis_802_11_ssid ssid;
86 u8 channel;/* ad-hoc support requirement */
87 u8 wireless_mode;/* A, B, G, auto */
88 u8 vrtl_carrier_sense; /*Enable, Disable, Auto*/
89 u8 vcs_type;/*RTS/CTS, CTS-to-self*/
92 u8 preamble;/*long, short, auto*/
93 u8 scan_mode;/*active, passive*/
115 struct wlan_bssid_ex dev_network;
119 u8 ampdu_enable;/*for tx*/
126 struct _adapter *padapter;
129 uint (*inirp_init)(struct _adapter *adapter);
130 uint (*inirp_deinit)(struct _adapter *adapter);
131 struct usb_device *pusbdev;
135 * struct _adapter - the main adapter structure for this device.
137 * bup: True indicates that the interface is up.
140 struct dvobj_priv dvobjpriv;
141 struct mlme_priv mlmepriv;
142 struct cmd_priv cmdpriv;
143 struct evt_priv evtpriv;
144 struct io_queue *pio_queue;
145 struct xmit_priv xmitpriv;
146 struct recv_priv recvpriv;
147 struct sta_priv stapriv;
148 struct security_priv securitypriv;
149 struct registry_priv registrypriv;
150 struct wlan_acl_pool acl_list;
151 struct pwrctrl_priv pwrctrlpriv;
152 struct eeprom_priv eeprompriv;
153 struct hal_priv halpriv;
154 struct led_priv ledpriv;
155 struct mp_priv mppriv;
157 s32 bSurpriseRemoved;
161 u8 EepromAddressSize;
162 u8 hw_init_completed;
163 struct task_struct *cmdThread;
165 struct task_struct *xmitThread;
167 uint (*dvobj_init)(struct _adapter *adapter);
168 void (*dvobj_deinit)(struct _adapter *adapter);
169 struct net_device *pnetdev;
171 struct net_device_stats stats;
172 struct iw_statistics iwstats;
173 int pid; /*process id from UI*/
174 struct work_struct wkFilterRxFF0;
175 u8 blnEnableRxFF0Filter;
176 spinlock_t lockRxFF0Filter;
177 const struct firmware *fw;
178 struct usb_interface *pusb_intf;
179 struct mutex mutex_start;
180 struct completion rtl8712_fw_ready;
183 static inline u8 *myid(struct eeprom_priv *peepriv)
185 return peepriv->mac_addr;
188 u8 r8712_usb_hal_bus_init(struct _adapter *adapter);
190 #endif /*__DRV_TYPES_H__*/