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>
62 #include <linux/usb.h>
64 /*--- Mins & Maxs -----------------------------------*/
65 #define HFA384x_PORTID_MAX ((u16)7)
66 #define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX + 1))
67 #define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */
68 #define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */
69 #define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/
70 #define HFA384x_SCANRESULT_MAX ((u16)31)
71 #define HFA384x_HSCANRESULT_MAX ((u16)31)
72 #define HFA384x_CHINFORESULT_MAX ((u16)16)
73 #define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
74 #define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN
75 #define HFA384x_USB_RWMEM_MAXLEN 2048
77 /*--- Support Constants -----------------------------*/
78 #define HFA384x_PORTTYPE_IBSS ((u16)0)
79 #define HFA384x_PORTTYPE_BSS ((u16)1)
80 #define HFA384x_PORTTYPE_PSUEDOIBSS ((u16)3)
81 #define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT(0))
82 #define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT(1))
83 #define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT(4))
84 #define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT(7))
85 #define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3)
86 #define HFA384x_PORTSTATUS_DISABLED ((u16)1)
87 #define HFA384x_RATEBIT_1 ((u16)1)
88 #define HFA384x_RATEBIT_2 ((u16)2)
89 #define HFA384x_RATEBIT_5dot5 ((u16)4)
90 #define HFA384x_RATEBIT_11 ((u16)8)
92 /*--- MAC Internal memory constants and macros ------*/
93 /* masks and macros used to manipulate MAC internal memory addresses. */
94 /* MAC internal memory addresses are 23 bit quantities. The MAC uses
95 * a paged address space where the upper 16 bits are the page number
96 * and the lower 7 bits are the offset. There are various Host API
97 * elements that require two 16-bit quantities to specify a MAC
98 * internal memory address. Unfortunately, some of the API's use a
99 * page/offset format where the offset value is JUST the lower seven
100 * bits and the page is the remaining 16 bits. Some of the API's
101 * assume that the 23 bit address has been split at the 16th bit. We
102 * refer to these two formats as AUX format and CMD format. The
103 * macros below help handle some of this.
106 /* Mask bits for discarding unwanted pieces in a flat address */
107 #define HFA384x_ADDR_FLAT_AUX_PAGE_MASK (0x007fff80)
108 #define HFA384x_ADDR_FLAT_AUX_OFF_MASK (0x0000007f)
109 #define HFA384x_ADDR_FLAT_CMD_PAGE_MASK (0xffff0000)
110 #define HFA384x_ADDR_FLAT_CMD_OFF_MASK (0x0000ffff)
112 /* Mask bits for discarding unwanted pieces in AUX format
113 * 16-bit address parts
115 #define HFA384x_ADDR_AUX_PAGE_MASK (0xffff)
116 #define HFA384x_ADDR_AUX_OFF_MASK (0x007f)
118 /* Make a 32-bit flat address from AUX format 16-bit page and offset */
119 #define HFA384x_ADDR_AUX_MKFLAT(p, o) \
120 ((((u32)(((u16)(p)) & HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
121 ((u32)(((u16)(o)) & HFA384x_ADDR_AUX_OFF_MASK)))
123 /* Make CMD format offset and page from a 32-bit flat address */
124 #define HFA384x_ADDR_CMD_MKPAGE(f) \
125 ((u16)((((u32)(f)) & HFA384x_ADDR_FLAT_CMD_PAGE_MASK) >> 16))
126 #define HFA384x_ADDR_CMD_MKOFF(f) \
127 ((u16)(((u32)(f)) & HFA384x_ADDR_FLAT_CMD_OFF_MASK))
129 /*--- Controller Memory addresses -------------------*/
130 #define HFA3842_PDA_BASE (0x007f0000UL)
131 #define HFA3841_PDA_BASE (0x003f0000UL)
132 #define HFA3841_PDA_BOGUS_BASE (0x00390000UL)
134 /*--- Driver Download states -----------------------*/
135 #define HFA384x_DLSTATE_DISABLED 0
136 #define HFA384x_DLSTATE_RAMENABLED 1
137 #define HFA384x_DLSTATE_FLASHENABLED 2
139 /*--- Register Field Masks --------------------------*/
140 #define HFA384x_CMD_AINFO ((u16)GENMASK(14, 8))
141 #define HFA384x_CMD_MACPORT ((u16)GENMASK(10, 8))
142 #define HFA384x_CMD_PROGMODE ((u16)GENMASK(9, 8))
143 #define HFA384x_CMD_CMDCODE ((u16)GENMASK(5, 0))
144 #define HFA384x_STATUS_RESULT ((u16)GENMASK(14, 8))
146 /*--- Command Code Constants --------------------------*/
147 /*--- Controller Commands --------------------------*/
148 #define HFA384x_CMDCODE_INIT ((u16)0x00)
149 #define HFA384x_CMDCODE_ENABLE ((u16)0x01)
150 #define HFA384x_CMDCODE_DISABLE ((u16)0x02)
152 /*--- Regulate Commands --------------------------*/
153 #define HFA384x_CMDCODE_INQ ((u16)0x11)
155 /*--- Configure Commands --------------------------*/
156 #define HFA384x_CMDCODE_DOWNLD ((u16)0x22)
158 /*--- Debugging Commands -----------------------------*/
159 #define HFA384x_CMDCODE_MONITOR ((u16)(0x38))
160 #define HFA384x_MONITOR_ENABLE ((u16)(0x0b))
161 #define HFA384x_MONITOR_DISABLE ((u16)(0x0f))
163 /*--- Result Codes --------------------------*/
164 #define HFA384x_CMD_ERR ((u16)(0x7F))
166 /*--- Programming Modes --------------------------
167 * MODE 0: Disable programming
168 * MODE 1: Enable volatile memory programming
169 * MODE 2: Enable non-volatile memory programming
170 * MODE 3: Program non-volatile memory section
171 *-------------------------------------------------
173 #define HFA384x_PROGMODE_DISABLE ((u16)0x00)
174 #define HFA384x_PROGMODE_RAM ((u16)0x01)
175 #define HFA384x_PROGMODE_NV ((u16)0x02)
176 #define HFA384x_PROGMODE_NVWRITE ((u16)0x03)
178 /*--- Record ID Constants --------------------------*/
179 /*--------------------------------------------------------------------
180 * Configuration RIDs: Network Parameters, Static Configuration Entities
181 *--------------------------------------------------------------------
183 #define HFA384x_RID_CNFPORTTYPE ((u16)0xFC00)
184 #define HFA384x_RID_CNFOWNMACADDR ((u16)0xFC01)
185 #define HFA384x_RID_CNFDESIREDSSID ((u16)0xFC02)
186 #define HFA384x_RID_CNFOWNCHANNEL ((u16)0xFC03)
187 #define HFA384x_RID_CNFOWNSSID ((u16)0xFC04)
188 #define HFA384x_RID_CNFMAXDATALEN ((u16)0xFC07)
190 /*--------------------------------------------------------------------
191 * Configuration RID lengths: Network Params, Static Config Entities
192 * This is the length of JUST the DATA part of the RID (does not
193 * include the len or code fields)
194 *--------------------------------------------------------------------
196 #define HFA384x_RID_CNFOWNMACADDR_LEN ((u16)6)
197 #define HFA384x_RID_CNFDESIREDSSID_LEN ((u16)34)
198 #define HFA384x_RID_CNFOWNSSID_LEN ((u16)34)
200 /*--------------------------------------------------------------------
201 * Configuration RIDs: Network Parameters, Dynamic Configuration Entities
202 *--------------------------------------------------------------------
204 #define HFA384x_RID_CREATEIBSS ((u16)0xFC81)
205 #define HFA384x_RID_FRAGTHRESH ((u16)0xFC82)
206 #define HFA384x_RID_RTSTHRESH ((u16)0xFC83)
207 #define HFA384x_RID_TXRATECNTL ((u16)0xFC84)
208 #define HFA384x_RID_PROMISCMODE ((u16)0xFC85)
210 /*----------------------------------------------------------------------
211 * Information RIDs: NIC Information
212 *----------------------------------------------------------------------
214 #define HFA384x_RID_MAXLOADTIME ((u16)0xFD00)
215 #define HFA384x_RID_DOWNLOADBUFFER ((u16)0xFD01)
216 #define HFA384x_RID_PRIIDENTITY ((u16)0xFD02)
217 #define HFA384x_RID_PRISUPRANGE ((u16)0xFD03)
218 #define HFA384x_RID_PRI_CFIACTRANGES ((u16)0xFD04)
219 #define HFA384x_RID_NICSERIALNUMBER ((u16)0xFD0A)
220 #define HFA384x_RID_NICIDENTITY ((u16)0xFD0B)
221 #define HFA384x_RID_MFISUPRANGE ((u16)0xFD0C)
222 #define HFA384x_RID_CFISUPRANGE ((u16)0xFD0D)
223 #define HFA384x_RID_STAIDENTITY ((u16)0xFD20)
224 #define HFA384x_RID_STASUPRANGE ((u16)0xFD21)
225 #define HFA384x_RID_STA_MFIACTRANGES ((u16)0xFD22)
226 #define HFA384x_RID_STA_CFIACTRANGES ((u16)0xFD23)
228 /*----------------------------------------------------------------------
229 * Information RID Lengths: NIC Information
230 * This is the length of JUST the DATA part of the RID (does not
231 * include the len or code fields)
232 *---------------------------------------------------------------------
234 #define HFA384x_RID_NICSERIALNUMBER_LEN ((u16)12)
236 /*--------------------------------------------------------------------
237 * Information RIDs: MAC Information
238 *--------------------------------------------------------------------
240 #define HFA384x_RID_PORTSTATUS ((u16)0xFD40)
241 #define HFA384x_RID_CURRENTSSID ((u16)0xFD41)
242 #define HFA384x_RID_CURRENTBSSID ((u16)0xFD42)
243 #define HFA384x_RID_CURRENTTXRATE ((u16)0xFD44)
244 #define HFA384x_RID_SHORTRETRYLIMIT ((u16)0xFD48)
245 #define HFA384x_RID_LONGRETRYLIMIT ((u16)0xFD49)
246 #define HFA384x_RID_MAXTXLIFETIME ((u16)0xFD4A)
247 #define HFA384x_RID_PRIVACYOPTIMP ((u16)0xFD4F)
248 #define HFA384x_RID_DBMCOMMSQUALITY ((u16)0xFD51)
250 /*--------------------------------------------------------------------
251 * Information RID Lengths: MAC Information
252 * This is the length of JUST the DATA part of the RID (does not
253 * include the len or code fields)
254 *--------------------------------------------------------------------
256 #define HFA384x_RID_DBMCOMMSQUALITY_LEN \
257 ((u16)sizeof(struct hfa384x_dbmcommsquality))
258 #define HFA384x_RID_JOINREQUEST_LEN \
259 ((u16)sizeof(struct hfa384x_join_request_data))
261 /*--------------------------------------------------------------------
262 * Information RIDs: Modem Information
263 *--------------------------------------------------------------------
265 #define HFA384x_RID_CURRENTCHANNEL ((u16)0xFDC1)
267 /*--------------------------------------------------------------------
268 * API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
269 *--------------------------------------------------------------------
271 #define HFA384x_RID_CNFWEPDEFAULTKEYID ((u16)0xFC23)
272 #define HFA384x_RID_CNFWEPDEFAULTKEY0 ((u16)0xFC24)
273 #define HFA384x_RID_CNFWEPDEFAULTKEY1 ((u16)0xFC25)
274 #define HFA384x_RID_CNFWEPDEFAULTKEY2 ((u16)0xFC26)
275 #define HFA384x_RID_CNFWEPDEFAULTKEY3 ((u16)0xFC27)
276 #define HFA384x_RID_CNFWEPFLAGS ((u16)0xFC28)
277 #define HFA384x_RID_CNFAUTHENTICATION ((u16)0xFC2A)
278 #define HFA384x_RID_CNFROAMINGMODE ((u16)0xFC2D)
279 #define HFA384x_RID_CNFAPBCNINT ((u16)0xFC33)
280 #define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46)
281 #define HFA384x_RID_CNFWPADATA ((u16)0xFC48)
282 #define HFA384x_RID_CNFBASICRATES ((u16)0xFCB3)
283 #define HFA384x_RID_CNFSUPPRATES ((u16)0xFCB4)
284 #define HFA384x_RID_CNFPASSIVESCANCTRL ((u16)0xFCBA)
285 #define HFA384x_RID_TXPOWERMAX ((u16)0xFCBE)
286 #define HFA384x_RID_JOINREQUEST ((u16)0xFCE2)
287 #define HFA384x_RID_AUTHENTICATESTA ((u16)0xFCE3)
288 #define HFA384x_RID_HOSTSCAN ((u16)0xFCE5)
290 #define HFA384x_RID_CNFWEPDEFAULTKEY_LEN ((u16)6)
291 #define HFA384x_RID_CNFWEP128DEFAULTKEY_LEN ((u16)14)
293 /*--------------------------------------------------------------------
295 *--------------------------------------------------------------------
297 #define HFA384x_PDR_PCB_PARTNUM ((u16)0x0001)
298 #define HFA384x_PDR_PDAVER ((u16)0x0002)
299 #define HFA384x_PDR_NIC_SERIAL ((u16)0x0003)
300 #define HFA384x_PDR_MKK_MEASUREMENTS ((u16)0x0004)
301 #define HFA384x_PDR_NIC_RAMSIZE ((u16)0x0005)
302 #define HFA384x_PDR_MFISUPRANGE ((u16)0x0006)
303 #define HFA384x_PDR_CFISUPRANGE ((u16)0x0007)
304 #define HFA384x_PDR_NICID ((u16)0x0008)
305 #define HFA384x_PDR_MAC_ADDRESS ((u16)0x0101)
306 #define HFA384x_PDR_REGDOMAIN ((u16)0x0103)
307 #define HFA384x_PDR_ALLOWED_CHANNEL ((u16)0x0104)
308 #define HFA384x_PDR_DEFAULT_CHANNEL ((u16)0x0105)
309 #define HFA384x_PDR_TEMPTYPE ((u16)0x0107)
310 #define HFA384x_PDR_IFR_SETTING ((u16)0x0200)
311 #define HFA384x_PDR_RFR_SETTING ((u16)0x0201)
312 #define HFA384x_PDR_HFA3861_BASELINE ((u16)0x0202)
313 #define HFA384x_PDR_HFA3861_SHADOW ((u16)0x0203)
314 #define HFA384x_PDR_HFA3861_IFRF ((u16)0x0204)
315 #define HFA384x_PDR_HFA3861_CHCALSP ((u16)0x0300)
316 #define HFA384x_PDR_HFA3861_CHCALI ((u16)0x0301)
317 #define HFA384x_PDR_MAX_TX_POWER ((u16)0x0302)
318 #define HFA384x_PDR_MASTER_CHAN_LIST ((u16)0x0303)
319 #define HFA384x_PDR_3842_NIC_CONFIG ((u16)0x0400)
320 #define HFA384x_PDR_USB_ID ((u16)0x0401)
321 #define HFA384x_PDR_PCI_ID ((u16)0x0402)
322 #define HFA384x_PDR_PCI_IFCONF ((u16)0x0403)
323 #define HFA384x_PDR_PCI_PMCONF ((u16)0x0404)
324 #define HFA384x_PDR_RFENRGY ((u16)0x0406)
325 #define HFA384x_PDR_USB_POWER_TYPE ((u16)0x0407)
326 #define HFA384x_PDR_USB_MAX_POWER ((u16)0x0409)
327 #define HFA384x_PDR_USB_MANUFACTURER ((u16)0x0410)
328 #define HFA384x_PDR_USB_PRODUCT ((u16)0x0411)
329 #define HFA384x_PDR_ANT_DIVERSITY ((u16)0x0412)
330 #define HFA384x_PDR_HFO_DELAY ((u16)0x0413)
331 #define HFA384x_PDR_SCALE_THRESH ((u16)0x0414)
333 #define HFA384x_PDR_HFA3861_MANF_TESTSP ((u16)0x0900)
334 #define HFA384x_PDR_HFA3861_MANF_TESTI ((u16)0x0901)
335 #define HFA384x_PDR_END_OF_PDA ((u16)0x0000)
337 /*--- Register Test/Get/Set Field macros ------------------------*/
339 #define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8))
340 #define HFA384x_CMD_MACPORT_SET(value) \
341 ((u16)HFA384x_CMD_AINFO_SET(value))
342 #define HFA384x_CMD_PROGMODE_SET(value) \
343 ((u16)HFA384x_CMD_AINFO_SET((u16)value))
344 #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value))
346 #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
348 /* Host Maintained State Info */
349 #define HFA384x_STATE_PREINIT 0
350 #define HFA384x_STATE_INIT 1
351 #define HFA384x_STATE_RUNNING 2
353 /*-------------------------------------------------------------*/
354 /* Commonly used basic types */
355 struct hfa384x_bytestr
{
360 struct hfa384x_bytestr32
{
365 /*--------------------------------------------------------------------
366 * Configuration Record Structures:
367 * Network Parameters, Static Configuration Entities
368 *--------------------------------------------------------------------
371 /*-- Hardware/Firmware Component Information ----------*/
372 struct hfa384x_compident
{
379 struct hfa384x_caplevel
{
387 /*-- Configuration Record: cnfAuthentication --*/
388 #define HFA384x_CNFAUTHENTICATION_OPENSYSTEM 0x0001
389 #define HFA384x_CNFAUTHENTICATION_SHAREDKEY 0x0002
390 #define HFA384x_CNFAUTHENTICATION_LEAP 0x0004
392 /*--------------------------------------------------------------------
393 * Configuration Record Structures:
394 * Network Parameters, Dynamic Configuration Entities
395 *--------------------------------------------------------------------
398 #define HFA384x_CREATEIBSS_JOINCREATEIBSS 0
400 /*-- Configuration Record: HostScanRequest (data portion only) --*/
401 struct hfa384x_host_scan_request_data
{
404 struct hfa384x_bytestr32 ssid
;
407 /*-- Configuration Record: JoinRequest (data portion only) --*/
408 struct hfa384x_join_request_data
{
409 u8 bssid
[WLAN_BSSID_LEN
];
413 /*-- Configuration Record: authenticateStation (data portion only) --*/
414 struct hfa384x_authenticate_station_data
{
415 u8 address
[ETH_ALEN
];
420 /*-- Configuration Record: WPAData (data portion only) --*/
421 struct hfa384x_wpa_data
{
423 u8 data
[0]; /* max 80 */
426 /*--------------------------------------------------------------------
427 * Information Record Structures: NIC Information
428 *--------------------------------------------------------------------
431 /*-- Information Record: DownLoadBuffer --*/
432 /* NOTE: The page and offset are in AUX format */
433 struct hfa384x_downloadbuffer
{
439 /*--------------------------------------------------------------------
440 * Information Record Structures: NIC Information
441 *--------------------------------------------------------------------
444 #define HFA384x_PSTATUS_CONN_IBSS ((u16)3)
446 /*-- Information Record: commsquality --*/
447 struct hfa384x_commsquality
{
453 /*-- Information Record: dmbcommsquality --*/
454 struct hfa384x_dbmcommsquality
{
456 u16 asl_dbm_curr_bss
;
460 /*--------------------------------------------------------------------
461 * FRAME STRUCTURES: Communication Frames
462 *--------------------------------------------------------------------
463 * Communication Frames: Transmit Frames
464 *--------------------------------------------------------------------
466 /*-- Communication Frame: Transmit Frame Structure --*/
467 struct hfa384x_tx_frame
{
476 /*-- 802.11 Header Information --*/
483 u16 sequence_control
;
485 u16 data_len
; /* little endian format */
487 /*-- 802.3 Header Information --*/
491 u16 data_length
; /* big endian format */
493 /*--------------------------------------------------------------------
494 * Communication Frames: Field Masks for Transmit Frames
495 *--------------------------------------------------------------------
497 /*-- Status Field --*/
498 #define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5))
499 #define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3))
500 #define HFA384x_TXSTATUS_DISCON ((u16)BIT(2))
501 #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
502 #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
503 /*-- Transmit Control Field --*/
504 #define HFA384x_TX_MACPORT ((u16)GENMASK(10, 8))
505 #define HFA384x_TX_STRUCTYPE ((u16)GENMASK(4, 3))
506 #define HFA384x_TX_TXEX ((u16)BIT(2))
507 #define HFA384x_TX_TXOK ((u16)BIT(1))
508 /*--------------------------------------------------------------------
509 * Communication Frames: Test/Get/Set Field Values for Transmit Frames
510 *--------------------------------------------------------------------
512 /*-- Status Field --*/
513 #define HFA384x_TXSTATUS_ISERROR(v) \
515 (HFA384x_TXSTATUS_ACKERR | HFA384x_TXSTATUS_FORMERR | \
516 HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
517 HFA384x_TXSTATUS_RETRYERR))
519 #define HFA384x_TX_SET(v, m, s) ((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
521 #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
522 #define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \
523 HFA384x_TX_STRUCTYPE, 3)
524 #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
525 #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
526 /*--------------------------------------------------------------------
527 * Communication Frames: Receive Frames
528 *--------------------------------------------------------------------
530 /*-- Communication Frame: Receive Frame Structure --*/
531 struct hfa384x_rx_frame
{
532 /*-- MAC rx descriptor (hfa384x byte order) --*/
542 /*-- 802.11 Header Information (802.11 byte order) --*/
543 __le16 frame_control
;
548 u16 sequence_control
;
550 __le16 data_len
; /* hfa384x (little endian) format */
552 /*-- 802.3 Header Information --*/
555 u16 data_length
; /* IEEE? (big endian) format */
557 /*--------------------------------------------------------------------
558 * Communication Frames: Field Masks for Receive Frames
559 *--------------------------------------------------------------------
562 /*-- Status Fields --*/
563 #define HFA384x_RXSTATUS_MACPORT ((u16)GENMASK(10, 8))
564 #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
565 /*--------------------------------------------------------------------
566 * Communication Frames: Test/Get/Set Field Values for Receive Frames
567 *--------------------------------------------------------------------
569 #define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \
570 & HFA384x_RXSTATUS_MACPORT) >> 8))
571 #define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \
572 & HFA384x_RXSTATUS_FCSERR))
573 /*--------------------------------------------------------------------
574 * FRAME STRUCTURES: Information Types and Information Frame Structures
575 *--------------------------------------------------------------------
577 *--------------------------------------------------------------------
579 #define HFA384x_IT_HANDOVERADDR ((u16)0xF000UL)
580 #define HFA384x_IT_COMMTALLIES ((u16)0xF100UL)
581 #define HFA384x_IT_SCANRESULTS ((u16)0xF101UL)
582 #define HFA384x_IT_CHINFORESULTS ((u16)0xF102UL)
583 #define HFA384x_IT_HOSTSCANRESULTS ((u16)0xF103UL)
584 #define HFA384x_IT_LINKSTATUS ((u16)0xF200UL)
585 #define HFA384x_IT_ASSOCSTATUS ((u16)0xF201UL)
586 #define HFA384x_IT_AUTHREQ ((u16)0xF202UL)
587 #define HFA384x_IT_PSUSERCNT ((u16)0xF203UL)
588 #define HFA384x_IT_KEYIDCHANGED ((u16)0xF204UL)
589 #define HFA384x_IT_ASSOCREQ ((u16)0xF205UL)
590 #define HFA384x_IT_MICFAILURE ((u16)0xF206UL)
592 /*--------------------------------------------------------------------
593 * Information Frames Structures
594 *--------------------------------------------------------------------
595 * Information Frames: Notification Frame Structures
596 *--------------------------------------------------------------------
599 /*-- Inquiry Frame, Diagnose: Communication Tallies --*/
600 struct hfa384x_comm_tallies_16
{
602 u16 txmulticastframes
;
605 u16 txmulticastoctets
;
607 u16 txsingleretryframes
;
608 u16 txmultipleretryframes
;
609 u16 txretrylimitexceeded
;
612 u16 rxmulticastframes
;
615 u16 rxmulticastoctets
;
617 u16 rxdiscardsnobuffer
;
618 u16 txdiscardswrongsa
;
619 u16 rxdiscardswepundecr
;
621 u16 rxmsginbadmsgfrag
;
624 struct hfa384x_comm_tallies_32
{
626 u32 txmulticastframes
;
629 u32 txmulticastoctets
;
631 u32 txsingleretryframes
;
632 u32 txmultipleretryframes
;
633 u32 txretrylimitexceeded
;
636 u32 rxmulticastframes
;
639 u32 rxmulticastoctets
;
641 u32 rxdiscardsnobuffer
;
642 u32 txdiscardswrongsa
;
643 u32 rxdiscardswepundecr
;
645 u32 rxmsginbadmsgfrag
;
648 /*-- Inquiry Frame, Diagnose: Scan Results & Subfields--*/
649 struct hfa384x_scan_result_sub
{
653 u8 bssid
[WLAN_BSSID_LEN
];
656 struct hfa384x_bytestr32 ssid
;
657 u8 supprates
[10]; /* 802.11 info element */
661 struct hfa384x_scan_result
{
664 struct hfa384x_scan_result_sub result
[HFA384x_SCANRESULT_MAX
];
667 /*-- Inquiry Frame, Diagnose: ChInfo Results & Subfields--*/
668 struct hfa384x_ch_info_result_sub
{
675 #define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
676 #define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)
678 struct hfa384x_ch_info_result
{
680 struct hfa384x_ch_info_result_sub result
[HFA384x_CHINFORESULT_MAX
];
683 /*-- Inquiry Frame, Diagnose: Host Scan Results & Subfields--*/
684 struct hfa384x_hscan_result_sub
{
688 u8 bssid
[WLAN_BSSID_LEN
];
691 struct hfa384x_bytestr32 ssid
;
692 u8 supprates
[10]; /* 802.11 info element */
697 struct hfa384x_hscan_result
{
700 struct hfa384x_hscan_result_sub result
[HFA384x_HSCANRESULT_MAX
];
703 /*-- Unsolicited Frame, MAC Mgmt: LinkStatus --*/
705 #define HFA384x_LINK_NOTCONNECTED ((u16)0)
706 #define HFA384x_LINK_CONNECTED ((u16)1)
707 #define HFA384x_LINK_DISCONNECTED ((u16)2)
708 #define HFA384x_LINK_AP_CHANGE ((u16)3)
709 #define HFA384x_LINK_AP_OUTOFRANGE ((u16)4)
710 #define HFA384x_LINK_AP_INRANGE ((u16)5)
711 #define HFA384x_LINK_ASSOCFAIL ((u16)6)
713 struct hfa384x_link_status
{
717 /*-- Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/
719 #define HFA384x_ASSOCSTATUS_STAASSOC ((u16)1)
720 #define HFA384x_ASSOCSTATUS_REASSOC ((u16)2)
721 #define HFA384x_ASSOCSTATUS_AUTHFAIL ((u16)5)
723 struct hfa384x_assoc_status
{
725 u8 sta_addr
[ETH_ALEN
];
726 /* old_ap_addr is only valid if assocstatus == 2 */
727 u8 old_ap_addr
[ETH_ALEN
];
732 /*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/
734 struct hfa384x_auth_request
{
735 u8 sta_addr
[ETH_ALEN
];
739 /*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/
741 struct hfa384x_ps_user_count
{
745 struct hfa384x_key_id_changed
{
746 u8 sta_addr
[ETH_ALEN
];
750 /*-- Collection of all Inf frames ---------------*/
751 union hfa384x_infodata
{
752 struct hfa384x_comm_tallies_16 commtallies16
;
753 struct hfa384x_comm_tallies_32 commtallies32
;
754 struct hfa384x_scan_result scanresult
;
755 struct hfa384x_ch_info_result chinforesult
;
756 struct hfa384x_hscan_result hscanresult
;
757 struct hfa384x_link_status linkstatus
;
758 struct hfa384x_assoc_status assocstatus
;
759 struct hfa384x_auth_request authreq
;
760 struct hfa384x_ps_user_count psusercnt
;
761 struct hfa384x_key_id_changed keyidchanged
;
764 struct hfa384x_inf_frame
{
767 union hfa384x_infodata info
;
770 /*--------------------------------------------------------------------
771 * USB Packet structures and constants.
772 *--------------------------------------------------------------------
775 /* Should be sent to the bulkout endpoint */
776 #define HFA384x_USB_TXFRM 0
777 #define HFA384x_USB_CMDREQ 1
778 #define HFA384x_USB_WRIDREQ 2
779 #define HFA384x_USB_RRIDREQ 3
780 #define HFA384x_USB_WMEMREQ 4
781 #define HFA384x_USB_RMEMREQ 5
783 /* Received from the bulkin endpoint */
784 #define HFA384x_USB_ISTXFRM(a) (((a) & 0x9000) == 0x1000)
785 #define HFA384x_USB_ISRXFRM(a) (!((a) & 0x9000))
786 #define HFA384x_USB_INFOFRM 0x8000
787 #define HFA384x_USB_CMDRESP 0x8001
788 #define HFA384x_USB_WRIDRESP 0x8002
789 #define HFA384x_USB_RRIDRESP 0x8003
790 #define HFA384x_USB_WMEMRESP 0x8004
791 #define HFA384x_USB_RMEMRESP 0x8005
792 #define HFA384x_USB_BUFAVAIL 0x8006
793 #define HFA384x_USB_ERROR 0x8007
795 /*------------------------------------*/
796 /* Request (bulk OUT) packet contents */
798 struct hfa384x_usb_txfrm
{
799 struct hfa384x_tx_frame desc
;
800 u8 data
[WLAN_DATA_MAXLEN
];
803 struct hfa384x_usb_cmdreq
{
812 struct hfa384x_usb_wridreq
{
816 u8 data
[HFA384x_RIDDATA_MAXLEN
];
819 struct hfa384x_usb_rridreq
{
826 struct hfa384x_usb_wmemreq
{
831 u8 data
[HFA384x_USB_RWMEM_MAXLEN
];
834 struct hfa384x_usb_rmemreq
{
842 /*------------------------------------*/
843 /* Response (bulk IN) packet contents */
845 struct hfa384x_usb_rxfrm
{
846 struct hfa384x_rx_frame desc
;
847 u8 data
[WLAN_DATA_MAXLEN
];
850 struct hfa384x_usb_infofrm
{
852 struct hfa384x_inf_frame info
;
855 struct hfa384x_usb_statusresp
{
863 struct hfa384x_usb_rridresp
{
867 u8 data
[HFA384x_RIDDATA_MAXLEN
];
870 struct hfa384x_usb_rmemresp
{
873 u8 data
[HFA384x_USB_RWMEM_MAXLEN
];
876 struct hfa384x_usb_bufavail
{
881 struct hfa384x_usb_error
{
886 /*----------------------------------------------------------*/
887 /* Unions for packaging all the known packet types together */
889 union hfa384x_usbout
{
891 struct hfa384x_usb_txfrm txfrm
;
892 struct hfa384x_usb_cmdreq cmdreq
;
893 struct hfa384x_usb_wridreq wridreq
;
894 struct hfa384x_usb_rridreq rridreq
;
895 struct hfa384x_usb_wmemreq wmemreq
;
896 struct hfa384x_usb_rmemreq rmemreq
;
899 union hfa384x_usbin
{
901 struct hfa384x_usb_rxfrm rxfrm
;
902 struct hfa384x_usb_txfrm txfrm
;
903 struct hfa384x_usb_infofrm infofrm
;
904 struct hfa384x_usb_statusresp cmdresp
;
905 struct hfa384x_usb_statusresp wridresp
;
906 struct hfa384x_usb_rridresp rridresp
;
907 struct hfa384x_usb_statusresp wmemresp
;
908 struct hfa384x_usb_rmemresp rmemresp
;
909 struct hfa384x_usb_bufavail bufavail
;
910 struct hfa384x_usb_error usberror
;
914 /*--------------------------------------------------------------------
915 * PD record structures.
916 *--------------------------------------------------------------------
919 struct hfa384x_pdr_pcb_partnum
{
923 struct hfa384x_pdr_pcb_tracenum
{
927 struct hfa384x_pdr_nic_serial
{
931 struct hfa384x_pdr_mkk_measurements
{
933 double occupied_band
;
934 double power_density
;
949 struct hfa384x_pdr_nic_ramsize
{
950 u8 size
[12]; /* units of KB */
953 struct hfa384x_pdr_mfisuprange
{
960 struct hfa384x_pdr_cfisuprange
{
967 struct hfa384x_pdr_nicid
{
974 struct hfa384x_pdr_refdac_measurements
{
978 struct hfa384x_pdr_vgdac_measurements
{
982 struct hfa384x_pdr_level_comp_measurements
{
986 struct hfa384x_pdr_mac_address
{
990 struct hfa384x_pdr_mkk_callname
{
994 struct hfa384x_pdr_regdomain
{
999 struct hfa384x_pdr_allowed_channel
{
1003 struct hfa384x_pdr_default_channel
{
1007 struct hfa384x_pdr_privacy_option
{
1011 struct hfa384x_pdr_temptype
{
1015 struct hfa384x_pdr_refdac_setup
{
1019 struct hfa384x_pdr_vgdac_setup
{
1023 struct hfa384x_pdr_level_comp_setup
{
1027 struct hfa384x_pdr_trimdac_setup
{
1032 struct hfa384x_pdr_ifr_setting
{
1036 struct hfa384x_pdr_rfr_setting
{
1040 struct hfa384x_pdr_hfa3861_baseline
{
1044 struct hfa384x_pdr_hfa3861_shadow
{
1048 struct hfa384x_pdr_hfa3861_ifrf
{
1052 struct hfa384x_pdr_hfa3861_chcalsp
{
1056 struct hfa384x_pdr_hfa3861_chcali
{
1060 struct hfa384x_pdr_hfa3861_nic_config
{
1064 struct hfa384x_pdr_hfo_delay
{
1068 struct hfa384x_pdr_hfa3861_manf_testsp
{
1072 struct hfa384x_pdr_hfa3861_manf_testi
{
1076 struct hfa384x_pdr_end_of_pda
{
1080 struct hfa384x_pdrec
{
1081 u16 len
; /* in words */
1084 struct hfa384x_pdr_pcb_partnum pcb_partnum
;
1085 struct hfa384x_pdr_pcb_tracenum pcb_tracenum
;
1086 struct hfa384x_pdr_nic_serial nic_serial
;
1087 struct hfa384x_pdr_mkk_measurements mkk_measurements
;
1088 struct hfa384x_pdr_nic_ramsize nic_ramsize
;
1089 struct hfa384x_pdr_mfisuprange mfisuprange
;
1090 struct hfa384x_pdr_cfisuprange cfisuprange
;
1091 struct hfa384x_pdr_nicid nicid
;
1092 struct hfa384x_pdr_refdac_measurements refdac_measurements
;
1093 struct hfa384x_pdr_vgdac_measurements vgdac_measurements
;
1094 struct hfa384x_pdr_level_comp_measurements level_compc_measurements
;
1095 struct hfa384x_pdr_mac_address mac_address
;
1096 struct hfa384x_pdr_mkk_callname mkk_callname
;
1097 struct hfa384x_pdr_regdomain regdomain
;
1098 struct hfa384x_pdr_allowed_channel allowed_channel
;
1099 struct hfa384x_pdr_default_channel default_channel
;
1100 struct hfa384x_pdr_privacy_option privacy_option
;
1101 struct hfa384x_pdr_temptype temptype
;
1102 struct hfa384x_pdr_refdac_setup refdac_setup
;
1103 struct hfa384x_pdr_vgdac_setup vgdac_setup
;
1104 struct hfa384x_pdr_level_comp_setup level_comp_setup
;
1105 struct hfa384x_pdr_trimdac_setup trimdac_setup
;
1106 struct hfa384x_pdr_ifr_setting ifr_setting
;
1107 struct hfa384x_pdr_rfr_setting rfr_setting
;
1108 struct hfa384x_pdr_hfa3861_baseline hfa3861_baseline
;
1109 struct hfa384x_pdr_hfa3861_shadow hfa3861_shadow
;
1110 struct hfa384x_pdr_hfa3861_ifrf hfa3861_ifrf
;
1111 struct hfa384x_pdr_hfa3861_chcalsp hfa3861_chcalsp
;
1112 struct hfa384x_pdr_hfa3861_chcali hfa3861_chcali
;
1113 struct hfa384x_pdr_hfa3861_nic_config nic_config
;
1114 struct hfa384x_pdr_hfo_delay hfo_delay
;
1115 struct hfa384x_pdr_hfa3861_manf_testsp hfa3861_manf_testsp
;
1116 struct hfa384x_pdr_hfa3861_manf_testi hfa3861_manf_testi
;
1117 struct hfa384x_pdr_end_of_pda end_of_pda
;
1123 /*--------------------------------------------------------------------
1124 * --- MAC state structure, argument to all functions --
1125 * --- Also, a collection of support types --
1126 *--------------------------------------------------------------------
1128 struct hfa384x_cmdresult
{
1135 /* USB Control Exchange (CTLX):
1136 * A queue of the structure below is maintained for all of the
1137 * Request/Response type USB packets supported by Prism2.
1139 /* The following hfa384x_* structures are arguments to
1140 * the usercb() for the different CTLX types.
1142 struct hfa384x_rridresult
{
1144 const void *riddata
;
1145 unsigned int riddata_len
;
1149 CTLX_START
= 0, /* Start state, not queued */
1151 CTLX_COMPLETE
, /* CTLX successfully completed */
1152 CTLX_REQ_FAILED
, /* OUT URB completed w/ error */
1154 CTLX_PENDING
, /* Queued, data valid */
1155 CTLX_REQ_SUBMITTED
, /* OUT URB submitted */
1156 CTLX_REQ_COMPLETE
, /* OUT URB complete */
1157 CTLX_RESP_COMPLETE
/* IN URB received */
1160 struct hfa384x_usbctlx
;
1163 typedef void (*ctlx_cmdcb_t
) (struct hfa384x
*, const struct hfa384x_usbctlx
*);
1165 typedef void (*ctlx_usercb_t
) (struct hfa384x
*hw
,
1166 void *ctlxresult
, void *usercb_data
);
1168 struct hfa384x_usbctlx
{
1169 struct list_head list
;
1172 union hfa384x_usbout outbuf
; /* pkt buf for OUT */
1173 union hfa384x_usbin inbuf
; /* pkt buf for IN(a copy) */
1175 enum ctlx_state state
; /* Tracks running state */
1177 struct completion done
;
1178 volatile int reapable
; /* Food for the reaper task */
1180 ctlx_cmdcb_t cmdcb
; /* Async command callback */
1181 ctlx_usercb_t usercb
; /* Async user callback, */
1182 void *usercb_data
; /* at CTLX completion */
1184 int variant
; /* Identifies cmd variant */
1187 struct hfa384x_usbctlxq
{
1189 struct list_head pending
;
1190 struct list_head active
;
1191 struct list_head completing
;
1192 struct list_head reapable
;
1195 struct hfa384x_metacmd
{
1202 struct hfa384x_cmdresult result
;
1205 #define MAX_GRP_ADDR 32
1206 #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */
1208 #define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */
1209 #define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */
1210 #define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */
1211 #define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */
1212 #define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */
1213 #define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */
1215 /* XXX These are going away ASAP */
1216 struct prism2sta_authlist
{
1218 u8 addr
[WLAN_AUTH_MAX
][ETH_ALEN
];
1219 u8 assoc
[WLAN_AUTH_MAX
];
1222 struct prism2sta_accesslist
{
1223 unsigned int modify
;
1225 u8 addr
[WLAN_ACCESS_MAX
][ETH_ALEN
];
1227 u8 addr1
[WLAN_ACCESS_MAX
][ETH_ALEN
];
1231 /* USB support data */
1232 struct usb_device
*usb
;
1234 struct sk_buff
*rx_urb_skb
;
1236 struct urb ctlx_urb
;
1237 union hfa384x_usbout txbuff
;
1238 struct hfa384x_usbctlxq ctlxq
;
1239 struct timer_list reqtimer
;
1240 struct timer_list resptimer
;
1242 struct timer_list throttle
;
1244 struct tasklet_struct reaper_bh
;
1245 struct tasklet_struct completion_bh
;
1247 struct work_struct usb_work
;
1249 unsigned long usb_flags
;
1250 #define THROTTLE_RX 0
1251 #define THROTTLE_TX 1
1252 #define WORK_RX_HALT 2
1253 #define WORK_TX_HALT 3
1254 #define WORK_RX_RESUME 4
1255 #define WORK_TX_RESUME 5
1257 unsigned short req_timer_done
:1;
1258 unsigned short resp_timer_done
:1;
1268 wait_queue_head_t cmdq
; /* wait queue itself */
1270 /* Controller state */
1273 u8 port_enabled
[HFA384x_NUMPORTS_MAX
];
1275 /* Download support */
1276 unsigned int dlstate
;
1277 struct hfa384x_downloadbuffer bufinfo
;
1280 int scanflag
; /* to signal scan complete */
1281 int join_ap
; /* are we joined to a specific ap */
1282 int join_retries
; /* number of join retries till we fail */
1283 struct hfa384x_join_request_data joinreq
;/* join request saved data */
1285 struct wlandevice
*wlandev
;
1286 /* Timer to allow for the deferred processing of linkstatus messages */
1287 struct work_struct link_bh
;
1289 struct work_struct commsqual_bh
;
1290 struct hfa384x_commsquality qual
;
1291 struct timer_list commsqual_timer
;
1294 u16 link_status_new
;
1295 struct sk_buff_head authq
;
1299 /* And here we have stuff that used to be in priv */
1301 /* State variables */
1302 unsigned int presniff_port_type
;
1303 u16 presniff_wepflags
;
1304 u32 dot11_desired_bss_type
;
1308 /* Group Addresses - right now, there are up to a total
1309 * of MAX_GRP_ADDR group addresses
1311 u8 dot11_grp_addr
[MAX_GRP_ADDR
][ETH_ALEN
];
1312 unsigned int dot11_grpcnt
;
1314 /* Component Identities */
1315 struct hfa384x_compident ident_nic
;
1316 struct hfa384x_compident ident_pri_fw
;
1317 struct hfa384x_compident ident_sta_fw
;
1318 struct hfa384x_compident ident_ap_fw
;
1321 /* Supplier compatibility ranges */
1322 struct hfa384x_caplevel cap_sup_mfi
;
1323 struct hfa384x_caplevel cap_sup_cfi
;
1324 struct hfa384x_caplevel cap_sup_pri
;
1325 struct hfa384x_caplevel cap_sup_sta
;
1326 struct hfa384x_caplevel cap_sup_ap
;
1328 /* Actor compatibility ranges */
1329 struct hfa384x_caplevel cap_act_pri_cfi
; /*
1330 * pri f/w to controller
1334 struct hfa384x_caplevel cap_act_sta_cfi
; /*
1335 * sta f/w to controller
1339 struct hfa384x_caplevel cap_act_sta_mfi
; /* sta f/w to modem interface */
1341 struct hfa384x_caplevel cap_act_ap_cfi
; /*
1342 * ap f/w to controller
1346 struct hfa384x_caplevel cap_act_ap_mfi
; /* ap f/w to modem interface */
1348 u32 psusercount
; /* Power save user count. */
1349 struct hfa384x_comm_tallies_32 tallies
; /* Communication tallies. */
1350 u8 comment
[WLAN_COMMENT_MAX
+ 1]; /* User comment */
1352 /* Channel Info request results (AP only) */
1356 struct hfa384x_ch_info_result results
;
1359 struct hfa384x_inf_frame
*scanresults
;
1361 struct prism2sta_authlist authlist
; /* Authenticated station list. */
1362 unsigned int accessmode
; /* Access mode. */
1363 struct prism2sta_accesslist allow
; /* Allowed station list. */
1364 struct prism2sta_accesslist deny
; /* Denied station list. */
1368 void hfa384x_create(struct hfa384x
*hw
, struct usb_device
*usb
);
1369 void hfa384x_destroy(struct hfa384x
*hw
);
1372 hfa384x_corereset(struct hfa384x
*hw
, int holdtime
, int settletime
, int genesis
);
1373 int hfa384x_drvr_disable(struct hfa384x
*hw
, u16 macport
);
1374 int hfa384x_drvr_enable(struct hfa384x
*hw
, u16 macport
);
1375 int hfa384x_drvr_flashdl_enable(struct hfa384x
*hw
);
1376 int hfa384x_drvr_flashdl_disable(struct hfa384x
*hw
);
1377 int hfa384x_drvr_flashdl_write(struct hfa384x
*hw
, u32 daddr
, void *buf
, u32 len
);
1378 int hfa384x_drvr_getconfig(struct hfa384x
*hw
, u16 rid
, void *buf
, u16 len
);
1379 int hfa384x_drvr_ramdl_enable(struct hfa384x
*hw
, u32 exeaddr
);
1380 int hfa384x_drvr_ramdl_disable(struct hfa384x
*hw
);
1381 int hfa384x_drvr_ramdl_write(struct hfa384x
*hw
, u32 daddr
, void *buf
, u32 len
);
1382 int hfa384x_drvr_readpda(struct hfa384x
*hw
, void *buf
, unsigned int len
);
1383 int hfa384x_drvr_setconfig(struct hfa384x
*hw
, u16 rid
, void *buf
, u16 len
);
1385 static inline int hfa384x_drvr_getconfig16(struct hfa384x
*hw
, u16 rid
, void *val
)
1389 result
= hfa384x_drvr_getconfig(hw
, rid
, val
, sizeof(u16
));
1395 static inline int hfa384x_drvr_setconfig16(struct hfa384x
*hw
, u16 rid
, u16 val
)
1397 __le16 value
= cpu_to_le16(val
);
1399 return hfa384x_drvr_setconfig(hw
, rid
, &value
, sizeof(value
));
1403 hfa384x_drvr_setconfig_async(struct hfa384x
*hw
,
1406 u16 len
, ctlx_usercb_t usercb
, void *usercb_data
);
1409 hfa384x_drvr_setconfig16_async(struct hfa384x
*hw
, u16 rid
, u16 val
)
1411 u16 value
= cpu_to_le16(val
);
1413 return hfa384x_drvr_setconfig_async(hw
, rid
, &value
, sizeof(value
),
1417 int hfa384x_drvr_start(struct hfa384x
*hw
);
1418 int hfa384x_drvr_stop(struct hfa384x
*hw
);
1420 hfa384x_drvr_txframe(struct hfa384x
*hw
, struct sk_buff
*skb
,
1421 union p80211_hdr
*p80211_hdr
,
1422 struct p80211_metawep
*p80211_wep
);
1423 void hfa384x_tx_timeout(struct wlandevice
*wlandev
);
1425 int hfa384x_cmd_initialize(struct hfa384x
*hw
);
1426 int hfa384x_cmd_enable(struct hfa384x
*hw
, u16 macport
);
1427 int hfa384x_cmd_disable(struct hfa384x
*hw
, u16 macport
);
1428 int hfa384x_cmd_allocate(struct hfa384x
*hw
, u16 len
);
1429 int hfa384x_cmd_monitor(struct hfa384x
*hw
, u16 enable
);
1431 hfa384x_cmd_download(struct hfa384x
*hw
,
1432 u16 mode
, u16 lowaddr
, u16 highaddr
, u16 codelen
);
1434 #endif /*__KERNEL__ */
1436 #endif /*_HFA384x_H */