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 /*=============================================================*/
60 #define HFA384x_FIRMWARE_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
62 #include <linux/if_ether.h>
64 /*------ Constants --------------------------------------------*/
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_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 16-bit address parts */
113 #define HFA384x_ADDR_AUX_PAGE_MASK (0xffff)
114 #define HFA384x_ADDR_AUX_OFF_MASK (0x007f)
116 /* Make a 32-bit flat address from AUX format 16-bit page and offset */
117 #define HFA384x_ADDR_AUX_MKFLAT(p,o) \
118 (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) <<7) | \
119 ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))
121 /* Make CMD format offset and page from a 32-bit flat address */
122 #define HFA384x_ADDR_CMD_MKPAGE(f) \
123 ((u16)((((u32)(f))&HFA384x_ADDR_FLAT_CMD_PAGE_MASK)>>16))
124 #define HFA384x_ADDR_CMD_MKOFF(f) \
125 ((u16)(((u32)(f))&HFA384x_ADDR_FLAT_CMD_OFF_MASK))
128 /*--- Controller Memory addresses -------------------*/
129 #define HFA3842_PDA_BASE (0x007f0000UL)
130 #define HFA3841_PDA_BASE (0x003f0000UL)
131 #define HFA3841_PDA_BOGUS_BASE (0x00390000UL)
133 /*--- Driver Download states -----------------------*/
134 #define HFA384x_DLSTATE_DISABLED 0
135 #define HFA384x_DLSTATE_RAMENABLED 1
136 #define HFA384x_DLSTATE_FLASHENABLED 2
138 /*--- Register Field Masks --------------------------*/
139 #define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
140 #define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
141 #define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8)))
142 #define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0)))
144 #define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
146 #define HFA384x_EVACK_TICK ((u16)BIT(15))
147 #define HFA384x_EVACK_INFDROP ((u16)BIT(13))
148 #define HFA384x_EVACK_INFO ((u16)BIT(7))
149 #define HFA384x_EVACK_DTIM ((u16)BIT(5))
150 #define HFA384x_EVACK_CMD ((u16)BIT(4))
151 #define HFA384x_EVACK_ALLOC ((u16)BIT(3))
152 #define HFA384x_EVACK_TXEXC ((u16)BIT(2))
153 #define HFA384x_EVACK_TX ((u16)BIT(1))
154 #define HFA384x_EVACK_RX ((u16)BIT(0)
157 /*--- Command Code Constants --------------------------*/
158 /*--- Controller Commands --------------------------*/
159 #define HFA384x_CMDCODE_INIT ((u16)0x00)
160 #define HFA384x_CMDCODE_ENABLE ((u16)0x01)
161 #define HFA384x_CMDCODE_DISABLE ((u16)0x02)
162 #define HFA384x_CMDCODE_DIAG ((u16)0x03)
164 /*--- Buffer Mgmt Commands --------------------------*/
165 #define HFA384x_CMDCODE_ALLOC ((u16)0x0A)
166 #define HFA384x_CMDCODE_TX ((u16)0x0B)
167 #define HFA384x_CMDCODE_CLRPRST ((u16)0x12)
169 /*--- Regulate Commands --------------------------*/
170 #define HFA384x_CMDCODE_NOTIFY ((u16)0x10)
171 #define HFA384x_CMDCODE_INQ ((u16)0x11)
173 /*--- Configure Commands --------------------------*/
174 #define HFA384x_CMDCODE_ACCESS ((u16)0x21)
175 #define HFA384x_CMDCODE_DOWNLD ((u16)0x22)
177 /*--- Debugging Commands -----------------------------*/
178 #define HFA384x_CMDCODE_MONITOR ((u16)(0x38))
179 #define HFA384x_MONITOR_ENABLE ((u16)(0x0b))
180 #define HFA384x_MONITOR_DISABLE ((u16)(0x0f))
182 /*--- Result Codes --------------------------*/
183 #define HFA384x_SUCCESS ((u16)(0x00))
184 #define HFA384x_CARD_FAIL ((u16)(0x01))
185 #define HFA384x_NO_BUFF ((u16)(0x05))
186 #define HFA384x_CMD_ERR ((u16)(0x7F))
188 /*--- Programming Modes --------------------------
189 MODE 0: Disable programming
190 MODE 1: Enable volatile memory programming
191 MODE 2: Enable non-volatile memory programming
192 MODE 3: Program non-volatile memory section
193 --------------------------------------------------*/
194 #define HFA384x_PROGMODE_DISABLE ((u16)0x00)
195 #define HFA384x_PROGMODE_RAM ((u16)0x01)
196 #define HFA384x_PROGMODE_NV ((u16)0x02)
197 #define HFA384x_PROGMODE_NVWRITE ((u16)0x03)
199 /*--- AUX register enable --------------------------*/
200 #define HFA384x_AUXPW0 ((u16)0xfe01)
201 #define HFA384x_AUXPW1 ((u16)0xdc23)
202 #define HFA384x_AUXPW2 ((u16)0xba45)
204 #define HFA384x_CONTROL_AUX_ISDISABLED ((u16)0x0000)
205 #define HFA384x_CONTROL_AUX_ISENABLED ((u16)0xc000)
206 #define HFA384x_CONTROL_AUX_DOENABLE ((u16)0x8000)
207 #define HFA384x_CONTROL_AUX_DODISABLE ((u16)0x4000)
209 /*--- Record ID Constants --------------------------*/
210 /*--------------------------------------------------------------------
211 Configuration RIDs: Network Parameters, Static Configuration Entities
212 --------------------------------------------------------------------*/
213 #define HFA384x_RID_CNFPORTTYPE ((u16)0xFC00)
214 #define HFA384x_RID_CNFOWNMACADDR ((u16)0xFC01)
215 #define HFA384x_RID_CNFDESIREDSSID ((u16)0xFC02)
216 #define HFA384x_RID_CNFOWNCHANNEL ((u16)0xFC03)
217 #define HFA384x_RID_CNFOWNSSID ((u16)0xFC04)
218 #define HFA384x_RID_CNFOWNATIMWIN ((u16)0xFC05)
219 #define HFA384x_RID_CNFSYSSCALE ((u16)0xFC06)
220 #define HFA384x_RID_CNFMAXDATALEN ((u16)0xFC07)
221 #define HFA384x_RID_CNFWDSADDR ((u16)0xFC08)
222 #define HFA384x_RID_CNFPMENABLED ((u16)0xFC09)
223 #define HFA384x_RID_CNFPMEPS ((u16)0xFC0A)
224 #define HFA384x_RID_CNFMULTICASTRX ((u16)0xFC0B)
225 #define HFA384x_RID_CNFMAXSLEEPDUR ((u16)0xFC0C)
226 #define HFA384x_RID_CNFPMHOLDDUR ((u16)0xFC0D)
227 #define HFA384x_RID_CNFOWNNAME ((u16)0xFC0E)
228 #define HFA384x_RID_CNFOWNDTIMPER ((u16)0xFC10)
229 #define HFA384x_RID_CNFWDSADDR1 ((u16)0xFC11)
230 #define HFA384x_RID_CNFWDSADDR2 ((u16)0xFC12)
231 #define HFA384x_RID_CNFWDSADDR3 ((u16)0xFC13)
232 #define HFA384x_RID_CNFWDSADDR4 ((u16)0xFC14)
233 #define HFA384x_RID_CNFWDSADDR5 ((u16)0xFC15)
234 #define HFA384x_RID_CNFWDSADDR6 ((u16)0xFC16)
235 #define HFA384x_RID_CNFMCASTPMBUFF ((u16)0xFC17)
237 /*--------------------------------------------------------------------
238 Configuration RID lengths: Network Params, Static Config Entities
239 This is the length of JUST the DATA part of the RID (does not
240 include the len or code fields)
241 --------------------------------------------------------------------*/
242 #define HFA384x_RID_CNFOWNMACADDR_LEN ((u16)6)
243 #define HFA384x_RID_CNFDESIREDSSID_LEN ((u16)34)
244 #define HFA384x_RID_CNFOWNSSID_LEN ((u16)34)
245 #define HFA384x_RID_CNFOWNATIMWIN_LEN ((u16)2)
246 #define HFA384x_RID_CNFSYSSCALE_LEN ((u16)0)
247 #define HFA384x_RID_CNFMAXDATALEN_LEN ((u16)0)
248 #define HFA384x_RID_CNFWDSADDR_LEN ((u16)6)
249 #define HFA384x_RID_CNFPMENABLED_LEN ((u16)0)
250 #define HFA384x_RID_CNFPMEPS_LEN ((u16)0)
251 #define HFA384x_RID_CNFMULTICASTRX_LEN ((u16)0)
252 #define HFA384x_RID_CNFMAXSLEEPDUR_LEN ((u16)0)
253 #define HFA384x_RID_CNFPMHOLDDUR_LEN ((u16)0)
254 #define HFA384x_RID_CNFOWNNAME_LEN ((u16)34)
255 #define HFA384x_RID_CNFOWNDTIMPER_LEN ((u16)0)
256 #define HFA384x_RID_CNFWDSADDR1_LEN ((u16)6)
257 #define HFA384x_RID_CNFWDSADDR2_LEN ((u16)6)
258 #define HFA384x_RID_CNFWDSADDR3_LEN ((u16)6)
259 #define HFA384x_RID_CNFWDSADDR4_LEN ((u16)6)
260 #define HFA384x_RID_CNFWDSADDR5_LEN ((u16)6)
261 #define HFA384x_RID_CNFWDSADDR6_LEN ((u16)6)
262 #define HFA384x_RID_CNFMCASTPMBUFF_LEN ((u16)0)
263 #define HFA384x_RID_CNFAUTHENTICATION_LEN ((u16)sizeof(u16))
264 #define HFA384x_RID_CNFMAXSLEEPDUR_LEN ((u16)0)
266 /*--------------------------------------------------------------------
267 Configuration RIDs: Network Parameters, Dynamic Configuration Entities
268 --------------------------------------------------------------------*/
269 #define HFA384x_RID_GROUPADDR ((u16)0xFC80)
270 #define HFA384x_RID_CREATEIBSS ((u16)0xFC81)
271 #define HFA384x_RID_FRAGTHRESH ((u16)0xFC82)
272 #define HFA384x_RID_RTSTHRESH ((u16)0xFC83)
273 #define HFA384x_RID_TXRATECNTL ((u16)0xFC84)
274 #define HFA384x_RID_PROMISCMODE ((u16)0xFC85)
275 #define HFA384x_RID_FRAGTHRESH0 ((u16)0xFC90)
276 #define HFA384x_RID_FRAGTHRESH1 ((u16)0xFC91)
277 #define HFA384x_RID_FRAGTHRESH2 ((u16)0xFC92)
278 #define HFA384x_RID_FRAGTHRESH3 ((u16)0xFC93)
279 #define HFA384x_RID_FRAGTHRESH4 ((u16)0xFC94)
280 #define HFA384x_RID_FRAGTHRESH5 ((u16)0xFC95)
281 #define HFA384x_RID_FRAGTHRESH6 ((u16)0xFC96)
282 #define HFA384x_RID_RTSTHRESH0 ((u16)0xFC97)
283 #define HFA384x_RID_RTSTHRESH1 ((u16)0xFC98)
284 #define HFA384x_RID_RTSTHRESH2 ((u16)0xFC99)
285 #define HFA384x_RID_RTSTHRESH3 ((u16)0xFC9A)
286 #define HFA384x_RID_RTSTHRESH4 ((u16)0xFC9B)
287 #define HFA384x_RID_RTSTHRESH5 ((u16)0xFC9C)
288 #define HFA384x_RID_RTSTHRESH6 ((u16)0xFC9D)
289 #define HFA384x_RID_TXRATECNTL0 ((u16)0xFC9E)
290 #define HFA384x_RID_TXRATECNTL1 ((u16)0xFC9F)
291 #define HFA384x_RID_TXRATECNTL2 ((u16)0xFCA0)
292 #define HFA384x_RID_TXRATECNTL3 ((u16)0xFCA1)
293 #define HFA384x_RID_TXRATECNTL4 ((u16)0xFCA2)
294 #define HFA384x_RID_TXRATECNTL5 ((u16)0xFCA3)
295 #define HFA384x_RID_TXRATECNTL6 ((u16)0xFCA4)
297 /*--------------------------------------------------------------------
298 Configuration RID Lengths: Network Param, Dynamic Config Entities
299 This is the length of JUST the DATA part of the RID (does not
300 include the len or code fields)
301 --------------------------------------------------------------------*/
302 /* TODO: fill in the rest of these */
303 #define HFA384x_RID_GROUPADDR_LEN ((u16)16 * ETH_ALEN)
304 #define HFA384x_RID_CREATEIBSS_LEN ((u16)0)
305 #define HFA384x_RID_FRAGTHRESH_LEN ((u16)0)
306 #define HFA384x_RID_RTSTHRESH_LEN ((u16)0)
307 #define HFA384x_RID_TXRATECNTL_LEN ((u16)4)
308 #define HFA384x_RID_PROMISCMODE_LEN ((u16)2)
309 #define HFA384x_RID_FRAGTHRESH0_LEN ((u16)0)
310 #define HFA384x_RID_FRAGTHRESH1_LEN ((u16)0)
311 #define HFA384x_RID_FRAGTHRESH2_LEN ((u16)0)
312 #define HFA384x_RID_FRAGTHRESH3_LEN ((u16)0)
313 #define HFA384x_RID_FRAGTHRESH4_LEN ((u16)0)
314 #define HFA384x_RID_FRAGTHRESH5_LEN ((u16)0)
315 #define HFA384x_RID_FRAGTHRESH6_LEN ((u16)0)
316 #define HFA384x_RID_RTSTHRESH0_LEN ((u16)0)
317 #define HFA384x_RID_RTSTHRESH1_LEN ((u16)0)
318 #define HFA384x_RID_RTSTHRESH2_LEN ((u16)0)
319 #define HFA384x_RID_RTSTHRESH3_LEN ((u16)0)
320 #define HFA384x_RID_RTSTHRESH4_LEN ((u16)0)
321 #define HFA384x_RID_RTSTHRESH5_LEN ((u16)0)
322 #define HFA384x_RID_RTSTHRESH6_LEN ((u16)0)
323 #define HFA384x_RID_TXRATECNTL0_LEN ((u16)0)
324 #define HFA384x_RID_TXRATECNTL1_LEN ((u16)0)
325 #define HFA384x_RID_TXRATECNTL2_LEN ((u16)0)
326 #define HFA384x_RID_TXRATECNTL3_LEN ((u16)0)
327 #define HFA384x_RID_TXRATECNTL4_LEN ((u16)0)
328 #define HFA384x_RID_TXRATECNTL5_LEN ((u16)0)
329 #define HFA384x_RID_TXRATECNTL6_LEN ((u16)0)
331 /*--------------------------------------------------------------------
332 Configuration RIDs: Behavior Parameters
333 --------------------------------------------------------------------*/
334 #define HFA384x_RID_ITICKTIME ((u16)0xFCE0)
336 /*--------------------------------------------------------------------
337 Configuration RID Lengths: Behavior Parameters
338 This is the length of JUST the DATA part of the RID (does not
339 include the len or code fields)
340 --------------------------------------------------------------------*/
341 #define HFA384x_RID_ITICKTIME_LEN ((u16)2)
343 /*----------------------------------------------------------------------
344 Information RIDs: NIC Information
345 --------------------------------------------------------------------*/
346 #define HFA384x_RID_MAXLOADTIME ((u16)0xFD00)
347 #define HFA384x_RID_DOWNLOADBUFFER ((u16)0xFD01)
348 #define HFA384x_RID_PRIIDENTITY ((u16)0xFD02)
349 #define HFA384x_RID_PRISUPRANGE ((u16)0xFD03)
350 #define HFA384x_RID_PRI_CFIACTRANGES ((u16)0xFD04)
351 #define HFA384x_RID_NICSERIALNUMBER ((u16)0xFD0A)
352 #define HFA384x_RID_NICIDENTITY ((u16)0xFD0B)
353 #define HFA384x_RID_MFISUPRANGE ((u16)0xFD0C)
354 #define HFA384x_RID_CFISUPRANGE ((u16)0xFD0D)
355 #define HFA384x_RID_CHANNELLIST ((u16)0xFD10)
356 #define HFA384x_RID_REGULATORYDOMAINS ((u16)0xFD11)
357 #define HFA384x_RID_TEMPTYPE ((u16)0xFD12)
358 #define HFA384x_RID_CIS ((u16)0xFD13)
359 #define HFA384x_RID_STAIDENTITY ((u16)0xFD20)
360 #define HFA384x_RID_STASUPRANGE ((u16)0xFD21)
361 #define HFA384x_RID_STA_MFIACTRANGES ((u16)0xFD22)
362 #define HFA384x_RID_STA_CFIACTRANGES ((u16)0xFD23)
363 #define HFA384x_RID_BUILDSEQ ((u16)0xFFFE)
364 #define HFA384x_RID_FWID ((u16)0xFFFF)
366 /*----------------------------------------------------------------------
367 Information RID Lengths: NIC Information
368 This is the length of JUST the DATA part of the RID (does not
369 include the len or code fields)
370 --------------------------------------------------------------------*/
371 #define HFA384x_RID_MAXLOADTIME_LEN ((u16)0)
372 #define HFA384x_RID_DOWNLOADBUFFER_LEN ((u16)sizeof(hfa384x_downloadbuffer_t))
373 #define HFA384x_RID_PRIIDENTITY_LEN ((u16)8)
374 #define HFA384x_RID_PRISUPRANGE_LEN ((u16)10)
375 #define HFA384x_RID_CFIACTRANGES_LEN ((u16)10)
376 #define HFA384x_RID_NICSERIALNUMBER_LEN ((u16)12)
377 #define HFA384x_RID_NICIDENTITY_LEN ((u16)8)
378 #define HFA384x_RID_MFISUPRANGE_LEN ((u16)10)
379 #define HFA384x_RID_CFISUPRANGE_LEN ((u16)10)
380 #define HFA384x_RID_CHANNELLIST_LEN ((u16)0)
381 #define HFA384x_RID_REGULATORYDOMAINS_LEN ((u16)12)
382 #define HFA384x_RID_TEMPTYPE_LEN ((u16)0)
383 #define HFA384x_RID_CIS_LEN ((u16)480)
384 #define HFA384x_RID_STAIDENTITY_LEN ((u16)8)
385 #define HFA384x_RID_STASUPRANGE_LEN ((u16)10)
386 #define HFA384x_RID_MFIACTRANGES_LEN ((u16)10)
387 #define HFA384x_RID_CFIACTRANGES2_LEN ((u16)10)
388 #define HFA384x_RID_BUILDSEQ_LEN ((u16)sizeof(hfa384x_BuildSeq_t))
389 #define HFA384x_RID_FWID_LEN ((u16)sizeof(hfa384x_FWID_t))
391 /*--------------------------------------------------------------------
392 Information RIDs: MAC Information
393 --------------------------------------------------------------------*/
394 #define HFA384x_RID_PORTSTATUS ((u16)0xFD40)
395 #define HFA384x_RID_CURRENTSSID ((u16)0xFD41)
396 #define HFA384x_RID_CURRENTBSSID ((u16)0xFD42)
397 #define HFA384x_RID_COMMSQUALITY ((u16)0xFD43)
398 #define HFA384x_RID_CURRENTTXRATE ((u16)0xFD44)
399 #define HFA384x_RID_CURRENTBCNint ((u16)0xFD45)
400 #define HFA384x_RID_CURRENTSCALETHRESH ((u16)0xFD46)
401 #define HFA384x_RID_PROTOCOLRSPTIME ((u16)0xFD47)
402 #define HFA384x_RID_SHORTRETRYLIMIT ((u16)0xFD48)
403 #define HFA384x_RID_LONGRETRYLIMIT ((u16)0xFD49)
404 #define HFA384x_RID_MAXTXLIFETIME ((u16)0xFD4A)
405 #define HFA384x_RID_MAXRXLIFETIME ((u16)0xFD4B)
406 #define HFA384x_RID_CFPOLLABLE ((u16)0xFD4C)
407 #define HFA384x_RID_AUTHALGORITHMS ((u16)0xFD4D)
408 #define HFA384x_RID_PRIVACYOPTIMP ((u16)0xFD4F)
409 #define HFA384x_RID_DBMCOMMSQUALITY ((u16)0xFD51)
410 #define HFA384x_RID_CURRENTTXRATE1 ((u16)0xFD80)
411 #define HFA384x_RID_CURRENTTXRATE2 ((u16)0xFD81)
412 #define HFA384x_RID_CURRENTTXRATE3 ((u16)0xFD82)
413 #define HFA384x_RID_CURRENTTXRATE4 ((u16)0xFD83)
414 #define HFA384x_RID_CURRENTTXRATE5 ((u16)0xFD84)
415 #define HFA384x_RID_CURRENTTXRATE6 ((u16)0xFD85)
416 #define HFA384x_RID_OWNMACADDRESS ((u16)0xFD86)
417 // #define HFA384x_RID_PCFINFO ((u16)0xFD87)
418 #define HFA384x_RID_SCANRESULTS ((u16)0xFD88) // NEW
419 #define HFA384x_RID_HOSTSCANRESULTS ((u16)0xFD89) // NEW
420 #define HFA384x_RID_AUTHENTICATIONUSED ((u16)0xFD8A) // NEW
421 #define HFA384x_RID_ASSOCIATEFAILURE ((u16)0xFD8D) // 1.8.0
423 /*--------------------------------------------------------------------
424 Information RID Lengths: MAC Information
425 This is the length of JUST the DATA part of the RID (does not
426 include the len or code fields)
427 --------------------------------------------------------------------*/
428 #define HFA384x_RID_PORTSTATUS_LEN ((u16)0)
429 #define HFA384x_RID_CURRENTSSID_LEN ((u16)34)
430 #define HFA384x_RID_CURRENTBSSID_LEN ((u16)WLAN_BSSID_LEN)
431 #define HFA384x_RID_COMMSQUALITY_LEN ((u16)sizeof(hfa384x_commsquality_t))
432 #define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t))
433 #define HFA384x_RID_CURRENTTXRATE_LEN ((u16)0)
434 #define HFA384x_RID_CURRENTBCNint_LEN ((u16)0)
435 #define HFA384x_RID_STACURSCALETHRESH_LEN ((u16)12)
436 #define HFA384x_RID_APCURSCALETHRESH_LEN ((u16)6)
437 #define HFA384x_RID_PROTOCOLRSPTIME_LEN ((u16)0)
438 #define HFA384x_RID_SHORTRETRYLIMIT_LEN ((u16)0)
439 #define HFA384x_RID_LONGRETRYLIMIT_LEN ((u16)0)
440 #define HFA384x_RID_MAXTXLIFETIME_LEN ((u16)0)
441 #define HFA384x_RID_MAXRXLIFETIME_LEN ((u16)0)
442 #define HFA384x_RID_CFPOLLABLE_LEN ((u16)0)
443 #define HFA384x_RID_AUTHALGORITHMS_LEN ((u16)4)
444 #define HFA384x_RID_PRIVACYOPTIMP_LEN ((u16)0)
445 #define HFA384x_RID_CURRENTTXRATE1_LEN ((u16)0)
446 #define HFA384x_RID_CURRENTTXRATE2_LEN ((u16)0)
447 #define HFA384x_RID_CURRENTTXRATE3_LEN ((u16)0)
448 #define HFA384x_RID_CURRENTTXRATE4_LEN ((u16)0)
449 #define HFA384x_RID_CURRENTTXRATE5_LEN ((u16)0)
450 #define HFA384x_RID_CURRENTTXRATE6_LEN ((u16)0)
451 #define HFA384x_RID_OWNMACADDRESS_LEN ((u16)6)
452 #define HFA384x_RID_PCFINFO_LEN ((u16)6)
453 #define HFA384x_RID_CNFAPPCFINFO_LEN ((u16)sizeof(hfa384x_PCFInfo_data_t))
454 #define HFA384x_RID_SCANREQUEST_LEN ((u16)sizeof(hfa384x_ScanRequest_data_t))
455 #define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t))
456 #define HFA384x_RID_AUTHENTICATESTA_LEN ((u16)sizeof(hfa384x_authenticateStation_data_t))
457 #define HFA384x_RID_CHANNELINFOREQUEST_LEN ((u16)sizeof(hfa384x_ChannelInfoRequest_data_t))
458 /*--------------------------------------------------------------------
459 Information RIDs: Modem Information
460 --------------------------------------------------------------------*/
461 #define HFA384x_RID_PHYTYPE ((u16)0xFDC0)
462 #define HFA384x_RID_CURRENTCHANNEL ((u16)0xFDC1)
463 #define HFA384x_RID_CURRENTPOWERSTATE ((u16)0xFDC2)
464 #define HFA384x_RID_CCAMODE ((u16)0xFDC3)
465 #define HFA384x_RID_SUPPORTEDDATARATES ((u16)0xFDC6)
466 #define HFA384x_RID_LFOSTATUS ((u16)0xFDC7) // 1.7.1
468 /*--------------------------------------------------------------------
469 Information RID Lengths: Modem Information
470 This is the length of JUST the DATA part of the RID (does not
471 include the len or code fields)
472 --------------------------------------------------------------------*/
473 #define HFA384x_RID_PHYTYPE_LEN ((u16)0)
474 #define HFA384x_RID_CURRENTCHANNEL_LEN ((u16)0)
475 #define HFA384x_RID_CURRENTPOWERSTATE_LEN ((u16)0)
476 #define HFA384x_RID_CCAMODE_LEN ((u16)0)
477 #define HFA384x_RID_SUPPORTEDDATARATES_LEN ((u16)10)
479 /*--------------------------------------------------------------------
480 API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
481 --------------------------------------------------------------------*/
482 #define HFA384x_RID_CNFWEPDEFAULTKEYID ((u16)0xFC23)
483 #define HFA384x_RID_CNFWEPDEFAULTKEY0 ((u16)0xFC24)
484 #define HFA384x_RID_CNFWEPDEFAULTKEY1 ((u16)0xFC25)
485 #define HFA384x_RID_CNFWEPDEFAULTKEY2 ((u16)0xFC26)
486 #define HFA384x_RID_CNFWEPDEFAULTKEY3 ((u16)0xFC27)
487 #define HFA384x_RID_CNFWEPFLAGS ((u16)0xFC28)
488 #define HFA384x_RID_CNFWEPKEYMAPTABLE ((u16)0xFC29)
489 #define HFA384x_RID_CNFAUTHENTICATION ((u16)0xFC2A)
490 #define HFA384x_RID_CNFMAXASSOCSTATIONS ((u16)0xFC2B)
491 #define HFA384x_RID_CNFTXCONTROL ((u16)0xFC2C)
492 #define HFA384x_RID_CNFROAMINGMODE ((u16)0xFC2D)
493 #define HFA384x_RID_CNFHOSTAUTHASSOC ((u16)0xFC2E)
494 #define HFA384x_RID_CNFRCVCRCERROR ((u16)0xFC30)
495 // #define HFA384x_RID_CNFMMLIFE ((u16)0xFC31)
496 #define HFA384x_RID_CNFALTRETRYCNT ((u16)0xFC32)
497 #define HFA384x_RID_CNFAPBCNint ((u16)0xFC33)
498 #define HFA384x_RID_CNFAPPCFINFO ((u16)0xFC34)
499 #define HFA384x_RID_CNFSTAPCFINFO ((u16)0xFC35)
500 #define HFA384x_RID_CNFPRIORITYQUSAGE ((u16)0xFC37)
501 #define HFA384x_RID_CNFTIMCTRL ((u16)0xFC40)
502 #define HFA384x_RID_CNFTHIRTY2TALLY ((u16)0xFC42)
503 #define HFA384x_RID_CNFENHSECURITY ((u16)0xFC43)
504 #define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46) // NEW
505 #define HFA384x_RID_CNFWPADATA ((u16)0xFC48) // 1.7.0
506 #define HFA384x_RID_CNFPROPOGATIONDELAY ((u16)0xFC49) // 1.7.6
507 #define HFA384x_RID_CNFSHORTPREAMBLE ((u16)0xFCB0)
508 #define HFA384x_RID_CNFEXCLONGPREAMBLE ((u16)0xFCB1)
509 #define HFA384x_RID_CNFAUTHRSPTIMEOUT ((u16)0xFCB2)
510 #define HFA384x_RID_CNFBASICRATES ((u16)0xFCB3)
511 #define HFA384x_RID_CNFSUPPRATES ((u16)0xFCB4)
512 #define HFA384x_RID_CNFFALLBACKCTRL ((u16)0xFCB5) // NEW
513 #define HFA384x_RID_WEPKEYSTATUS ((u16)0xFCB6) // NEW
514 #define HFA384x_RID_WEPKEYMAPINDEX ((u16)0xFCB7) // NEW
515 #define HFA384x_RID_BROADCASTKEYID ((u16)0xFCB8) // NEW
516 #define HFA384x_RID_ENTSECFLAGEYID ((u16)0xFCB9) // NEW
517 #define HFA384x_RID_CNFPASSIVESCANCTRL ((u16)0xFCBA) // NEW STA
518 #define HFA384x_RID_CNFWPAHANDLING ((u16)0xFCBB) // 1.7.0
519 #define HFA384x_RID_MDCCONTROL ((u16)0xFCBC) // 1.7.0/1.4.0
520 #define HFA384x_RID_MDCCOUNTRY ((u16)0xFCBD) // 1.7.0/1.4.0
521 #define HFA384x_RID_TXPOWERMAX ((u16)0xFCBE) // 1.7.0/1.4.0
522 #define HFA384x_RID_CNFLFOENBLED ((u16)0xFCBF) // 1.6.3
523 #define HFA384x_RID_CAPINFO ((u16)0xFCC0) // 1.7.0/1.3.7
524 #define HFA384x_RID_LISTENintERVAL ((u16)0xFCC1) // 1.7.0/1.3.7
525 #define HFA384x_RID_DIVERSITYENABLED ((u16)0xFCC2) // 1.7.0/1.3.7
526 #define HFA384x_RID_LED_CONTROL ((u16)0xFCC4) // 1.7.6
527 #define HFA384x_RID_HFO_DELAY ((u16)0xFCC5) // 1.7.6
528 #define HFA384x_RID_DISSALOWEDBSSID ((u16)0xFCC6) // 1.8.0
529 #define HFA384x_RID_SCANREQUEST ((u16)0xFCE1)
530 #define HFA384x_RID_JOINREQUEST ((u16)0xFCE2)
531 #define HFA384x_RID_AUTHENTICATESTA ((u16)0xFCE3)
532 #define HFA384x_RID_CHANNELINFOREQUEST ((u16)0xFCE4)
533 #define HFA384x_RID_HOSTSCAN ((u16)0xFCE5) // NEW STA
534 #define HFA384x_RID_ASSOCIATESTA ((u16)0xFCE6)
536 #define HFA384x_RID_CNFWEPDEFAULTKEY_LEN ((u16)6)
537 #define HFA384x_RID_CNFWEP128DEFAULTKEY_LEN ((u16)14)
538 #define HFA384x_RID_CNFPRIOQUSAGE_LEN ((u16)4)
539 /*--------------------------------------------------------------------
541 --------------------------------------------------------------------*/
542 #define HFA384x_PDR_PCB_PARTNUM ((u16)0x0001)
543 #define HFA384x_PDR_PDAVER ((u16)0x0002)
544 #define HFA384x_PDR_NIC_SERIAL ((u16)0x0003)
545 #define HFA384x_PDR_MKK_MEASUREMENTS ((u16)0x0004)
546 #define HFA384x_PDR_NIC_RAMSIZE ((u16)0x0005)
547 #define HFA384x_PDR_MFISUPRANGE ((u16)0x0006)
548 #define HFA384x_PDR_CFISUPRANGE ((u16)0x0007)
549 #define HFA384x_PDR_NICID ((u16)0x0008)
550 #define HFA384x_PDR_MAC_ADDRESS ((u16)0x0101)
551 #define HFA384x_PDR_REGDOMAIN ((u16)0x0103)
552 #define HFA384x_PDR_ALLOWED_CHANNEL ((u16)0x0104)
553 #define HFA384x_PDR_DEFAULT_CHANNEL ((u16)0x0105)
554 #define HFA384x_PDR_TEMPTYPE ((u16)0x0107)
555 #define HFA384x_PDR_IFR_SETTING ((u16)0x0200)
556 #define HFA384x_PDR_RFR_SETTING ((u16)0x0201)
557 #define HFA384x_PDR_HFA3861_BASELINE ((u16)0x0202)
558 #define HFA384x_PDR_HFA3861_SHADOW ((u16)0x0203)
559 #define HFA384x_PDR_HFA3861_IFRF ((u16)0x0204)
560 #define HFA384x_PDR_HFA3861_CHCALSP ((u16)0x0300)
561 #define HFA384x_PDR_HFA3861_CHCALI ((u16)0x0301)
562 #define HFA384x_PDR_MAX_TX_POWER ((u16)0x0302)
563 #define HFA384x_PDR_MASTER_CHAN_LIST ((u16)0x0303)
564 #define HFA384x_PDR_3842_NIC_CONFIG ((u16)0x0400)
565 #define HFA384x_PDR_USB_ID ((u16)0x0401)
566 #define HFA384x_PDR_PCI_ID ((u16)0x0402)
567 #define HFA384x_PDR_PCI_IFCONF ((u16)0x0403)
568 #define HFA384x_PDR_PCI_PMCONF ((u16)0x0404)
569 #define HFA384x_PDR_RFENRGY ((u16)0x0406)
570 #define HFA384x_PDR_USB_POWER_TYPE ((u16)0x0407)
571 #define HFA384x_PDR_USB_MAX_POWER ((u16)0x0409)
572 #define HFA384x_PDR_USB_MANUFACTURER ((u16)0x0410)
573 #define HFA384x_PDR_USB_PRODUCT ((u16)0x0411)
574 #define HFA384x_PDR_ANT_DIVERSITY ((u16)0x0412)
575 #define HFA384x_PDR_HFO_DELAY ((u16)0x0413)
576 #define HFA384x_PDR_SCALE_THRESH ((u16)0x0414)
578 #define HFA384x_PDR_HFA3861_MANF_TESTSP ((u16)0x0900)
579 #define HFA384x_PDR_HFA3861_MANF_TESTI ((u16)0x0901)
580 #define HFA384x_PDR_END_OF_PDA ((u16)0x0000)
583 /*=============================================================*/
584 /*------ Macros -----------------------------------------------*/
586 /*--- Register Test/Get/Set Field macros ------------------------*/
588 #define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8))
589 #define HFA384x_CMD_MACPORT_SET(value) ((u16)HFA384x_CMD_AINFO_SET(value))
590 #define HFA384x_CMD_QOS_GET(value) ((u16)((((u16)(value))&((u16)0x3000)) >> 12))
591 #define HFA384x_CMD_QOS_SET(value) ((u16)((((u16)(value)) << 12) & 0x3000))
592 #define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)value))
593 #define HFA384x_CMD_CMDCODE_GET(value) ((u16)(((u16)(value)) & HFA384x_CMD_CMDCODE))
594 #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value))
596 #define HFA384x_STATUS_RESULT_GET(value) ((u16)((((u16)(value)) & HFA384x_STATUS_RESULT) >> 8))
597 #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
599 #define HFA384x_EVACK_ISINFDROP(value) ((u16)(((u16)(value)) & HFA384x_EVACK_INFDROP))
600 #define HFA384x_EVACK_INFDROP_SET(value) ((u16)(((u16)(value)) << 13))
601 #define HFA384x_EVACK_ISINFO(value) ((u16)(((u16)(value)) & HFA384x_EVACK_INFO))
602 #define HFA384x_EVACK_INFO_SET(value) ((u16)(((u16)(value)) << 7))
603 #define HFA384x_EVACK_ISDTIM(value) ((u16)(((u16)(value)) & HFA384x_EVACK_DTIM))
604 #define HFA384x_EVACK_DTIM_SET(value) ((u16)(((u16)(value)) << 5))
605 #define HFA384x_EVACK_ISCMD(value) ((u16)(((u16)(value)) & HFA384x_EVACK_CMD))
606 #define HFA384x_EVACK_CMD_SET(value) ((u16)(((u16)(value)) << 4))
607 #define HFA384x_EVACK_ISALLOC(value) ((u16)(((u16)(value)) & HFA384x_EVACK_ALLOC))
608 #define HFA384x_EVACK_ALLOC_SET(value) ((u16)(((u16)(value)) << 3))
609 #define HFA384x_EVACK_ISTXEXC(value) ((u16)(((u16)(value)) & HFA384x_EVACK_TXEXC))
610 #define HFA384x_EVACK_TXEXC_SET(value) ((u16)(((u16)(value)) << 2))
611 #define HFA384x_EVACK_ISTX(value) ((u16)(((u16)(value)) & HFA384x_EVACK_TX))
612 #define HFA384x_EVACK_TX_SET(value) ((u16)(((u16)(value)) << 1))
613 #define HFA384x_EVACK_ISRX(value) ((u16)(((u16)(value)) & HFA384x_EVACK_RX))
614 #define HFA384x_EVACK_RX_SET(value) ((u16)(((u16)(value)) << 0))
618 #define hfa384x2host_16(n) (__le16_to_cpu((u16)(n)))
619 #define hfa384x2host_32(n) (__le32_to_cpu((u32)(n)))
620 #define host2hfa384x_16(n) (__cpu_to_le16((u16)(n)))
621 #define host2hfa384x_32(n) (__cpu_to_le32((u32)(n)))
624 /* Host Maintained State Info */
625 #define HFA384x_STATE_PREINIT 0
626 #define HFA384x_STATE_INIT 1
627 #define HFA384x_STATE_RUNNING 2
629 /*=============================================================*/
630 /*------ Types and their related constants --------------------*/
632 /*-------------------------------------------------------------*/
633 /* Commonly used basic types */
634 typedef struct hfa384x_bytestr
638 } __attribute__((packed)) hfa384x_bytestr_t;
640 typedef struct hfa384x_bytestr32
644 } __attribute__((packed)) hfa384x_bytestr32_t;
646 /*--------------------------------------------------------------------
647 Configuration Record Structures:
648 Network Parameters, Static Configuration Entities
649 --------------------------------------------------------------------*/
650 /* Prototype structure: all configuration record structures start with
653 typedef struct hfa384x_record
657 } __attribute__((packed)) hfa384x_rec_t;
659 typedef struct hfa384x_record16
664 } __attribute__((packed)) hfa384x_rec16_t;
666 typedef struct hfa384x_record32
671 } __attribute__((packed)) hfa384x_rec32;
673 /*-- Hardware/Firmware Component Information ----------*/
674 typedef struct hfa384x_compident
680 } __attribute__((packed)) hfa384x_compident_t;
682 typedef struct hfa384x_caplevel
689 } __attribute__((packed)) hfa384x_caplevel_t;
691 /*-- Configuration Record: cnfPortType --*/
692 typedef struct hfa384x_cnfPortType
695 } __attribute__((packed)) hfa384x_cnfPortType_t;
697 /*-- Configuration Record: cnfOwnMACAddress --*/
698 typedef struct hfa384x_cnfOwnMACAddress
700 u8 cnfOwnMACAddress[6];
701 } __attribute__((packed)) hfa384x_cnfOwnMACAddress_t;
703 /*-- Configuration Record: cnfDesiredSSID --*/
704 typedef struct hfa384x_cnfDesiredSSID
706 u8 cnfDesiredSSID[34];
707 } __attribute__((packed)) hfa384x_cnfDesiredSSID_t;
709 /*-- Configuration Record: cnfOwnChannel --*/
710 typedef struct hfa384x_cnfOwnChannel
713 } __attribute__((packed)) hfa384x_cnfOwnChannel_t;
715 /*-- Configuration Record: cnfOwnATIMWindow --*/
716 typedef struct hfa384x_cnfOwnATIMWindow
718 u16 cnfOwnATIMWindow;
719 } __attribute__((packed)) hfa384x_cnfOwnATIMWindow_t;
721 /*-- Configuration Record: cnfSystemScale --*/
722 typedef struct hfa384x_cnfSystemScale
725 } __attribute__((packed)) hfa384x_cnfSystemScale_t;
727 /*-- Configuration Record: cnfWDSAddress --*/
728 typedef struct hfa384x_cnfWDSAddress
731 } __attribute__((packed)) hfa384x_cnfWDSAddress_t;
733 /*-- Configuration Record: cnfAuthentication --*/
734 #define HFA384x_CNFAUTHENTICATION_OPENSYSTEM 0x0001
735 #define HFA384x_CNFAUTHENTICATION_SHAREDKEY 0x0002
736 #define HFA384x_CNFAUTHENTICATION_LEAP 0x0004
738 /*-- Configuration Record: cnfMaxSleepDuration --*/
739 typedef struct hfa384x_cnfMaxSleepDuration
741 u16 cnfMaxSleepDuration;
742 } __attribute__((packed)) hfa384x_cnfMaxSleepDuration_t;
744 /*-- Configuration Record: cnfPMHoldoverDuration --*/
745 typedef struct hfa384x_cnfPMHoldoverDuration
747 u16 cnfPMHoldoverDuration;
748 } __attribute__((packed)) hfa384x_cnfPMHoldoverDuration_t;
750 /*-- Configuration Record: cnfOwnName --*/
751 typedef struct hfa384x_cnfOwnName
754 } __attribute__((packed)) hfa384x_cnfOwnName_t;
756 /*-- Configuration Record: cnfOwnDTIMPeriod --*/
757 typedef struct hfa384x_cnfOwnDTIMPeriod
759 u16 cnfOwnDTIMPeriod;
760 } __attribute__((packed)) hfa384x_cnfOwnDTIMPeriod_t;
762 /*-- Configuration Record: cnfWDSAddress --*/
763 typedef struct hfa384x_cnfWDSAddressN
766 } __attribute__((packed)) hfa384x_cnfWDSAddressN_t;
768 /*-- Configuration Record: cnfMulticastPMBuffering --*/
769 typedef struct hfa384x_cnfMulticastPMBuffering
771 u16 cnfMulticastPMBuffering;
772 } __attribute__((packed)) hfa384x_cnfMulticastPMBuffering_t;
774 /*--------------------------------------------------------------------
775 Configuration Record Structures:
776 Network Parameters, Dynamic Configuration Entities
777 --------------------------------------------------------------------*/
779 /*-- Configuration Record: GroupAddresses --*/
780 typedef struct hfa384x_GroupAddresses
782 u8 MACAddress[16][6];
783 } __attribute__((packed)) hfa384x_GroupAddresses_t;
785 /*-- Configuration Record: CreateIBSS --*/
786 typedef struct hfa384x_CreateIBSS
789 } __attribute__((packed)) hfa384x_CreateIBSS_t;
791 #define HFA384x_CREATEIBSS_JOINCREATEIBSS 0
792 #define HFA384x_CREATEIBSS_JOINESS_JOINCREATEIBSS 1
793 #define HFA384x_CREATEIBSS_JOINIBSS 2
794 #define HFA384x_CREATEIBSS_JOINESS_JOINIBSS 3
796 /*-- Configuration Record: FragmentationThreshold --*/
797 typedef struct hfa384x_FragmentationThreshold
799 u16 FragmentationThreshold;
800 } __attribute__((packed)) hfa384x_FragmentationThreshold_t;
802 /*-- Configuration Record: RTSThreshold --*/
803 typedef struct hfa384x_RTSThreshold
806 } __attribute__((packed)) hfa384x_RTSThreshold_t;
808 /*-- Configuration Record: TxRateControl --*/
809 typedef struct hfa384x_TxRateControl
812 } __attribute__((packed)) hfa384x_TxRateControl_t;
814 /*-- Configuration Record: PromiscuousMode --*/
815 typedef struct hfa384x_PromiscuousMode
818 } __attribute__((packed)) hfa384x_PromiscuousMode_t;
820 /*-- Configuration Record: ScanRequest (data portion only) --*/
821 typedef struct hfa384x_ScanRequest_data
825 } __attribute__((packed)) hfa384x_ScanRequest_data_t;
827 /*-- Configuration Record: HostScanRequest (data portion only) --*/
828 typedef struct hfa384x_HostScanRequest_data
832 hfa384x_bytestr32_t ssid;
833 } __attribute__((packed)) hfa384x_HostScanRequest_data_t;
835 /*-- Configuration Record: JoinRequest (data portion only) --*/
836 typedef struct hfa384x_JoinRequest_data
838 u8 bssid[WLAN_BSSID_LEN];
840 } __attribute__((packed)) hfa384x_JoinRequest_data_t;
842 /*-- Configuration Record: authenticateStation (data portion only) --*/
843 typedef struct hfa384x_authenticateStation_data
845 u8 address[ETH_ALEN];
848 } __attribute__((packed)) hfa384x_authenticateStation_data_t;
850 /*-- Configuration Record: associateStation (data portion only) --*/
851 typedef struct hfa384x_associateStation_data
853 u8 address[ETH_ALEN];
856 } __attribute__((packed)) hfa384x_associateStation_data_t;
858 /*-- Configuration Record: ChannelInfoRequest (data portion only) --*/
859 typedef struct hfa384x_ChannelInfoRequest_data
862 u16 channelDwellTime;
863 } __attribute__((packed)) hfa384x_ChannelInfoRequest_data_t;
865 /*-- Configuration Record: WEPKeyMapping (data portion only) --*/
866 typedef struct hfa384x_WEPKeyMapping
868 u8 address[ETH_ALEN];
871 u8 mic_transmit_key[4];
872 u8 mic_receive_key[4];
873 } __attribute__((packed)) hfa384x_WEPKeyMapping_t;
875 /*-- Configuration Record: WPAData (data portion only) --*/
876 typedef struct hfa384x_WPAData
879 u8 data[0]; // max 80
880 } __attribute__((packed)) hfa384x_WPAData_t;
882 /*--------------------------------------------------------------------
883 Configuration Record Structures: Behavior Parameters
884 --------------------------------------------------------------------*/
886 /*-- Configuration Record: TickTime --*/
887 typedef struct hfa384x_TickTime
890 } __attribute__((packed)) hfa384x_TickTime_t;
892 /*--------------------------------------------------------------------
893 Information Record Structures: NIC Information
894 --------------------------------------------------------------------*/
896 /*-- Information Record: MaxLoadTime --*/
897 typedef struct hfa384x_MaxLoadTime
900 } __attribute__((packed)) hfa384x_MaxLoadTime_t;
902 /*-- Information Record: DownLoadBuffer --*/
903 /* NOTE: The page and offset are in AUX format */
904 typedef struct hfa384x_downloadbuffer
909 } __attribute__((packed)) hfa384x_downloadbuffer_t;
911 /*-- Information Record: PRIIdentity --*/
912 typedef struct hfa384x_PRIIdentity
918 } __attribute__((packed)) hfa384x_PRIIdentity_t;
920 /*-- Information Record: PRISupRange --*/
921 typedef struct hfa384x_PRISupRange
928 } __attribute__((packed)) hfa384x_PRISupRange_t;
930 /*-- Information Record: CFIActRanges --*/
931 typedef struct hfa384x_CFIActRanges
938 } __attribute__((packed)) hfa384x_CFIActRanges_t;
940 /*-- Information Record: NICSerialNumber --*/
941 typedef struct hfa384x_NICSerialNumber
943 u8 NICSerialNumber[12];
944 } __attribute__((packed)) hfa384x_NICSerialNumber_t;
946 /*-- Information Record: NICIdentity --*/
947 typedef struct hfa384x_NICIdentity
953 } __attribute__((packed)) hfa384x_NICIdentity_t;
955 /*-- Information Record: MFISupRange --*/
956 typedef struct hfa384x_MFISupRange
963 } __attribute__((packed)) hfa384x_MFISupRange_t;
965 /*-- Information Record: CFISupRange --*/
966 typedef struct hfa384x_CFISupRange
973 } __attribute__((packed)) hfa384x_CFISupRange_t;
975 /*-- Information Record: BUILDSEQ:BuildSeq --*/
976 typedef struct hfa384x_BuildSeq {
979 } __attribute__((packed)) hfa384x_BuildSeq_t;
981 /*-- Information Record: FWID --*/
982 #define HFA384x_FWID_LEN 14
983 typedef struct hfa384x_FWID {
984 u8 primary[HFA384x_FWID_LEN];
985 u8 secondary[HFA384x_FWID_LEN];
986 } __attribute__((packed)) hfa384x_FWID_t;
988 /*-- Information Record: ChannelList --*/
989 typedef struct hfa384x_ChannelList
992 } __attribute__((packed)) hfa384x_ChannelList_t;
994 /*-- Information Record: RegulatoryDomains --*/
995 typedef struct hfa384x_RegulatoryDomains
997 u8 RegulatoryDomains[12];
998 } __attribute__((packed)) hfa384x_RegulatoryDomains_t;
1000 /*-- Information Record: TempType --*/
1001 typedef struct hfa384x_TempType
1004 } __attribute__((packed)) hfa384x_TempType_t;
1006 /*-- Information Record: CIS --*/
1007 typedef struct hfa384x_CIS
1010 } __attribute__((packed)) hfa384x_CIS_t;
1012 /*-- Information Record: STAIdentity --*/
1013 typedef struct hfa384x_STAIdentity
1017 u16 STAMajorVersion;
1018 u16 STAMinorVersion;
1019 } __attribute__((packed)) hfa384x_STAIdentity_t;
1021 /*-- Information Record: STASupRange --*/
1022 typedef struct hfa384x_STASupRange
1029 } __attribute__((packed)) hfa384x_STASupRange_t;
1031 /*-- Information Record: MFIActRanges --*/
1032 typedef struct hfa384x_MFIActRanges
1039 } __attribute__((packed)) hfa384x_MFIActRanges_t;
1041 /*--------------------------------------------------------------------
1042 Information Record Structures: NIC Information
1043 --------------------------------------------------------------------*/
1045 /*-- Information Record: PortStatus --*/
1046 typedef struct hfa384x_PortStatus
1049 } __attribute__((packed)) hfa384x_PortStatus_t;
1051 #define HFA384x_PSTATUS_DISABLED ((u16)1)
1052 #define HFA384x_PSTATUS_SEARCHING ((u16)2)
1053 #define HFA384x_PSTATUS_CONN_IBSS ((u16)3)
1054 #define HFA384x_PSTATUS_CONN_ESS ((u16)4)
1055 #define HFA384x_PSTATUS_OUTOFRANGE ((u16)5)
1056 #define HFA384x_PSTATUS_CONN_WDS ((u16)6)
1058 /*-- Information Record: CurrentSSID --*/
1059 typedef struct hfa384x_CurrentSSID
1062 } __attribute__((packed)) hfa384x_CurrentSSID_t;
1064 /*-- Information Record: CurrentBSSID --*/
1065 typedef struct hfa384x_CurrentBSSID
1068 } __attribute__((packed)) hfa384x_CurrentBSSID_t;
1070 /*-- Information Record: commsquality --*/
1071 typedef struct hfa384x_commsquality
1076 } __attribute__((packed)) hfa384x_commsquality_t;
1078 /*-- Information Record: dmbcommsquality --*/
1079 typedef struct hfa384x_dbmcommsquality
1084 } __attribute__((packed)) hfa384x_dbmcommsquality_t;
1086 /*-- Information Record: CurrentTxRate --*/
1087 typedef struct hfa384x_CurrentTxRate
1090 } __attribute__((packed)) hfa384x_CurrentTxRate_t;
1092 /*-- Information Record: CurrentBeaconInterval --*/
1093 typedef struct hfa384x_CurrentBeaconInterval
1095 u16 CurrentBeaconInterval;
1096 } __attribute__((packed)) hfa384x_CurrentBeaconInterval_t;
1098 /*-- Information Record: CurrentScaleThresholds --*/
1099 typedef struct hfa384x_CurrentScaleThresholds
1101 u16 EnergyDetectThreshold;
1102 u16 CarrierDetectThreshold;
1103 u16 DeferDetectThreshold;
1104 u16 CellSearchThreshold; /* Stations only */
1105 u16 DeadSpotThreshold; /* Stations only */
1106 } __attribute__((packed)) hfa384x_CurrentScaleThresholds_t;
1108 /*-- Information Record: ProtocolRspTime --*/
1109 typedef struct hfa384x_ProtocolRspTime
1111 u16 ProtocolRspTime;
1112 } __attribute__((packed)) hfa384x_ProtocolRspTime_t;
1114 /*-- Information Record: ShortRetryLimit --*/
1115 typedef struct hfa384x_ShortRetryLimit
1117 u16 ShortRetryLimit;
1118 } __attribute__((packed)) hfa384x_ShortRetryLimit_t;
1120 /*-- Information Record: LongRetryLimit --*/
1121 typedef struct hfa384x_LongRetryLimit
1124 } __attribute__((packed)) hfa384x_LongRetryLimit_t;
1126 /*-- Information Record: MaxTransmitLifetime --*/
1127 typedef struct hfa384x_MaxTransmitLifetime
1129 u16 MaxTransmitLifetime;
1130 } __attribute__((packed)) hfa384x_MaxTransmitLifetime_t;
1132 /*-- Information Record: MaxReceiveLifetime --*/
1133 typedef struct hfa384x_MaxReceiveLifetime
1135 u16 MaxReceiveLifetime;
1136 } __attribute__((packed)) hfa384x_MaxReceiveLifetime_t;
1138 /*-- Information Record: CFPollable --*/
1139 typedef struct hfa384x_CFPollable
1142 } __attribute__((packed)) hfa384x_CFPollable_t;
1144 /*-- Information Record: AuthenticationAlgorithms --*/
1145 typedef struct hfa384x_AuthenticationAlgorithms
1147 u16 AuthenticationType;
1149 } __attribute__((packed)) hfa384x_AuthenticationAlgorithms_t;
1151 /*-- Information Record: AuthenticationAlgorithms
1153 typedef struct hfa384x_AuthenticationAlgorithms_data
1155 u16 AuthenticationType;
1157 } __attribute__((packed)) hfa384x_AuthenticationAlgorithms_data_t;
1159 /*-- Information Record: PrivacyOptionImplemented --*/
1160 typedef struct hfa384x_PrivacyOptionImplemented
1162 u16 PrivacyOptionImplemented;
1163 } __attribute__((packed)) hfa384x_PrivacyOptionImplemented_t;
1165 /*-- Information Record: OwnMACAddress --*/
1166 typedef struct hfa384x_OwnMACAddress
1168 u8 OwnMACAddress[6];
1169 } __attribute__((packed)) hfa384x_OwnMACAddress_t;
1171 /*-- Information Record: PCFInfo --*/
1172 typedef struct hfa384x_PCFInfo
1174 u16 MediumOccupancyLimit;
1178 } __attribute__((packed)) hfa384x_PCFInfo_t;
1180 /*-- Information Record: PCFInfo (data portion only) --*/
1181 typedef struct hfa384x_PCFInfo_data
1183 u16 MediumOccupancyLimit;
1187 } __attribute__((packed)) hfa384x_PCFInfo_data_t;
1189 /*--------------------------------------------------------------------
1190 Information Record Structures: Modem Information Records
1191 --------------------------------------------------------------------*/
1193 /*-- Information Record: PHYType --*/
1194 typedef struct hfa384x_PHYType
1197 } __attribute__((packed)) hfa384x_PHYType_t;
1199 /*-- Information Record: CurrentChannel --*/
1200 typedef struct hfa384x_CurrentChannel
1203 } __attribute__((packed)) hfa384x_CurrentChannel_t;
1205 /*-- Information Record: CurrentPowerState --*/
1206 typedef struct hfa384x_CurrentPowerState
1208 u16 CurrentPowerState;
1209 } __attribute__((packed)) hfa384x_CurrentPowerState_t;
1211 /*-- Information Record: CCAMode --*/
1212 typedef struct hfa384x_CCAMode
1215 } __attribute__((packed)) hfa384x_CCAMode_t;
1217 /*-- Information Record: SupportedDataRates --*/
1218 typedef struct hfa384x_SupportedDataRates
1220 u8 SupportedDataRates[10];
1221 } __attribute__((packed)) hfa384x_SupportedDataRates_t;
1223 /*-- Information Record: LFOStatus --*/
1224 typedef struct hfa384x_LFOStatus
1229 } __attribute__((packed)) hfa384x_LFOStatus_t;
1231 #define HFA384x_TESTRESULT_ALLPASSED BIT(0)
1232 #define HFA384x_TESTRESULT_LFO_FAIL BIT(1)
1233 #define HFA384x_TESTRESULT_VR_HF0_FAIL BIT(2)
1234 #define HFA384x_HOST_FIRM_COORDINATE BIT(7)
1235 #define HFA384x_TESTRESULT_COORDINATE BIT(15)
1237 /*-- Information Record: LEDControl --*/
1238 typedef struct hfa384x_LEDControl
1245 } __attribute__((packed)) hfa384x_LEDControl_t;
1247 /*--------------------------------------------------------------------
1248 FRAME DESCRIPTORS AND FRAME STRUCTURES
1250 FRAME DESCRIPTORS: Offsets
1252 ----------------------------------------------------------------------
1253 Control Info (offset 44-51)
1254 --------------------------------------------------------------------*/
1255 #define HFA384x_FD_STATUS_OFF ((u16)0x44)
1256 #define HFA384x_FD_TIME_OFF ((u16)0x46)
1257 #define HFA384x_FD_SWSUPPORT_OFF ((u16)0x4A)
1258 #define HFA384x_FD_SILENCE_OFF ((u16)0x4A)
1259 #define HFA384x_FD_SIGNAL_OFF ((u16)0x4B)
1260 #define HFA384x_FD_RATE_OFF ((u16)0x4C)
1261 #define HFA384x_FD_RXFLOW_OFF ((u16)0x4D)
1262 #define HFA384x_FD_RESERVED_OFF ((u16)0x4E)
1263 #define HFA384x_FD_TXCONTROL_OFF ((u16)0x50)
1264 /*--------------------------------------------------------------------
1265 802.11 Header (offset 52-6B)
1266 --------------------------------------------------------------------*/
1267 #define HFA384x_FD_FRAMECONTROL_OFF ((u16)0x52)
1268 #define HFA384x_FD_DURATIONID_OFF ((u16)0x54)
1269 #define HFA384x_FD_ADDRESS1_OFF ((u16)0x56)
1270 #define HFA384x_FD_ADDRESS2_OFF ((u16)0x5C)
1271 #define HFA384x_FD_ADDRESS3_OFF ((u16)0x62)
1272 #define HFA384x_FD_SEQCONTROL_OFF ((u16)0x68)
1273 #define HFA384x_FD_ADDRESS4_OFF ((u16)0x6A)
1274 #define HFA384x_FD_DATALEN_OFF ((u16)0x70)
1275 /*--------------------------------------------------------------------
1276 802.3 Header (offset 72-7F)
1277 --------------------------------------------------------------------*/
1278 #define HFA384x_FD_DESTADDRESS_OFF ((u16)0x72)
1279 #define HFA384x_FD_SRCADDRESS_OFF ((u16)0x78)
1280 #define HFA384x_FD_DATALENGTH_OFF ((u16)0x7E)
1282 /*--------------------------------------------------------------------
1283 FRAME STRUCTURES: Communication Frames
1284 ----------------------------------------------------------------------
1285 Communication Frames: Transmit Frames
1286 --------------------------------------------------------------------*/
1287 /*-- Communication Frame: Transmit Frame Structure --*/
1288 typedef struct hfa384x_tx_frame
1298 /*-- 802.11 Header Information --*/
1305 u16 sequence_control;
1307 u16 data_len; /* little endian format */
1309 /*-- 802.3 Header Information --*/
1313 u16 data_length; /* big endian format */
1314 } __attribute__((packed)) hfa384x_tx_frame_t;
1315 /*--------------------------------------------------------------------
1316 Communication Frames: Field Masks for Transmit Frames
1317 --------------------------------------------------------------------*/
1318 /*-- Status Field --*/
1319 #define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5))
1320 #define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3))
1321 #define HFA384x_TXSTATUS_DISCON ((u16)BIT(2))
1322 #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
1323 #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
1324 /*-- Transmit Control Field --*/
1325 #define HFA384x_TX_CFPOLL ((u16)BIT(12))
1326 #define HFA384x_TX_PRST ((u16)BIT(11))
1327 #define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
1328 #define HFA384x_TX_NOENCRYPT ((u16)BIT(7))
1329 #define HFA384x_TX_RETRYSTRAT ((u16)(BIT(6) | BIT(5)))
1330 #define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3)))
1331 #define HFA384x_TX_TXEX ((u16)BIT(2))
1332 #define HFA384x_TX_TXOK ((u16)BIT(1))
1333 /*--------------------------------------------------------------------
1334 Communication Frames: Test/Get/Set Field Values for Transmit Frames
1335 --------------------------------------------------------------------*/
1336 /*-- Status Field --*/
1337 #define HFA384x_TXSTATUS_ISERROR(v) \
1339 (HFA384x_TXSTATUS_ACKERR|HFA384x_TXSTATUS_FORMERR|\
1340 HFA384x_TXSTATUS_DISCON|HFA384x_TXSTATUS_AGEDERR|\
1341 HFA384x_TXSTATUS_RETRYERR))
1343 #define HFA384x_TX_GET(v,m,s) ((((u16)(v))&((u16)(m)))>>((u16)(s)))
1344 #define HFA384x_TX_SET(v,m,s) ((((u16)(v))<<((u16)(s)))&((u16)(m)))
1346 #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
1347 #define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, HFA384x_TX_STRUCTYPE, 3)
1348 #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
1349 #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
1350 /*--------------------------------------------------------------------
1351 Communication Frames: Receive Frames
1352 --------------------------------------------------------------------*/
1353 /*-- Communication Frame: Receive Frame Structure --*/
1354 typedef struct hfa384x_rx_frame
1356 /*-- MAC rx descriptor (hfa384x byte order) --*/
1366 /*-- 802.11 Header Information (802.11 byte order) --*/
1372 u16 sequence_control;
1374 u16 data_len; /* hfa384x (little endian) format */
1376 /*-- 802.3 Header Information --*/
1379 u16 data_length; /* IEEE? (big endian) format */
1380 } __attribute__((packed)) hfa384x_rx_frame_t;
1381 /*--------------------------------------------------------------------
1382 Communication Frames: Field Masks for Receive Frames
1383 --------------------------------------------------------------------*/
1385 /*-- Status Fields --*/
1386 #define HFA384x_RXSTATUS_MSGTYPE ((u16)(BIT(15) | BIT(14) | BIT(13)))
1387 #define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
1388 #define HFA384x_RXSTATUS_UNDECR ((u16)BIT(1))
1389 #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
1390 /*--------------------------------------------------------------------
1391 Communication Frames: Test/Get/Set Field Values for Receive Frames
1392 --------------------------------------------------------------------*/
1393 #define HFA384x_RXSTATUS_MSGTYPE_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MSGTYPE) >> 13))
1394 #define HFA384x_RXSTATUS_MSGTYPE_SET(value) ((u16)(((u16)(value)) << 13))
1395 #define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MACPORT) >> 8))
1396 #define HFA384x_RXSTATUS_MACPORT_SET(value) ((u16)(((u16)(value)) << 8))
1397 #define HFA384x_RXSTATUS_ISUNDECR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_UNDECR))
1398 #define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR))
1399 /*--------------------------------------------------------------------
1400 FRAME STRUCTURES: Information Types and Information Frame Structures
1401 ----------------------------------------------------------------------
1403 --------------------------------------------------------------------*/
1404 #define HFA384x_IT_HANDOVERADDR ((u16)0xF000UL)
1405 #define HFA384x_IT_HANDOVERDEAUTHADDRESS ((u16)0xF001UL)//AP 1.3.7
1406 #define HFA384x_IT_COMMTALLIES ((u16)0xF100UL)
1407 #define HFA384x_IT_SCANRESULTS ((u16)0xF101UL)
1408 #define HFA384x_IT_CHINFORESULTS ((u16)0xF102UL)
1409 #define HFA384x_IT_HOSTSCANRESULTS ((u16)0xF103UL)
1410 #define HFA384x_IT_LINKSTATUS ((u16)0xF200UL)
1411 #define HFA384x_IT_ASSOCSTATUS ((u16)0xF201UL)
1412 #define HFA384x_IT_AUTHREQ ((u16)0xF202UL)
1413 #define HFA384x_IT_PSUSERCNT ((u16)0xF203UL)
1414 #define HFA384x_IT_KEYIDCHANGED ((u16)0xF204UL)
1415 #define HFA384x_IT_ASSOCREQ ((u16)0xF205UL)
1416 #define HFA384x_IT_MICFAILURE ((u16)0xF206UL)
1418 /*--------------------------------------------------------------------
1419 Information Frames Structures
1420 ----------------------------------------------------------------------
1421 Information Frames: Notification Frame Structures
1422 --------------------------------------------------------------------*/
1424 /*-- Inquiry Frame, Diagnose: Communication Tallies --*/
1425 typedef struct hfa384x_CommTallies16
1427 u16 txunicastframes;
1428 u16 txmulticastframes;
1430 u16 txunicastoctets;
1431 u16 txmulticastoctets;
1432 u16 txdeferredtrans;
1433 u16 txsingleretryframes;
1434 u16 txmultipleretryframes;
1435 u16 txretrylimitexceeded;
1437 u16 rxunicastframes;
1438 u16 rxmulticastframes;
1440 u16 rxunicastoctets;
1441 u16 rxmulticastoctets;
1443 u16 rxdiscardsnobuffer;
1444 u16 txdiscardswrongsa;
1445 u16 rxdiscardswepundecr;
1447 u16 rxmsginbadmsgfrag;
1448 } __attribute__((packed)) hfa384x_CommTallies16_t;
1450 typedef struct hfa384x_CommTallies32
1452 u32 txunicastframes;
1453 u32 txmulticastframes;
1455 u32 txunicastoctets;
1456 u32 txmulticastoctets;
1457 u32 txdeferredtrans;
1458 u32 txsingleretryframes;
1459 u32 txmultipleretryframes;
1460 u32 txretrylimitexceeded;
1462 u32 rxunicastframes;
1463 u32 rxmulticastframes;
1465 u32 rxunicastoctets;
1466 u32 rxmulticastoctets;
1468 u32 rxdiscardsnobuffer;
1469 u32 txdiscardswrongsa;
1470 u32 rxdiscardswepundecr;
1472 u32 rxmsginbadmsgfrag;
1473 } __attribute__((packed)) hfa384x_CommTallies32_t;
1475 /*-- Inquiry Frame, Diagnose: Scan Results & Subfields--*/
1476 typedef struct hfa384x_ScanResultSub
1481 u8 bssid[WLAN_BSSID_LEN];
1484 hfa384x_bytestr32_t ssid;
1485 u8 supprates[10]; /* 802.11 info element */
1487 } __attribute__((packed)) hfa384x_ScanResultSub_t;
1489 typedef struct hfa384x_ScanResult
1493 hfa384x_ScanResultSub_t
1494 result[HFA384x_SCANRESULT_MAX];
1495 } __attribute__((packed)) hfa384x_ScanResult_t;
1497 /*-- Inquiry Frame, Diagnose: ChInfo Results & Subfields--*/
1498 typedef struct hfa384x_ChInfoResultSub
1504 } __attribute__((packed)) hfa384x_ChInfoResultSub_t;
1506 #define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
1507 #define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)
1509 typedef struct hfa384x_ChInfoResult
1512 hfa384x_ChInfoResultSub_t
1513 result[HFA384x_CHINFORESULT_MAX];
1514 } __attribute__((packed)) hfa384x_ChInfoResult_t;
1516 /*-- Inquiry Frame, Diagnose: Host Scan Results & Subfields--*/
1517 typedef struct hfa384x_HScanResultSub
1522 u8 bssid[WLAN_BSSID_LEN];
1525 hfa384x_bytestr32_t ssid;
1526 u8 supprates[10]; /* 802.11 info element */
1529 } __attribute__((packed)) hfa384x_HScanResultSub_t;
1531 typedef struct hfa384x_HScanResult
1535 hfa384x_HScanResultSub_t
1536 result[HFA384x_HSCANRESULT_MAX];
1537 } __attribute__((packed)) hfa384x_HScanResult_t;
1539 /*-- Unsolicited Frame, MAC Mgmt: LinkStatus --*/
1541 #define HFA384x_LINK_NOTCONNECTED ((u16)0)
1542 #define HFA384x_LINK_CONNECTED ((u16)1)
1543 #define HFA384x_LINK_DISCONNECTED ((u16)2)
1544 #define HFA384x_LINK_AP_CHANGE ((u16)3)
1545 #define HFA384x_LINK_AP_OUTOFRANGE ((u16)4)
1546 #define HFA384x_LINK_AP_INRANGE ((u16)5)
1547 #define HFA384x_LINK_ASSOCFAIL ((u16)6)
1549 typedef struct hfa384x_LinkStatus
1552 } __attribute__((packed)) hfa384x_LinkStatus_t;
1555 /*-- Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/
1557 #define HFA384x_ASSOCSTATUS_STAASSOC ((u16)1)
1558 #define HFA384x_ASSOCSTATUS_REASSOC ((u16)2)
1559 #define HFA384x_ASSOCSTATUS_DISASSOC ((u16)3)
1560 #define HFA384x_ASSOCSTATUS_ASSOCFAIL ((u16)4)
1561 #define HFA384x_ASSOCSTATUS_AUTHFAIL ((u16)5)
1563 typedef struct hfa384x_AssocStatus
1566 u8 sta_addr[ETH_ALEN];
1567 /* old_ap_addr is only valid if assocstatus == 2 */
1568 u8 old_ap_addr[ETH_ALEN];
1571 } __attribute__((packed)) hfa384x_AssocStatus_t;
1573 /*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/
1575 typedef struct hfa384x_AuthRequest
1577 u8 sta_addr[ETH_ALEN];
1579 } __attribute__((packed)) hfa384x_AuthReq_t;
1581 /*-- Unsolicited Frame, MAC Mgmt: AssocRequest (AP Only) --*/
1583 typedef struct hfa384x_AssocRequest
1585 u8 sta_addr[ETH_ALEN];
1588 } __attribute__((packed)) hfa384x_AssocReq_t;
1591 /*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/
1593 typedef struct hfa384x_PSUserCount
1596 } __attribute__((packed)) hfa384x_PSUserCount_t;
1598 typedef struct hfa384x_KeyIDChanged
1600 u8 sta_addr[ETH_ALEN];
1602 } __attribute__((packed)) hfa384x_KeyIDChanged_t;
1604 /*-- Collection of all Inf frames ---------------*/
1605 typedef union hfa384x_infodata {
1606 hfa384x_CommTallies16_t commtallies16;
1607 hfa384x_CommTallies32_t commtallies32;
1608 hfa384x_ScanResult_t scanresult;
1609 hfa384x_ChInfoResult_t chinforesult;
1610 hfa384x_HScanResult_t hscanresult;
1611 hfa384x_LinkStatus_t linkstatus;
1612 hfa384x_AssocStatus_t assocstatus;
1613 hfa384x_AuthReq_t authreq;
1614 hfa384x_PSUserCount_t psusercnt;
1615 hfa384x_KeyIDChanged_t keyidchanged;
1616 } __attribute__((packed)) hfa384x_infodata_t;
1618 typedef struct hfa384x_InfFrame
1622 hfa384x_infodata_t info;
1623 } __attribute__((packed)) hfa384x_InfFrame_t;
1625 /*--------------------------------------------------------------------
1626 USB Packet structures and constants.
1627 --------------------------------------------------------------------*/
1629 /* Should be sent to the ctrlout endpoint */
1630 #define HFA384x_USB_ENBULKIN 6
1632 /* Should be sent to the bulkout endpoint */
1633 #define HFA384x_USB_TXFRM 0
1634 #define HFA384x_USB_CMDREQ 1
1635 #define HFA384x_USB_WRIDREQ 2
1636 #define HFA384x_USB_RRIDREQ 3
1637 #define HFA384x_USB_WMEMREQ 4
1638 #define HFA384x_USB_RMEMREQ 5
1640 /* Received from the bulkin endpoint */
1641 #define HFA384x_USB_ISFRM(a) (!((a) & 0x8000))
1642 #define HFA384x_USB_ISTXFRM(a) (((a) & 0x9000) == 0x1000)
1643 #define HFA384x_USB_ISRXFRM(a) (!((a) & 0x9000))
1644 #define HFA384x_USB_INFOFRM 0x8000
1645 #define HFA384x_USB_CMDRESP 0x8001
1646 #define HFA384x_USB_WRIDRESP 0x8002
1647 #define HFA384x_USB_RRIDRESP 0x8003
1648 #define HFA384x_USB_WMEMRESP 0x8004
1649 #define HFA384x_USB_RMEMRESP 0x8005
1650 #define HFA384x_USB_BUFAVAIL 0x8006
1651 #define HFA384x_USB_ERROR 0x8007
1653 /*------------------------------------*/
1654 /* Request (bulk OUT) packet contents */
1656 typedef struct hfa384x_usb_txfrm {
1657 hfa384x_tx_frame_t desc;
1658 u8 data[WLAN_DATA_MAXLEN];
1659 } __attribute__((packed)) hfa384x_usb_txfrm_t;
1661 typedef struct hfa384x_usb_cmdreq {
1668 } __attribute__((packed)) hfa384x_usb_cmdreq_t;
1670 typedef struct hfa384x_usb_wridreq {
1674 u8 data[HFA384x_RIDDATA_MAXLEN];
1675 } __attribute__((packed)) hfa384x_usb_wridreq_t;
1677 typedef struct hfa384x_usb_rridreq {
1682 } __attribute__((packed)) hfa384x_usb_rridreq_t;
1684 typedef struct hfa384x_usb_wmemreq {
1689 u8 data[HFA384x_USB_RWMEM_MAXLEN];
1690 } __attribute__((packed)) hfa384x_usb_wmemreq_t;
1692 typedef struct hfa384x_usb_rmemreq {
1698 } __attribute__((packed)) hfa384x_usb_rmemreq_t;
1700 /*------------------------------------*/
1701 /* Response (bulk IN) packet contents */
1703 typedef struct hfa384x_usb_rxfrm {
1704 hfa384x_rx_frame_t desc;
1705 u8 data[WLAN_DATA_MAXLEN];
1706 } __attribute__((packed)) hfa384x_usb_rxfrm_t;
1708 typedef struct hfa384x_usb_infofrm {
1710 hfa384x_InfFrame_t info;
1711 } __attribute__((packed)) hfa384x_usb_infofrm_t;
1713 typedef struct hfa384x_usb_statusresp {
1719 } __attribute__((packed)) hfa384x_usb_cmdresp_t;
1721 typedef hfa384x_usb_cmdresp_t hfa384x_usb_wridresp_t;
1723 typedef struct hfa384x_usb_rridresp {
1727 u8 data[HFA384x_RIDDATA_MAXLEN];
1728 } __attribute__((packed)) hfa384x_usb_rridresp_t;
1730 typedef hfa384x_usb_cmdresp_t hfa384x_usb_wmemresp_t;
1732 typedef struct hfa384x_usb_rmemresp {
1735 u8 data[HFA384x_USB_RWMEM_MAXLEN];
1736 } __attribute__((packed)) hfa384x_usb_rmemresp_t;
1738 typedef struct hfa384x_usb_bufavail {
1741 } __attribute__((packed)) hfa384x_usb_bufavail_t;
1743 typedef struct hfa384x_usb_error {
1746 } __attribute__((packed)) hfa384x_usb_error_t;
1748 /*----------------------------------------------------------*/
1749 /* Unions for packaging all the known packet types together */
1751 typedef union hfa384x_usbout {
1753 hfa384x_usb_txfrm_t txfrm;
1754 hfa384x_usb_cmdreq_t cmdreq;
1755 hfa384x_usb_wridreq_t wridreq;
1756 hfa384x_usb_rridreq_t rridreq;
1757 hfa384x_usb_wmemreq_t wmemreq;
1758 hfa384x_usb_rmemreq_t rmemreq;
1759 } __attribute__((packed)) hfa384x_usbout_t;
1761 typedef union hfa384x_usbin {
1763 hfa384x_usb_rxfrm_t rxfrm;
1764 hfa384x_usb_txfrm_t txfrm;
1765 hfa384x_usb_infofrm_t infofrm;
1766 hfa384x_usb_cmdresp_t cmdresp;
1767 hfa384x_usb_wridresp_t wridresp;
1768 hfa384x_usb_rridresp_t rridresp;
1769 hfa384x_usb_wmemresp_t wmemresp;
1770 hfa384x_usb_rmemresp_t rmemresp;
1771 hfa384x_usb_bufavail_t bufavail;
1772 hfa384x_usb_error_t usberror;
1774 } __attribute__((packed)) hfa384x_usbin_t;
1776 /*--------------------------------------------------------------------
1777 PD record structures.
1778 --------------------------------------------------------------------*/
1780 typedef struct hfa384x_pdr_pcb_partnum
1783 } __attribute__((packed)) hfa384x_pdr_pcb_partnum_t;
1785 typedef struct hfa384x_pdr_pcb_tracenum
1788 } __attribute__((packed)) hfa384x_pdr_pcb_tracenum_t;
1790 typedef struct hfa384x_pdr_nic_serial
1793 } __attribute__((packed)) hfa384x_pdr_nic_serial_t;
1795 typedef struct hfa384x_pdr_mkk_measurements
1797 double carrier_freq;
1798 double occupied_band;
1799 double power_density;
1812 } __attribute__((packed)) hfa384x_pdr_mkk_measurements_t;
1814 typedef struct hfa384x_pdr_nic_ramsize
1816 u8 size[12]; /* units of KB */
1817 } __attribute__((packed)) hfa384x_pdr_nic_ramsize_t;
1819 typedef struct hfa384x_pdr_mfisuprange
1825 } __attribute__((packed)) hfa384x_pdr_mfisuprange_t;
1827 typedef struct hfa384x_pdr_cfisuprange
1833 } __attribute__((packed)) hfa384x_pdr_cfisuprange_t;
1835 typedef struct hfa384x_pdr_nicid
1841 } __attribute__((packed)) hfa384x_pdr_nicid_t;
1844 typedef struct hfa384x_pdr_refdac_measurements
1847 } __attribute__((packed)) hfa384x_pdr_refdac_measurements_t;
1849 typedef struct hfa384x_pdr_vgdac_measurements
1852 } __attribute__((packed)) hfa384x_pdr_vgdac_measurements_t;
1854 typedef struct hfa384x_pdr_level_comp_measurements
1857 } __attribute__((packed)) hfa384x_pdr_level_compc_measurements_t;
1859 typedef struct hfa384x_pdr_mac_address
1862 } __attribute__((packed)) hfa384x_pdr_mac_address_t;
1864 typedef struct hfa384x_pdr_mkk_callname
1867 } __attribute__((packed)) hfa384x_pdr_mkk_callname_t;
1869 typedef struct hfa384x_pdr_regdomain
1873 } __attribute__((packed)) hfa384x_pdr_regdomain_t;
1875 typedef struct hfa384x_pdr_allowed_channel
1878 } __attribute__((packed)) hfa384x_pdr_allowed_channel_t;
1880 typedef struct hfa384x_pdr_default_channel
1883 } __attribute__((packed)) hfa384x_pdr_default_channel_t;
1885 typedef struct hfa384x_pdr_privacy_option
1888 } __attribute__((packed)) hfa384x_pdr_privacy_option_t;
1890 typedef struct hfa384x_pdr_temptype
1893 } __attribute__((packed)) hfa384x_pdr_temptype_t;
1895 typedef struct hfa384x_pdr_refdac_setup
1898 } __attribute__((packed)) hfa384x_pdr_refdac_setup_t;
1900 typedef struct hfa384x_pdr_vgdac_setup
1903 } __attribute__((packed)) hfa384x_pdr_vgdac_setup_t;
1905 typedef struct hfa384x_pdr_level_comp_setup
1908 } __attribute__((packed)) hfa384x_pdr_level_comp_setup_t;
1910 typedef struct hfa384x_pdr_trimdac_setup
1914 } __attribute__((packed)) hfa384x_pdr_trimdac_setup_t;
1916 typedef struct hfa384x_pdr_ifr_setting
1919 } __attribute__((packed)) hfa384x_pdr_ifr_setting_t;
1921 typedef struct hfa384x_pdr_rfr_setting
1924 } __attribute__((packed)) hfa384x_pdr_rfr_setting_t;
1926 typedef struct hfa384x_pdr_hfa3861_baseline
1929 } __attribute__((packed)) hfa384x_pdr_hfa3861_baseline_t;
1931 typedef struct hfa384x_pdr_hfa3861_shadow
1934 } __attribute__((packed)) hfa384x_pdr_hfa3861_shadow_t;
1936 typedef struct hfa384x_pdr_hfa3861_ifrf
1939 } __attribute__((packed)) hfa384x_pdr_hfa3861_ifrf_t;
1941 typedef struct hfa384x_pdr_hfa3861_chcalsp
1944 } __attribute__((packed)) hfa384x_pdr_hfa3861_chcalsp_t;
1946 typedef struct hfa384x_pdr_hfa3861_chcali
1949 } __attribute__((packed)) hfa384x_pdr_hfa3861_chcali_t;
1951 typedef struct hfa384x_pdr_hfa3861_nic_config
1954 } __attribute__((packed)) hfa384x_pdr_nic_config_t;
1956 typedef struct hfa384x_pdr_hfo_delay
1959 } __attribute__((packed)) hfa384x_hfo_delay_t;
1961 typedef struct hfa384x_pdr_hfa3861_manf_testsp
1964 } __attribute__((packed)) hfa384x_pdr_hfa3861_manf_testsp_t;
1966 typedef struct hfa384x_pdr_hfa3861_manf_testi
1969 } __attribute__((packed)) hfa384x_pdr_hfa3861_manf_testi_t;
1971 typedef struct hfa384x_end_of_pda
1974 } __attribute__((packed)) hfa384x_pdr_end_of_pda_t;
1976 typedef struct hfa384x_pdrec
1978 u16 len; /* in words */
1981 hfa384x_pdr_pcb_partnum_t pcb_partnum;
1982 hfa384x_pdr_pcb_tracenum_t pcb_tracenum;
1983 hfa384x_pdr_nic_serial_t nic_serial;
1984 hfa384x_pdr_mkk_measurements_t mkk_measurements;
1985 hfa384x_pdr_nic_ramsize_t nic_ramsize;
1986 hfa384x_pdr_mfisuprange_t mfisuprange;
1987 hfa384x_pdr_cfisuprange_t cfisuprange;
1988 hfa384x_pdr_nicid_t nicid;
1989 hfa384x_pdr_refdac_measurements_t refdac_measurements;
1990 hfa384x_pdr_vgdac_measurements_t vgdac_measurements;
1991 hfa384x_pdr_level_compc_measurements_t level_compc_measurements;
1992 hfa384x_pdr_mac_address_t mac_address;
1993 hfa384x_pdr_mkk_callname_t mkk_callname;
1994 hfa384x_pdr_regdomain_t regdomain;
1995 hfa384x_pdr_allowed_channel_t allowed_channel;
1996 hfa384x_pdr_default_channel_t default_channel;
1997 hfa384x_pdr_privacy_option_t privacy_option;
1998 hfa384x_pdr_temptype_t temptype;
1999 hfa384x_pdr_refdac_setup_t refdac_setup;
2000 hfa384x_pdr_vgdac_setup_t vgdac_setup;
2001 hfa384x_pdr_level_comp_setup_t level_comp_setup;
2002 hfa384x_pdr_trimdac_setup_t trimdac_setup;
2003 hfa384x_pdr_ifr_setting_t ifr_setting;
2004 hfa384x_pdr_rfr_setting_t rfr_setting;
2005 hfa384x_pdr_hfa3861_baseline_t hfa3861_baseline;
2006 hfa384x_pdr_hfa3861_shadow_t hfa3861_shadow;
2007 hfa384x_pdr_hfa3861_ifrf_t hfa3861_ifrf;
2008 hfa384x_pdr_hfa3861_chcalsp_t hfa3861_chcalsp;
2009 hfa384x_pdr_hfa3861_chcali_t hfa3861_chcali;
2010 hfa384x_pdr_nic_config_t nic_config;
2011 hfa384x_hfo_delay_t hfo_delay;
2012 hfa384x_pdr_hfa3861_manf_testsp_t hfa3861_manf_testsp;
2013 hfa384x_pdr_hfa3861_manf_testi_t hfa3861_manf_testi;
2014 hfa384x_pdr_end_of_pda_t end_of_pda;
2017 } __attribute__((packed)) hfa384x_pdrec_t;
2021 /*--------------------------------------------------------------------
2022 --- MAC state structure, argument to all functions --
2023 --- Also, a collection of support types --
2024 --------------------------------------------------------------------*/
2025 typedef struct hfa384x_statusresult
2031 } hfa384x_cmdresult_t;
2033 /* USB Control Exchange (CTLX):
2034 * A queue of the structure below is maintained for all of the
2035 * Request/Response type USB packets supported by Prism2.
2037 /* The following hfa384x_* structures are arguments to
2038 * the usercb() for the different CTLX types.
2040 typedef hfa384x_cmdresult_t hfa384x_wridresult_t;
2041 typedef hfa384x_cmdresult_t hfa384x_wmemresult_t;
2043 typedef struct hfa384x_rridresult
2046 const void *riddata;
2047 unsigned int riddata_len;
2048 } hfa384x_rridresult_t;
2051 CTLX_START = 0, /* Start state, not queued */
2053 CTLX_COMPLETE, /* CTLX successfully completed */
2054 CTLX_REQ_FAILED, /* OUT URB completed w/ error */
2056 CTLX_PENDING, /* Queued, data valid */
2057 CTLX_REQ_SUBMITTED, /* OUT URB submitted */
2058 CTLX_REQ_COMPLETE, /* OUT URB complete */
2059 CTLX_RESP_COMPLETE /* IN URB received */
2061 typedef enum ctlx_state CTLX_STATE;
2063 struct hfa384x_usbctlx;
2066 typedef void (*ctlx_cmdcb_t)( struct hfa384x*, const struct hfa384x_usbctlx* );
2068 typedef void (*ctlx_usercb_t)(
2073 typedef struct hfa384x_usbctlx
2075 struct list_head list;
2078 hfa384x_usbout_t outbuf; /* pkt buf for OUT */
2079 hfa384x_usbin_t inbuf; /* pkt buf for IN(a copy) */
2081 CTLX_STATE state; /* Tracks running state */
2083 struct completion done;
2084 volatile int reapable; /* Food for the reaper task */
2086 ctlx_cmdcb_t cmdcb; /* Async command callback */
2087 ctlx_usercb_t usercb; /* Async user callback, */
2088 void *usercb_data; /* at CTLX completion */
2090 int variant; /* Identifies cmd variant */
2091 } hfa384x_usbctlx_t;
2093 typedef struct hfa384x_usbctlxq
2096 struct list_head pending;
2097 struct list_head active;
2098 struct list_head completing;
2099 struct list_head reapable;
2100 } hfa384x_usbctlxq_t;
2102 typedef struct hfa484x_metacmd
2110 hfa384x_cmdresult_t result;
2111 } hfa384x_metacmd_t;
2113 #define MAX_PRISM2_GRP_ADDR 16
2114 #define MAX_GRP_ADDR 32
2115 #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */
2117 #define MM_SAT_PCF (BIT(14))
2118 #define MM_GCSD_PCF (BIT(15))
2119 #define MM_GCSD_PCF_EB (BIT(14) | BIT(15))
2121 #define WLAN_STATE_STOPPED 0 /* Network is not active. */
2122 #define WLAN_STATE_STARTED 1 /* Network has been started. */
2124 #define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */
2125 #define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */
2126 #define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */
2127 #define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */
2128 #define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */
2129 #define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */
2131 /* XXX These are going away ASAP */
2132 typedef struct prism2sta_authlist
2135 u8 addr[WLAN_AUTH_MAX][ETH_ALEN];
2136 u8 assoc[WLAN_AUTH_MAX];
2137 } prism2sta_authlist_t;
2139 typedef struct prism2sta_accesslist
2141 unsigned int modify;
2143 u8 addr[WLAN_ACCESS_MAX][ETH_ALEN];
2145 u8 addr1[WLAN_ACCESS_MAX][ETH_ALEN];
2146 } prism2sta_accesslist_t;
2148 typedef struct hfa384x
2150 /* USB support data */
2151 struct usb_device *usb;
2153 struct sk_buff *rx_urb_skb;
2155 struct urb ctlx_urb;
2156 hfa384x_usbout_t txbuff;
2157 hfa384x_usbctlxq_t ctlxq;
2158 struct timer_list reqtimer;
2159 struct timer_list resptimer;
2161 struct timer_list throttle;
2163 struct tasklet_struct reaper_bh;
2164 struct tasklet_struct completion_bh;
2166 struct work_struct usb_work;
2168 unsigned long usb_flags;
2169 #define THROTTLE_RX 0
2170 #define THROTTLE_TX 1
2171 #define WORK_RX_HALT 2
2172 #define WORK_TX_HALT 3
2173 #define WORK_RX_RESUME 4
2174 #define WORK_TX_RESUME 5
2176 unsigned short req_timer_done:1;
2177 unsigned short resp_timer_done:1;
2187 wait_queue_head_t cmdq; /* wait queue itself */
2189 /* Controller state */
2192 u8 port_enabled[HFA384x_NUMPORTS_MAX];
2194 /* Download support */
2195 unsigned int dlstate;
2196 hfa384x_downloadbuffer_t bufinfo;
2199 int scanflag; /* to signal scan comlete */
2200 int join_ap; /* are we joined to a specific ap */
2201 int join_retries; /* number of join retries till we fail */
2202 hfa384x_JoinRequest_data_t joinreq; /* join request saved data */
2204 wlandevice_t *wlandev;
2205 /* Timer to allow for the deferred processing of linkstatus messages */
2206 struct work_struct link_bh;
2208 struct work_struct commsqual_bh;
2209 hfa384x_commsquality_t qual;
2210 struct timer_list commsqual_timer;
2213 u16 link_status_new;
2214 struct sk_buff_head authq;
2216 /* And here we have stuff that used to be in priv */
2218 /* State variables */
2219 unsigned int presniff_port_type;
2220 u16 presniff_wepflags;
2221 u32 dot11_desired_bss_type;
2225 /* Group Addresses - right now, there are up to a total
2226 of MAX_GRP_ADDR group addresses */
2227 u8 dot11_grp_addr[MAX_GRP_ADDR][ETH_ALEN];
2228 unsigned int dot11_grpcnt;
2230 /* Component Identities */
2231 hfa384x_compident_t ident_nic;
2232 hfa384x_compident_t ident_pri_fw;
2233 hfa384x_compident_t ident_sta_fw;
2234 hfa384x_compident_t ident_ap_fw;
2237 /* Supplier compatibility ranges */
2238 hfa384x_caplevel_t cap_sup_mfi;
2239 hfa384x_caplevel_t cap_sup_cfi;
2240 hfa384x_caplevel_t cap_sup_pri;
2241 hfa384x_caplevel_t cap_sup_sta;
2242 hfa384x_caplevel_t cap_sup_ap;
2244 /* Actor compatibility ranges */
2245 hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */
2246 hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */
2247 hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */
2248 hfa384x_caplevel_t cap_act_ap_cfi; /* ap f/w to controller interface */
2249 hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */
2251 u32 psusercount; /* Power save user count. */
2252 hfa384x_CommTallies32_t tallies; /* Communication tallies. */
2253 u8 comment[WLAN_COMMENT_MAX+1]; /* User comment */
2255 /* Channel Info request results (AP only) */
2259 hfa384x_ChInfoResult_t results;
2262 hfa384x_InfFrame_t *scanresults;
2265 prism2sta_authlist_t authlist; /* Authenticated station list. */
2266 unsigned int accessmode; /* Access mode. */
2267 prism2sta_accesslist_t allow; /* Allowed station list. */
2268 prism2sta_accesslist_t deny; /* Denied station list. */
2272 /*=============================================================*/
2273 /*--- Function Declarations -----------------------------------*/
2274 /*=============================================================*/
2278 struct usb_device *usb);
2280 void hfa384x_destroy(hfa384x_t *hw);
2283 hfa384x_corereset( hfa384x_t *hw, int holdtime, int settletime, int genesis);
2285 hfa384x_drvr_chinforesults( hfa384x_t *hw);
2287 hfa384x_drvr_commtallies( hfa384x_t *hw);
2289 hfa384x_drvr_disable(hfa384x_t *hw, u16 macport);
2291 hfa384x_drvr_enable(hfa384x_t *hw, u16 macport);
2293 hfa384x_drvr_flashdl_enable(hfa384x_t *hw);
2295 hfa384x_drvr_flashdl_disable(hfa384x_t *hw);
2297 hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void* buf, u32 len);
2299 hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
2301 hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr);
2303 hfa384x_drvr_hostscanresults( hfa384x_t *hw);
2305 hfa384x_drvr_mmi_read(hfa384x_t *hw, u32 address, u32 *result);
2307 hfa384x_drvr_mmi_write(hfa384x_t *hw, u32 address, u32 data);
2309 hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr);
2311 hfa384x_drvr_ramdl_disable(hfa384x_t *hw);
2313 hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void* buf, u32 len);
2315 hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len);
2317 hfa384x_drvr_scanresults( hfa384x_t *hw);
2320 hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len);
2323 hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
2326 result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
2327 if ( result == 0 ) {
2328 *((u16*)val) = hfa384x2host_16(*((u16*)val));
2334 hfa384x_drvr_getconfig32(hfa384x_t *hw, u16 rid, void *val)
2338 result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u32));
2339 if ( result == 0 ) {
2340 *((u32*)val) = hfa384x2host_32(*((u32*)val));
2347 hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val)
2349 u16 value = host2hfa384x_16(val);
2350 return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
2354 hfa384x_drvr_setconfig32(hfa384x_t *hw, u16 rid, u32 val)
2356 u32 value = host2hfa384x_32(val);
2357 return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
2361 hfa384x_drvr_getconfig_async(hfa384x_t *hw,
2363 ctlx_usercb_t usercb,
2367 hfa384x_drvr_setconfig_async(hfa384x_t *hw,
2371 ctlx_usercb_t usercb,
2375 hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val)
2377 u16 value = host2hfa384x_16(val);
2378 return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value),
2383 hfa384x_drvr_setconfig32_async(hfa384x_t *hw, u16 rid, u32 val)
2385 u32 value = host2hfa384x_32(val);
2386 return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value),
2392 hfa384x_drvr_start(hfa384x_t *hw);
2394 hfa384x_drvr_stop(hfa384x_t *hw);
2396 hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep);
2398 hfa384x_tx_timeout(wlandevice_t *wlandev);
2401 hfa384x_cmd_initialize(hfa384x_t *hw);
2403 hfa384x_cmd_enable(hfa384x_t *hw, u16 macport);
2405 hfa384x_cmd_disable(hfa384x_t *hw, u16 macport);
2407 hfa384x_cmd_diagnose(hfa384x_t *hw);
2409 hfa384x_cmd_allocate(hfa384x_t *hw, u16 len);
2411 hfa384x_cmd_transmit(hfa384x_t *hw, u16 reclaim, u16 qos, u16 fid);
2413 hfa384x_cmd_clearpersist(hfa384x_t *hw, u16 fid);
2415 hfa384x_cmd_access(hfa384x_t *hw, u16 write, u16 rid, void *buf, u16 len);
2417 hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable);
2419 hfa384x_cmd_download(
2426 hfa384x_cmd_aux_enable(hfa384x_t *hw, int force);
2428 hfa384x_cmd_aux_disable(hfa384x_t *hw);
2430 hfa384x_copy_from_bap(
2438 hfa384x_copy_to_bap(
2446 hfa384x_copy_from_aux(
2453 hfa384x_copy_to_aux(
2460 #endif /* __KERNEL__ */
2462 #endif /* _HFA384x_H */