1 /*---------------------------------------------------------------------
3 For type defines and data structure defines
5 -----------------------------------------------------------------------*/
6 #ifndef __DRV_TYPES_H__
7 #define __DRV_TYPES_H__
11 #include "osdep_service.h"
12 #include "wlan_bssdef.h"
13 #include "rtl8712_spec.h"
14 #include "rtl8712_hal.h"
26 /* bit mask option: u-apsd, s-apsd, ts, block ack... */
27 unsigned int qos_option;
30 #include "rtl871x_ht.h"
31 #include "rtl871x_cmd.h"
32 #include "rtl871x_xmit.h"
33 #include "rtl871x_recv.h"
34 #include "rtl871x_security.h"
35 #include "rtl871x_pwrctrl.h"
36 #include "rtl871x_io.h"
37 #include "rtl871x_eeprom.h"
39 #include "rtl871x_mlme.h"
40 #include "rtl871x_mp.h"
41 #include "rtl871x_debug.h"
42 #include "rtl871x_rf.h"
43 #include "rtl871x_event.h"
44 #include "rtl871x_led.h"
46 #define SPEC_DEV_ID_NONE BIT(0)
47 #define SPEC_DEV_ID_DISABLE_HT BIT(1)
48 #define SPEC_DEV_ID_ENABLE_PS BIT(2)
50 struct specific_device_id {
57 struct registry_priv {
62 u8 network_mode; /*infra, ad-hoc, auto*/
63 struct ndis_802_11_ssid ssid;
64 u8 channel;/* ad-hoc support requirement */
65 u8 wireless_mode;/* A, B, G, auto */
66 u8 vrtl_carrier_sense; /*Enable, Disable, Auto*/
67 u8 vcs_type;/*RTS/CTS, CTS-to-self*/
70 u8 preamble;/*long, short, auto*/
71 u8 scan_mode;/*active, passive*/
93 struct wlan_bssid_ex dev_network;
97 u8 ampdu_enable;/*for tx*/
103 /* For registry parameters */
104 #define RGTRY_OFT(field) ((addr_t)FIELD_OFFSET(struct registry_priv, field))
105 #define RGTRY_SZ(field) sizeof(((struct registry_priv *)0)->field)
106 #define BSSID_OFT(field) ((addr_t)FIELD_OFFSET(struct ndis_wlan_bssid_ex, \
108 #define BSSID_SZ(field) sizeof(((struct ndis_wlan_bssid_ex *)0)->field)
111 struct _adapter *padapter;
114 uint(*inirp_init)(struct _adapter *adapter);
115 uint(*inirp_deinit)(struct _adapter *adapter);
116 struct semaphore usb_suspend_sema;
117 struct usb_device *pusbdev;
121 struct dvobj_priv dvobjpriv;
122 struct mlme_priv mlmepriv;
123 struct cmd_priv cmdpriv;
124 struct evt_priv evtpriv;
125 struct io_queue *pio_queue;
126 struct xmit_priv xmitpriv;
127 struct recv_priv recvpriv;
128 struct sta_priv stapriv;
129 struct security_priv securitypriv;
130 struct registry_priv registrypriv;
131 struct wlan_acl_pool acl_list;
132 struct pwrctrl_priv pwrctrlpriv;
133 struct eeprom_priv eeprompriv;
134 struct hal_priv halpriv;
135 struct led_priv ledpriv;
136 struct mp_priv mppriv;
138 s32 bSurpriseRemoved;
141 u8 EepromAddressSize;
142 u8 hw_init_completed;
143 struct task_struct *cmdThread;
145 struct task_struct *xmitThread;
147 uint(*dvobj_init)(struct _adapter *adapter);
148 void (*dvobj_deinit)(struct _adapter *adapter);
149 struct net_device *pnetdev;
151 struct net_device_stats stats;
152 struct iw_statistics iwstats;
153 int pid; /*process id from UI*/
156 static inline u8 *myid(struct eeprom_priv *peepriv)
158 return peepriv->mac_addr;
161 u8 r8712_usb_hal_bus_init(struct _adapter *adapter);
163 #endif /*__DRV_TYPES_H__*/