Nut/OS  4.10.3
API Reference
wlandef.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 *  This file is part of the WLAN-Ethernut device driver.
00003 *
00004 *  Copyright (c) 2004 by Michael Fischer. All rights reserved.
00005 *
00006 *  Redistribution and use in source and binary forms, with or without 
00007 *  modification, are permitted provided that the following conditions 
00008 *  are met:
00009 *  
00010 *  1. Redistributions of source code must retain the above copyright 
00011 *     notice, this list of conditions and the following disclaimer.
00012 *  2. Redistributions in binary form must reproduce the above copyright
00013 *     notice, this list of conditions and the following disclaimer in the 
00014 *     documentation and/or other materials provided with the distribution.
00015 *  3. Neither the name of the author nor the names of its contributors may 
00016 *     be used to endorse or promote products derived from this software 
00017 *     without specific prior written permission.
00018 *
00019 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00020 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
00021 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
00022 *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
00023 *  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
00024 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
00025 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
00026 *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
00027 *  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
00028 *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
00029 *  THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
00030 *  SUCH DAMAGE.
00031 *
00032 ****************************************************************************
00033 *  Portions Copyright: 
00034 *
00035 *  Copyright (c) 2001 Atsushi Onoe
00036 *  Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
00037 *  Copyright (c) 2002 M Warner Losh <imp@freebsd.org>.  All rights reserved.
00038 *  Copyright (c) 1997, 1998, 1999
00039 *        Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
00040 *
00041 *  Redistribution and use in source and binary forms, with or without
00042 *  modification, are permitted provided that the following conditions
00043 *  are met:
00044 *  1. Redistributions of source code must retain the above copyright
00045 *     notice, this list of conditions and the following disclaimer.
00046 *  2. Redistributions in binary form must reproduce the above copyright
00047 *     notice, this list of conditions and the following disclaimer in the
00048 *     documentation and/or other materials provided with the distribution.
00049 *  3. Neither the name of the author nor the names of any co-contributors
00050 *     may be used to endorse or promote products derived from this software
00051 *     without specific prior written permission.
00052 *
00053 *  THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
00054 *  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00055 *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00056 *  ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
00057 *  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00058 *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00059 *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00060 *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00061 *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00062 *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
00063 *  THE POSSIBILITY OF SUCH DAMAGE.
00064 *
00065 ****************************************************************************
00066 *  History:
00067 *
00068 *  28.02.04  mifi   First Version 
00069 *                   This file is a mix of several FreeBSD header files.
00070 *                   I have put all the files together, because it was
00071 *                   difficult to use the original files. I have try this
00072 *                   but I must comment out to much to get it to work.
00073 *                   Here in this file you will fimd ONLY defines. All
00074 *                   the structs you will find in wlandrv.h.
00075 ****************************************************************************/
00076 #ifndef __WLANDEF_H__
00077 #define __WLANDEF_H__
00078 
00079 /*-------------------------------------------------------------------------*/
00080 /* global defines                                                          */
00081 /*-------------------------------------------------------------------------*/
00082 
00083 /***************************************************************************/
00084 /*                         ieee80211.h                                     */
00085 /***************************************************************************/
00086 
00087 enum {
00088   IEEE80211_AUTH_NONE   = 0,
00089   IEEE80211_AUTH_OPEN   = 1,
00090   IEEE80211_AUTH_SHARED = 2,
00091 };
00092 
00093 #define IEEE80211_RATE_BASIC      0x80
00094 #define IEEE80211_RATE_VAL                        0x7f
00095     
00096 
00097 
00098 /*
00099  * Maximum acceptable MTU is:
00100  *      IEEE80211_MAX_LEN - WEP overhead - CRC -
00101  *              QoS overhead - RSN/WPA overhead
00102  * Min is arbitrarily chosen > IEEE80211_MIN_LEN.  The default
00103  * mtu is Ethernet-compatible; it's set by ether_ifattach.
00104  */
00105 #define IEEE80211_MTU_MAX                           2290
00106 #define IEEE80211_MTU_MIN                           32
00107  
00108 #define IEEE80211_MAX_LEN                       (2300 + IEEE80211_CRC_LEN + \
00109     (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))
00110     
00111 
00112 /***************************************************************************/
00113 /*                      ieee80211_var.h                                    */
00114 /***************************************************************************/
00115 
00116 /*
00117  * 802.11 definitions
00118  */
00119 #define IEEE80211_CHAN_MAX        32
00120 #define IEEE80211_CHAN_ANY            0xffff  /* token for ``any channel'' */
00121 #define IEEE80211_CHAN_ANYC \
00122         ((struct ieee80211_channel *) IEEE80211_CHAN_ANY)
00123 
00124 /* XXX not really a mode; there are really multiple PHY's */
00125 enum ieee80211_phymode {
00126   IEEE80211_MODE_AUTO  = 0,               /* autoselect */
00127   IEEE80211_MODE_11A   = 1,               /* 5GHz, OFDM */
00128   IEEE80211_MODE_11B   = 2,               /* 2GHz, CCK */
00129   IEEE80211_MODE_11G   = 3,               /* 2GHz, OFDM */
00130   IEEE80211_MODE_FH    = 4,               /* 2GHz, GFSK */
00131   IEEE80211_MODE_TURBO = 5,               /* 5GHz, OFDM, 2x clock */
00132 };
00133 #define IEEE80211_MODE_MAX      (IEEE80211_MODE_TURBO+1)
00134 
00135 /* bits 0-3 are for private use by drivers */
00136 /* channel attributes */
00137 #define IEEE80211_CHAN_TURBO      0x0010  /* Turbo channel */
00138 #define IEEE80211_CHAN_CCK        0x0020  /* CCK channel */
00139 #define IEEE80211_CHAN_OFDM       0x0040  /* OFDM channel */
00140 #define IEEE80211_CHAN_2GHZ       0x0080  /* 2 GHz spectrum channel. */
00141 #define IEEE80211_CHAN_5GHZ       0x0100  /* 5 GHz spectrum channel */
00142 #define IEEE80211_CHAN_PASSIVE    0x0200  /* Only passive scan allowed */
00143 #define IEEE80211_CHAN_DYN        0x0400  /* Dynamic CCK-OFDM channel */
00144 #define IEEE80211_CHAN_GFSK       0x0800  /* GFSK channel (FHSS PHY) */
00145 
00146 /*
00147  * Useful combinations of channel characteristics.
00148  */
00149 #define IEEE80211_CHAN_FHSS \
00150         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)
00151 #define IEEE80211_CHAN_A \
00152         (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
00153 #define IEEE80211_CHAN_B \
00154         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
00155 #define IEEE80211_CHAN_PUREG \
00156         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)
00157 #define IEEE80211_CHAN_G \
00158         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
00159 #define IEEE80211_CHAN_T \
00160         (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
00161 
00162 /***************************************************************************/
00163 /*                      ieee80211_node.h                                   */
00164 /***************************************************************************/
00165 
00166 #define IEEE80211_RATE_SIZE           8       /* 802.11 standard */
00167 #define IEEE80211_RATE_MAXSIZE    15      /* max rates we'll handle */
00168 
00169 /***************************************************************************/
00170 /*                          if_wivar.h                                     */
00171 /***************************************************************************/
00172 
00173 /*
00174  * FirmwareType
00175 */
00176 #define WI_NOTYPE                 0
00177 #define WI_LUCENT                 1
00178 #define WI_INTERSIL               2
00179 #define WI_SYMBOL                 3
00180 
00181 /*
00182  * Encryption controls. We can enable or disable encryption as
00183  * well as specify up to 4 encryption keys. We can also specify
00184  * which of the four keys will be used for transmit encryption.
00185  */
00186 #define WI_RID_ENCRYPTION         0xFC20
00187 #define WI_RID_AUTHTYPE           0xFC21
00188 #define WI_RID_DEFLT_CRYPT_KEYS   0xFCB0
00189 #define WI_RID_TX_CRYPT_KEY       0xFCB1
00190 #define WI_RID_WEP_AVAIL          0xFD4F
00191 #define WI_RID_P2_TX_CRYPT_KEY    0xFC23
00192 #define WI_RID_P2_CRYPT_KEY0      0xFC24
00193 #define WI_RID_P2_CRYPT_KEY1      0xFC25
00194 #define WI_RID_MICROWAVE_OVEN     0xFC25
00195 #define WI_RID_P2_CRYPT_KEY2      0xFC26
00196 #define WI_RID_P2_CRYPT_KEY3      0xFC27
00197 #define WI_RID_P2_ENCRYPTION      0xFC28
00198 #define WI_RID_ROAMING_MODE       0xFC2D
00199 
00200 #define WI_PRISM_MIN_RSSI         0x1b
00201 #define WI_PRISM_MAX_RSSI         0x9a
00202 #define WI_PRISM_DBM_OFFSET       100
00203 
00204 #define WI_LUCENT_MIN_RSSI        47
00205 #define WI_LUCENT_MAX_RSSI        138
00206 #define WI_LUCENT_DBM_OFFSET      149
00207 
00208 /*
00209  * Various compat hacks/kludges
00210  */
00211 #define le16toh(x) (x)
00212 #define htole16(x) (x)
00213 
00214 /***************************************************************************/
00215 /*                          if_wireg.h                                     */
00216 /***************************************************************************/
00217 
00218 #define WI_DELAY        5UL /* Harald: Added UL specifiers. However that worked before */
00219 #define WI_TIMEOUT      (500000UL/WI_DELAY) /* 500 ms */ /* Harald: Same here */
00220 
00221 #define WI_PORT0        (0 << 8)
00222 #define WI_PORT1        (1 << 8)
00223 #define WI_PORT2        (2 << 8)
00224 #define WI_PORT3        (3 << 8)
00225 #define WI_PORT4        (4 << 8)
00226 #define WI_PORT5        (5 << 8)
00227 
00228 #define WI_HFA384X_SWSUPPORT0_OFF 0x28
00229 #define WI_PRISM2STA_MAGIC        0x4A2D
00230 
00231 /* Default port: 0 (only 0 exists on stations) */
00232 #define WI_DEFAULT_PORT WI_PORT0
00233 
00234 #define WI_DEFAULT_ROAMING      1
00235 
00236 #define WI_DEFAULT_AUTHTYPE     1
00237 
00238 /*
00239  * Hermes & Prism2 register definitions 
00240  */
00241 
00242 /* Hermes command/status registers. */
00243 #define WI_COMMAND              0x00
00244 #define WI_PARAM0               0x02
00245 #define WI_PARAM1               0x04
00246 #define WI_PARAM2               0x06
00247 #define WI_STATUS               0x08
00248 #define WI_RESP0                0x0A
00249 #define WI_RESP1                0x0C
00250 #define WI_RESP2                0x0E
00251 
00252 /* Command register values. */
00253 #define WI_CMD_BUSY             0x8000  /* busy bit */
00254 #define WI_CMD_INI              0x0000  /* initialize */
00255 #define WI_CMD_ENABLE           0x0001  /* enable */
00256 #define WI_CMD_DISABLE          0x0002  /* disable */
00257 #define WI_CMD_DIAG             0x0003
00258 #define WI_CMD_ALLOC_MEM        0x000A  /* allocate NIC memory */
00259 #define WI_CMD_TX               0x000B  /* transmit */
00260 #define WI_CMD_NOTIFY           0x0010
00261 #define WI_CMD_INQUIRE          0x0011
00262 #define WI_CMD_ACCESS           0x0021
00263 #define WI_CMD_ACCESS_WRITE     0x0121
00264 #define WI_CMD_PROGRAM          0x0022
00265 #define WI_CMD_READEE           0x0030  /* symbol only */
00266 #define WI_CMD_READMIF          0x0030  /* prism2 */
00267 #define WI_CMD_WRITEMIF         0x0031  /* prism2 */
00268 #define WI_CMD_DEBUG            0x0038  /* Various test commands */
00269 
00270 #define WI_CMD_CODE_MASK        0x003F
00271 
00272 /*
00273  * Various cmd test stuff.
00274  */
00275 #define WI_TEST_MONITOR         0x0B
00276 #define WI_TEST_STOP            0x0F
00277 #define WI_TEST_CFG_BITS        0x15
00278 #define WI_TEST_CFG_BIT_ALC     0x08
00279 
00280 /*
00281  * Reclaim qualifier bit, applicable to the
00282  * TX and INQUIRE commands.
00283  */
00284 #define WI_RECLAIM              0x0100  /* reclaim NIC memory */
00285 
00286 /*
00287  * ACCESS command qualifier bits.
00288  */
00289 #define WI_ACCESS_READ          0x0000
00290 #define WI_ACCESS_WRITE         0x0100
00291 
00292 
00293 /* Status register values */
00294 #define WI_STAT_CMD_CODE        0x003F
00295 #define WI_STAT_DIAG_ERR        0x0100
00296 #define WI_STAT_INQ_ERR         0x0500
00297 #define WI_STAT_CMD_RESULT      0x7F00
00298 
00299 /* memory handle management registers */
00300 #define WI_INFO_FID             0x10
00301 #define WI_RX_FID               0x20
00302 #define WI_ALLOC_FID            0x22
00303 #define WI_TX_CMP_FID           0x24
00304 
00305 /*
00306  * Buffer Access Path (BAP) registers.
00307  * These are I/O channels. I believe you can use each one for
00308  * any desired purpose independently of the other. In general
00309  * though, we use BAP1 for reading and writing LTV records and
00310  * reading received data frames, and BAP0 for writing transmit
00311  * frames. This is a convention though, not a rule.
00312  */
00313 #define WI_SEL0                 0x18
00314 #define WI_SEL1                 0x1A
00315 #define WI_OFF0                 0x1C
00316 #define WI_OFF1                 0x1E
00317 #define WI_DATA0                0x36
00318 #define WI_DATA1                0x38
00319 #define WI_BAP0                 WI_DATA0
00320 #define WI_BAP1                 WI_DATA1
00321 
00322 #define WI_OFF_BUSY             0x8000
00323 #define WI_OFF_ERR              0x4000
00324 #define WI_OFF_DATAOFF          0x0FFF
00325 
00326 /* Event registers */
00327 #define WI_EVENT_STAT           0x30      /* Event status */
00328 #define WI_INT_EN               0x32      /* Interrupt enable/disable */
00329 #define WI_EVENT_ACK            0x34      /* Ack event */
00330 
00331 /* Events */
00332 #define WI_EV_TICK              0x8000  /* aux timer tick */
00333 #define WI_EV_RES               0x4000  /* controller h/w error (time out) */
00334 #define WI_EV_INFO_DROP         0x2000  /* no RAM to build unsolicited frame */
00335 #define WI_EV_NO_CARD           0x0800  /* card removed (hunh?) */
00336 #define WI_EV_DUIF_RX           0x0400  /* wavelan management packet received */
00337 #define WI_EV_INFO              0x0080  /* async info frame */
00338 #define WI_EV_CMD               0x0010  /* command completed */
00339 #define WI_EV_ALLOC             0x0008  /* async alloc/reclaim completed */
00340 #define WI_EV_TX_EXC            0x0004  /* async xmit completed with failure */
00341 #define WI_EV_TX                0x0002  /* async xmit completed succesfully */
00342 #define WI_EV_RX                0x0001  /* async rx completed */
00343 
00344 /*
00345  * PCMCIA Address definition
00346 */
00347 #define WI_COR_OFFSET           0x3e0
00348 #define WI_COR_VALUE            0x41
00349 
00350 /* 
00351  * Define card ident 
00352 */
00353 #define WI_NIC_LUCENT_ID          0x0001
00354 #define WI_NIC_LUCENT_STR         "Lucent Technologies, WaveLAN/IEEE"
00355 
00356 #define WI_NIC_SONY_ID            0x0002
00357 #define WI_NIC_SONY_STR           "Sony WaveLAN/IEEE"
00358 
00359 #define WI_NIC_LUCENT_EMB_ID      0x0005
00360 #define WI_NIC_LUCENT_EMB_STR       "Lucent Embedded WaveLAN/IEEE"
00361 
00362 #define WI_NIC_EVB2_ID            0x8000
00363 #define WI_NIC_EVB2_STR           "RF:PRISM2 MAC:HFA3841"
00364 
00365 #define WI_NIC_HWB3763_ID         0x8001
00366 #define WI_NIC_HWB3763_STR            "RF:PRISM2 MAC:HFA3841 CARD:HWB3763 rev.B"
00367 
00368 #define WI_NIC_HWB3163_ID         0x8002
00369 #define WI_NIC_HWB3163_STR        "RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.A"
00370 
00371 #define WI_NIC_HWB3163B_ID        0x8003
00372 #define WI_NIC_HWB3163B_STR       "RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.B"
00373 
00374 #define WI_NIC_EVB3_ID            0x8004
00375 #define WI_NIC_EVB3_STR           "RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"
00376 
00377 #define WI_NIC_HWB1153_ID         0x8007
00378 #define WI_NIC_HWB1153_STR        "RF:PRISM1 MAC:HFA3841 CARD:HWB1153"
00379 
00380 #define WI_NIC_P2_SST_ID          0x8008  /* Prism2 with SST flush */
00381 #define WI_NIC_P2_SST_STR         "RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"
00382 
00383 #define WI_NIC_EVB2_SST_ID        0x8009
00384 #define WI_NIC_EVB2_SST_STR       "RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"
00385 
00386 #define WI_NIC_3842_EVA_ID        0x800A  /* 3842 Evaluation Board */
00387 #define WI_NIC_3842_EVA_STR       "RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"
00388 
00389 #define WI_NIC_3842_PCMCIA_AMD_ID       0x800B  /* Prism2.5 PCMCIA */
00390 #define WI_NIC_3842_PCMCIA_SST_ID       0x800C
00391 #define WI_NIC_3842_PCMCIA_ATL_ID       0x800D
00392 #define WI_NIC_3842_PCMCIA_ATS_ID       0x800E
00393 #define WI_NIC_3842_PCMCIA_STR          "RF:PRISM2.5 MAC:ISL3873"
00394 
00395 #define WI_NIC_3842_MINI_AMD_ID   0x8012  /* Prism2.5 Mini-PCI */
00396 #define WI_NIC_3842_MINI_SST_ID   0x8013
00397 #define WI_NIC_3842_MINI_ATL_ID   0x8014
00398 #define WI_NIC_3842_MINI_ATS_ID   0x8015
00399 #define WI_NIC_3842_MINI_STR      "RF:PRISM2.5 MAC:ISL3874A(Mini-PCI)"
00400 
00401 #define WI_NIC_3842_PCI_AMD_ID    0x8016  /* Prism2.5 PCI-bridge */
00402 #define WI_NIC_3842_PCI_SST_ID    0x8017
00403 #define WI_NIC_3842_PCI_ATL_ID    0x8018
00404 #define WI_NIC_3842_PCI_ATS_ID    0x8019
00405 #define WI_NIC_3842_PCI_STR       "RF:PRISM2.5 MAC:ISL3874A(PCI-bridge)"
00406 
00407 #define WI_NIC_P3_PCMCIA_AMD_ID   0x801A  /* Prism3 PCMCIA */
00408 #define WI_NIC_P3_PCMCIA_SST_ID   0x801B
00409 #define WI_NIC_P3_PCMCIA_ATL_ID   0x801C
00410 #define WI_NIC_P3_PCMCIA_ATS_ID   0x801D
00411 #define WI_NIC_P3_PCMCIA_STR      "RF:PRISM3(PCMCIA)"
00412 
00413 #define WI_NIC_P3_MINI_AMD_ID     0x8021  /* Prism3 Mini-PCI */
00414 #define WI_NIC_P3_MINI_SST_ID     0x8022
00415 #define WI_NIC_P3_MINI_ATL_ID     0x8023
00416 #define WI_NIC_P3_MINI_ATS_ID     0x8024
00417 #define WI_NIC_P3_MINI_STR        "RF:PRISM3(Mini-PCI)"
00418 
00419 /*
00420  * Connection control characteristics. (0xFC00)
00421  * 0 == IBSS (802.11 compliant mode) (Only PRISM2)
00422  * 1 == Basic Service Set (BSS)
00423  * 2 == Wireless Distribudion System (WDS)
00424  * 3 == Pseudo IBSS 
00425  *      (Only PRISM2; not 802.11 compliant mode, testing use only)
00426  * 6 == HOST AP (Only PRISM2)
00427  */
00428 #define WI_PORTTYPE_IBSS    0x0
00429 #define WI_PORTTYPE_BSS     0x1
00430 #define WI_PORTTYPE_WDS     0x2
00431 #define WI_PORTTYPE_ADHOC   0x3
00432 #define WI_PORTTYPE_HOSTAP  0x6
00433 
00434 /*
00435  * Information frame types.
00436 */
00437 #define WI_INFO_NOTIFY                  0xF000  /* Handover address */
00438 #define WI_INFO_COUNTERS                0xF100  /* Statistics counters */
00439 #define WI_INFO_SCAN_RESULTS            0xF101  /* Scan results */
00440 #define WI_INFO_HOST_SCAN_RESULTS       0xF104  /* Scan results */
00441 #define WI_INFO_LINK_STAT               0xF200  /* Link status */
00442 #define WI_INFO_LINK_STAT_CONNECTED     1
00443 #define WI_INFO_LINK_STAT_DISCONNECTED  2
00444 #define WI_INFO_LINK_STAT_AP_CHG        3 /* AP Change */
00445 #define WI_INFO_LINK_STAT_AP_OOR        4 /* AP Out Of Range */
00446 #define WI_INFO_LINK_STAT_AP_INR        5 /* AP In Range */
00447 #define WI_INFO_LINK_STAT_ASSOC_FAILED  6
00448 #define WI_INFO_ASSOC_STAT              0xF201  /* Association status */
00449 #define WI_INFO_AUTH_REQUEST            0xF202  /* Authentication Request (AP) */
00450 #define WI_INFO_POWERSAVE_COUNT         0xF203  /* PowerSave User Count (AP) */
00451 
00452 /* Rx Status Field */
00453 #define WI_STAT_ERRSTAT                 0x0003
00454 
00455 
00456 /***************************************************************************/
00457 /*                          if_wavelan_ieee.h                              */
00458 /***************************************************************************/
00459 
00460 /*
00461  * Network parameters, static configuration entities.
00462  */
00463 #define WI_RID_PORTTYPE                 0xFC00  /* Connection control characteristics */
00464 #define WI_RID_MAC_NODE           0xFC01  /* MAC address of this station */
00465 #define WI_RID_DESIRED_SSID       0xFC02  /* Service Set ID for connection */
00466 #define WI_RID_OWN_CHNL           0xFC03  /* Comm channel for BSS creation */
00467 #define WI_RID_OWN_SSID           0xFC04  /* IBSS creation ID */
00468 #define WI_RID_OWN_ATIM_WIN           0xFC05  /* ATIM window time for IBSS creation */
00469 #define WI_RID_SYSTEM_SCALE           0xFC06  /* scale that specifies AP density */
00470 #define WI_RID_MAX_DATALEN        0xFC07  /* Max len of MAC frame body data */
00471 #define WI_RID_MAC_WDS            0xFC08  /* MAC addr of corresponding WDS node */
00472 #define WI_RID_PM_ENABLED         0xFC09  /* ESS power management enable */
00473 #define WI_RID_PM_EPS             0xFC0A  /* PM EPS/PS mode */
00474 #define WI_RID_MCAST_RX           0xFC0B  /* ESS PM mcast reception */
00475 #define WI_RID_MAX_SLEEP          0xFC0C  /* max sleep time for ESS PM */
00476 #define WI_RID_HOLDOVER           0xFC0D  /* holdover time for ESS PM */
00477 #define WI_RID_NODENAME           0xFC0E  /* ID name of this node for diag */
00478 #define WI_RID_DTIM_PERIOD        0xFC10  /* beacon interval between DTIMs */
00479 #define WI_RID_WDS_ADDR1          0xFC11  /* port 1 MAC of WDS link node */
00480 #define WI_RID_WDS_ADDR2          0xFC12  /* port 1 MAC of WDS link node */
00481 #define WI_RID_WDS_ADDR3          0xFC13  /* port 1 MAC of WDS link node */
00482 #define WI_RID_WDS_ADDR4          0xFC14  /* port 1 MAC of WDS link node */
00483 #define WI_RID_WDS_ADDR5          0xFC15  /* port 1 MAC of WDS link node */
00484 #define WI_RID_WDS_ADDR6          0xFC16  /* port 1 MAC of WDS link node */
00485 #define WI_RID_MCAST_PM_BUF       0xFC17  /* PM buffering of mcast */
00486 #define WI_RID_ENCRYPTION         0xFC20  /* enable/disable WEP */
00487 #define WI_RID_AUTHTYPE           0xFC21  /* specify authentication type */
00488 #define WI_RID_P2_TX_CRYPT_KEY    0xFC23
00489 #define WI_RID_P2_CRYPT_KEY0      0xFC24
00490 #define WI_RID_P2_CRYPT_KEY1      0xFC25
00491 #define WI_RID_MICROWAVE_OVEN     0xFC25
00492 #define WI_RID_P2_CRYPT_KEY2      0xFC26
00493 #define WI_RID_P2_CRYPT_KEY3      0xFC27
00494 #define WI_RID_P2_ENCRYPTION      0xFC28
00495 #define  PRIVACY_INVOKED          0x01
00496 #define  EXCLUDE_UNENCRYPTED      0x02
00497 #define  HOST_ENCRYPT             0x10
00498 #define  IV_EVERY_FRAME           0x00    /* IV = Initialization Vector */
00499 #define  IV_EVERY10_FRAME         0x20    /* every 10 frame IV reuse */
00500 #define  IV_EVERY50_FRAME         0x40    /* every 50 frame IV reuse */
00501 #define  IV_EVERY100_FRAME        0x60    /* every 100 frame IV reuse */
00502 #define  HOST_DECRYPT             0x80
00503 #define WI_RID_WEP_MAPTABLE       0xFC29
00504 #define WI_RID_CNFAUTHMODE        0xFC2A
00505 #define WI_RID_ROAMING_MODE       0xFC2D
00506 #define WI_RID_OWN_BEACON_INT     0xFC33  /* beacon xmit time for BSS creation */
00507 #define WI_RID_CNF_DBM_ADJUST     0xFC46
00508 #define WI_RID_DBM_ADJUST         0xFC46  /* RSSI - WI_RID_DBM_ADJUST ~ dBm */
00509 #define WI_RID_BASIC_RATE         0xFCB3
00510 #define WI_RID_SUPPORT_RATE       0xFCB4
00511 
00512 /*
00513  * Network parameters, dynamic configuration entities
00514  */
00515 #define WI_RID_MCAST_LIST         0xFC80  /* list of multicast addrs */
00516 #define WI_RID_CREATE_IBSS        0xFC81  /* create IBSS */
00517 #define WI_RID_FRAG_THRESH        0xFC82  /* frag len, unicast msg xmit */
00518 #define WI_RID_RTS_THRESH         0xFC83  /* frame len for RTS/CTS handshake */
00519 #define WI_RID_TX_RATE            0xFC84  /* data rate for message xmit */
00520                                           /* 0 == Fixed 1mbps */
00521                                           /* 1 == Fixed 2mbps */
00522                                           /* 2 == auto fallback */                                  
00523 #define WI_RID_PROMISC            0xFC85  /* enable promisc mode */
00524 #define WI_RID_FRAG_THRESH0       0xFC90
00525 #define WI_RID_FRAG_THRESH1           0xFC91
00526 #define WI_RID_FRAG_THRESH2           0xFC92
00527 #define WI_RID_FRAG_THRESH3           0xFC93
00528 #define WI_RID_FRAG_THRESH4           0xFC94
00529 #define WI_RID_FRAG_THRESH5           0xFC95
00530 #define WI_RID_FRAG_THRESH6           0xFC96
00531 #define WI_RID_RTS_THRESH0        0xFC97
00532 #define WI_RID_RTS_THRESH1        0xFC98
00533 #define WI_RID_RTS_THRESH2        0xFC99
00534 #define WI_RID_RTS_THRESH3        0xFC9A
00535 #define WI_RID_RTS_THRESH4        0xFC9B
00536 #define WI_RID_RTS_THRESH5        0xFC9C
00537 #define WI_RID_RTS_THRESH6        0xFC9D
00538 #define WI_RID_TX_RATE0           0xFC9E
00539 #define WI_RID_TX_RATE1           0xFC9F
00540 #define WI_RID_TX_RATE2           0xFCA0
00541 #define WI_RID_TX_RATE3           0xFCA1
00542 #define WI_RID_TX_RATE4           0xFCA2
00543 #define WI_RID_TX_RATE5           0xFCA3
00544 #define WI_RID_TX_RATE6           0xFCA4
00545 #define WI_RID_DEFLT_CRYPT_KEYS   0xFCB0
00546 #define WI_RID_TX_CRYPT_KEY       0xFCB1
00547 #define WI_RID_TICK_TIME          0xFCE0
00548 
00549 
00550 struct wi_key {
00551         u_int16_t               wi_keylen;
00552         u_int8_t                wi_keydat[14];
00553 };
00554 
00555 
00556 /*
00557  * NIC information
00558 */
00559 #define WI_RID_DNLD_BUF           0xFD01
00560 #define WI_RID_MEMSZ              0xFD02  /* memory size info (XXX Lucent) */
00561                                           /*  Looks like on lucnet pri firm too */
00562 #define WI_RID_PRI_IDENTITY       0xFD02  /* primary funcs firmware ident (PRISM2) */
00563 #define WI_RID_PRI_SUP_RANGE      0xFD03  /* primary supplier compatibility */
00564 #define WI_RID_CIF_ACT_RANGE      0xFD04  /* controller sup. compatibility */
00565 #define WI_RID_SERIALNO           0xFD0A  /* card serial number */
00566 #define WI_RID_CARD_ID            0xFD0B  /* card identification */
00567 #define WI_RID_MFI_SUP_RANGE      0xFD0C  /* modem supplier compatibility */
00568 #define WI_RID_CFI_SUP_RANGE      0xFD0D  /* controller sup. compatibility */
00569 #define WI_RID_CHANNEL_LIST       0xFD10  /* allowd comm. frequencies. */
00570 #define WI_RID_REG_DOMAINS        0xFD11  /* list of intendted regulatory doms */
00571 #define WI_RID_TEMP_TYPE          0xFD12  /* hw temp range code */
00572 #define WI_RID_CIS                0xFD13  /* PC card info struct */
00573 #define WI_RID_STA_IDENTITY       0xFD20  /* station funcs firmware ident */
00574 #define WI_RID_STA_SUP_RANGE      0xFD21  /* station supplier compat */
00575 #define WI_RID_MFI_ACT_RANGE      0xFD22
00576 #define WI_RID_SYMBOL_IDENTITY    0xFD24
00577 #define WI_RID_CFI_ACT_RANGE      0xFD33
00578 #define WI_RID_COMMQUAL           0xFD43
00579 #define WI_RID_SCALETHRESH        0xFD46
00580 #define WI_RID_PCF                0xFD87
00581 
00582 /*
00583  * MAC information
00584 */
00585 #define WI_RID_PORT_STAT          0xFD40  /* actual MAC port con control stat */
00586 #define WI_RID_CURRENT_SSID       0xFD41  /* ID of actually connected SS */
00587 #define WI_RID_CURRENT_BSSID      0xFD42  /* ID of actually connected BSS */
00588 #define WI_RID_COMMS_QUALITY      0xFD43  /* quality of BSS connection */
00589 #define WI_RID_CUR_TX_RATE        0xFD44  /* current TX rate */
00590 #define WI_RID_CUR_BEACON_INT     0xFD45  /* current beacon interval */
00591 #define WI_RID_CUR_SCALE_THRESH   0xFD46  /* actual system scane thresh setting */
00592 #define WI_RID_PROT_RESP_TIME     0xFD47  /* time to wait for resp to req msg */
00593 #define WI_RID_SHORT_RTR_LIM      0xFD48  /* max tx attempts for short frames */
00594 #define WI_RID_LONG_RTS_LIM       0xFD49  /* max tx attempts for long frames */
00595 #define WI_RID_MAX_TX_LIFE        0xFD4A  /* max tx frame handling duration */
00596 #define WI_RID_MAX_RX_LIFE        0xFD4B  /* max rx frame handling duration */
00597 #define WI_RID_CF_POLL            0xFD4C  /* contention free pollable ind */
00598 #define WI_RID_AUTH_ALGS          0xFD4D  /* auth algorithms available */
00599 #define WI_RID_AUTH_TYPE          0xFD4E  /* availanle auth types */
00600 #define WI_RID_WEP_AVAIL          0xFD4F  /* WEP privacy option available */
00601 #define WI_RID_DBM_COMMS_QUAL     0xFD51  /* CommQuality normalized to dBm */
00602 #define WI_RID_CUR_TX_RATE1       0xFD80
00603 #define WI_RID_CUR_TX_RATE2       0xFD81
00604 #define WI_RID_CUR_TX_RATE3       0xFD82
00605 #define WI_RID_CUR_TX_RATE4       0xFD83
00606 #define WI_RID_CUR_TX_RATE5       0xFD84
00607 #define WI_RID_CUR_TX_RATE6       0xFD85
00608 #define WI_RID_OWN_MAC            0xFD86  /* unique local MAC addr */
00609 #define WI_RID_PCI_INFO           0xFD87  /* point coordination func cap */
00610 
00611 /*
00612  * Modem information
00613  */
00614 #define WI_RID_PHY_TYPE           0xFDC0  /* phys layer type indication */
00615 #define WI_RID_CURRENT_CHAN       0xFDC1  /* current frequency */
00616 #define WI_RID_PWR_STATE          0xFDC2  /* pwr consumption status */
00617 #define WI_RID_CCA_MODE           0xFDC3  /* clear chan assess mode indication */
00618 #define WI_RID_CCA_TIME           0xFDC4  /* clear chan assess time */
00619 #define WI_RID_MAC_PROC_DELAY     0xFDC5  /* MAC processing delay time */
00620 #define WI_RID_DATA_RATES               0xFDC6  /* supported data rates */
00621 
00622 #endif /* !__WLANDEF_H__ */