3 * Defines the constants and data structures for the hfa384x
5 * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
6 * --------------------------------------------------------------------
10 * The contents of this file are subject to the Mozilla Public
11 * License Version 1.1 (the "License"); you may not use this file
12 * except in compliance with the License. You may obtain a copy of
13 * the License at http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS
16 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
17 * implied. See the License for the specific language governing
18 * rights and limitations under the License.
20 * Alternatively, the contents of this file may be used under the
21 * terms of the GNU Public License version 2 (the "GPL"), in which
22 * case the provisions of the GPL are applicable instead of the
23 * above. If you wish to allow the use of your version of this file
24 * only under the terms of the GPL and not to allow others to use
25 * your version of this file under the MPL, indicate your decision
26 * by deleting the provisions above and replace them with the notice
27 * and other provisions required by the GPL. If you do not delete
28 * the provisions above, a recipient may use your version of this
29 * file under either the MPL or the GPL.
31 * --------------------------------------------------------------------
33 * Inquiries regarding the linux-wlan Open Source project can be
36 * AbsoluteValue Systems Inc.
38 * http://www.linux-wlan.com
40 * --------------------------------------------------------------------
42 * Portions of the development of this software were funded by
43 * Intersil Corporation as part of PRISM(R) chipset product development.
45 * --------------------------------------------------------------------
47 * [Implementation and usage notes]
50 * CW10 Programmer's Manual v1.5
53 * --------------------------------------------------------------------
59 #define HFA384x_FIRMWARE_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
61 #include <linux/if_ether.h>
63 /*--- Mins & Maxs -----------------------------------*/
64 #define HFA384x_PORTID_MAX ((u16)7)
65 #define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1))
66 #define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */
67 #define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK */
68 #define HFA384x_SCANRESULT_MAX ((u16)31)
69 #define HFA384x_HSCANRESULT_MAX ((u16)31)
70 #define HFA384x_CHINFORESULT_MAX ((u16)16)
71 #define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
72 #define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN
73 #define HFA384x_USB_RWMEM_MAXLEN 2048
75 /*--- Support Constants -----------------------------*/
76 #define HFA384x_PORTTYPE_IBSS ((u16)0)
77 #define HFA384x_PORTTYPE_BSS ((u16)1)
78 #define HFA384x_PORTTYPE_PSUEDOIBSS ((u16)3)
79 #define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT(0))
80 #define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT(1))
81 #define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT(4))
82 #define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT(7))
83 #define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3)
84 #define HFA384x_PORTSTATUS_DISABLED ((u16)1)
85 #define HFA384x_RATEBIT_1 ((u16)1)
86 #define HFA384x_RATEBIT_2 ((u16)2)
87 #define HFA384x_RATEBIT_5dot5 ((u16)4)
88 #define HFA384x_RATEBIT_11 ((u16)8)
90 /*--- MAC Internal memory constants and macros ------*/
91 /* masks and macros used to manipulate MAC internal memory addresses. */
92 /* MAC internal memory addresses are 23 bit quantities. The MAC uses
93 * a paged address space where the upper 16 bits are the page number
94 * and the lower 7 bits are the offset. There are various Host API
95 * elements that require two 16-bit quantities to specify a MAC
96 * internal memory address. Unfortunately, some of the API's use a
97 * page/offset format where the offset value is JUST the lower seven
98 * bits and the page is the remaining 16 bits. Some of the API's
99 * assume that the 23 bit address has been split at the 16th bit. We
100 * refer to these two formats as AUX format and CMD format. The
101 * macros below help handle some of this.
104 /* Mask bits for discarding unwanted pieces in a flat address */
105 #define HFA384x_ADDR_FLAT_AUX_PAGE_MASK (0x007fff80)
106 #define HFA384x_ADDR_FLAT_AUX_OFF_MASK (0x0000007f)
107 #define HFA384x_ADDR_FLAT_CMD_PAGE_MASK (0xffff0000)
108 #define HFA384x_ADDR_FLAT_CMD_OFF_MASK (0x0000ffff)
110 /* Mask bits for discarding unwanted pieces in AUX format
111 16-bit address parts */
112 #define HFA384x_ADDR_AUX_PAGE_MASK (0xffff)
113 #define HFA384x_ADDR_AUX_OFF_MASK (0x007f)
115 /* Make a 32-bit flat address from AUX format 16-bit page and offset */
116 #define HFA384x_ADDR_AUX_MKFLAT(p, o) \
117 (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
118 ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))
120 /* Make CMD format offset and page from a 32-bit flat address */
121 #define HFA384x_ADDR_CMD_MKPAGE(f) \
122 ((u16)((((u32)(f))&HFA384x_ADDR_FLAT_CMD_PAGE_MASK)>>16))
123 #define HFA384x_ADDR_CMD_MKOFF(f) \
124 ((u16)(((u32)(f))&HFA384x_ADDR_FLAT_CMD_OFF_MASK))
126 /*--- Controller Memory addresses -------------------*/
127 #define HFA3842_PDA_BASE (0x007f0000UL)
128 #define HFA3841_PDA_BASE (0x003f0000UL)
129 #define HFA3841_PDA_BOGUS_BASE (0x00390000UL)
131 /*--- Driver Download states -----------------------*/
132 #define HFA384x_DLSTATE_DISABLED 0
133 #define HFA384x_DLSTATE_RAMENABLED 1
134 #define HFA384x_DLSTATE_FLASHENABLED 2
136 /*--- Register Field Masks --------------------------*/
137 #define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
138 #define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
139 #define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8)))
140 #define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0)))
142 #define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
144 /*--- Command Code Constants --------------------------*/
145 /*--- Controller Commands --------------------------*/
146 #define HFA384x_CMDCODE_INIT ((u16)0x00)
147 #define HFA384x_CMDCODE_ENABLE ((u16)0x01)
148 #define HFA384x_CMDCODE_DISABLE ((u16)0x02)
150 /*--- Regulate Commands --------------------------*/
151 #define HFA384x_CMDCODE_INQ ((u16)0x11)
153 /*--- Configure Commands --------------------------*/
154 #define HFA384x_CMDCODE_DOWNLD ((u16)0x22)
156 /*--- Debugging Commands -----------------------------*/
157 #define HFA384x_CMDCODE_MONITOR ((u16)(0x38))
158 #define HFA384x_MONITOR_ENABLE ((u16)(0x0b))
159 #define HFA384x_MONITOR_DISABLE ((u16)(0x0f))
161 /*--- Result Codes --------------------------*/
162 #define HFA384x_CMD_ERR ((u16)(0x7F))
164 /*--- Programming Modes --------------------------
165 MODE 0: Disable programming
166 MODE 1: Enable volatile memory programming
167 MODE 2: Enable non-volatile memory programming
168 MODE 3: Program non-volatile memory section
169 --------------------------------------------------*/
170 #define HFA384x_PROGMODE_DISABLE ((u16)0x00)
171 #define HFA384x_PROGMODE_RAM ((u16)0x01)
172 #define HFA384x_PROGMODE_NV ((u16)0x02)
173 #define HFA384x_PROGMODE_NVWRITE ((u16)0x03)
175 /*--- Record ID Constants --------------------------*/
176 /*--------------------------------------------------------------------
177 Configuration RIDs: Network Parameters, Static Configuration Entities
178 --------------------------------------------------------------------*/
179 #define HFA384x_RID_CNFPORTTYPE ((u16)0xFC00)
180 #define HFA384x_RID_CNFOWNMACADDR ((u16)0xFC01)
181 #define HFA384x_RID_CNFDESIREDSSID ((u16)0xFC02)
182 #define HFA384x_RID_CNFOWNCHANNEL ((u16)0xFC03)
183 #define HFA384x_RID_CNFOWNSSID ((u16)0xFC04)
184 #define HFA384x_RID_CNFMAXDATALEN ((u16)0xFC07)
186 /*--------------------------------------------------------------------
187 Configuration RID lengths: Network Params, Static Config Entities
188 This is the length of JUST the DATA part of the RID (does not
189 include the len or code fields)
190 --------------------------------------------------------------------*/
191 #define HFA384x_RID_CNFOWNMACADDR_LEN ((u16)6)
192 #define HFA384x_RID_CNFDESIREDSSID_LEN ((u16)34)
193 #define HFA384x_RID_CNFOWNSSID_LEN ((u16)34)
195 /*--------------------------------------------------------------------
196 Configuration RIDs: Network Parameters, Dynamic Configuration Entities
197 --------------------------------------------------------------------*/
198 #define HFA384x_RID_CREATEIBSS ((u16)0xFC81)
199 #define HFA384x_RID_FRAGTHRESH ((u16)0xFC82)
200 #define HFA384x_RID_RTSTHRESH ((u16)0xFC83)
201 #define HFA384x_RID_TXRATECNTL ((u16)0xFC84)
202 #define HFA384x_RID_PROMISCMODE ((u16)0xFC85)
204 /*----------------------------------------------------------------------
205 Information RIDs: NIC Information
206 --------------------------------------------------------------------*/
207 #define HFA384x_RID_MAXLOADTIME ((u16)0xFD00)
208 #define HFA384x_RID_DOWNLOADBUFFER ((u16)0xFD01)
209 #define HFA384x_RID_PRIIDENTITY ((u16)0xFD02)
210 #define HFA384x_RID_PRISUPRANGE ((u16)0xFD03)
211 #define HFA384x_RID_PRI_CFIACTRANGES ((u16)0xFD04)
212 #define HFA384x_RID_NICSERIALNUMBER ((u16)0xFD0A)
213 #define HFA384x_RID_NICIDENTITY ((u16)0xFD0B)
214 #define HFA384x_RID_MFISUPRANGE ((u16)0xFD0C)
215 #define HFA384x_RID_CFISUPRANGE ((u16)0xFD0D)
216 #define HFA384x_RID_STAIDENTITY ((u16)0xFD20)
217 #define HFA384x_RID_STASUPRANGE ((u16)0xFD21)
218 #define HFA384x_RID_STA_MFIACTRANGES ((u16)0xFD22)
219 #define HFA384x_RID_STA_CFIACTRANGES ((u16)0xFD23)
221 /*----------------------------------------------------------------------
222 Information RID Lengths: NIC Information
223 This is the length of JUST the DATA part of the RID (does not
224 include the len or code fields)
225 --------------------------------------------------------------------*/
226 #define HFA384x_RID_NICSERIALNUMBER_LEN ((u16)12)
228 /*--------------------------------------------------------------------
229 Information RIDs: MAC Information
230 --------------------------------------------------------------------*/
231 #define HFA384x_RID_PORTSTATUS ((u16)0xFD40)
232 #define HFA384x_RID_CURRENTSSID ((u16)0xFD41)
233 #define HFA384x_RID_CURRENTBSSID ((u16)0xFD42)
234 #define HFA384x_RID_CURRENTTXRATE ((u16)0xFD44)
235 #define HFA384x_RID_SHORTRETRYLIMIT ((u16)0xFD48)
236 #define HFA384x_RID_LONGRETRYLIMIT ((u16)0xFD49)
237 #define HFA384x_RID_MAXTXLIFETIME ((u16)0xFD4A)
238 #define HFA384x_RID_PRIVACYOPTIMP ((u16)0xFD4F)
239 #define HFA384x_RID_DBMCOMMSQUALITY ((u16)0xFD51)
241 /*--------------------------------------------------------------------
242 Information RID Lengths: MAC Information
243 This is the length of JUST the DATA part of the RID (does not
244 include the len or code fields)
245 --------------------------------------------------------------------*/
246 #define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t))
247 #define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t))
249 /*--------------------------------------------------------------------
250 Information RIDs: Modem Information
251 --------------------------------------------------------------------*/
252 #define HFA384x_RID_CURRENTCHANNEL ((u16)0xFDC1)
254 /*--------------------------------------------------------------------
255 API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
256 --------------------------------------------------------------------*/
257 #define HFA384x_RID_CNFWEPDEFAULTKEYID ((u16)0xFC23)
258 #define HFA384x_RID_CNFWEPDEFAULTKEY0 ((u16)0xFC24)
259 #define HFA384x_RID_CNFWEPDEFAULTKEY1 ((u16)0xFC25)
260 #define HFA384x_RID_CNFWEPDEFAULTKEY2 ((u16)0xFC26)
261 #define HFA384x_RID_CNFWEPDEFAULTKEY3 ((u16)0xFC27)
262 #define HFA384x_RID_CNFWEPFLAGS ((u16)0xFC28)
263 #define HFA384x_RID_CNFAUTHENTICATION ((u16)0xFC2A)
264 #define HFA384x_RID_CNFROAMINGMODE ((u16)0xFC2D)
265 #define HFA384x_RID_CNFAPBCNint ((u16)0xFC33)
266 #define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46)
267 #define HFA384x_RID_CNFWPADATA ((u16)0xFC48)
268 #define HFA384x_RID_CNFBASICRATES ((u16)0xFCB3)
269 #define HFA384x_RID_CNFSUPPRATES ((u16)0xFCB4)
270 #define HFA384x_RID_CNFPASSIVESCANCTRL ((u16)0xFCBA)
271 #define HFA384x_RID_TXPOWERMAX ((u16)0xFCBE)
272 #define HFA384x_RID_JOINREQUEST ((u16)0xFCE2)
273 #define HFA384x_RID_AUTHENTICATESTA ((u16)0xFCE3)
274 #define HFA384x_RID_HOSTSCAN ((u16)0xFCE5)
276 #define HFA384x_RID_CNFWEPDEFAULTKEY_LEN ((u16)6)
277 #define HFA384x_RID_CNFWEP128DEFAULTKEY_LEN ((u16)14)
279 /*--------------------------------------------------------------------
281 --------------------------------------------------------------------*/
282 #define HFA384x_PDR_PCB_PARTNUM ((u16)0x0001)
283 #define HFA384x_PDR_PDAVER ((u16)0x0002)
284 #define HFA384x_PDR_NIC_SERIAL ((u16)0x0003)
285 #define HFA384x_PDR_MKK_MEASUREMENTS ((u16)0x0004)
286 #define HFA384x_PDR_NIC_RAMSIZE ((u16)0x0005)
287 #define HFA384x_PDR_MFISUPRANGE ((u16)0x0006)
288 #define HFA384x_PDR_CFISUPRANGE ((u16)0x0007)
289 #define HFA384x_PDR_NICID ((u16)0x0008)
290 #define HFA384x_PDR_MAC_ADDRESS ((u16)0x0101)
291 #define HFA384x_PDR_REGDOMAIN ((u16)0x0103)
292 #define HFA384x_PDR_ALLOWED_CHANNEL ((u16)0x0104)
293 #define HFA384x_PDR_DEFAULT_CHANNEL ((u16)0x0105)
294 #define HFA384x_PDR_TEMPTYPE ((u16)0x0107)
295 #define HFA384x_PDR_IFR_SETTING ((u16)0x0200)
296 #define HFA384x_PDR_RFR_SETTING ((u16)0x0201)
297 #define HFA384x_PDR_HFA3861_BASELINE ((u16)0x0202)
298 #define HFA384x_PDR_HFA3861_SHADOW ((u16)0x0203)
299 #define HFA384x_PDR_HFA3861_IFRF ((u16)0x0204)
300 #define HFA384x_PDR_HFA3861_CHCALSP ((u16)0x0300)
301 #define HFA384x_PDR_HFA3861_CHCALI ((u16)0x0301)
302 #define HFA384x_PDR_MAX_TX_POWER ((u16)0x0302)
303 #define HFA384x_PDR_MASTER_CHAN_LIST ((u16)0x0303)
304 #define HFA384x_PDR_3842_NIC_CONFIG ((u16)0x0400)
305 #define HFA384x_PDR_USB_ID ((u16)0x0401)
306 #define HFA384x_PDR_PCI_ID ((u16)0x0402)
307 #define HFA384x_PDR_PCI_IFCONF ((u16)0x0403)
308 #define HFA384x_PDR_PCI_PMCONF ((u16)0x0404)
309 #define HFA384x_PDR_RFENRGY ((u16)0x0406)
310 #define HFA384x_PDR_USB_POWER_TYPE ((u16)0x0407)
311 #define HFA384x_PDR_USB_MAX_POWER ((u16)0x0409)
312 #define HFA384x_PDR_USB_MANUFACTURER ((u16)0x0410)
313 #define HFA384x_PDR_USB_PRODUCT ((u16)0x0411)
314 #define HFA384x_PDR_ANT_DIVERSITY ((u16)0x0412)
315 #define HFA384x_PDR_HFO_DELAY ((u16)0x0413)
316 #define HFA384x_PDR_SCALE_THRESH ((u16)0x0414)
318 #define HFA384x_PDR_HFA3861_MANF_TESTSP ((u16)0x0900)
319 #define HFA384x_PDR_HFA3861_MANF_TESTI ((u16)0x0901)
320 #define HFA384x_PDR_END_OF_PDA ((u16)0x0000)
322 /*--- Register Test/Get/Set Field macros ------------------------*/
324 #define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8))
325 #define HFA384x_CMD_MACPORT_SET(value) ((u16)HFA384x_CMD_AINFO_SET(value))
326 #define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)value))
327 #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value))
329 #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
331 /* Host Maintained State Info */
332 #define HFA384x_STATE_PREINIT 0
333 #define HFA384x_STATE_INIT 1
334 #define HFA384x_STATE_RUNNING 2
336 /*-------------------------------------------------------------*/
337 /* Commonly used basic types */
338 typedef struct hfa384x_bytestr {
341 } __attribute__ ((packed)) hfa384x_bytestr_t;
343 typedef struct hfa384x_bytestr32 {
346 } __attribute__ ((packed)) hfa384x_bytestr32_t;
348 /*--------------------------------------------------------------------
349 Configuration Record Structures:
350 Network Parameters, Static Configuration Entities
351 --------------------------------------------------------------------*/
353 /*-- Hardware/Firmware Component Information ----------*/
354 typedef struct hfa384x_compident {
359 } __attribute__ ((packed)) hfa384x_compident_t;
361 typedef struct hfa384x_caplevel {
367 } __attribute__ ((packed)) hfa384x_caplevel_t;
369 /*-- Configuration Record: cnfAuthentication --*/
370 #define HFA384x_CNFAUTHENTICATION_OPENSYSTEM 0x0001
371 #define HFA384x_CNFAUTHENTICATION_SHAREDKEY 0x0002
372 #define HFA384x_CNFAUTHENTICATION_LEAP 0x0004
374 /*--------------------------------------------------------------------
375 Configuration Record Structures:
376 Network Parameters, Dynamic Configuration Entities
377 --------------------------------------------------------------------*/
379 #define HFA384x_CREATEIBSS_JOINCREATEIBSS 0
381 /*-- Configuration Record: HostScanRequest (data portion only) --*/
382 typedef struct hfa384x_HostScanRequest_data {
385 hfa384x_bytestr32_t ssid;
386 } __attribute__ ((packed)) hfa384x_HostScanRequest_data_t;
388 /*-- Configuration Record: JoinRequest (data portion only) --*/
389 typedef struct hfa384x_JoinRequest_data {
390 u8 bssid[WLAN_BSSID_LEN];
392 } __attribute__ ((packed)) hfa384x_JoinRequest_data_t;
394 /*-- Configuration Record: authenticateStation (data portion only) --*/
395 typedef struct hfa384x_authenticateStation_data {
396 u8 address[ETH_ALEN];
399 } __attribute__ ((packed)) hfa384x_authenticateStation_data_t;
401 /*-- Configuration Record: WPAData (data portion only) --*/
402 typedef struct hfa384x_WPAData {
404 u8 data[0]; // max 80
405 } __attribute__ ((packed)) hfa384x_WPAData_t;
407 /*--------------------------------------------------------------------
408 Information Record Structures: NIC Information
409 --------------------------------------------------------------------*/
411 /*-- Information Record: DownLoadBuffer --*/
412 /* NOTE: The page and offset are in AUX format */
413 typedef struct hfa384x_downloadbuffer {
417 } __attribute__ ((packed)) hfa384x_downloadbuffer_t;
419 /*--------------------------------------------------------------------
420 Information Record Structures: NIC Information
421 --------------------------------------------------------------------*/
423 #define HFA384x_PSTATUS_CONN_IBSS ((u16)3)
425 /*-- Information Record: commsquality --*/
426 typedef struct hfa384x_commsquality {
430 } __attribute__ ((packed)) hfa384x_commsquality_t;
432 /*-- Information Record: dmbcommsquality --*/
433 typedef struct hfa384x_dbmcommsquality {
437 } __attribute__ ((packed)) hfa384x_dbmcommsquality_t;
439 /*--------------------------------------------------------------------
440 FRAME STRUCTURES: Communication Frames
441 ----------------------------------------------------------------------
442 Communication Frames: Transmit Frames
443 --------------------------------------------------------------------*/
444 /*-- Communication Frame: Transmit Frame Structure --*/
445 typedef struct hfa384x_tx_frame {
454 /*-- 802.11 Header Information --*/
461 u16 sequence_control;
463 u16 data_len; /* little endian format */
465 /*-- 802.3 Header Information --*/
469 u16 data_length; /* big endian format */
470 } __attribute__ ((packed)) hfa384x_tx_frame_t;
471 /*--------------------------------------------------------------------
472 Communication Frames: Field Masks for Transmit Frames
473 --------------------------------------------------------------------*/
474 /*-- Status Field --*/
475 #define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5))
476 #define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3))
477 #define HFA384x_TXSTATUS_DISCON ((u16)BIT(2))
478 #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
479 #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
480 /*-- Transmit Control Field --*/
481 #define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
482 #define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3)))
483 #define HFA384x_TX_TXEX ((u16)BIT(2))
484 #define HFA384x_TX_TXOK ((u16)BIT(1))
485 /*--------------------------------------------------------------------
486 Communication Frames: Test/Get/Set Field Values for Transmit Frames
487 --------------------------------------------------------------------*/
488 /*-- Status Field --*/
489 #define HFA384x_TXSTATUS_ISERROR(v) \
491 (HFA384x_TXSTATUS_ACKERR|HFA384x_TXSTATUS_FORMERR|\
492 HFA384x_TXSTATUS_DISCON|HFA384x_TXSTATUS_AGEDERR|\
493 HFA384x_TXSTATUS_RETRYERR))
495 #define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m)))
497 #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
498 #define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, HFA384x_TX_STRUCTYPE, 3)
499 #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
500 #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
501 /*--------------------------------------------------------------------
502 Communication Frames: Receive Frames
503 --------------------------------------------------------------------*/
504 /*-- Communication Frame: Receive Frame Structure --*/
505 typedef struct hfa384x_rx_frame {
506 /*-- MAC rx descriptor (hfa384x byte order) --*/
516 /*-- 802.11 Header Information (802.11 byte order) --*/
522 u16 sequence_control;
524 u16 data_len; /* hfa384x (little endian) format */
526 /*-- 802.3 Header Information --*/
529 u16 data_length; /* IEEE? (big endian) format */
530 } __attribute__ ((packed)) hfa384x_rx_frame_t;
531 /*--------------------------------------------------------------------
532 Communication Frames: Field Masks for Receive Frames
533 --------------------------------------------------------------------*/
535 /*-- Status Fields --*/
536 #define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
537 #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
538 /*--------------------------------------------------------------------
539 Communication Frames: Test/Get/Set Field Values for Receive Frames
540 --------------------------------------------------------------------*/
541 #define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MACPORT) >> 8))
542 #define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR))
543 /*--------------------------------------------------------------------
544 FRAME STRUCTURES: Information Types and Information Frame Structures
545 ----------------------------------------------------------------------
547 --------------------------------------------------------------------*/
548 #define HFA384x_IT_HANDOVERADDR ((u16)0xF000UL)
549 #define HFA384x_IT_COMMTALLIES ((u16)0xF100UL)
550 #define HFA384x_IT_SCANRESULTS ((u16)0xF101UL)
551 #define HFA384x_IT_CHINFORESULTS ((u16)0xF102UL)
552 #define HFA384x_IT_HOSTSCANRESULTS ((u16)0xF103UL)
553 #define HFA384x_IT_LINKSTATUS ((u16)0xF200UL)
554 #define HFA384x_IT_ASSOCSTATUS ((u16)0xF201UL)
555 #define HFA384x_IT_AUTHREQ ((u16)0xF202UL)
556 #define HFA384x_IT_PSUSERCNT ((u16)0xF203UL)
557 #define HFA384x_IT_KEYIDCHANGED ((u16)0xF204UL)
558 #define HFA384x_IT_ASSOCREQ ((u16)0xF205UL)
559 #define HFA384x_IT_MICFAILURE ((u16)0xF206UL)
561 /*--------------------------------------------------------------------
562 Information Frames Structures
563 ----------------------------------------------------------------------
564 Information Frames: Notification Frame Structures
565 --------------------------------------------------------------------*/
567 /*-- Inquiry Frame, Diagnose: Communication Tallies --*/
568 typedef struct hfa384x_CommTallies16 {
570 u16 txmulticastframes;
573 u16 txmulticastoctets;
575 u16 txsingleretryframes;
576 u16 txmultipleretryframes;
577 u16 txretrylimitexceeded;
580 u16 rxmulticastframes;
583 u16 rxmulticastoctets;
585 u16 rxdiscardsnobuffer;
586 u16 txdiscardswrongsa;
587 u16 rxdiscardswepundecr;
589 u16 rxmsginbadmsgfrag;
590 } __attribute__ ((packed)) hfa384x_CommTallies16_t;
592 typedef struct hfa384x_CommTallies32 {
594 u32 txmulticastframes;
597 u32 txmulticastoctets;
599 u32 txsingleretryframes;
600 u32 txmultipleretryframes;
601 u32 txretrylimitexceeded;
604 u32 rxmulticastframes;
607 u32 rxmulticastoctets;
609 u32 rxdiscardsnobuffer;
610 u32 txdiscardswrongsa;
611 u32 rxdiscardswepundecr;
613 u32 rxmsginbadmsgfrag;
614 } __attribute__ ((packed)) hfa384x_CommTallies32_t;
616 /*-- Inquiry Frame, Diagnose: Scan Results & Subfields--*/
617 typedef struct hfa384x_ScanResultSub {
621 u8 bssid[WLAN_BSSID_LEN];
624 hfa384x_bytestr32_t ssid;
625 u8 supprates[10]; /* 802.11 info element */
627 } __attribute__ ((packed)) hfa384x_ScanResultSub_t;
629 typedef struct hfa384x_ScanResult {
632 hfa384x_ScanResultSub_t result[HFA384x_SCANRESULT_MAX];
633 } __attribute__ ((packed)) hfa384x_ScanResult_t;
635 /*-- Inquiry Frame, Diagnose: ChInfo Results & Subfields--*/
636 typedef struct hfa384x_ChInfoResultSub {
641 } __attribute__ ((packed)) hfa384x_ChInfoResultSub_t;
643 #define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
644 #define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)
646 typedef struct hfa384x_ChInfoResult {
648 hfa384x_ChInfoResultSub_t result[HFA384x_CHINFORESULT_MAX];
649 } __attribute__ ((packed)) hfa384x_ChInfoResult_t;
651 /*-- Inquiry Frame, Diagnose: Host Scan Results & Subfields--*/
652 typedef struct hfa384x_HScanResultSub {
656 u8 bssid[WLAN_BSSID_LEN];
659 hfa384x_bytestr32_t ssid;
660 u8 supprates[10]; /* 802.11 info element */
663 } __attribute__ ((packed)) hfa384x_HScanResultSub_t;
665 typedef struct hfa384x_HScanResult {
668 hfa384x_HScanResultSub_t result[HFA384x_HSCANRESULT_MAX];
669 } __attribute__ ((packed)) hfa384x_HScanResult_t;
671 /*-- Unsolicited Frame, MAC Mgmt: LinkStatus --*/
673 #define HFA384x_LINK_NOTCONNECTED ((u16)0)
674 #define HFA384x_LINK_CONNECTED ((u16)1)
675 #define HFA384x_LINK_DISCONNECTED ((u16)2)
676 #define HFA384x_LINK_AP_CHANGE ((u16)3)
677 #define HFA384x_LINK_AP_OUTOFRANGE ((u16)4)
678 #define HFA384x_LINK_AP_INRANGE ((u16)5)
679 #define HFA384x_LINK_ASSOCFAIL ((u16)6)
681 typedef struct hfa384x_LinkStatus {
683 } __attribute__ ((packed)) hfa384x_LinkStatus_t;
685 /*-- Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/
687 #define HFA384x_ASSOCSTATUS_STAASSOC ((u16)1)
688 #define HFA384x_ASSOCSTATUS_REASSOC ((u16)2)
689 #define HFA384x_ASSOCSTATUS_AUTHFAIL ((u16)5)
691 typedef struct hfa384x_AssocStatus {
693 u8 sta_addr[ETH_ALEN];
694 /* old_ap_addr is only valid if assocstatus == 2 */
695 u8 old_ap_addr[ETH_ALEN];
698 } __attribute__ ((packed)) hfa384x_AssocStatus_t;
700 /*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/
702 typedef struct hfa384x_AuthRequest {
703 u8 sta_addr[ETH_ALEN];
705 } __attribute__ ((packed)) hfa384x_AuthReq_t;
707 /*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/
709 typedef struct hfa384x_PSUserCount {
711 } __attribute__ ((packed)) hfa384x_PSUserCount_t;
713 typedef struct hfa384x_KeyIDChanged {
714 u8 sta_addr[ETH_ALEN];
716 } __attribute__ ((packed)) hfa384x_KeyIDChanged_t;
718 /*-- Collection of all Inf frames ---------------*/
719 typedef union hfa384x_infodata {
720 hfa384x_CommTallies16_t commtallies16;
721 hfa384x_CommTallies32_t commtallies32;
722 hfa384x_ScanResult_t scanresult;
723 hfa384x_ChInfoResult_t chinforesult;
724 hfa384x_HScanResult_t hscanresult;
725 hfa384x_LinkStatus_t linkstatus;
726 hfa384x_AssocStatus_t assocstatus;
727 hfa384x_AuthReq_t authreq;
728 hfa384x_PSUserCount_t psusercnt;
729 hfa384x_KeyIDChanged_t keyidchanged;
730 } __attribute__ ((packed)) hfa384x_infodata_t;
732 typedef struct hfa384x_InfFrame {
735 hfa384x_infodata_t info;
736 } __attribute__ ((packed)) hfa384x_InfFrame_t;
738 /*--------------------------------------------------------------------
739 USB Packet structures and constants.
740 --------------------------------------------------------------------*/
742 /* Should be sent to the bulkout endpoint */
743 #define HFA384x_USB_TXFRM 0
744 #define HFA384x_USB_CMDREQ 1
745 #define HFA384x_USB_WRIDREQ 2
746 #define HFA384x_USB_RRIDREQ 3
747 #define HFA384x_USB_WMEMREQ 4
748 #define HFA384x_USB_RMEMREQ 5
750 /* Received from the bulkin endpoint */
751 #define HFA384x_USB_ISTXFRM(a) (((a) & 0x9000) == 0x1000)
752 #define HFA384x_USB_ISRXFRM(a) (!((a) & 0x9000))
753 #define HFA384x_USB_INFOFRM 0x8000
754 #define HFA384x_USB_CMDRESP 0x8001
755 #define HFA384x_USB_WRIDRESP 0x8002
756 #define HFA384x_USB_RRIDRESP 0x8003
757 #define HFA384x_USB_WMEMRESP 0x8004
758 #define HFA384x_USB_RMEMRESP 0x8005
759 #define HFA384x_USB_BUFAVAIL 0x8006
760 #define HFA384x_USB_ERROR 0x8007
762 /*------------------------------------*/
763 /* Request (bulk OUT) packet contents */
765 typedef struct hfa384x_usb_txfrm {
766 hfa384x_tx_frame_t desc;
767 u8 data[WLAN_DATA_MAXLEN];
768 } __attribute__ ((packed)) hfa384x_usb_txfrm_t;
770 typedef struct hfa384x_usb_cmdreq {
777 } __attribute__ ((packed)) hfa384x_usb_cmdreq_t;
779 typedef struct hfa384x_usb_wridreq {
783 u8 data[HFA384x_RIDDATA_MAXLEN];
784 } __attribute__ ((packed)) hfa384x_usb_wridreq_t;
786 typedef struct hfa384x_usb_rridreq {
791 } __attribute__ ((packed)) hfa384x_usb_rridreq_t;
793 typedef struct hfa384x_usb_wmemreq {
798 u8 data[HFA384x_USB_RWMEM_MAXLEN];
799 } __attribute__ ((packed)) hfa384x_usb_wmemreq_t;
801 typedef struct hfa384x_usb_rmemreq {
807 } __attribute__ ((packed)) hfa384x_usb_rmemreq_t;
809 /*------------------------------------*/
810 /* Response (bulk IN) packet contents */
812 typedef struct hfa384x_usb_rxfrm {
813 hfa384x_rx_frame_t desc;
814 u8 data[WLAN_DATA_MAXLEN];
815 } __attribute__ ((packed)) hfa384x_usb_rxfrm_t;
817 typedef struct hfa384x_usb_infofrm {
819 hfa384x_InfFrame_t info;
820 } __attribute__ ((packed)) hfa384x_usb_infofrm_t;
822 typedef struct hfa384x_usb_statusresp {
828 } __attribute__ ((packed)) hfa384x_usb_cmdresp_t;
830 typedef hfa384x_usb_cmdresp_t hfa384x_usb_wridresp_t;
832 typedef struct hfa384x_usb_rridresp {
836 u8 data[HFA384x_RIDDATA_MAXLEN];
837 } __attribute__ ((packed)) hfa384x_usb_rridresp_t;
839 typedef hfa384x_usb_cmdresp_t hfa384x_usb_wmemresp_t;
841 typedef struct hfa384x_usb_rmemresp {
844 u8 data[HFA384x_USB_RWMEM_MAXLEN];
845 } __attribute__ ((packed)) hfa384x_usb_rmemresp_t;
847 typedef struct hfa384x_usb_bufavail {
850 } __attribute__ ((packed)) hfa384x_usb_bufavail_t;
852 typedef struct hfa384x_usb_error {
855 } __attribute__ ((packed)) hfa384x_usb_error_t;
857 /*----------------------------------------------------------*/
858 /* Unions for packaging all the known packet types together */
860 typedef union hfa384x_usbout {
862 hfa384x_usb_txfrm_t txfrm;
863 hfa384x_usb_cmdreq_t cmdreq;
864 hfa384x_usb_wridreq_t wridreq;
865 hfa384x_usb_rridreq_t rridreq;
866 hfa384x_usb_wmemreq_t wmemreq;
867 hfa384x_usb_rmemreq_t rmemreq;
868 } __attribute__ ((packed)) hfa384x_usbout_t;
870 typedef union hfa384x_usbin {
872 hfa384x_usb_rxfrm_t rxfrm;
873 hfa384x_usb_txfrm_t txfrm;
874 hfa384x_usb_infofrm_t infofrm;
875 hfa384x_usb_cmdresp_t cmdresp;
876 hfa384x_usb_wridresp_t wridresp;
877 hfa384x_usb_rridresp_t rridresp;
878 hfa384x_usb_wmemresp_t wmemresp;
879 hfa384x_usb_rmemresp_t rmemresp;
880 hfa384x_usb_bufavail_t bufavail;
881 hfa384x_usb_error_t usberror;
883 } __attribute__ ((packed)) hfa384x_usbin_t;
886 /*--------------------------------------------------------------------
887 --- MAC state structure, argument to all functions --
888 --- Also, a collection of support types --
889 --------------------------------------------------------------------*/
890 typedef struct hfa384x_statusresult {
895 } hfa384x_cmdresult_t;
897 /* USB Control Exchange (CTLX):
898 * A queue of the structure below is maintained for all of the
899 * Request/Response type USB packets supported by Prism2.
901 /* The following hfa384x_* structures are arguments to
902 * the usercb() for the different CTLX types.
904 typedef struct hfa384x_rridresult {
907 unsigned int riddata_len;
908 } hfa384x_rridresult_t;
911 CTLX_START = 0, /* Start state, not queued */
913 CTLX_COMPLETE, /* CTLX successfully completed */
914 CTLX_REQ_FAILED, /* OUT URB completed w/ error */
916 CTLX_PENDING, /* Queued, data valid */
917 CTLX_REQ_SUBMITTED, /* OUT URB submitted */
918 CTLX_REQ_COMPLETE, /* OUT URB complete */
919 CTLX_RESP_COMPLETE /* IN URB received */
921 typedef enum ctlx_state CTLX_STATE;
923 struct hfa384x_usbctlx;
926 typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *);
928 typedef void (*ctlx_usercb_t) (struct hfa384x *hw,
929 void *ctlxresult, void *usercb_data);
931 typedef struct hfa384x_usbctlx {
932 struct list_head list;
935 hfa384x_usbout_t outbuf; /* pkt buf for OUT */
936 hfa384x_usbin_t inbuf; /* pkt buf for IN(a copy) */
938 CTLX_STATE state; /* Tracks running state */
940 struct completion done;
941 volatile int reapable; /* Food for the reaper task */
943 ctlx_cmdcb_t cmdcb; /* Async command callback */
944 ctlx_usercb_t usercb; /* Async user callback, */
945 void *usercb_data; /* at CTLX completion */
947 int variant; /* Identifies cmd variant */
950 typedef struct hfa384x_usbctlxq {
952 struct list_head pending;
953 struct list_head active;
954 struct list_head completing;
955 struct list_head reapable;
956 } hfa384x_usbctlxq_t;
958 typedef struct hfa484x_metacmd {
965 hfa384x_cmdresult_t result;
968 #define MAX_GRP_ADDR 32
969 #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */
971 #define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */
972 #define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */
973 #define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */
974 #define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */
975 #define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */
976 #define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */
978 /* XXX These are going away ASAP */
979 typedef struct prism2sta_authlist {
981 u8 addr[WLAN_AUTH_MAX][ETH_ALEN];
982 u8 assoc[WLAN_AUTH_MAX];
983 } prism2sta_authlist_t;
985 typedef struct prism2sta_accesslist {
988 u8 addr[WLAN_ACCESS_MAX][ETH_ALEN];
990 u8 addr1[WLAN_ACCESS_MAX][ETH_ALEN];
991 } prism2sta_accesslist_t;
993 typedef struct hfa384x {
994 /* USB support data */
995 struct usb_device *usb;
997 struct sk_buff *rx_urb_skb;
1000 hfa384x_usbout_t txbuff;
1001 hfa384x_usbctlxq_t ctlxq;
1002 struct timer_list reqtimer;
1003 struct timer_list resptimer;
1005 struct timer_list throttle;
1007 struct tasklet_struct reaper_bh;
1008 struct tasklet_struct completion_bh;
1010 struct work_struct usb_work;
1012 unsigned long usb_flags;
1013 #define THROTTLE_RX 0
1014 #define THROTTLE_TX 1
1015 #define WORK_RX_HALT 2
1016 #define WORK_TX_HALT 3
1017 #define WORK_RX_RESUME 4
1018 #define WORK_TX_RESUME 5
1020 unsigned short req_timer_done:1;
1021 unsigned short resp_timer_done:1;
1031 wait_queue_head_t cmdq; /* wait queue itself */
1033 /* Controller state */
1036 u8 port_enabled[HFA384x_NUMPORTS_MAX];
1038 /* Download support */
1039 unsigned int dlstate;
1040 hfa384x_downloadbuffer_t bufinfo;
1043 int scanflag; /* to signal scan comlete */
1044 int join_ap; /* are we joined to a specific ap */
1045 int join_retries; /* number of join retries till we fail */
1046 hfa384x_JoinRequest_data_t joinreq; /* join request saved data */
1048 wlandevice_t *wlandev;
1049 /* Timer to allow for the deferred processing of linkstatus messages */
1050 struct work_struct link_bh;
1052 struct work_struct commsqual_bh;
1053 hfa384x_commsquality_t qual;
1054 struct timer_list commsqual_timer;
1057 u16 link_status_new;
1058 struct sk_buff_head authq;
1060 /* And here we have stuff that used to be in priv */
1062 /* State variables */
1063 unsigned int presniff_port_type;
1064 u16 presniff_wepflags;
1065 u32 dot11_desired_bss_type;
1069 /* Group Addresses - right now, there are up to a total
1070 of MAX_GRP_ADDR group addresses */
1071 u8 dot11_grp_addr[MAX_GRP_ADDR][ETH_ALEN];
1072 unsigned int dot11_grpcnt;
1074 /* Component Identities */
1075 hfa384x_compident_t ident_nic;
1076 hfa384x_compident_t ident_pri_fw;
1077 hfa384x_compident_t ident_sta_fw;
1078 hfa384x_compident_t ident_ap_fw;
1081 /* Supplier compatibility ranges */
1082 hfa384x_caplevel_t cap_sup_mfi;
1083 hfa384x_caplevel_t cap_sup_cfi;
1084 hfa384x_caplevel_t cap_sup_pri;
1085 hfa384x_caplevel_t cap_sup_sta;
1086 hfa384x_caplevel_t cap_sup_ap;
1088 /* Actor compatibility ranges */
1089 hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */
1090 hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */
1091 hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */
1092 hfa384x_caplevel_t cap_act_ap_cfi; /* ap f/w to controller interface */
1093 hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */
1095 u32 psusercount; /* Power save user count. */
1096 hfa384x_CommTallies32_t tallies; /* Communication tallies. */
1097 u8 comment[WLAN_COMMENT_MAX + 1]; /* User comment */
1099 /* Channel Info request results (AP only) */
1103 hfa384x_ChInfoResult_t results;
1106 hfa384x_InfFrame_t *scanresults;
1108 prism2sta_authlist_t authlist; /* Authenticated station list. */
1109 unsigned int accessmode; /* Access mode. */
1110 prism2sta_accesslist_t allow; /* Allowed station list. */
1111 prism2sta_accesslist_t deny; /* Denied station list. */
1115 void hfa384x_create(hfa384x_t *hw, struct usb_device *usb);
1116 void hfa384x_destroy(hfa384x_t *hw);
1119 hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis);
1120 int hfa384x_drvr_commtallies(hfa384x_t *hw);
1121 int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport);
1122 int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport);
1123 int hfa384x_drvr_flashdl_enable(hfa384x_t *hw);
1124 int hfa384x_drvr_flashdl_disable(hfa384x_t *hw);
1125 int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
1126 int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
1127 int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr);
1128 int hfa384x_drvr_ramdl_disable(hfa384x_t *hw);
1129 int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len);
1130 int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len);
1131 int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
1133 static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
1136 result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
1138 *((u16 *) val) = le16_to_cpu(*((u16 *) val));
1142 static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val)
1144 u16 value = cpu_to_le16(val);
1145 return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
1149 hfa384x_drvr_getconfig_async(hfa384x_t *hw,
1150 u16 rid, ctlx_usercb_t usercb, void *usercb_data);
1153 hfa384x_drvr_setconfig_async(hfa384x_t *hw,
1156 u16 len, ctlx_usercb_t usercb, void *usercb_data);
1159 hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val)
1161 u16 value = cpu_to_le16(val);
1162 return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value),
1166 int hfa384x_drvr_start(hfa384x_t *hw);
1167 int hfa384x_drvr_stop(hfa384x_t *hw);
1169 hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb,
1170 p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep);
1171 void hfa384x_tx_timeout(wlandevice_t *wlandev);
1173 int hfa384x_cmd_initialize(hfa384x_t *hw);
1174 int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport);
1175 int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport);
1176 int hfa384x_cmd_allocate(hfa384x_t *hw, u16 len);
1177 int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable);
1179 hfa384x_cmd_download(hfa384x_t *hw,
1180 u16 mode, u16 lowaddr, u16 highaddr, u16 codelen);
1182 #endif /* __KERNEL__ */
1184 #endif /* _HFA384x_H */