⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wlandef.h

📁 含有完整TCP/IP PPP协议的嵌入式操作系统
💻 H
📖 第 1 页 / 共 2 页
字号:
/*****************************************************************************  This file is part of the WLAN-Ethernut device driver.**  Copyright (c) 2004 by Michael Fischer. All rights reserved.**  Redistribution and use in source and binary forms, with or without *  modification, are permitted provided that the following conditions *  are met:*  *  1. Redistributions of source code must retain the above copyright *     notice, this list of conditions and the following disclaimer.*  2. Redistributions in binary form must reproduce the above copyright*     notice, this list of conditions and the following disclaimer in the *     documentation and/or other materials provided with the distribution.*  3. Neither the name of the author nor the names of its contributors may *     be used to endorse or promote products derived from this software *     without specific prior written permission.**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED *  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF *  THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF *  SUCH DAMAGE.******************************************************************************  Portions Copyright: **  Copyright (c) 2001 Atsushi Onoe*  Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting*  Copyright (c) 2002 M Warner Losh <imp@freebsd.org>.  All rights reserved.*  Copyright (c) 1997, 1998, 1999*	 Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.**  Redistribution and use in source and binary forms, with or without*  modification, are permitted provided that the following conditions*  are met:*  1. Redistributions of source code must retain the above copyright*     notice, this list of conditions and the following disclaimer.*  2. Redistributions in binary form must reproduce the above copyright*     notice, this list of conditions and the following disclaimer in the*     documentation and/or other materials provided with the distribution.*  3. Neither the name of the author nor the names of any co-contributors*     may be used to endorse or promote products derived from this software*     without specific prior written permission.**  THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND*  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE*  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE*  ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD*  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR*  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF*  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS*  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN*  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)*  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF*  THE POSSIBILITY OF SUCH DAMAGE.******************************************************************************  History:**  28.02.04  mifi   First Version *                   This file is a mix of several FreeBSD header files.*                   I have put all the files together, because it was*                   difficult to use the original files. I have try this*                   but I must comment out to much to get it to work.*                   Here in this file you will fimd ONLY defines. All*                   the structs you will find in wlandrv.h.****************************************************************************/#ifndef __WLANDEF_H__#define __WLANDEF_H__/*-------------------------------------------------------------------------*//* global defines                                                          *//*-------------------------------------------------------------------------*//***************************************************************************//*                         ieee80211.h                                     *//***************************************************************************/enum {  IEEE80211_AUTH_NONE   = 0,  IEEE80211_AUTH_OPEN   = 1,  IEEE80211_AUTH_SHARED = 2,};#define	IEEE80211_RATE_BASIC      0x80#define	IEEE80211_RATE_VAL			  0x7f    /* * Maximum acceptable MTU is: *	IEEE80211_MAX_LEN - WEP overhead - CRC - *		QoS overhead - RSN/WPA overhead * Min is arbitrarily chosen > IEEE80211_MIN_LEN.  The default * mtu is Ethernet-compatible; it's set by ether_ifattach. */#define	IEEE80211_MTU_MAX			    2290#define	IEEE80211_MTU_MIN			    32 #define	IEEE80211_MAX_LEN			(2300 + IEEE80211_CRC_LEN + \    (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))    /***************************************************************************//*                      ieee80211_var.h                                    *//***************************************************************************//* * 802.11 definitions */#define IEEE80211_CHAN_MAX        32#define	IEEE80211_CHAN_ANY	      0xffff  /* token for ``any channel'' */#define	IEEE80211_CHAN_ANYC \	((struct ieee80211_channel *) IEEE80211_CHAN_ANY)/* XXX not really a mode; there are really multiple PHY's */enum ieee80211_phymode {  IEEE80211_MODE_AUTO  = 0,               /* autoselect */  IEEE80211_MODE_11A   = 1,               /* 5GHz, OFDM */  IEEE80211_MODE_11B   = 2,               /* 2GHz, CCK */  IEEE80211_MODE_11G   = 3,               /* 2GHz, OFDM */  IEEE80211_MODE_FH    = 4,               /* 2GHz, GFSK */  IEEE80211_MODE_TURBO = 5,               /* 5GHz, OFDM, 2x clock */};#define	IEEE80211_MODE_MAX	(IEEE80211_MODE_TURBO+1)/* bits 0-3 are for private use by drivers *//* channel attributes */#define	IEEE80211_CHAN_TURBO      0x0010  /* Turbo channel */#define	IEEE80211_CHAN_CCK        0x0020  /* CCK channel */#define	IEEE80211_CHAN_OFDM       0x0040  /* OFDM channel */#define	IEEE80211_CHAN_2GHZ       0x0080  /* 2 GHz spectrum channel. */#define	IEEE80211_CHAN_5GHZ       0x0100  /* 5 GHz spectrum channel */#define	IEEE80211_CHAN_PASSIVE    0x0200  /* Only passive scan allowed */#define	IEEE80211_CHAN_DYN        0x0400  /* Dynamic CCK-OFDM channel */#define	IEEE80211_CHAN_GFSK       0x0800  /* GFSK channel (FHSS PHY) *//* * Useful combinations of channel characteristics. */#define	IEEE80211_CHAN_FHSS \	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)#define	IEEE80211_CHAN_A \	(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)#define	IEEE80211_CHAN_B \	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)#define	IEEE80211_CHAN_PUREG \	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)#define	IEEE80211_CHAN_G \	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)#define	IEEE80211_CHAN_T \	(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)/***************************************************************************//*                      ieee80211_node.h                                   *//***************************************************************************/#define	IEEE80211_RATE_SIZE	      8       /* 802.11 standard */#define	IEEE80211_RATE_MAXSIZE	  15      /* max rates we'll handle *//***************************************************************************//*                          if_wivar.h                                     *//***************************************************************************//* * FirmwareType*/#define WI_NOTYPE                 0#define	WI_LUCENT                 1#define	WI_INTERSIL               2#define	WI_SYMBOL                 3/* * Encryption controls. We can enable or disable encryption as * well as specify up to 4 encryption keys. We can also specify * which of the four keys will be used for transmit encryption. */#define WI_RID_ENCRYPTION         0xFC20#define WI_RID_AUTHTYPE           0xFC21#define WI_RID_DEFLT_CRYPT_KEYS   0xFCB0#define WI_RID_TX_CRYPT_KEY       0xFCB1#define WI_RID_WEP_AVAIL          0xFD4F#define WI_RID_P2_TX_CRYPT_KEY    0xFC23#define WI_RID_P2_CRYPT_KEY0      0xFC24#define WI_RID_P2_CRYPT_KEY1      0xFC25#define WI_RID_MICROWAVE_OVEN     0xFC25#define WI_RID_P2_CRYPT_KEY2      0xFC26#define WI_RID_P2_CRYPT_KEY3      0xFC27#define WI_RID_P2_ENCRYPTION      0xFC28#define WI_RID_ROAMING_MODE       0xFC2D#define	WI_PRISM_MIN_RSSI         0x1b#define	WI_PRISM_MAX_RSSI         0x9a#define	WI_PRISM_DBM_OFFSET       100#define	WI_LUCENT_MIN_RSSI        47#define	WI_LUCENT_MAX_RSSI        138#define	WI_LUCENT_DBM_OFFSET      149/* * Various compat hacks/kludges */#define le16toh(x) (x)#define htole16(x) (x)/***************************************************************************//*                          if_wireg.h                                     *//***************************************************************************/#define WI_DELAY	5UL /* Harald: Added UL specifiers. However that worked before */#define WI_TIMEOUT	(500000UL/WI_DELAY) /* 500 ms */ /* Harald: Same here */#define WI_PORT0	(0 << 8)#define WI_PORT1	(1 << 8)#define WI_PORT2	(2 << 8)#define WI_PORT3	(3 << 8)#define WI_PORT4	(4 << 8)#define WI_PORT5	(5 << 8)#define WI_HFA384X_SWSUPPORT0_OFF 0x28#define WI_PRISM2STA_MAGIC        0x4A2D/* Default port: 0 (only 0 exists on stations) */#define WI_DEFAULT_PORT	WI_PORT0#define WI_DEFAULT_ROAMING	1#define WI_DEFAULT_AUTHTYPE	1/* * Hermes & Prism2 register definitions  *//* Hermes command/status registers. */#define WI_COMMAND              0x00#define WI_PARAM0               0x02#define WI_PARAM1               0x04#define WI_PARAM2               0x06#define WI_STATUS               0x08#define WI_RESP0                0x0A#define WI_RESP1                0x0C#define WI_RESP2                0x0E/* Command register values. */#define WI_CMD_BUSY             0x8000  /* busy bit */#define WI_CMD_INI              0x0000  /* initialize */#define WI_CMD_ENABLE           0x0001  /* enable */#define WI_CMD_DISABLE          0x0002  /* disable */#define WI_CMD_DIAG             0x0003#define WI_CMD_ALLOC_MEM        0x000A  /* allocate NIC memory */#define WI_CMD_TX               0x000B  /* transmit */#define WI_CMD_NOTIFY           0x0010#define WI_CMD_INQUIRE          0x0011#define WI_CMD_ACCESS           0x0021#define WI_CMD_ACCESS_WRITE     0x0121#define WI_CMD_PROGRAM          0x0022#define WI_CMD_READEE           0x0030	/* symbol only */#define WI_CMD_READMIF          0x0030	/* prism2 */#define WI_CMD_WRITEMIF         0x0031	/* prism2 */#define WI_CMD_DEBUG            0x0038	/* Various test commands */#define WI_CMD_CODE_MASK        0x003F/* * Various cmd test stuff. */#define WI_TEST_MONITOR         0x0B#define WI_TEST_STOP            0x0F#define WI_TEST_CFG_BITS        0x15#define WI_TEST_CFG_BIT_ALC     0x08/* * Reclaim qualifier bit, applicable to the * TX and INQUIRE commands. */#define WI_RECLAIM              0x0100  /* reclaim NIC memory *//* * ACCESS command qualifier bits. */#define WI_ACCESS_READ          0x0000#define WI_ACCESS_WRITE         0x0100/* Status register values */#define WI_STAT_CMD_CODE        0x003F#define WI_STAT_DIAG_ERR        0x0100#define WI_STAT_INQ_ERR         0x0500#define WI_STAT_CMD_RESULT      0x7F00/* memory handle management registers */#define WI_INFO_FID             0x10#define WI_RX_FID               0x20#define WI_ALLOC_FID            0x22#define WI_TX_CMP_FID           0x24/* * Buffer Access Path (BAP) registers. * These are I/O channels. I believe you can use each one for * any desired purpose independently of the other. In general * though, we use BAP1 for reading and writing LTV records and * reading received data frames, and BAP0 for writing transmit * frames. This is a convention though, not a rule. */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -