4 * Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
5 * Copyright (C) 2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
6 * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #if !defined(_ISL_OID_H)
27 * MIB related constant and structure definitions for communicating
28 * with the device firmware
34 } __attribute__ ((packed
));
37 u8 type
; /* dot11_priv_t */
40 } __attribute__ ((packed
));
47 } __attribute__ ((packed
));
56 } __attribute__ ((packed
));
60 u32 addr
; /* 32bit bus address */
61 } __attribute__ ((packed
));
82 } __attribute__ ((packed
));
86 struct obj_bss bsslist
[0];
87 } __attribute__ ((packed
));
89 struct obj_frequencies
{
92 } __attribute__ ((packed
));
95 * in case everything's ok, the inlined function below will be
96 * optimized away by the compiler...
99 __bug_on_wrong_struct_sizes(void)
101 BUG_ON(sizeof (struct obj_ssid
) != 34);
102 BUG_ON(sizeof (struct obj_key
) != 34);
103 BUG_ON(sizeof (struct obj_mlme
) != 12);
104 BUG_ON(sizeof (struct obj_mlmeex
) != 14);
105 BUG_ON(sizeof (struct obj_buffer
) != 8);
106 BUG_ON(sizeof (struct obj_bss
) != 60);
107 BUG_ON(sizeof (struct obj_bsslist
) != 4);
108 BUG_ON(sizeof (struct obj_frequencies
) != 2);
112 DOT11_STATE_NONE
= 0,
113 DOT11_STATE_AUTHING
= 1,
114 DOT11_STATE_AUTH
= 2,
115 DOT11_STATE_ASSOCING
= 3,
117 DOT11_STATE_ASSOC
= 5,
118 DOT11_STATE_IBSS
= 6,
122 enum dot11_bsstype_t
{
123 DOT11_BSSTYPE_NONE
= 0,
124 DOT11_BSSTYPE_INFRA
= 1,
125 DOT11_BSSTYPE_IBSS
= 2,
126 DOT11_BSSTYPE_ANY
= 3
138 DOT11_MLME_INTERMEDIATE
= 1,
139 DOT11_MLME_EXTENDED
= 2
147 /* Prism "Nitro" / Frameburst / "Packet Frame Grouping"
148 * Value is in microseconds. Represents the # microseconds
149 * the firmware will take to group frames before sending out then out
150 * together with a CSMA contention. Without this all frames are
151 * sent with a CSMA contention.
153 * http://www.hpl.hp.com/personal/Jean_Tourrilhes/Papers/Packet.Frame.Grouping.html
155 enum dot11_maxframeburst_t
{
156 /* Values for DOT11_OID_MAXFRAMEBURST */
157 DOT11_MAXFRAMEBURST_OFF
= 0, /* Card firmware default */
158 DOT11_MAXFRAMEBURST_MIXED_SAFE
= 650, /* 802.11 a,b,g safe */
159 DOT11_MAXFRAMEBURST_IDEAL
= 1300, /* Theoretical ideal level */
160 DOT11_MAXFRAMEBURST_MAX
= 5000, /* Use this as max,
161 * Note: firmware allows for greater values. This is a
162 * recommended max. I'll update this as I find
163 * out what the real MAX is. Also note that you don't necessarily
164 * get better results with a greater value here.
168 /* Support for 802.11 long and short frame preambles.
169 * Long preamble uses 128-bit sync field, 8-bit CRC
170 * Short preamble uses 56-bit sync field, 16-bit CRC
172 * 802.11a -- not sure, both optionally ?
173 * 802.11b supports long and optionally short
174 * 802.11g supports both */
175 enum dot11_preamblesettings_t
{
176 DOT11_PREAMBLESETTING_LONG
= 0,
177 /* Allows *only* long 802.11 preambles */
178 DOT11_PREAMBLESETTING_SHORT
= 1,
179 /* Allows *only* short 802.11 preambles */
180 DOT11_PREAMBLESETTING_DYNAMIC
= 2
181 /* AutomatiGically set */
184 /* Support for 802.11 slot timing (time between packets).
186 * Long uses 802.11a slot timing (9 usec ?)
187 * Short uses 802.11b slot timing (20 use ?) */
188 enum dot11_slotsettings_t
{
189 DOT11_SLOTSETTINGS_LONG
= 0,
190 /* Allows *only* long 802.11b slot timing */
191 DOT11_SLOTSETTINGS_SHORT
= 1,
192 /* Allows *only* long 802.11a slot timing */
193 DOT11_SLOTSETTINGS_DYNAMIC
= 2
194 /* AutomatiGically set */
197 /* All you need to know, ERP is "Extended Rate PHY".
198 * An Extended Rate PHY (ERP) STA or AP shall support three different
199 * preamble and header formats:
200 * Long preamble (refer to above)
201 * Short preamble (refer to above)
202 * OFDM preamble ( ? )
204 * I'm assuming here Protection tells the AP
205 * to be careful, a STA which cannot handle the long pre-amble
208 enum do11_nonerpstatus_t
{
209 DOT11_ERPSTAT_NONEPRESENT
= 0,
210 DOT11_ERPSTAT_USEPROTECTION
= 1
213 /* (ERP is "Extended Rate PHY") Way to read NONERP is NON-ERP-*
214 * The key here is DOT11 NON ERP NEVER protects against
215 * NON ERP STA's. You *don't* want this unless
216 * you know what you are doing. It means you will only
217 * get Extended Rate capabilities */
218 enum dot11_nonerpprotection_t
{
219 DOT11_NONERP_NEVER
= 0,
220 DOT11_NONERP_ALWAYS
= 1,
221 DOT11_NONERP_DYNAMIC
= 2
224 /* Preset OID configuration for 802.11 modes
225 * Note: DOT11_OID_CW[MIN|MAX] hold the values of the
226 * DCS MIN|MAX backoff used */
227 enum dot11_profile_t
{ /* And set/allowed values */
228 /* Allowed values for DOT11_OID_PROFILES */
229 DOT11_PROFILE_B_ONLY
= 0,
230 /* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps
231 * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC
232 * DOT11_OID_CWMIN: 31
233 * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC
234 * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_LONG
236 DOT11_PROFILE_MIXED_G_WIFI
= 1,
237 /* DOT11_OID_RATES: 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54Mbs
238 * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC
239 * DOT11_OID_CWMIN: 15
240 * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC
241 * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_DYNAMIC
243 DOT11_PROFILE_MIXED_LONG
= 2, /* "Long range" */
244 /* Same as Profile MIXED_G_WIFI */
245 DOT11_PROFILE_G_ONLY
= 3,
246 /* Same as Profile MIXED_G_WIFI */
247 DOT11_PROFILE_TEST
= 4,
248 /* Same as Profile MIXED_G_WIFI except:
249 * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_SHORT
250 * DOT11_OID_NONEPROTECTION: DOT11_NOERP_NEVER
251 * DOT11_OID_SLOTSETTINGS: DOT11_SLOTSETTINGS_SHORT
253 DOT11_PROFILE_B_WIFI
= 5,
254 /* Same as Profile B_ONLY */
255 DOT11_PROFILE_A_ONLY
= 6,
256 /* Same as Profile MIXED_G_WIFI except:
257 * DOT11_OID_RATES: 6, 9, 12, 18, 24, 36, 48, 54Mbs
259 DOT11_PROFILE_MIXED_SHORT
= 7
260 /* Same as MIXED_G_WIFI */
264 /* The dot11d conformance level configures the 802.11d conformance levels.
265 * The following conformance levels exist:*/
266 enum oid_inl_conformance_t
{
267 OID_INL_CONFORMANCE_NONE
= 0, /* Perform active scanning */
268 OID_INL_CONFORMANCE_STRICT
= 1, /* Strictly adhere to 802.11d */
269 OID_INL_CONFORMANCE_FLEXIBLE
= 2, /* Use passed 802.11d info to
270 * determine channel AND/OR just make assumption that active
271 * channels are valid channels */
274 enum oid_inl_mode_t
{
276 INL_MODE_PROMISCUOUS
= 0,
282 enum oid_inl_config_t
{
283 INL_CONFIG_NOTHING
= 0x00,
284 INL_CONFIG_MANUALRUN
= 0x01,
285 INL_CONFIG_FRAMETRAP
= 0x02,
286 INL_CONFIG_RXANNEX
= 0x04,
287 INL_CONFIG_TXANNEX
= 0x08,
288 INL_CONFIG_WDS
= 0x10
291 enum oid_inl_phycap_t
{
292 INL_PHYCAP_2400MHZ
= 1,
293 INL_PHYCAP_5000MHZ
= 2,
294 INL_PHYCAP_FAA
= 0x80000000, /* Means card supports the FAA switch */
299 GEN_OID_MACADDRESS
= 0,
312 DOT11_OID_COUNTRYSTRING
,
313 DOT11_OID_SSIDOVERRIDE
,
315 DOT11_OID_MEDIUMLIMIT
,
316 DOT11_OID_BEACONPERIOD
,
317 DOT11_OID_DTIMPERIOD
,
318 DOT11_OID_ATIMWINDOW
,
319 DOT11_OID_LISTENINTERVAL
,
321 DOT11_OID_CFPDURATION
,
323 DOT11_OID_AUTHENABLE
,
324 DOT11_OID_PRIVACYINVOKED
,
325 DOT11_OID_EXUNENCRYPTED
,
327 DOT11_OID_DEFKEYX
, /* DOT11_OID_DEFKEY1,...DOT11_OID_DEFKEY4 */
329 DOT11_OID_REKEYTHRESHOLD
,
332 DOT11_OID_PRIVTXREJECTED
,
333 DOT11_OID_PRIVRXPLAIN
,
334 DOT11_OID_PRIVRXFAILED
,
335 DOT11_OID_PRIVRXNOKEY
,
338 DOT11_OID_FRAGTHRESH
,
339 DOT11_OID_SHORTRETRIES
,
340 DOT11_OID_LONGRETRIES
,
341 DOT11_OID_MAXTXLIFETIME
,
342 DOT11_OID_MAXRXLIFETIME
,
343 DOT11_OID_AUTHRESPTIMEOUT
,
344 DOT11_OID_ASSOCRESPTIMEOUT
,
346 DOT11_OID_ALOFT_TABLE
,
347 DOT11_OID_ALOFT_CTRL_TABLE
,
348 DOT11_OID_ALOFT_RETREAT
,
349 DOT11_OID_ALOFT_PROGRESS
,
350 DOT11_OID_ALOFT_FIXEDRATE
,
351 DOT11_OID_ALOFT_RSSIGRAPH
,
352 DOT11_OID_ALOFT_CONFIG
,
355 DOT11_OID_MAXFRAMEBURST
,
358 DOT11_OID_CAMTIMEOUT
,
359 DOT11_OID_RECEIVEDTIMS
,
360 DOT11_OID_ROAMPREFERENCE
,
362 DOT11_OID_BRIDGELOCAL
,
364 DOT11_OID_CLIENTSASSOCIATED
,
365 DOT11_OID_CLIENTX
, /* DOT11_OID_CLIENTX,...DOT11_OID_CLIENT2007 */
367 DOT11_OID_CLIENTFIND
,
368 DOT11_OID_WDSLINKADD
,
369 DOT11_OID_WDSLINKREMOVE
,
370 DOT11_OID_EAPAUTHSTA
,
371 DOT11_OID_EAPUNAUTHSTA
,
372 DOT11_OID_DOT1XENABLE
,
373 DOT11_OID_MICFAILURE
,
374 DOT11_OID_REKEYINDICATE
,
376 DOT11_OID_MPDUTXSUCCESSFUL
,
377 DOT11_OID_MPDUTXONERETRY
,
378 DOT11_OID_MPDUTXMULTIPLERETRIES
,
379 DOT11_OID_MPDUTXFAILED
,
380 DOT11_OID_MPDURXSUCCESSFUL
,
381 DOT11_OID_MPDURXDUPS
,
382 DOT11_OID_RTSSUCCESSFUL
,
385 DOT11_OID_FRAMERECEIVES
,
386 DOT11_OID_FRAMEERRORS
,
387 DOT11_OID_FRAMEABORTS
,
388 DOT11_OID_FRAMEABORTSPHY
,
391 DOT11_OID_CWMIN
, /* MIN DCS backoff */
392 DOT11_OID_CWMAX
, /* MAX DCS backoff */
396 DOT11_OID_ANTENNADIVERSITY
,
398 DOT11_OID_EDTHRESHOLD
,
399 DOT11_OID_PREAMBLESETTINGS
,
401 DOT11_OID_CCAMODESUPPORTED
,
403 DOT11_OID_RSSIVECTOR
,
404 DOT11_OID_OUTPUTPOWERTABLE
,
405 DOT11_OID_OUTPUTPOWER
,
406 DOT11_OID_SUPPORTEDRATES
,
408 DOT11_OID_SUPPORTEDFREQUENCIES
,
409 DOT11_OID_NOISEFLOOR
,
410 DOT11_OID_FREQUENCYACTIVITY
,
411 DOT11_OID_IQCALIBRATIONTABLE
,
412 DOT11_OID_NONERPPROTECTION
,
413 DOT11_OID_SLOTSETTINGS
,
414 DOT11_OID_NONERPTIMEOUT
,
416 DOT11_OID_EXTENDEDRATES
,
418 DOT11_OID_DEAUTHENTICATE
,
419 DOT11_OID_AUTHENTICATE
,
420 DOT11_OID_DISASSOCIATE
,
425 DOT11_OID_DEAUTHENTICATEEX
,
426 DOT11_OID_AUTHENTICATEEX
,
427 DOT11_OID_DISASSOCIATEEX
,
428 DOT11_OID_ASSOCIATEEX
,
429 DOT11_OID_REASSOCIATE
,
430 DOT11_OID_REASSOCIATEEX
,
432 DOT11_OID_NONERPSTATUS
,
434 DOT11_OID_STATIMEOUT
,
435 DOT11_OID_MLMEAUTOLEVEL
,
436 DOT11_OID_BSSTIMEOUT
,
437 DOT11_OID_ATTACHMENT
,
441 DOT11_OID_BSSX
, /*DOT11_OID_BSS1,...,DOT11_OID_BSS64 */
449 OID_INL_COMPONENT_NR
,
451 OID_INL_INTERFACE_ID
,
452 OID_INL_COMPONENT_ID
,
454 OID_INL_DOT11D_CONFORMANCE
,
455 OID_INL_PHYCAPABILITIES
,
461 #define OID_FLAG_CACHED 0x80
462 #define OID_FLAG_TYPE 0x7f
464 #define OID_TYPE_U32 0x01
465 #define OID_TYPE_SSID 0x02
466 #define OID_TYPE_KEY 0x03
467 #define OID_TYPE_BUFFER 0x04
468 #define OID_TYPE_BSS 0x05
469 #define OID_TYPE_BSSLIST 0x06
470 #define OID_TYPE_FREQUENCIES 0x07
471 #define OID_TYPE_MLME 0x08
472 #define OID_TYPE_MLMEEX 0x09
473 #define OID_TYPE_ADDR 0x0A
474 #define OID_TYPE_RAW 0x0B
476 /* OID_TYPE_MLMEEX is special because of a variable size field when sending.
477 * Not yet implemented (not used in driver anyway).
482 short range
; /* to define a range of oid */
483 short size
; /* max size of the associated data */
492 #define IWMAX_BITRATES 20
494 #define IWMAX_FREQ 30
495 #define PRIV_STR_SIZE 1024
497 #endif /* !defined(_ISL_OID_H) */