1 // SPDX-License-Identifier: (GPL-2.0 OR MPL-1.1)
4 * Defines the constants and data structures for the hfa384x
6 * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
7 * --------------------------------------------------------------------
11 * The contents of this file are subject to the Mozilla Public
12 * License Version 1.1 (the "License"); you may not use this file
13 * except in compliance with the License. You may obtain a copy of
14 * the License at http://www.mozilla.org/MPL/
16 * Software distributed under the License is distributed on an "AS
17 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
18 * implied. See the License for the specific language governing
19 * rights and limitations under the License.
21 * Alternatively, the contents of this file may be used under the
22 * terms of the GNU Public License version 2 (the "GPL"), in which
23 * case the provisions of the GPL are applicable instead of the
24 * above. If you wish to allow the use of your version of this file
25 * only under the terms of the GPL and not to allow others to use
26 * your version of this file under the MPL, indicate your decision
27 * by deleting the provisions above and replace them with the notice
28 * and other provisions required by the GPL. If you do not delete
29 * the provisions above, a recipient may use your version of this
30 * file under either the MPL or the GPL.
32 * --------------------------------------------------------------------
34 * Inquiries regarding the linux-wlan Open Source project can be
37 * AbsoluteValue Systems Inc.
39 * http://www.linux-wlan.com
41 * --------------------------------------------------------------------
43 * Portions of the development of this software were funded by
44 * Intersil Corporation as part of PRISM(R) chipset product development.
46 * --------------------------------------------------------------------
48 * [Implementation and usage notes]
51 * CW10 Programmer's Manual v1.5
54 * --------------------------------------------------------------------
60 #define HFA384x_FIRMWARE_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
62 #include <linux/if_ether.h>
63 #include <linux/usb.h>
65 /*--- Mins & Maxs -----------------------------------*/
66 #define HFA384x_PORTID_MAX ((u16)7)
67 #define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX + 1))
68 #define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */
69 #define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */
70 #define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/
71 #define HFA384x_SCANRESULT_MAX ((u16)31)
72 #define HFA384x_HSCANRESULT_MAX ((u16)31)
73 #define HFA384x_CHINFORESULT_MAX ((u16)16)
74 #define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
75 #define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN
76 #define HFA384x_USB_RWMEM_MAXLEN 2048
78 /*--- Support Constants -----------------------------*/
79 #define HFA384x_PORTTYPE_IBSS ((u16)0)
80 #define HFA384x_PORTTYPE_BSS ((u16)1)
81 #define HFA384x_PORTTYPE_PSUEDOIBSS ((u16)3)
82 #define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT(0))
83 #define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT(1))
84 #define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT(4))
85 #define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT(7))
86 #define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3)
87 #define HFA384x_PORTSTATUS_DISABLED ((u16)1)
88 #define HFA384x_RATEBIT_1 ((u16)1)
89 #define HFA384x_RATEBIT_2 ((u16)2)
90 #define HFA384x_RATEBIT_5dot5 ((u16)4)
91 #define HFA384x_RATEBIT_11 ((u16)8)
93 /*--- MAC Internal memory constants and macros ------*/
94 /* masks and macros used to manipulate MAC internal memory addresses. */
95 /* MAC internal memory addresses are 23 bit quantities. The MAC uses
96 * a paged address space where the upper 16 bits are the page number
97 * and the lower 7 bits are the offset. There are various Host API
98 * elements that require two 16-bit quantities to specify a MAC
99 * internal memory address. Unfortunately, some of the API's use a
100 * page/offset format where the offset value is JUST the lower seven
101 * bits and the page is the remaining 16 bits. Some of the API's
102 * assume that the 23 bit address has been split at the 16th bit. We
103 * refer to these two formats as AUX format and CMD format. The
104 * macros below help handle some of this.
107 /* Mask bits for discarding unwanted pieces in a flat address */
108 #define HFA384x_ADDR_FLAT_AUX_PAGE_MASK (0x007fff80)
109 #define HFA384x_ADDR_FLAT_AUX_OFF_MASK (0x0000007f)
110 #define HFA384x_ADDR_FLAT_CMD_PAGE_MASK (0xffff0000)
111 #define HFA384x_ADDR_FLAT_CMD_OFF_MASK (0x0000ffff)
113 /* Mask bits for discarding unwanted pieces in AUX format
114 * 16-bit address parts
116 #define HFA384x_ADDR_AUX_PAGE_MASK (0xffff)
117 #define HFA384x_ADDR_AUX_OFF_MASK (0x007f)
119 /* Make a 32-bit flat address from AUX format 16-bit page and offset */
120 #define HFA384x_ADDR_AUX_MKFLAT(p, o) \
121 ((((u32)(((u16)(p)) & HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
122 ((u32)(((u16)(o)) & HFA384x_ADDR_AUX_OFF_MASK)))
124 /* Make CMD format offset and page from a 32-bit flat address */
125 #define HFA384x_ADDR_CMD_MKPAGE(f) \
126 ((u16)((((u32)(f)) & HFA384x_ADDR_FLAT_CMD_PAGE_MASK) >> 16))
127 #define HFA384x_ADDR_CMD_MKOFF(f) \
128 ((u16)(((u32)(f)) & HFA384x_ADDR_FLAT_CMD_OFF_MASK))
130 /*--- Controller Memory addresses -------------------*/
131 #define HFA3842_PDA_BASE (0x007f0000UL)
132 #define HFA3841_PDA_BASE (0x003f0000UL)
133 #define HFA3841_PDA_BOGUS_BASE (0x00390000UL)
135 /*--- Driver Download states -----------------------*/
136 #define HFA384x_DLSTATE_DISABLED 0
137 #define HFA384x_DLSTATE_RAMENABLED 1
138 #define HFA384x_DLSTATE_FLASHENABLED 2
140 /*--- Register Field Masks --------------------------*/
141 #define HFA384x_CMD_AINFO ((u16)GENMASK(14, 8))
142 #define HFA384x_CMD_MACPORT ((u16)GENMASK(10, 8))
143 #define HFA384x_CMD_PROGMODE ((u16)GENMASK(9, 8))
144 #define HFA384x_CMD_CMDCODE ((u16)GENMASK(5, 0))
145 #define HFA384x_STATUS_RESULT ((u16)GENMASK(14, 8))
147 /*--- Command Code Constants --------------------------*/
148 /*--- Controller Commands --------------------------*/
149 #define HFA384x_CMDCODE_INIT ((u16)0x00)
150 #define HFA384x_CMDCODE_ENABLE ((u16)0x01)
151 #define HFA384x_CMDCODE_DISABLE ((u16)0x02)
153 /*--- Regulate Commands --------------------------*/
154 #define HFA384x_CMDCODE_INQ ((u16)0x11)
156 /*--- Configure Commands --------------------------*/
157 #define HFA384x_CMDCODE_DOWNLD ((u16)0x22)
159 /*--- Debugging Commands -----------------------------*/
160 #define HFA384x_CMDCODE_MONITOR ((u16)(0x38))
161 #define HFA384x_MONITOR_ENABLE ((u16)(0x0b))
162 #define HFA384x_MONITOR_DISABLE ((u16)(0x0f))
164 /*--- Result Codes --------------------------*/
165 #define HFA384x_CMD_ERR ((u16)(0x7F))
167 /*--- Programming Modes --------------------------
168 * MODE 0: Disable programming
169 * MODE 1: Enable volatile memory programming
170 * MODE 2: Enable non-volatile memory programming
171 * MODE 3: Program non-volatile memory section
172 *-------------------------------------------------
174 #define HFA384x_PROGMODE_DISABLE ((u16)0x00)
175 #define HFA384x_PROGMODE_RAM ((u16)0x01)
176 #define HFA384x_PROGMODE_NV ((u16)0x02)
177 #define HFA384x_PROGMODE_NVWRITE ((u16)0x03)
179 /*--- Record ID Constants --------------------------*/
180 /*--------------------------------------------------------------------
181 * Configuration RIDs: Network Parameters, Static Configuration Entities
182 *--------------------------------------------------------------------
184 #define HFA384x_RID_CNFPORTTYPE ((u16)0xFC00)
185 #define HFA384x_RID_CNFOWNMACADDR ((u16)0xFC01)
186 #define HFA384x_RID_CNFDESIREDSSID ((u16)0xFC02)
187 #define HFA384x_RID_CNFOWNCHANNEL ((u16)0xFC03)
188 #define HFA384x_RID_CNFOWNSSID ((u16)0xFC04)
189 #define HFA384x_RID_CNFMAXDATALEN ((u16)0xFC07)
191 /*--------------------------------------------------------------------
192 * Configuration RID lengths: Network Params, Static Config Entities
193 * This is the length of JUST the DATA part of the RID (does not
194 * include the len or code fields)
195 *--------------------------------------------------------------------
197 #define HFA384x_RID_CNFOWNMACADDR_LEN ((u16)6)
198 #define HFA384x_RID_CNFDESIREDSSID_LEN ((u16)34)
199 #define HFA384x_RID_CNFOWNSSID_LEN ((u16)34)
201 /*--------------------------------------------------------------------
202 * Configuration RIDs: Network Parameters, Dynamic Configuration Entities
203 *--------------------------------------------------------------------
205 #define HFA384x_RID_CREATEIBSS ((u16)0xFC81)
206 #define HFA384x_RID_FRAGTHRESH ((u16)0xFC82)
207 #define HFA384x_RID_RTSTHRESH ((u16)0xFC83)
208 #define HFA384x_RID_TXRATECNTL ((u16)0xFC84)
209 #define HFA384x_RID_PROMISCMODE ((u16)0xFC85)
211 /*----------------------------------------------------------------------
212 * Information RIDs: NIC Information
213 *----------------------------------------------------------------------
215 #define HFA384x_RID_MAXLOADTIME ((u16)0xFD00)
216 #define HFA384x_RID_DOWNLOADBUFFER ((u16)0xFD01)
217 #define HFA384x_RID_PRIIDENTITY ((u16)0xFD02)
218 #define HFA384x_RID_PRISUPRANGE ((u16)0xFD03)
219 #define HFA384x_RID_PRI_CFIACTRANGES ((u16)0xFD04)
220 #define HFA384x_RID_NICSERIALNUMBER ((u16)0xFD0A)
221 #define HFA384x_RID_NICIDENTITY ((u16)0xFD0B)
222 #define HFA384x_RID_MFISUPRANGE ((u16)0xFD0C)
223 #define HFA384x_RID_CFISUPRANGE ((u16)0xFD0D)
224 #define HFA384x_RID_STAIDENTITY ((u16)0xFD20)
225 #define HFA384x_RID_STASUPRANGE ((u16)0xFD21)
226 #define HFA384x_RID_STA_MFIACTRANGES ((u16)0xFD22)
227 #define HFA384x_RID_STA_CFIACTRANGES ((u16)0xFD23)
229 /*----------------------------------------------------------------------
230 * Information RID Lengths: NIC Information
231 * This is the length of JUST the DATA part of the RID (does not
232 * include the len or code fields)
233 *---------------------------------------------------------------------
235 #define HFA384x_RID_NICSERIALNUMBER_LEN ((u16)12)
237 /*--------------------------------------------------------------------
238 * Information RIDs: MAC Information
239 *--------------------------------------------------------------------
241 #define HFA384x_RID_PORTSTATUS ((u16)0xFD40)
242 #define HFA384x_RID_CURRENTSSID ((u16)0xFD41)
243 #define HFA384x_RID_CURRENTBSSID ((u16)0xFD42)
244 #define HFA384x_RID_CURRENTTXRATE ((u16)0xFD44)
245 #define HFA384x_RID_SHORTRETRYLIMIT ((u16)0xFD48)
246 #define HFA384x_RID_LONGRETRYLIMIT ((u16)0xFD49)
247 #define HFA384x_RID_MAXTXLIFETIME ((u16)0xFD4A)
248 #define HFA384x_RID_PRIVACYOPTIMP ((u16)0xFD4F)
249 #define HFA384x_RID_DBMCOMMSQUALITY ((u16)0xFD51)
251 /*--------------------------------------------------------------------
252 * Information RID Lengths: MAC Information
253 * This is the length of JUST the DATA part of the RID (does not
254 * include the len or code fields)
255 *--------------------------------------------------------------------
257 #define HFA384x_RID_DBMCOMMSQUALITY_LEN \
258 ((u16)sizeof(struct hfa384x_dbmcommsquality))
259 #define HFA384x_RID_JOINREQUEST_LEN \
260 ((u16)sizeof(struct hfa384x_join_request_data))
262 /*--------------------------------------------------------------------
263 * Information RIDs: Modem Information
264 *--------------------------------------------------------------------
266 #define HFA384x_RID_CURRENTCHANNEL ((u16)0xFDC1)
268 /*--------------------------------------------------------------------
269 * API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
270 *--------------------------------------------------------------------
272 #define HFA384x_RID_CNFWEPDEFAULTKEYID ((u16)0xFC23)
273 #define HFA384x_RID_CNFWEPDEFAULTKEY0 ((u16)0xFC24)
274 #define HFA384x_RID_CNFWEPDEFAULTKEY1 ((u16)0xFC25)
275 #define HFA384x_RID_CNFWEPDEFAULTKEY2 ((u16)0xFC26)
276 #define HFA384x_RID_CNFWEPDEFAULTKEY3 ((u16)0xFC27)
277 #define HFA384x_RID_CNFWEPFLAGS ((u16)0xFC28)
278 #define HFA384x_RID_CNFAUTHENTICATION ((u16)0xFC2A)
279 #define HFA384x_RID_CNFROAMINGMODE ((u16)0xFC2D)
280 #define HFA384x_RID_CNFAPBCNINT ((u16)0xFC33)
281 #define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46)
282 #define HFA384x_RID_CNFWPADATA ((u16)0xFC48)
283 #define HFA384x_RID_CNFBASICRATES ((u16)0xFCB3)
284 #define HFA384x_RID_CNFSUPPRATES ((u16)0xFCB4)
285 #define HFA384x_RID_CNFPASSIVESCANCTRL ((u16)0xFCBA)
286 #define HFA384x_RID_TXPOWERMAX ((u16)0xFCBE)
287 #define HFA384x_RID_JOINREQUEST ((u16)0xFCE2)
288 #define HFA384x_RID_AUTHENTICATESTA ((u16)0xFCE3)
289 #define HFA384x_RID_HOSTSCAN ((u16)0xFCE5)
291 #define HFA384x_RID_CNFWEPDEFAULTKEY_LEN ((u16)6)
292 #define HFA384x_RID_CNFWEP128DEFAULTKEY_LEN ((u16)14)
294 /*--------------------------------------------------------------------
296 *--------------------------------------------------------------------
298 #define HFA384x_PDR_PCB_PARTNUM ((u16)0x0001)
299 #define HFA384x_PDR_PDAVER ((u16)0x0002)
300 #define HFA384x_PDR_NIC_SERIAL ((u16)0x0003)
301 #define HFA384x_PDR_MKK_MEASUREMENTS ((u16)0x0004)
302 #define HFA384x_PDR_NIC_RAMSIZE ((u16)0x0005)
303 #define HFA384x_PDR_MFISUPRANGE ((u16)0x0006)
304 #define HFA384x_PDR_CFISUPRANGE ((u16)0x0007)
305 #define HFA384x_PDR_NICID ((u16)0x0008)
306 #define HFA384x_PDR_MAC_ADDRESS ((u16)0x0101)
307 #define HFA384x_PDR_REGDOMAIN ((u16)0x0103)
308 #define HFA384x_PDR_ALLOWED_CHANNEL ((u16)0x0104)
309 #define HFA384x_PDR_DEFAULT_CHANNEL ((u16)0x0105)
310 #define HFA384x_PDR_TEMPTYPE ((u16)0x0107)
311 #define HFA384x_PDR_IFR_SETTING ((u16)0x0200)
312 #define HFA384x_PDR_RFR_SETTING ((u16)0x0201)
313 #define HFA384x_PDR_HFA3861_BASELINE ((u16)0x0202)
314 #define HFA384x_PDR_HFA3861_SHADOW ((u16)0x0203)
315 #define HFA384x_PDR_HFA3861_IFRF ((u16)0x0204)
316 #define HFA384x_PDR_HFA3861_CHCALSP ((u16)0x0300)
317 #define HFA384x_PDR_HFA3861_CHCALI ((u16)0x0301)
318 #define HFA384x_PDR_MAX_TX_POWER ((u16)0x0302)
319 #define HFA384x_PDR_MASTER_CHAN_LIST ((u16)0x0303)
320 #define HFA384x_PDR_3842_NIC_CONFIG ((u16)0x0400)
321 #define HFA384x_PDR_USB_ID ((u16)0x0401)
322 #define HFA384x_PDR_PCI_ID ((u16)0x0402)
323 #define HFA384x_PDR_PCI_IFCONF ((u16)0x0403)
324 #define HFA384x_PDR_PCI_PMCONF ((u16)0x0404)
325 #define HFA384x_PDR_RFENRGY ((u16)0x0406)
326 #define HFA384x_PDR_USB_POWER_TYPE ((u16)0x0407)
327 #define HFA384x_PDR_USB_MAX_POWER ((u16)0x0409)
328 #define HFA384x_PDR_USB_MANUFACTURER ((u16)0x0410)
329 #define HFA384x_PDR_USB_PRODUCT ((u16)0x0411)
330 #define HFA384x_PDR_ANT_DIVERSITY ((u16)0x0412)
331 #define HFA384x_PDR_HFO_DELAY ((u16)0x0413)
332 #define HFA384x_PDR_SCALE_THRESH ((u16)0x0414)
334 #define HFA384x_PDR_HFA3861_MANF_TESTSP ((u16)0x0900)
335 #define HFA384x_PDR_HFA3861_MANF_TESTI ((u16)0x0901)
336 #define HFA384x_PDR_END_OF_PDA ((u16)0x0000)
338 /*--- Register Test/Get/Set Field macros ------------------------*/
340 #define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8))
341 #define HFA384x_CMD_MACPORT_SET(value) \
342 ((u16)HFA384x_CMD_AINFO_SET(value))
343 #define HFA384x_CMD_PROGMODE_SET(value) \
344 ((u16)HFA384x_CMD_AINFO_SET((u16)value))
345 #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value))
347 #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
349 /* Host Maintained State Info */
350 #define HFA384x_STATE_PREINIT 0
351 #define HFA384x_STATE_INIT 1
352 #define HFA384x_STATE_RUNNING 2
354 /*-------------------------------------------------------------*/
355 /* Commonly used basic types */
356 struct hfa384x_bytestr
{
361 struct hfa384x_bytestr32
{
366 /*--------------------------------------------------------------------
367 * Configuration Record Structures:
368 * Network Parameters, Static Configuration Entities
369 *--------------------------------------------------------------------
372 /*-- Hardware/Firmware Component Information ----------*/
373 struct hfa384x_compident
{
380 struct hfa384x_caplevel
{
388 /*-- Configuration Record: cnfAuthentication --*/
389 #define HFA384x_CNFAUTHENTICATION_OPENSYSTEM 0x0001
390 #define HFA384x_CNFAUTHENTICATION_SHAREDKEY 0x0002
391 #define HFA384x_CNFAUTHENTICATION_LEAP 0x0004
393 /*--------------------------------------------------------------------
394 * Configuration Record Structures:
395 * Network Parameters, Dynamic Configuration Entities
396 *--------------------------------------------------------------------
399 #define HFA384x_CREATEIBSS_JOINCREATEIBSS 0
401 /*-- Configuration Record: HostScanRequest (data portion only) --*/
402 struct hfa384x_host_scan_request_data
{
405 struct hfa384x_bytestr32 ssid
;
408 /*-- Configuration Record: JoinRequest (data portion only) --*/
409 struct hfa384x_join_request_data
{
410 u8 bssid
[WLAN_BSSID_LEN
];
414 /*-- Configuration Record: authenticateStation (data portion only) --*/
415 struct hfa384x_authenticate_station_data
{
416 u8 address
[ETH_ALEN
];
421 /*-- Configuration Record: WPAData (data portion only) --*/
422 struct hfa384x_wpa_data
{
424 u8 data
[0]; /* max 80 */
427 /*--------------------------------------------------------------------
428 * Information Record Structures: NIC Information
429 *--------------------------------------------------------------------
432 /*-- Information Record: DownLoadBuffer --*/
433 /* NOTE: The page and offset are in AUX format */
434 struct hfa384x_downloadbuffer
{
440 /*--------------------------------------------------------------------
441 * Information Record Structures: NIC Information
442 *--------------------------------------------------------------------
445 #define HFA384x_PSTATUS_CONN_IBSS ((u16)3)
447 /*-- Information Record: commsquality --*/
448 struct hfa384x_commsquality
{
454 /*-- Information Record: dmbcommsquality --*/
455 struct hfa384x_dbmcommsquality
{
457 u16 asl_dbm_curr_bss
;
461 /*--------------------------------------------------------------------
462 * FRAME STRUCTURES: Communication Frames
463 *--------------------------------------------------------------------
464 * Communication Frames: Transmit Frames
465 *--------------------------------------------------------------------
467 /*-- Communication Frame: Transmit Frame Structure --*/
468 struct hfa384x_tx_frame
{
477 /*-- 802.11 Header Information --*/
484 u16 sequence_control
;
486 __le16 data_len
; /* little endian format */
488 /*-- 802.3 Header Information --*/
492 u16 data_length
; /* big endian format */
494 /*--------------------------------------------------------------------
495 * Communication Frames: Field Masks for Transmit Frames
496 *--------------------------------------------------------------------
498 /*-- Status Field --*/
499 #define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5))
500 #define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3))
501 #define HFA384x_TXSTATUS_DISCON ((u16)BIT(2))
502 #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
503 #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
504 /*-- Transmit Control Field --*/
505 #define HFA384x_TX_MACPORT ((u16)GENMASK(10, 8))
506 #define HFA384x_TX_STRUCTYPE ((u16)GENMASK(4, 3))
507 #define HFA384x_TX_TXEX ((u16)BIT(2))
508 #define HFA384x_TX_TXOK ((u16)BIT(1))
509 /*--------------------------------------------------------------------
510 * Communication Frames: Test/Get/Set Field Values for Transmit Frames
511 *--------------------------------------------------------------------
513 /*-- Status Field --*/
514 #define HFA384x_TXSTATUS_ISERROR(v) \
516 (HFA384x_TXSTATUS_ACKERR | HFA384x_TXSTATUS_FORMERR | \
517 HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
518 HFA384x_TXSTATUS_RETRYERR))
520 #define HFA384x_TX_SET(v, m, s) ((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
522 #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
523 #define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \
524 HFA384x_TX_STRUCTYPE, 3)
525 #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
526 #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
527 /*--------------------------------------------------------------------
528 * Communication Frames: Receive Frames
529 *--------------------------------------------------------------------
531 /*-- Communication Frame: Receive Frame Structure --*/
532 struct hfa384x_rx_frame
{
533 /*-- MAC rx descriptor (hfa384x byte order) --*/
543 /*-- 802.11 Header Information (802.11 byte order) --*/
544 __le16 frame_control
;
549 u16 sequence_control
;
551 __le16 data_len
; /* hfa384x (little endian) format */
553 /*-- 802.3 Header Information --*/
556 u16 data_length
; /* IEEE? (big endian) format */
558 /*--------------------------------------------------------------------
559 * Communication Frames: Field Masks for Receive Frames
560 *--------------------------------------------------------------------
563 /*-- Status Fields --*/
564 #define HFA384x_RXSTATUS_MACPORT ((u16)GENMASK(10, 8))
565 #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
566 /*--------------------------------------------------------------------
567 * Communication Frames: Test/Get/Set Field Values for Receive Frames
568 *--------------------------------------------------------------------
570 #define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \
571 & HFA384x_RXSTATUS_MACPORT) >> 8))
572 #define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \
573 & HFA384x_RXSTATUS_FCSERR))
574 /*--------------------------------------------------------------------
575 * FRAME STRUCTURES: Information Types and Information Frame Structures
576 *--------------------------------------------------------------------
578 *--------------------------------------------------------------------
580 #define HFA384x_IT_HANDOVERADDR ((u16)0xF000UL)
581 #define HFA384x_IT_COMMTALLIES ((u16)0xF100UL)
582 #define HFA384x_IT_SCANRESULTS ((u16)0xF101UL)
583 #define HFA384x_IT_CHINFORESULTS ((u16)0xF102UL)
584 #define HFA384x_IT_HOSTSCANRESULTS ((u16)0xF103UL)
585 #define HFA384x_IT_LINKSTATUS ((u16)0xF200UL)
586 #define HFA384x_IT_ASSOCSTATUS ((u16)0xF201UL)
587 #define HFA384x_IT_AUTHREQ ((u16)0xF202UL)
588 #define HFA384x_IT_PSUSERCNT ((u16)0xF203UL)
589 #define HFA384x_IT_KEYIDCHANGED ((u16)0xF204UL)
590 #define HFA384x_IT_ASSOCREQ ((u16)0xF205UL)
591 #define HFA384x_IT_MICFAILURE ((u16)0xF206UL)
593 /*--------------------------------------------------------------------
594 * Information Frames Structures
595 *--------------------------------------------------------------------
596 * Information Frames: Notification Frame Structures
597 *--------------------------------------------------------------------
600 /*-- Inquiry Frame, Diagnose: Communication Tallies --*/
601 struct hfa384x_comm_tallies_16
{
602 __le16 txunicastframes
;
603 __le16 txmulticastframes
;
605 __le16 txunicastoctets
;
606 __le16 txmulticastoctets
;
607 __le16 txdeferredtrans
;
608 __le16 txsingleretryframes
;
609 __le16 txmultipleretryframes
;
610 __le16 txretrylimitexceeded
;
612 __le16 rxunicastframes
;
613 __le16 rxmulticastframes
;
615 __le16 rxunicastoctets
;
616 __le16 rxmulticastoctets
;
618 __le16 rxdiscardsnobuffer
;
619 __le16 txdiscardswrongsa
;
620 __le16 rxdiscardswepundecr
;
621 __le16 rxmsginmsgfrag
;
622 __le16 rxmsginbadmsgfrag
;
625 struct hfa384x_comm_tallies_32
{
626 __le32 txunicastframes
;
627 __le32 txmulticastframes
;
629 __le32 txunicastoctets
;
630 __le32 txmulticastoctets
;
631 __le32 txdeferredtrans
;
632 __le32 txsingleretryframes
;
633 __le32 txmultipleretryframes
;
634 __le32 txretrylimitexceeded
;
636 __le32 rxunicastframes
;
637 __le32 rxmulticastframes
;
639 __le32 rxunicastoctets
;
640 __le32 rxmulticastoctets
;
642 __le32 rxdiscardsnobuffer
;
643 __le32 txdiscardswrongsa
;
644 __le32 rxdiscardswepundecr
;
645 __le32 rxmsginmsgfrag
;
646 __le32 rxmsginbadmsgfrag
;
649 /*-- Inquiry Frame, Diagnose: Scan Results & Subfields--*/
650 struct hfa384x_scan_result_sub
{
654 u8 bssid
[WLAN_BSSID_LEN
];
657 struct hfa384x_bytestr32 ssid
;
658 u8 supprates
[10]; /* 802.11 info element */
662 struct hfa384x_scan_result
{
665 struct hfa384x_scan_result_sub result
[HFA384x_SCANRESULT_MAX
];
668 /*-- Inquiry Frame, Diagnose: ChInfo Results & Subfields--*/
669 struct hfa384x_ch_info_result_sub
{
676 #define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
677 #define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)
679 struct hfa384x_ch_info_result
{
681 struct hfa384x_ch_info_result_sub result
[HFA384x_CHINFORESULT_MAX
];
684 /*-- Inquiry Frame, Diagnose: Host Scan Results & Subfields--*/
685 struct hfa384x_hscan_result_sub
{
689 u8 bssid
[WLAN_BSSID_LEN
];
692 struct hfa384x_bytestr32 ssid
;
693 u8 supprates
[10]; /* 802.11 info element */
698 struct hfa384x_hscan_result
{
701 struct hfa384x_hscan_result_sub result
[HFA384x_HSCANRESULT_MAX
];
704 /*-- Unsolicited Frame, MAC Mgmt: LinkStatus --*/
706 #define HFA384x_LINK_NOTCONNECTED ((u16)0)
707 #define HFA384x_LINK_CONNECTED ((u16)1)
708 #define HFA384x_LINK_DISCONNECTED ((u16)2)
709 #define HFA384x_LINK_AP_CHANGE ((u16)3)
710 #define HFA384x_LINK_AP_OUTOFRANGE ((u16)4)
711 #define HFA384x_LINK_AP_INRANGE ((u16)5)
712 #define HFA384x_LINK_ASSOCFAIL ((u16)6)
714 struct hfa384x_link_status
{
718 /*-- Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/
720 #define HFA384x_ASSOCSTATUS_STAASSOC ((u16)1)
721 #define HFA384x_ASSOCSTATUS_REASSOC ((u16)2)
722 #define HFA384x_ASSOCSTATUS_AUTHFAIL ((u16)5)
724 struct hfa384x_assoc_status
{
726 u8 sta_addr
[ETH_ALEN
];
727 /* old_ap_addr is only valid if assocstatus == 2 */
728 u8 old_ap_addr
[ETH_ALEN
];
733 /*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/
735 struct hfa384x_auth_request
{
736 u8 sta_addr
[ETH_ALEN
];
740 /*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/
742 struct hfa384x_ps_user_count
{
746 struct hfa384x_key_id_changed
{
747 u8 sta_addr
[ETH_ALEN
];
751 /*-- Collection of all Inf frames ---------------*/
752 union hfa384x_infodata
{
753 struct hfa384x_comm_tallies_16 commtallies16
;
754 struct hfa384x_comm_tallies_32 commtallies32
;
755 struct hfa384x_scan_result scanresult
;
756 struct hfa384x_ch_info_result chinforesult
;
757 struct hfa384x_hscan_result hscanresult
;
758 struct hfa384x_link_status linkstatus
;
759 struct hfa384x_assoc_status assocstatus
;
760 struct hfa384x_auth_request authreq
;
761 struct hfa384x_ps_user_count psusercnt
;
762 struct hfa384x_key_id_changed keyidchanged
;
765 struct hfa384x_inf_frame
{
768 union hfa384x_infodata info
;
771 /*--------------------------------------------------------------------
772 * USB Packet structures and constants.
773 *--------------------------------------------------------------------
776 /* Should be sent to the bulkout endpoint */
777 #define HFA384x_USB_TXFRM 0
778 #define HFA384x_USB_CMDREQ 1
779 #define HFA384x_USB_WRIDREQ 2
780 #define HFA384x_USB_RRIDREQ 3
781 #define HFA384x_USB_WMEMREQ 4
782 #define HFA384x_USB_RMEMREQ 5
784 /* Received from the bulkin endpoint */
785 #define HFA384x_USB_ISTXFRM(a) (((a) & 0x9000) == 0x1000)
786 #define HFA384x_USB_ISRXFRM(a) (!((a) & 0x9000))
787 #define HFA384x_USB_INFOFRM 0x8000
788 #define HFA384x_USB_CMDRESP 0x8001
789 #define HFA384x_USB_WRIDRESP 0x8002
790 #define HFA384x_USB_RRIDRESP 0x8003
791 #define HFA384x_USB_WMEMRESP 0x8004
792 #define HFA384x_USB_RMEMRESP 0x8005
793 #define HFA384x_USB_BUFAVAIL 0x8006
794 #define HFA384x_USB_ERROR 0x8007
796 /*------------------------------------*/
797 /* Request (bulk OUT) packet contents */
799 struct hfa384x_usb_txfrm
{
800 struct hfa384x_tx_frame desc
;
801 u8 data
[WLAN_DATA_MAXLEN
];
804 struct hfa384x_usb_cmdreq
{
813 struct hfa384x_usb_wridreq
{
817 u8 data
[HFA384x_RIDDATA_MAXLEN
];
820 struct hfa384x_usb_rridreq
{
827 struct hfa384x_usb_wmemreq
{
832 u8 data
[HFA384x_USB_RWMEM_MAXLEN
];
835 struct hfa384x_usb_rmemreq
{
843 /*------------------------------------*/
844 /* Response (bulk IN) packet contents */
846 struct hfa384x_usb_rxfrm
{
847 struct hfa384x_rx_frame desc
;
848 u8 data
[WLAN_DATA_MAXLEN
];
851 struct hfa384x_usb_infofrm
{
853 struct hfa384x_inf_frame info
;
856 struct hfa384x_usb_statusresp
{
864 struct hfa384x_usb_rridresp
{
868 u8 data
[HFA384x_RIDDATA_MAXLEN
];
871 struct hfa384x_usb_rmemresp
{
874 u8 data
[HFA384x_USB_RWMEM_MAXLEN
];
877 struct hfa384x_usb_bufavail
{
882 struct hfa384x_usb_error
{
887 /*----------------------------------------------------------*/
888 /* Unions for packaging all the known packet types together */
890 union hfa384x_usbout
{
892 struct hfa384x_usb_txfrm txfrm
;
893 struct hfa384x_usb_cmdreq cmdreq
;
894 struct hfa384x_usb_wridreq wridreq
;
895 struct hfa384x_usb_rridreq rridreq
;
896 struct hfa384x_usb_wmemreq wmemreq
;
897 struct hfa384x_usb_rmemreq rmemreq
;
900 union hfa384x_usbin
{
902 struct hfa384x_usb_rxfrm rxfrm
;
903 struct hfa384x_usb_txfrm txfrm
;
904 struct hfa384x_usb_infofrm infofrm
;
905 struct hfa384x_usb_statusresp cmdresp
;
906 struct hfa384x_usb_statusresp wridresp
;
907 struct hfa384x_usb_rridresp rridresp
;
908 struct hfa384x_usb_statusresp wmemresp
;
909 struct hfa384x_usb_rmemresp rmemresp
;
910 struct hfa384x_usb_bufavail bufavail
;
911 struct hfa384x_usb_error usberror
;
915 /*--------------------------------------------------------------------
916 * PD record structures.
917 *--------------------------------------------------------------------
920 struct hfa384x_pdr_pcb_partnum
{
924 struct hfa384x_pdr_pcb_tracenum
{
928 struct hfa384x_pdr_nic_serial
{
932 struct hfa384x_pdr_mkk_measurements
{
934 double occupied_band
;
935 double power_density
;
950 struct hfa384x_pdr_nic_ramsize
{
951 u8 size
[12]; /* units of KB */
954 struct hfa384x_pdr_mfisuprange
{
961 struct hfa384x_pdr_cfisuprange
{
968 struct hfa384x_pdr_nicid
{
975 struct hfa384x_pdr_refdac_measurements
{
979 struct hfa384x_pdr_vgdac_measurements
{
983 struct hfa384x_pdr_level_comp_measurements
{
987 struct hfa384x_pdr_mac_address
{
991 struct hfa384x_pdr_mkk_callname
{
995 struct hfa384x_pdr_regdomain
{
1000 struct hfa384x_pdr_allowed_channel
{
1004 struct hfa384x_pdr_default_channel
{
1008 struct hfa384x_pdr_privacy_option
{
1012 struct hfa384x_pdr_temptype
{
1016 struct hfa384x_pdr_refdac_setup
{
1020 struct hfa384x_pdr_vgdac_setup
{
1024 struct hfa384x_pdr_level_comp_setup
{
1028 struct hfa384x_pdr_trimdac_setup
{
1033 struct hfa384x_pdr_ifr_setting
{
1037 struct hfa384x_pdr_rfr_setting
{
1041 struct hfa384x_pdr_hfa3861_baseline
{
1045 struct hfa384x_pdr_hfa3861_shadow
{
1049 struct hfa384x_pdr_hfa3861_ifrf
{
1053 struct hfa384x_pdr_hfa3861_chcalsp
{
1057 struct hfa384x_pdr_hfa3861_chcali
{
1061 struct hfa384x_pdr_hfa3861_nic_config
{
1065 struct hfa384x_pdr_hfo_delay
{
1069 struct hfa384x_pdr_hfa3861_manf_testsp
{
1073 struct hfa384x_pdr_hfa3861_manf_testi
{
1077 struct hfa384x_pdr_end_of_pda
{
1081 struct hfa384x_pdrec
{
1082 __le16 len
; /* in words */
1085 struct hfa384x_pdr_pcb_partnum pcb_partnum
;
1086 struct hfa384x_pdr_pcb_tracenum pcb_tracenum
;
1087 struct hfa384x_pdr_nic_serial nic_serial
;
1088 struct hfa384x_pdr_mkk_measurements mkk_measurements
;
1089 struct hfa384x_pdr_nic_ramsize nic_ramsize
;
1090 struct hfa384x_pdr_mfisuprange mfisuprange
;
1091 struct hfa384x_pdr_cfisuprange cfisuprange
;
1092 struct hfa384x_pdr_nicid nicid
;
1093 struct hfa384x_pdr_refdac_measurements refdac_measurements
;
1094 struct hfa384x_pdr_vgdac_measurements vgdac_measurements
;
1095 struct hfa384x_pdr_level_comp_measurements level_compc_measurements
;
1096 struct hfa384x_pdr_mac_address mac_address
;
1097 struct hfa384x_pdr_mkk_callname mkk_callname
;
1098 struct hfa384x_pdr_regdomain regdomain
;
1099 struct hfa384x_pdr_allowed_channel allowed_channel
;
1100 struct hfa384x_pdr_default_channel default_channel
;
1101 struct hfa384x_pdr_privacy_option privacy_option
;
1102 struct hfa384x_pdr_temptype temptype
;
1103 struct hfa384x_pdr_refdac_setup refdac_setup
;
1104 struct hfa384x_pdr_vgdac_setup vgdac_setup
;
1105 struct hfa384x_pdr_level_comp_setup level_comp_setup
;
1106 struct hfa384x_pdr_trimdac_setup trimdac_setup
;
1107 struct hfa384x_pdr_ifr_setting ifr_setting
;
1108 struct hfa384x_pdr_rfr_setting rfr_setting
;
1109 struct hfa384x_pdr_hfa3861_baseline hfa3861_baseline
;
1110 struct hfa384x_pdr_hfa3861_shadow hfa3861_shadow
;
1111 struct hfa384x_pdr_hfa3861_ifrf hfa3861_ifrf
;
1112 struct hfa384x_pdr_hfa3861_chcalsp hfa3861_chcalsp
;
1113 struct hfa384x_pdr_hfa3861_chcali hfa3861_chcali
;
1114 struct hfa384x_pdr_hfa3861_nic_config nic_config
;
1115 struct hfa384x_pdr_hfo_delay hfo_delay
;
1116 struct hfa384x_pdr_hfa3861_manf_testsp hfa3861_manf_testsp
;
1117 struct hfa384x_pdr_hfa3861_manf_testi hfa3861_manf_testi
;
1118 struct hfa384x_pdr_end_of_pda end_of_pda
;
1124 /*--------------------------------------------------------------------
1125 * --- MAC state structure, argument to all functions --
1126 * --- Also, a collection of support types --
1127 *--------------------------------------------------------------------
1129 struct hfa384x_cmdresult
{
1136 /* USB Control Exchange (CTLX):
1137 * A queue of the structure below is maintained for all of the
1138 * Request/Response type USB packets supported by Prism2.
1140 /* The following hfa384x_* structures are arguments to
1141 * the usercb() for the different CTLX types.
1143 struct hfa384x_rridresult
{
1145 const void *riddata
;
1146 unsigned int riddata_len
;
1150 CTLX_START
= 0, /* Start state, not queued */
1152 CTLX_COMPLETE
, /* CTLX successfully completed */
1153 CTLX_REQ_FAILED
, /* OUT URB completed w/ error */
1155 CTLX_PENDING
, /* Queued, data valid */
1156 CTLX_REQ_SUBMITTED
, /* OUT URB submitted */
1157 CTLX_REQ_COMPLETE
, /* OUT URB complete */
1158 CTLX_RESP_COMPLETE
/* IN URB received */
1161 struct hfa384x_usbctlx
;
1164 typedef void (*ctlx_cmdcb_t
) (struct hfa384x
*, const struct hfa384x_usbctlx
*);
1166 typedef void (*ctlx_usercb_t
) (struct hfa384x
*hw
,
1167 void *ctlxresult
, void *usercb_data
);
1169 struct hfa384x_usbctlx
{
1170 struct list_head list
;
1173 union hfa384x_usbout outbuf
; /* pkt buf for OUT */
1174 union hfa384x_usbin inbuf
; /* pkt buf for IN(a copy) */
1176 enum ctlx_state state
; /* Tracks running state */
1178 struct completion done
;
1179 volatile int reapable
; /* Food for the reaper task */
1181 ctlx_cmdcb_t cmdcb
; /* Async command callback */
1182 ctlx_usercb_t usercb
; /* Async user callback, */
1183 void *usercb_data
; /* at CTLX completion */
1185 int variant
; /* Identifies cmd variant */
1188 struct hfa384x_usbctlxq
{
1190 struct list_head pending
;
1191 struct list_head active
;
1192 struct list_head completing
;
1193 struct list_head reapable
;
1196 struct hfa384x_metacmd
{
1203 struct hfa384x_cmdresult result
;
1206 #define MAX_GRP_ADDR 32
1207 #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */
1209 #define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */
1210 #define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */
1211 #define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */
1212 #define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */
1213 #define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */
1214 #define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */
1216 /* XXX These are going away ASAP */
1217 struct prism2sta_authlist
{
1219 u8 addr
[WLAN_AUTH_MAX
][ETH_ALEN
];
1220 u8 assoc
[WLAN_AUTH_MAX
];
1223 struct prism2sta_accesslist
{
1224 unsigned int modify
;
1226 u8 addr
[WLAN_ACCESS_MAX
][ETH_ALEN
];
1228 u8 addr1
[WLAN_ACCESS_MAX
][ETH_ALEN
];
1232 /* USB support data */
1233 struct usb_device
*usb
;
1235 struct sk_buff
*rx_urb_skb
;
1237 struct urb ctlx_urb
;
1238 union hfa384x_usbout txbuff
;
1239 struct hfa384x_usbctlxq ctlxq
;
1240 struct timer_list reqtimer
;
1241 struct timer_list resptimer
;
1243 struct timer_list throttle
;
1245 struct tasklet_struct reaper_bh
;
1246 struct tasklet_struct completion_bh
;
1248 struct work_struct usb_work
;
1250 unsigned long usb_flags
;
1251 #define THROTTLE_RX 0
1252 #define THROTTLE_TX 1
1253 #define WORK_RX_HALT 2
1254 #define WORK_TX_HALT 3
1255 #define WORK_RX_RESUME 4
1256 #define WORK_TX_RESUME 5
1258 unsigned short req_timer_done
:1;
1259 unsigned short resp_timer_done
:1;
1269 wait_queue_head_t cmdq
; /* wait queue itself */
1271 /* Controller state */
1274 u8 port_enabled
[HFA384x_NUMPORTS_MAX
];
1276 /* Download support */
1277 unsigned int dlstate
;
1278 struct hfa384x_downloadbuffer bufinfo
;
1281 int scanflag
; /* to signal scan complete */
1282 int join_ap
; /* are we joined to a specific ap */
1283 int join_retries
; /* number of join retries till we fail */
1284 struct hfa384x_join_request_data joinreq
;/* join request saved data */
1286 struct wlandevice
*wlandev
;
1287 /* Timer to allow for the deferred processing of linkstatus messages */
1288 struct work_struct link_bh
;
1290 struct work_struct commsqual_bh
;
1291 struct hfa384x_commsquality qual
;
1292 struct timer_list commsqual_timer
;
1295 u16 link_status_new
;
1296 struct sk_buff_head authq
;
1300 /* And here we have stuff that used to be in priv */
1302 /* State variables */
1303 unsigned int presniff_port_type
;
1304 u16 presniff_wepflags
;
1305 u32 dot11_desired_bss_type
;
1309 /* Group Addresses - right now, there are up to a total
1310 * of MAX_GRP_ADDR group addresses
1312 u8 dot11_grp_addr
[MAX_GRP_ADDR
][ETH_ALEN
];
1313 unsigned int dot11_grpcnt
;
1315 /* Component Identities */
1316 struct hfa384x_compident ident_nic
;
1317 struct hfa384x_compident ident_pri_fw
;
1318 struct hfa384x_compident ident_sta_fw
;
1319 struct hfa384x_compident ident_ap_fw
;
1322 /* Supplier compatibility ranges */
1323 struct hfa384x_caplevel cap_sup_mfi
;
1324 struct hfa384x_caplevel cap_sup_cfi
;
1325 struct hfa384x_caplevel cap_sup_pri
;
1326 struct hfa384x_caplevel cap_sup_sta
;
1327 struct hfa384x_caplevel cap_sup_ap
;
1329 /* Actor compatibility ranges */
1330 struct hfa384x_caplevel cap_act_pri_cfi
; /*
1331 * pri f/w to controller
1335 struct hfa384x_caplevel cap_act_sta_cfi
; /*
1336 * sta f/w to controller
1340 struct hfa384x_caplevel cap_act_sta_mfi
; /* sta f/w to modem interface */
1342 struct hfa384x_caplevel cap_act_ap_cfi
; /*
1343 * ap f/w to controller
1347 struct hfa384x_caplevel cap_act_ap_mfi
; /* ap f/w to modem interface */
1349 u32 psusercount
; /* Power save user count. */
1350 struct hfa384x_comm_tallies_32 tallies
; /* Communication tallies. */
1351 u8 comment
[WLAN_COMMENT_MAX
+ 1]; /* User comment */
1353 /* Channel Info request results (AP only) */
1357 struct hfa384x_ch_info_result results
;
1360 struct hfa384x_inf_frame
*scanresults
;
1362 struct prism2sta_authlist authlist
; /* Authenticated station list. */
1363 unsigned int accessmode
; /* Access mode. */
1364 struct prism2sta_accesslist allow
; /* Allowed station list. */
1365 struct prism2sta_accesslist deny
; /* Denied station list. */
1369 void hfa384x_create(struct hfa384x
*hw
, struct usb_device
*usb
);
1370 void hfa384x_destroy(struct hfa384x
*hw
);
1373 hfa384x_corereset(struct hfa384x
*hw
, int holdtime
, int settletime
, int genesis
);
1374 int hfa384x_drvr_disable(struct hfa384x
*hw
, u16 macport
);
1375 int hfa384x_drvr_enable(struct hfa384x
*hw
, u16 macport
);
1376 int hfa384x_drvr_flashdl_enable(struct hfa384x
*hw
);
1377 int hfa384x_drvr_flashdl_disable(struct hfa384x
*hw
);
1378 int hfa384x_drvr_flashdl_write(struct hfa384x
*hw
, u32 daddr
, void *buf
, u32 len
);
1379 int hfa384x_drvr_getconfig(struct hfa384x
*hw
, u16 rid
, void *buf
, u16 len
);
1380 int hfa384x_drvr_ramdl_enable(struct hfa384x
*hw
, u32 exeaddr
);
1381 int hfa384x_drvr_ramdl_disable(struct hfa384x
*hw
);
1382 int hfa384x_drvr_ramdl_write(struct hfa384x
*hw
, u32 daddr
, void *buf
, u32 len
);
1383 int hfa384x_drvr_readpda(struct hfa384x
*hw
, void *buf
, unsigned int len
);
1384 int hfa384x_drvr_setconfig(struct hfa384x
*hw
, u16 rid
, void *buf
, u16 len
);
1386 static inline int hfa384x_drvr_getconfig16(struct hfa384x
*hw
, u16 rid
, void *val
)
1390 result
= hfa384x_drvr_getconfig(hw
, rid
, val
, sizeof(u16
));
1396 static inline int hfa384x_drvr_setconfig16(struct hfa384x
*hw
, u16 rid
, u16 val
)
1398 __le16 value
= cpu_to_le16(val
);
1400 return hfa384x_drvr_setconfig(hw
, rid
, &value
, sizeof(value
));
1404 hfa384x_drvr_setconfig_async(struct hfa384x
*hw
,
1407 u16 len
, ctlx_usercb_t usercb
, void *usercb_data
);
1410 hfa384x_drvr_setconfig16_async(struct hfa384x
*hw
, u16 rid
, u16 val
)
1412 __le16 value
= cpu_to_le16(val
);
1414 return hfa384x_drvr_setconfig_async(hw
, rid
, &value
, sizeof(value
),
1418 int hfa384x_drvr_start(struct hfa384x
*hw
);
1419 int hfa384x_drvr_stop(struct hfa384x
*hw
);
1421 hfa384x_drvr_txframe(struct hfa384x
*hw
, struct sk_buff
*skb
,
1422 union p80211_hdr
*p80211_hdr
,
1423 struct p80211_metawep
*p80211_wep
);
1424 void hfa384x_tx_timeout(struct wlandevice
*wlandev
);
1426 int hfa384x_cmd_initialize(struct hfa384x
*hw
);
1427 int hfa384x_cmd_enable(struct hfa384x
*hw
, u16 macport
);
1428 int hfa384x_cmd_disable(struct hfa384x
*hw
, u16 macport
);
1429 int hfa384x_cmd_allocate(struct hfa384x
*hw
, u16 len
);
1430 int hfa384x_cmd_monitor(struct hfa384x
*hw
, u16 enable
);
1432 hfa384x_cmd_download(struct hfa384x
*hw
,
1433 u16 mode
, u16 lowaddr
, u16 highaddr
, u16 codelen
);
1435 #endif /*__KERNEL__ */
1437 #endif /*_HFA384x_H */