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

📄 ipw2200.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 4 页
字号:
/******************************************************************************  Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.  This program is free software; you can redistribute it and/or modify it  under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation.  This program is distributed in the hope that it will be useful, but WITHOUT  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for  more details.  You should have received a copy of the GNU General Public License along with  this program; if not, write to the Free Software Foundation, Inc., 59  Temple Place - Suite 330, Boston, MA  02111-1307, USA.  The full GNU General Public License is included in this distribution in the  file called LICENSE.  Contact Information:  James P. Ketrenos <ipw2100-admin@linux.intel.com>  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497******************************************************************************/#ifndef __ipw2200_h__#define __ipw2200_h__#define WEXT_USECHANNELS 1#include <linux/module.h>#include <linux/moduleparam.h>#include <linux/config.h>#include <linux/init.h>#include <linux/pci.h>#include <linux/netdevice.h>#include <linux/ethtool.h>#include <linux/skbuff.h>#include <linux/etherdevice.h>#include <linux/delay.h>#include <linux/random.h>#include <linux/dma-mapping.h>#include <linux/firmware.h>#include <linux/wireless.h>#include <linux/dma-mapping.h>#include <asm/io.h>#include <net/ieee80211.h>#include <net/ieee80211_radiotap.h>#define DRV_NAME	"ipw2200"#include <linux/workqueue.h>/* Authentication  and Association States */enum connection_manager_assoc_states {	CMAS_INIT = 0,	CMAS_TX_AUTH_SEQ_1,	CMAS_RX_AUTH_SEQ_2,	CMAS_AUTH_SEQ_1_PASS,	CMAS_AUTH_SEQ_1_FAIL,	CMAS_TX_AUTH_SEQ_3,	CMAS_RX_AUTH_SEQ_4,	CMAS_AUTH_SEQ_2_PASS,	CMAS_AUTH_SEQ_2_FAIL,	CMAS_AUTHENTICATED,	CMAS_TX_ASSOC,	CMAS_RX_ASSOC_RESP,	CMAS_ASSOCIATED,	CMAS_LAST};#define IPW_WAIT                     (1<<0)#define IPW_QUIET                    (1<<1)#define IPW_ROAMING                  (1<<2)#define IPW_POWER_MODE_CAM           0x00	//(always on)#define IPW_POWER_INDEX_1            0x01#define IPW_POWER_INDEX_2            0x02#define IPW_POWER_INDEX_3            0x03#define IPW_POWER_INDEX_4            0x04#define IPW_POWER_INDEX_5            0x05#define IPW_POWER_AC                 0x06#define IPW_POWER_BATTERY            0x07#define IPW_POWER_LIMIT              0x07#define IPW_POWER_MASK               0x0F#define IPW_POWER_ENABLED            0x10#define IPW_POWER_LEVEL(x)           ((x) & IPW_POWER_MASK)#define IPW_CMD_HOST_COMPLETE                 2#define IPW_CMD_POWER_DOWN                    4#define IPW_CMD_SYSTEM_CONFIG                 6#define IPW_CMD_MULTICAST_ADDRESS             7#define IPW_CMD_SSID                          8#define IPW_CMD_ADAPTER_ADDRESS              11#define IPW_CMD_PORT_TYPE                    12#define IPW_CMD_RTS_THRESHOLD                15#define IPW_CMD_FRAG_THRESHOLD               16#define IPW_CMD_POWER_MODE                   17#define IPW_CMD_WEP_KEY                      18#define IPW_CMD_TGI_TX_KEY                   19#define IPW_CMD_SCAN_REQUEST                 20#define IPW_CMD_ASSOCIATE                    21#define IPW_CMD_SUPPORTED_RATES              22#define IPW_CMD_SCAN_ABORT                   23#define IPW_CMD_TX_FLUSH                     24#define IPW_CMD_QOS_PARAMETERS               25#define IPW_CMD_SCAN_REQUEST_EXT             26#define IPW_CMD_DINO_CONFIG                  30#define IPW_CMD_RSN_CAPABILITIES             31#define IPW_CMD_RX_KEY                       32#define IPW_CMD_CARD_DISABLE                 33#define IPW_CMD_SEED_NUMBER                  34#define IPW_CMD_TX_POWER                     35#define IPW_CMD_COUNTRY_INFO                 36#define IPW_CMD_AIRONET_INFO                 37#define IPW_CMD_AP_TX_POWER                  38#define IPW_CMD_CCKM_INFO                    39#define IPW_CMD_CCX_VER_INFO                 40#define IPW_CMD_SET_CALIBRATION              41#define IPW_CMD_SENSITIVITY_CALIB            42#define IPW_CMD_RETRY_LIMIT                  51#define IPW_CMD_IPW_PRE_POWER_DOWN           58#define IPW_CMD_VAP_BEACON_TEMPLATE          60#define IPW_CMD_VAP_DTIM_PERIOD              61#define IPW_CMD_EXT_SUPPORTED_RATES          62#define IPW_CMD_VAP_LOCAL_TX_PWR_CONSTRAINT  63#define IPW_CMD_VAP_QUIET_INTERVALS          64#define IPW_CMD_VAP_CHANNEL_SWITCH           65#define IPW_CMD_VAP_MANDATORY_CHANNELS       66#define IPW_CMD_VAP_CELL_PWR_LIMIT           67#define IPW_CMD_VAP_CF_PARAM_SET             68#define IPW_CMD_VAP_SET_BEACONING_STATE      69#define IPW_CMD_MEASUREMENT                  80#define IPW_CMD_POWER_CAPABILITY             81#define IPW_CMD_SUPPORTED_CHANNELS           82#define IPW_CMD_TPC_REPORT                   83#define IPW_CMD_WME_INFO                     84#define IPW_CMD_PRODUCTION_COMMAND	     85#define IPW_CMD_LINKSYS_EOU_INFO             90#define RFD_SIZE                              4#define NUM_TFD_CHUNKS                        6#define TX_QUEUE_SIZE                        32#define RX_QUEUE_SIZE                        32#define DINO_CMD_WEP_KEY                   0x08#define DINO_CMD_TX                        0x0B#define DCT_ANTENNA_A                      0x01#define DCT_ANTENNA_B                      0x02#define IPW_A_MODE                         0#define IPW_B_MODE                         1#define IPW_G_MODE                         2/* * TX Queue Flag Definitions *//* tx wep key definition */#define DCT_WEP_KEY_NOT_IMMIDIATE	0x00#define DCT_WEP_KEY_64Bit		0x40#define DCT_WEP_KEY_128Bit		0x80#define DCT_WEP_KEY_128bitIV		0xC0#define DCT_WEP_KEY_SIZE_MASK		0xC0#define DCT_WEP_KEY_INDEX_MASK		0x0F#define DCT_WEP_INDEX_USE_IMMEDIATE	0x20/* abort attempt if mgmt frame is rx'd */#define DCT_FLAG_ABORT_MGMT                0x01/* require CTS */#define DCT_FLAG_CTS_REQUIRED              0x02/* use short preamble */#define DCT_FLAG_LONG_PREAMBLE             0x00#define DCT_FLAG_SHORT_PREAMBLE            0x04/* RTS/CTS first */#define DCT_FLAG_RTS_REQD                  0x08/* dont calculate duration field */#define DCT_FLAG_DUR_SET                   0x10/* even if MAC WEP set (allows pre-encrypt) */#define DCT_FLAG_NO_WEP              0x20/* overwrite TSF field */#define DCT_FLAG_TSF_REQD                  0x40/* ACK rx is expected to follow */#define DCT_FLAG_ACK_REQD                  0x80/* TX flags extension */#define DCT_FLAG_EXT_MODE_CCK  0x01#define DCT_FLAG_EXT_MODE_OFDM 0x00#define DCT_FLAG_EXT_SECURITY_WEP     0x00#define DCT_FLAG_EXT_SECURITY_NO      DCT_FLAG_EXT_SECURITY_WEP#define DCT_FLAG_EXT_SECURITY_CKIP    0x04#define DCT_FLAG_EXT_SECURITY_CCM     0x08#define DCT_FLAG_EXT_SECURITY_TKIP    0x0C#define DCT_FLAG_EXT_SECURITY_MASK    0x0C#define DCT_FLAG_EXT_QOS_ENABLED      0x10#define DCT_FLAG_EXT_HC_NO_SIFS_PIFS  0x00#define DCT_FLAG_EXT_HC_SIFS          0x20#define DCT_FLAG_EXT_HC_PIFS          0x40#define TX_RX_TYPE_MASK                    0xFF#define TX_FRAME_TYPE                      0x00#define TX_HOST_COMMAND_TYPE               0x01#define RX_FRAME_TYPE                      0x09#define RX_HOST_NOTIFICATION_TYPE          0x03#define RX_HOST_CMD_RESPONSE_TYPE          0x04#define RX_TX_FRAME_RESPONSE_TYPE          0x05#define TFD_NEED_IRQ_MASK                  0x04#define HOST_CMD_DINO_CONFIG               30#define HOST_NOTIFICATION_STATUS_ASSOCIATED             10#define HOST_NOTIFICATION_STATUS_AUTHENTICATE           11#define HOST_NOTIFICATION_STATUS_SCAN_CHANNEL_RESULT    12#define HOST_NOTIFICATION_STATUS_SCAN_COMPLETED         13#define HOST_NOTIFICATION_STATUS_FRAG_LENGTH            14#define HOST_NOTIFICATION_STATUS_LINK_DETERIORATION     15#define HOST_NOTIFICATION_DINO_CONFIG_RESPONSE          16#define HOST_NOTIFICATION_STATUS_BEACON_STATE           17#define HOST_NOTIFICATION_STATUS_TGI_TX_KEY             18#define HOST_NOTIFICATION_TX_STATUS                     19#define HOST_NOTIFICATION_CALIB_KEEP_RESULTS            20#define HOST_NOTIFICATION_MEASUREMENT_STARTED           21#define HOST_NOTIFICATION_MEASUREMENT_ENDED             22#define HOST_NOTIFICATION_CHANNEL_SWITCHED              23#define HOST_NOTIFICATION_RX_DURING_QUIET_PERIOD        24#define HOST_NOTIFICATION_NOISE_STATS			25#define HOST_NOTIFICATION_S36_MEASUREMENT_ACCEPTED      30#define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED       31#define HOST_NOTIFICATION_STATUS_BEACON_MISSING         1#define IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT           24#define IPW_MB_ROAMING_THRESHOLD_DEFAULT                8#define IPW_REAL_RATE_RX_PACKET_THRESHOLD               300#define MACADRR_BYTE_LEN                     6#define DCR_TYPE_AP                       0x01#define DCR_TYPE_WLAP                     0x02#define DCR_TYPE_MU_ESS                   0x03#define DCR_TYPE_MU_IBSS                  0x04#define DCR_TYPE_MU_PIBSS                 0x05#define DCR_TYPE_SNIFFER                  0x06#define DCR_TYPE_MU_BSS        DCR_TYPE_MU_ESS/* QoS  definitions */#define CW_MIN_OFDM          15#define CW_MAX_OFDM          1023#define CW_MIN_CCK           31#define CW_MAX_CCK           1023#define QOS_TX0_CW_MIN_OFDM      CW_MIN_OFDM#define QOS_TX1_CW_MIN_OFDM      CW_MIN_OFDM#define QOS_TX2_CW_MIN_OFDM      ( (CW_MIN_OFDM + 1) / 2 - 1 )#define QOS_TX3_CW_MIN_OFDM      ( (CW_MIN_OFDM + 1) / 4 - 1 )#define QOS_TX0_CW_MIN_CCK       CW_MIN_CCK#define QOS_TX1_CW_MIN_CCK       CW_MIN_CCK#define QOS_TX2_CW_MIN_CCK       ( (CW_MIN_CCK + 1) / 2 - 1 )#define QOS_TX3_CW_MIN_CCK       ( (CW_MIN_CCK + 1) / 4 - 1 )#define QOS_TX0_CW_MAX_OFDM      CW_MAX_OFDM#define QOS_TX1_CW_MAX_OFDM      CW_MAX_OFDM#define QOS_TX2_CW_MAX_OFDM      CW_MIN_OFDM#define QOS_TX3_CW_MAX_OFDM      ( (CW_MIN_OFDM + 1) / 2 - 1 )#define QOS_TX0_CW_MAX_CCK       CW_MAX_CCK#define QOS_TX1_CW_MAX_CCK       CW_MAX_CCK#define QOS_TX2_CW_MAX_CCK       CW_MIN_CCK#define QOS_TX3_CW_MAX_CCK       ( (CW_MIN_CCK + 1) / 2 - 1 )#define QOS_TX0_AIFS            (3 - QOS_AIFSN_MIN_VALUE)#define QOS_TX1_AIFS            (7 - QOS_AIFSN_MIN_VALUE)#define QOS_TX2_AIFS            (2 - QOS_AIFSN_MIN_VALUE)#define QOS_TX3_AIFS            (2 - QOS_AIFSN_MIN_VALUE)#define QOS_TX0_ACM             0#define QOS_TX1_ACM             0#define QOS_TX2_ACM             0#define QOS_TX3_ACM             0#define QOS_TX0_TXOP_LIMIT_CCK          0#define QOS_TX1_TXOP_LIMIT_CCK          0#define QOS_TX2_TXOP_LIMIT_CCK          6016#define QOS_TX3_TXOP_LIMIT_CCK          3264#define QOS_TX0_TXOP_LIMIT_OFDM      0#define QOS_TX1_TXOP_LIMIT_OFDM      0#define QOS_TX2_TXOP_LIMIT_OFDM      3008#define QOS_TX3_TXOP_LIMIT_OFDM      1504#define DEF_TX0_CW_MIN_OFDM      CW_MIN_OFDM#define DEF_TX1_CW_MIN_OFDM      CW_MIN_OFDM#define DEF_TX2_CW_MIN_OFDM      CW_MIN_OFDM#define DEF_TX3_CW_MIN_OFDM      CW_MIN_OFDM#define DEF_TX0_CW_MIN_CCK       CW_MIN_CCK#define DEF_TX1_CW_MIN_CCK       CW_MIN_CCK#define DEF_TX2_CW_MIN_CCK       CW_MIN_CCK#define DEF_TX3_CW_MIN_CCK       CW_MIN_CCK#define DEF_TX0_CW_MAX_OFDM      CW_MAX_OFDM#define DEF_TX1_CW_MAX_OFDM      CW_MAX_OFDM#define DEF_TX2_CW_MAX_OFDM      CW_MAX_OFDM#define DEF_TX3_CW_MAX_OFDM      CW_MAX_OFDM#define DEF_TX0_CW_MAX_CCK       CW_MAX_CCK#define DEF_TX1_CW_MAX_CCK       CW_MAX_CCK#define DEF_TX2_CW_MAX_CCK       CW_MAX_CCK#define DEF_TX3_CW_MAX_CCK       CW_MAX_CCK#define DEF_TX0_AIFS            0#define DEF_TX1_AIFS            0#define DEF_TX2_AIFS            0#define DEF_TX3_AIFS            0#define DEF_TX0_ACM             0#define DEF_TX1_ACM             0#define DEF_TX2_ACM             0#define DEF_TX3_ACM             0#define DEF_TX0_TXOP_LIMIT_CCK        0#define DEF_TX1_TXOP_LIMIT_CCK        0#define DEF_TX2_TXOP_LIMIT_CCK        0#define DEF_TX3_TXOP_LIMIT_CCK        0#define DEF_TX0_TXOP_LIMIT_OFDM       0#define DEF_TX1_TXOP_LIMIT_OFDM       0#define DEF_TX2_TXOP_LIMIT_OFDM       0#define DEF_TX3_TXOP_LIMIT_OFDM       0#define QOS_QOS_SETS                  3#define QOS_PARAM_SET_ACTIVE          0#define QOS_PARAM_SET_DEF_CCK         1#define QOS_PARAM_SET_DEF_OFDM        2#define CTRL_QOS_NO_ACK               (0x0020)#define IPW_TX_QUEUE_1        1#define IPW_TX_QUEUE_2        2#define IPW_TX_QUEUE_3        3#define IPW_TX_QUEUE_4        4/* QoS sturctures */struct ipw_qos_info {	int qos_enable;	struct ieee80211_qos_parameters *def_qos_parm_OFDM;	struct ieee80211_qos_parameters *def_qos_parm_CCK;	u32 burst_duration_CCK;	u32 burst_duration_OFDM;	u16 qos_no_ack_mask;	int burst_enable;};/**************************************************************//** * Generic queue structure * * Contains common data for Rx and Tx queues */struct clx2_queue {	int n_bd;		       /**< number of BDs in this queue */	int first_empty;	       /**< 1-st empty entry (index) */	int last_used;		       /**< last used entry (index) */	u32 reg_w;		     /**< 'write' reg (queue head), addr in domain 1 */	u32 reg_r;		     /**< 'read' reg (queue tail), addr in domain 1 */	dma_addr_t dma_addr;		/**< physical addr for BD's */	int low_mark;		       /**< low watermark, resume queue if free space more than this */	int high_mark;		       /**< high watermark, stop queue if free space less than this */} __attribute__ ((packed));struct machdr32 {	u16 frame_ctl;	u16 duration;		// watch out for endians!	u8 addr1[MACADRR_BYTE_LEN];	u8 addr2[MACADRR_BYTE_LEN];	u8 addr3[MACADRR_BYTE_LEN];	u16 seq_ctrl;		// more endians!	u8 addr4[MACADRR_BYTE_LEN];	u16 qos_ctrl;} __attribute__ ((packed));struct machdr30 {	u16 frame_ctl;	u16 duration;		// watch out for endians!	u8 addr1[MACADRR_BYTE_LEN];	u8 addr2[MACADRR_BYTE_LEN];	u8 addr3[MACADRR_BYTE_LEN];	u16 seq_ctrl;		// more endians!	u8 addr4[MACADRR_BYTE_LEN];} __attribute__ ((packed));struct machdr26 {	u16 frame_ctl;	u16 duration;		// watch out for endians!	u8 addr1[MACADRR_BYTE_LEN];	u8 addr2[MACADRR_BYTE_LEN];	u8 addr3[MACADRR_BYTE_LEN];	u16 seq_ctrl;		// more endians!	u16 qos_ctrl;} __attribute__ ((packed));struct machdr24 {	u16 frame_ctl;	u16 duration;		// watch out for endians!	u8 addr1[MACADRR_BYTE_LEN];	u8 addr2[MACADRR_BYTE_LEN];	u8 addr3[MACADRR_BYTE_LEN];	u16 seq_ctrl;		// more endians!} __attribute__ ((packed));// TX TFD with 32 byte MAC Headerstruct tx_tfd_32 {	struct machdr32 mchdr;	// 32	u32 uivplaceholder[2];	// 8} __attribute__ ((packed));// TX TFD with 30 byte MAC Headerstruct tx_tfd_30 {	struct machdr30 mchdr;	// 30	u8 reserved[2];		// 2	u32 uivplaceholder[2];	// 8} __attribute__ ((packed));// tx tfd with 26 byte mac headerstruct tx_tfd_26 {	struct machdr26 mchdr;	// 26	u8 reserved1[2];	// 2	u32 uivplaceholder[2];	// 8	u8 reserved2[4];	// 4} __attribute__ ((packed));// tx tfd with 24 byte mac headerstruct tx_tfd_24 {	struct machdr24 mchdr;	// 24	u32 uivplaceholder[2];	// 8	u8 reserved[8];		// 8} __attribute__ ((packed));#define DCT_WEP_KEY_FIELD_LENGTH 16struct tfd_command {	u8 index;	u8 length;	u16 reserved;	u8 payload[0];} __attribute__ ((packed));struct tfd_data {	/* Header */	u32 work_area_ptr;	u8 station_number;	/* 0 for BSS */	u8 reserved1;	u16 reserved2;	/* Tx Parameters */	u8 cmd_id;	u8 seq_num;	u16 len;	u8 priority;	u8 tx_flags;	u8 tx_flags_ext;	u8 key_index;	u8 wepkey[DCT_WEP_KEY_FIELD_LENGTH];	u8 rate;	u8 antenna;

⌨️ 快捷键说明

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