aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/otus/usbdrv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/otus/usbdrv.h')
-rw-r--r--drivers/staging/otus/usbdrv.h140
1 files changed, 68 insertions, 72 deletions
diff --git a/drivers/staging/otus/usbdrv.h b/drivers/staging/otus/usbdrv.h
index 78004062cab..330d1b95cb8 100644
--- a/drivers/staging/otus/usbdrv.h
+++ b/drivers/staging/otus/usbdrv.h
@@ -45,7 +45,7 @@
45#include "oal_dt.h" 45#include "oal_dt.h"
46#include "oal_marc.h" 46#include "oal_marc.h"
47#include "80211core/pub_zfi.h" 47#include "80211core/pub_zfi.h"
48//#include "pub_zfw.h" 48/* #include "pub_zfw.h" */
49#include "80211core/pub_usb.h" 49#include "80211core/pub_usb.h"
50 50
51#include <linux/usb.h> 51#include <linux/usb.h>
@@ -86,8 +86,7 @@ struct driver_stats {
86#define ZM_MAX_RX_URB_NUM 16 86#define ZM_MAX_RX_URB_NUM 16
87#define ZM_MAX_TX_BUF_NUM 128 87#define ZM_MAX_TX_BUF_NUM 128
88 88
89typedef struct UsbTxQ 89typedef struct UsbTxQ {
90{
91 zbuf_t *buf; 90 zbuf_t *buf;
92 u8_t hdr[80]; 91 u8_t hdr[80];
93 u16_t hdrlen; 92 u16_t hdrlen;
@@ -100,17 +99,16 @@ typedef struct UsbTxQ
100 99
101 100
102struct zdap_ioctl { 101struct zdap_ioctl {
103 u16_t cmd; /* Command to run */ 102 u16_t cmd; /* Command to run */
104 u32_t addr; /* Length of the data buffer */ 103 u32_t addr; /* Length of the data buffer */
105 u32_t value; /* Pointer to the data buffer */ 104 u32_t value; /* Pointer to the data buffer */
106 u8_t data[0x100]; 105 u8_t data[0x100];
107}; 106};
108 107
109#define ZM_OAL_MAX_STA_SUPPORT 16 108#define ZM_OAL_MAX_STA_SUPPORT 16
110 109
111struct usbdrv_private 110struct usbdrv_private {
112{ 111 /* linux used */
113 //linux used
114 struct net_device *device; 112 struct net_device *device;
115#if (WLAN_HOSTIF == WLAN_PCI) 113#if (WLAN_HOSTIF == WLAN_PCI)
116 struct pci_dev *pdev; 114 struct pci_dev *pdev;
@@ -121,7 +119,7 @@ struct usbdrv_private
121#endif 119#endif
122 struct driver_stats drv_stats; 120 struct driver_stats drv_stats;
123 char ifname[IFNAMSIZ]; 121 char ifname[IFNAMSIZ];
124 int using_dac; 122 int using_dac;
125 u8_t rev_id; /* adapter PCI revision ID */ 123 u8_t rev_id; /* adapter PCI revision ID */
126 rwlock_t isolate_lock; 124 rwlock_t isolate_lock;
127 spinlock_t cs_lock; 125 spinlock_t cs_lock;
@@ -130,78 +128,76 @@ struct usbdrv_private
130 void *regp; 128 void *regp;
131#endif 129#endif
132 130
133 /* timer for heart beat */ 131 /* timer for heart beat */
134 struct timer_list hbTimer10ms; 132 struct timer_list hbTimer10ms;
135 133
136 /* For driver core */ 134 /* For driver core */
137 void* wd; 135 void *wd;
138 136
139#if (WLAN_HOSTIF == WLAN_USB) 137#if (WLAN_HOSTIF == WLAN_USB)
140 u8_t txUsbBuf[ZM_MAX_TX_URB_NUM][ZM_USB_TX_BUF_SIZE]; 138 u8_t txUsbBuf[ZM_MAX_TX_URB_NUM][ZM_USB_TX_BUF_SIZE];
141 u8_t regUsbReadBuf[ZM_USB_REG_MAX_BUF_SIZE]; 139 u8_t regUsbReadBuf[ZM_USB_REG_MAX_BUF_SIZE];
142 u8_t regUsbWriteBuf[ZM_USB_REG_MAX_BUF_SIZE]; 140 u8_t regUsbWriteBuf[ZM_USB_REG_MAX_BUF_SIZE];
143 urb_t *WlanTxDataUrb[ZM_MAX_TX_URB_NUM]; 141 urb_t *WlanTxDataUrb[ZM_MAX_TX_URB_NUM];
144 urb_t *WlanRxDataUrb[ZM_MAX_RX_URB_NUM]; 142 urb_t *WlanRxDataUrb[ZM_MAX_RX_URB_NUM];
145 urb_t *RegOutUrb; 143 urb_t *RegOutUrb;
146 urb_t *RegInUrb; 144 urb_t *RegInUrb;
147 UsbTxQ_t UsbTxBufQ[ZM_MAX_TX_BUF_NUM]; 145 UsbTxQ_t UsbTxBufQ[ZM_MAX_TX_BUF_NUM];
148 zbuf_t *UsbRxBufQ[ZM_MAX_RX_URB_NUM]; 146 zbuf_t *UsbRxBufQ[ZM_MAX_RX_URB_NUM];
149 u16_t TxBufHead; 147 u16_t TxBufHead;
150 u16_t TxBufTail; 148 u16_t TxBufTail;
151 u16_t TxBufCnt; 149 u16_t TxBufCnt;
152 u16_t TxUrbHead; 150 u16_t TxUrbHead;
153 u16_t TxUrbTail; 151 u16_t TxUrbTail;
154 u16_t TxUrbCnt; 152 u16_t TxUrbCnt;
155 u16_t RxBufHead; 153 u16_t RxBufHead;
156 u16_t RxBufTail; 154 u16_t RxBufTail;
157 u16_t RxBufCnt; 155 u16_t RxBufCnt;
158#endif 156#endif
159 157
160#if ZM_USB_STREAM_MODE == 1 158#if ZM_USB_STREAM_MODE == 1
161 zbuf_t *reamin_buf; 159 zbuf_t *reamin_buf;
162#endif 160#endif
163 161
164#ifdef ZM_HOSTAPD_SUPPORT 162#ifdef ZM_HOSTAPD_SUPPORT
165 struct athr_wlan_param athr_wpa_req; 163 struct athr_wlan_param athr_wpa_req;
166#endif 164#endif
167 struct sock *netlink_sk; 165 struct sock *netlink_sk;
168 u8_t DeviceOpened; //CWYang(+) 166 u8_t DeviceOpened; /* CWYang(+) */
169 u8_t supIe[50]; 167 u8_t supIe[50];
170 u8_t supLen; 168 u8_t supLen;
171 struct ieee80211req_wpaie stawpaie[ZM_OAL_MAX_STA_SUPPORT]; 169 struct ieee80211req_wpaie stawpaie[ZM_OAL_MAX_STA_SUPPORT];
172 u8_t forwardMgmt; 170 u8_t forwardMgmt;
173 171
174 struct zfCbUsbFuncTbl usbCbFunctions; 172 struct zfCbUsbFuncTbl usbCbFunctions;
175 173
176 /* For keventd */ 174 /* For keventd */
177 u32_t flags; 175 u32_t flags;
178 unsigned long kevent_flags; 176 unsigned long kevent_flags;
179 u16_t kevent_ready; 177 u16_t kevent_ready;
180 178
181 struct semaphore ioctl_sem; 179 struct semaphore ioctl_sem;
182 struct work_struct kevent; 180 struct work_struct kevent;
183 wait_queue_head_t wait_queue_event; 181 wait_queue_head_t wait_queue_event;
184#ifdef ZM_HALPLUS_LOCK 182#ifdef ZM_HALPLUS_LOCK
185 unsigned long hal_irqFlag; 183 unsigned long hal_irqFlag;
186#endif 184#endif
187 u16_t adapterState; 185 u16_t adapterState;
188}; 186};
189 187
190/* WDS */ 188/* WDS */
191#define ZM_WDS_PORT_NUMBER 6 189#define ZM_WDS_PORT_NUMBER 6
192 190
193struct zsWdsStruct 191struct zsWdsStruct {
194{ 192 struct net_device *dev;
195 struct net_device* dev;
196 u16_t openFlag; 193 u16_t openFlag;
197}; 194};
198 195
199/* VAP */ 196/* VAP */
200#define ZM_VAP_PORT_NUMBER 7 197#define ZM_VAP_PORT_NUMBER 7
201 198
202struct zsVapStruct 199struct zsVapStruct {
203{ 200 struct net_device *dev;
204 struct net_device* dev;
205 u16_t openFlag; 201 u16_t openFlag;
206}; 202};
207 203
@@ -215,25 +211,25 @@ struct zsVapStruct
215#define ZM_IOCTL_RXD_DUMP 0x07 211#define ZM_IOCTL_RXD_DUMP 0x07
216#define ZM_IOCTL_MEM_READ 0x0B 212#define ZM_IOCTL_MEM_READ 0x0B
217#define ZM_IOCTL_MEM_WRITE 0x0C 213#define ZM_IOCTL_MEM_WRITE 0x0C
218#define ZM_IOCTL_DMA_TEST 0x10 214#define ZM_IOCTL_DMA_TEST 0x10
219#define ZM_IOCTL_REG_TEST 0x11 215#define ZM_IOCTL_REG_TEST 0x11
220#define ZM_IOCTL_TEST 0x80 216#define ZM_IOCTL_TEST 0x80
221#define ZM_IOCTL_TALLY 0x81 //CWYang(+) 217#define ZM_IOCTL_TALLY 0x81 /* CWYang(+) */
222#define ZM_IOCTL_RTS 0xA0 218#define ZM_IOCTL_RTS 0xA0
223#define ZM_IOCTL_MIX_MODE 0xA1 219#define ZM_IOCTL_MIX_MODE 0xA1
224#define ZM_IOCTL_FRAG 0xA2 220#define ZM_IOCTL_FRAG 0xA2
225#define ZM_IOCTL_SCAN 0xA3 221#define ZM_IOCTL_SCAN 0xA3
226#define ZM_IOCTL_KEY 0xA4 222#define ZM_IOCTL_KEY 0xA4
227#define ZM_IOCTL_RATE 0xA5 223#define ZM_IOCTL_RATE 0xA5
228#define ZM_IOCTL_ENCRYPTION_MODE 0xA6 224#define ZM_IOCTL_ENCRYPTION_MODE 0xA6
229#define ZM_IOCTL_GET_TXCNT 0xA7 225#define ZM_IOCTL_GET_TXCNT 0xA7
230#define ZM_IOCTL_GET_DEAGG_CNT 0xA8 226#define ZM_IOCTL_GET_DEAGG_CNT 0xA8
231#define ZM_IOCTL_DURATION_MODE 0xA9 227#define ZM_IOCTL_DURATION_MODE 0xA9
232#define ZM_IOCTL_SET_AES_KEY 0xAA 228#define ZM_IOCTL_SET_AES_KEY 0xAA
233#define ZM_IOCTL_SET_AES_MODE 0xAB 229#define ZM_IOCTL_SET_AES_MODE 0xAB
234#define ZM_IOCTL_SIGNAL_STRENGTH 0xAC //CWYang(+) 230#define ZM_IOCTL_SIGNAL_STRENGTH 0xAC /* CWYang(+) */
235#define ZM_IOCTL_SIGNAL_QUALITY 0xAD //CWYang(+) 231#define ZM_IOCTL_SIGNAL_QUALITY 0xAD /* CWYang(+) */
236#define ZM_IOCTL_SET_PIBSS_MODE 0xAE 232#define ZM_IOCTL_SET_PIBSS_MODE 0xAE
237 233
238#define ZDAPIOCTL SIOCDEVPRIVATE 234#define ZDAPIOCTL SIOCDEVPRIVATE
239 235