fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / net / wireless / prism54 / isl_oid.h
index 25732d2..b7534c2 100644 (file)
@@ -1,8 +1,7 @@
 /*
- *  $Id: isl_oid.h,v 1.3 2004/03/09 09:05:27 mcgrof Exp $
- *  
  *  Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
  *  Copyright (C) 2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
+ *  Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -22,7 +21,7 @@
 #if !defined(_ISL_OID_H)
 #define _ISL_OID_H
 
-/* 
+/*
  * MIB related constant and structure definitions for communicating
  * with the device firmware
  */
@@ -90,21 +89,29 @@ struct obj_frequencies {
        u16 mhz[0];
 } __attribute__ ((packed));
 
-/* 
+struct obj_attachment {
+       char type;
+       char reserved;
+       short id;
+       short size;
+       char data[0];
+} __attribute__((packed));
+
+/*
  * in case everything's ok, the inlined function below will be
  * optimized away by the compiler...
  */
 static inline void
 __bug_on_wrong_struct_sizes(void)
 {
-       BUG_ON(sizeof (struct obj_ssid) != 34);
-       BUG_ON(sizeof (struct obj_key) != 34);
-       BUG_ON(sizeof (struct obj_mlme) != 12);
-       BUG_ON(sizeof (struct obj_mlmeex) != 14);
-       BUG_ON(sizeof (struct obj_buffer) != 8);
-       BUG_ON(sizeof (struct obj_bss) != 60);
-       BUG_ON(sizeof (struct obj_bsslist) != 4);
-       BUG_ON(sizeof (struct obj_frequencies) != 2);
+       BUILD_BUG_ON(sizeof (struct obj_ssid) != 34);
+       BUILD_BUG_ON(sizeof (struct obj_key) != 34);
+       BUILD_BUG_ON(sizeof (struct obj_mlme) != 12);
+       BUILD_BUG_ON(sizeof (struct obj_mlmeex) != 14);
+       BUILD_BUG_ON(sizeof (struct obj_buffer) != 8);
+       BUILD_BUG_ON(sizeof (struct obj_bss) != 60);
+       BUILD_BUG_ON(sizeof (struct obj_bsslist) != 4);
+       BUILD_BUG_ON(sizeof (struct obj_frequencies) != 2);
 }
 
 enum dot11_state_t {
@@ -145,13 +152,13 @@ enum dot11_priv_t {
 
 /* Prism "Nitro" / Frameburst / "Packet Frame Grouping"
  * Value is in microseconds. Represents the # microseconds
- * the firmware will take to group frames before sending out then out 
+ * the firmware will take to group frames before sending out then out
  * together with a CSMA contention. Without this all frames are
- * sent with a CSMA contention. 
- * Bibliography: 
+ * sent with a CSMA contention.
+ * Bibliography:
  * http://www.hpl.hp.com/personal/Jean_Tourrilhes/Papers/Packet.Frame.Grouping.html
  */
-enum dot11_maxframeburst_t { 
+enum dot11_maxframeburst_t {
        /* Values for DOT11_OID_MAXFRAMEBURST */
        DOT11_MAXFRAMEBURST_OFF = 0, /* Card firmware default */
        DOT11_MAXFRAMEBURST_MIXED_SAFE = 650, /* 802.11 a,b,g safe */
@@ -167,9 +174,9 @@ enum dot11_maxframeburst_t {
 /* Support for 802.11 long and short frame preambles.
  * Long         preamble uses 128-bit sync field, 8-bit  CRC
  * Short preamble uses 56-bit  sync field, 16-bit CRC
- * 
+ *
  * 802.11a -- not sure, both optionally ?
- * 802.11b supports long and optionally short 
+ * 802.11b supports long and optionally short
  * 802.11g supports both */
 enum dot11_preamblesettings_t {
        DOT11_PREAMBLESETTING_LONG = 0,
@@ -185,7 +192,7 @@ enum dot11_preamblesettings_t {
  * Long uses 802.11a slot timing  (9 usec ?)
  * Short uses 802.11b slot timing (20 use ?) */
 enum dot11_slotsettings_t {
-       DOT11_SLOTSETTINGS_LONG = 0, 
+       DOT11_SLOTSETTINGS_LONG = 0,
                /* Allows *only* long 802.11b slot timing */
        DOT11_SLOTSETTINGS_SHORT = 1,
                /* Allows *only* long 802.11a slot timing */
@@ -194,7 +201,7 @@ enum dot11_slotsettings_t {
 };
 
 /* All you need to know, ERP is "Extended Rate PHY".
- * An Extended Rate PHY (ERP) STA or AP shall support three different 
+ * An Extended Rate PHY (ERP) STA or AP shall support three different
  * preamble and header formats:
  * Long  preamble (refer to above)
  * Short preamble (refer to above)
@@ -212,7 +219,7 @@ enum do11_nonerpstatus_t {
 /* (ERP is "Extended Rate PHY") Way to read NONERP is NON-ERP-*
  * The key here is DOT11 NON ERP NEVER protects against
  * NON ERP STA's. You *don't* want this unless
- * you know what you are doing. It means you will only 
+ * you know what you are doing. It means you will only
  * get Extended Rate capabilities */
 enum dot11_nonerpprotection_t {
        DOT11_NONERP_NEVER = 0,
@@ -220,13 +227,13 @@ enum dot11_nonerpprotection_t {
        DOT11_NONERP_DYNAMIC = 2
 };
 
-/* Preset OID configuration for 802.11 modes 
- * Note: DOT11_OID_CW[MIN|MAX] hold the values of the 
+/* Preset OID configuration for 802.11 modes
+ * Note: DOT11_OID_CW[MIN|MAX] hold the values of the
  * DCS MIN|MAX backoff used */
 enum dot11_profile_t { /* And set/allowed values */
        /* Allowed values for DOT11_OID_PROFILES */
        DOT11_PROFILE_B_ONLY = 0,
-               /* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps 
+               /* DOT11_OID_RATES: 1, 2, 5.5, 11Mbps
                 * DOT11_OID_PREAMBLESETTINGS: DOT11_PREAMBLESETTING_DYNAMIC
                 * DOT11_OID_CWMIN: 31
                 * DOT11_OID_NONEPROTECTION: DOT11_NOERP_DYNAMIC
@@ -266,7 +273,7 @@ enum oid_inl_conformance_t {
        OID_INL_CONFORMANCE_NONE = 0,   /* Perform active scanning */
        OID_INL_CONFORMANCE_STRICT = 1, /* Strictly adhere to 802.11d */
        OID_INL_CONFORMANCE_FLEXIBLE = 2,       /* Use passed 802.11d info to
-               * determine channel AND/OR just make assumption that active 
+               * determine channel AND/OR just make assumption that active
                * channels are valid  channels */
 };
 
@@ -457,16 +464,30 @@ enum oid_num_t {
        OID_NUM_LAST
 };
 
-/* We  could add more flags. eg: in which mode are they allowed, ro, rw, ...*/
-#define OID_FLAG_CACHED        0x01
-#define OID_FLAG_U32   0x02
-#define OID_FLAG_MLMEEX        0x04    /* this type is special because of a variable
-                                  size field when sending. Not yet implemented (not used in driver). */
+#define OID_FLAG_CACHED                0x80
+#define OID_FLAG_TYPE          0x7f
+
+#define OID_TYPE_U32           0x01
+#define OID_TYPE_SSID          0x02
+#define OID_TYPE_KEY           0x03
+#define OID_TYPE_BUFFER                0x04
+#define OID_TYPE_BSS           0x05
+#define OID_TYPE_BSSLIST       0x06
+#define OID_TYPE_FREQUENCIES   0x07
+#define OID_TYPE_MLME          0x08
+#define OID_TYPE_MLMEEX                0x09
+#define OID_TYPE_ADDR          0x0A
+#define OID_TYPE_RAW           0x0B
+#define OID_TYPE_ATTACH                0x0C
+
+/* OID_TYPE_MLMEEX is special because of a variable size field when sending.
+ * Not yet implemented (not used in driver anyway).
+ */
 
 struct oid_t {
        enum oid_num_t oid;
        short range;            /* to define a range of oid */
-       short size;             /* size of the associated data */
+       short size;             /* max size of the associated data */
        char flags;
 };
 
@@ -478,6 +499,7 @@ union oid_res_t {
 #define        IWMAX_BITRATES  20
 #define        IWMAX_BSS       24
 #define IWMAX_FREQ     30
+#define PRIV_STR_SIZE  1024
 
 #endif                         /* !defined(_ISL_OID_H) */
 /* EOF */