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

📄 rtmp_def.h

📁 台湾RALink公司的 rt2570无线 802.11g 网卡的 驱动的源代码 ,支持linux2.4以上的 内河
💻 H
📖 第 1 页 / 共 2 页
字号:
/*
 ***************************************************************************
 * Ralink Tech Inc.
 * 4F, No. 2 Technology 5th Rd.
 * Science-based Industrial Park
 * Hsin-chu, Taiwan, R.O.C.
 *
 * (c) Copyright 2002-2004, Ralink Technology, Inc.
 *
 * 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  * 
 * the Free Software Foundation; either version 2 of the License, or     * 
 * (at your option) any later version.                                   * 
 *                                                                       * 
 * 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.             * 
 *                                                                       * 
 ************************************************************************
	Module Name:
	rtmp_def.h

	Abstract:

	Revision History:
	Who			When			What
	--------	----------		----------------------------------------------
	Name		Date			Modification logs
	Jan Lee		2005-06-01		Release
*/
#ifndef __RTMP_DEF_H__
#define __RTMP_DEF_H__

//
//  Debug information verbosity: lower values indicate higher urgency
//
#define RT_DEBUG_OFF        0
#define RT_DEBUG_ERROR      1
#define RT_DEBUG_WARN       2
#define RT_DEBUG_TRACE      3
#define RT_DEBUG_INFO       4
#define RT_DEBUG_LOUD       5
#define RT_DEBUG_TEMP       3
#define RT_DEBUG_CNTL       1
#define RT_DEBUG_ADHOC       3

#define NIC_TAG             ((ULONG)'0752')
#define NIC_DBG_STRING      ("RTUSB  ")

//
// update the driver version number every time you release a new driver
// The high word is the major version. The low word is the minor version.
//
#define NIC_VENDOR_DRIVER_VERSION   0x00010001

//
// NDIS version in use by the NIC driver.
// The high byte is the major version. The low byte is the minor version.
//
#ifdef  NDIS51_MINIPORT
#define NIC_DRIVER_VERSION      0x0501
#else
#define NIC_DRIVER_VERSION      0x0500
#endif

//
// NDIS media type, current is ethernet, change if native wireless supported
//
#define NIC_MEDIA_TYPE          NdisMedium802_3
#define NIC_PCI_HDR_LENGTH      0xe2
#define NIC_MAX_PACKET_SIZE     2304
#define NIC_HEADER_SIZE         14



//
// Entry number for each DMA descriptor ring
//
//blue,#define TX_RING_SIZE            16
#define TX_RING_SIZE            32
//blue,#define ATIM_RING_SIZE          4
#define PRIO_RING_SIZE          32   
//#define RX_RING_SIZE            1
#define RX_RING_SIZE            8
#define	BEACON_RING_SIZE		2
//blue,#define DESCRIPTOR_REQUIRED     ((TX_RING_SIZE) + (ATIM_RING_SIZE) + (PRIO_RING_SIZE) + (RX_RING_SIZE) + (BEACON_RING_SIZE))
#define	MGMT_RING_SIZE			32
//blue,#define RING_DESCRIPTOR_SIZE    48
//steven:for test#define TX_BUFFER_SIZE          2048
#define PRIO_BUFFER_SIZE        1024  // 2048
//steven:for test#define RX_BUFFER_SIZE          2064	//2048
//blue,#define BUFFER_SIZE				2064	//2048
#define BUFFER_SIZE				2400	//2048
//blue,#define ATIM_BUFFER_SIZE        2048
//blue,#define BEACON_BUFFER_SIZE      2048
#define	MAX_FRAME_SIZE			2346					// Maximum 802.11 frame size
#define ALLOC_RX_PACKET_POOL    (RX_RING_SIZE)
#define ALLOC_RX_BUFFER_POOL    (ALLOC_RX_PACKET_POOL)
#define	TX_RING					0xa
#define	ATIM_RING				0xb
#define	PRIO_RING				0xc
#define	RX_RING					0xd
#define	BEACON_RING				0xe
#define	NULL_RING				0xf
#define	MAX_TX_PROCESS			2
#define	MAX_RX_PROCESS			4
#define	MAX_CLIENT				4
#define	MAX_MCAST_LIST_SIZE		32

//  RTMP_ADAPTER flags
//#define fRTMP_ADAPTER_MAP_REGISTER          0x00000001
//#define fRTMP_ADAPTER_INTERRUPT_IN_USE      0x00000002
#define	fRTMP_ADAPTER_TEST_MODE				0x00000001//blue
#define fRTMP_ADAPTER_MLME_RESET_IN_PROGRESS     0x00000002 //blue
#define fRTMP_ADAPTER_HARDWARE_ERROR        0x00000004
#define fRTMP_ADAPTER_SEND_PACKET_ERROR     0x00000010
#define fRTMP_ADAPTER_RECEIVE_PACKET_ERROR  0x00000020
#define fRTMP_ADAPTER_HALT_IN_PROGRESS      0x00000040
#define fRTMP_ADAPTER_RESET_IN_PROGRESS     0x00000080
#define fRTMP_ADAPTER_REMOVE_IN_PROGRESS    0x00000100
#define fRTMP_ADAPTER_TX_RING_ALLOCATED     0x00000200
#define fRTMP_ADAPTER_ATIM_RING_ALLOCATED   0x00000400
#define fRTMP_ADAPTER_PRIO_RING_ALLOCATED   0x00000800
#define fRTMP_ADAPTER_RX_RING_ALLOCATED     0x00001000
#define fRTMP_ADAPTER_BSS_JOIN_IN_PROGRESS  0x00002000
#define fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS  0x00004000
#define	fRTMP_ADAPTER_REASSOC_IN_PROGRESS	0x00008000
#define	fRTMP_ADAPTER_MEDIA_STATE_PENDING	0x00010000
#define	fRTMP_ADAPTER_RADIO_OFF				0x00020000
#define	fRTMP_ADAPTER_BULKOUT_RESET			0x00100000
#define	fRTMP_ADAPTER_BULKIN_RESET			0x00200000
#define fRTMP_ADAPTER_RESET_DATA_SW_QUEUE   0x00400000
#define fRTMP_ADAPTER_RESET_PIPE_IN_PROGRESS    0x00800000
#define fRTMP_ADAPTER_SCAN_CHANNEL_IN_PROGRESS 0x01000000
#ifdef RALINK_ATE
#define	fRTMP_ADAPTER_ATE_START_TX			0x01000000
#define	fRTMP_ADAPTER_ATE_START_TX_CARRIER	0x02000000
#define	fRTMP_ADAPTER_ATE_START_RX			0x04000000
#endif

// Lock bit for accessing different ring buffers
#define fRTMP_ADAPTER_TX_RING_BUSY      	0x80000000
#define fRTMP_ADAPTER_PRIO_RING_BUSY      	0x40000000
#define fRTMP_ADAPTER_ATIM_RING_BUSY      	0x20000000
#define fRTMP_ADAPTER_RX_RING_BUSY      	0x10000000

// Lock bit for accessing different queue
#define	fRTMP_ADAPTER_TX_QUEUE_BUSY      	0x08000000
#define	fRTMP_ADAPTER_PRIO_QUEUE_BUSY      	0x04000000

//
// Flags for Bulkflags control for bulk out data
//
#define	fRTUSB_BULK_OUT_DATA_NULL			0x00000001
#define	fRTUSB_BULK_OUT_DATA_NORMAL			0x00000002
#define	fRTUSB_BULK_OUT_MLME				0x00000004
#define	fRTUSB_BULK_OUT_BEACON_1			0x00000008
#define	fRTUSB_BULK_OUT_BEACON_0			0x00000010
#define	fRTUSB_BULK_OUT_PSPOLL				0x00000020
#define	fRTUSB_BULK_OUT_DATA_FRAG			0x00000040

//
// Error code section
//
// NDIS_ERROR_CODE_ADAPTER_NOT_FOUND
#define ERRLOG_READ_PCI_SLOT_FAILED     0x00000101L
#define ERRLOG_WRITE_PCI_SLOT_FAILED    0x00000102L
#define ERRLOG_VENDOR_DEVICE_NOMATCH    0x00000103L

// NDIS_ERROR_CODE_ADAPTER_DISABLED
#define ERRLOG_BUS_MASTER_DISABLED      0x00000201L

// NDIS_ERROR_CODE_UNSUPPORTED_CONFIGURATION
#define ERRLOG_INVALID_SPEED_DUPLEX     0x00000301L
#define ERRLOG_SET_SECONDARY_FAILED     0x00000302L

// NDIS_ERROR_CODE_OUT_OF_RESOURCES
#define ERRLOG_OUT_OF_MEMORY            0x00000401L
#define ERRLOG_OUT_OF_SHARED_MEMORY     0x00000402L
#define ERRLOG_OUT_OF_MAP_REGISTERS     0x00000403L
#define ERRLOG_OUT_OF_BUFFER_POOL       0x00000404L
#define ERRLOG_OUT_OF_NDIS_BUFFER       0x00000405L
#define ERRLOG_OUT_OF_PACKET_POOL       0x00000406L
#define ERRLOG_OUT_OF_NDIS_PACKET       0x00000407L
#define ERRLOG_OUT_OF_LOOKASIDE_MEMORY  0x00000408L

// NDIS_ERROR_CODE_HARDWARE_FAILURE
#define ERRLOG_SELFTEST_FAILED          0x00000501L
#define ERRLOG_INITIALIZE_ADAPTER       0x00000502L
#define ERRLOG_REMOVE_MINIPORT          0x00000503L

// NDIS_ERROR_CODE_RESOURCE_CONFLICT
#define ERRLOG_MAP_IO_SPACE             0x00000601L
#define ERRLOG_QUERY_ADAPTER_RESOURCES  0x00000602L
#define ERRLOG_NO_IO_RESOURCE           0x00000603L
#define ERRLOG_NO_INTERRUPT_RESOURCE    0x00000604L
#define ERRLOG_NO_MEMORY_RESOURCE       0x00000605L



//============================================================
// Length definitions
#define PEER_KEY_NO                       2
#define CRC_LEN                           4
#define MAC_ADDR_LEN                      6
#define TIMESTAMP_LEN                     8
#define MAX_LEN_OF_SUPPORTED_RATES        12    // 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54
#define MAX_NUM_OF_POWER_LEVEL            8
#define MAX_NUM_OF_DOMAIN                 8
#define MAX_LEN_OF_KEY                    32      // 32 octets == 256 bits, Redefine for WPA
#define MAX_LEN_OF_CHANNELS               42      // 14 channels @2.4G +  12@UNII + 4 @MMAC + 11 @HiperLAN2 + 1 as NULL termination
#define MAX_LEN_OF_PEER_KEY               16
#define MAC_HDR_LEN                       24
#define MAX_LEN_OF_MANUFACTURE_ID         32
#define MAX_LEN_OF_PRODUCT_ID             32
#define MAX_LEN_OF_MAC_TABLE              32
#define MAX_LEN_OF_SSID                   32
#define CIPHER_TEXT_LEN                   128
#define HASH_TABLE_SIZE                   256
#define MAX_LEN_OF_MLME_BUFFER            512
#define MAX_FRAME_LEN                     2338
#define	MAX_VIE_LEN                       128	// New for WPA cipher suite variable IE sizes.
#define MAX_MLME_HANDLER_MEMORY           20    //each them cantains  MAX_LEN_OF_MLME_BUFFER size 
#define MAX_INI_BUFFER_SIZE               4096

#define MAX_TX_POWER_LEVEL                100   /* mW */
#define MAX_RSSI_TRIGGER                 -10    /* dBm */
#define MIN_RSSI_TRIGGER                 -200   /* dBm */
#define MAX_FRAG_THRESHOLD                2346  /* byte count */
#define MIN_FRAG_THRESHOLD                256   /* byte count */
#define MAX_RTS_THRESHOLD                 2347  /* byte count */

// key related definitions
#define SHARE_KEY_NO                      4
#define MAX_LEN_OF_SHARE_KEY              16
#define PAIRWISE_KEY_NO                   4
#define GROUP_KEY_NO                      4
#define	PMKID_NO							4	// Number of PMKID saved supported

// power status related definitions
#define PWR_ACTIVE                        0
#define PWR_SAVE                          1
#define PWR_UNKNOWN                       2

// Auth and Assoc mode related definitions
#define AUTH_MODE                         0x10
#define ASSOC_MODE                        0x20

#define AUTH_MODE_OPEN                    0x00
#define AUTH_MODE_SHARED                  0x01
#define AUTH_MODE_AUTO_SWITCH             0x03
#define AUTH_MODE_DEAUTH                  0x04
#define AUTH_MODE_UPLAYER                 0x05 // reserved for 802.11i use

#define ASSOC_MODE_DISASSOC               0x04
#define ASSOC_MODE_ASSOC                  0x05

// BSS Type definitions
#define BSS_INDEP                         0  // = Ndis802_11IBSS
#define BSS_INFRA                         1  // = Ndis802_11Infrastructure
#define BSS_ANY                           2  // = Ndis802_11AutoUnknown
// #define BSS_UNKNOWN                       0xff


// WEP related definitions
// #define WEP_DISABLE                       0
// #define WEP_ENABLE                        1
// #define WEP_KEY_ABSENT                    2
// #define WEP_NOT_SUPPORTED                 3

// value of FrameDesc.priority
// #define PRIO_CONTENTION                   0
// #define PRIO_CONTENTION_FREE              1

// value of auth_algorithm in Authentication frame body

// Reason code definitions
#define REASON_RESERVED                   0
#define REASON_UNSPECIFY                  1
#define REASON_NO_LONGER_VALID            2
#define REASON_DEAUTH_STA_LEAVING         3
#define REASON_DISASSOC_INACTIVE          4
#define REASON_DISASSPC_AP_UNABLE         5
#define REASON_CLS2ERR                    6
#define REASON_CLS3ERR                    7
#define REASON_DISASSOC_STA_LEAVING       8
#define REASON_STA_REQ_ASSOC_NOT_AUTH     9
#define	REASON_INVALID_IE                 13
#define	REASON_MIC_FAILURE                14
#define	REASON_4_WAY_HANDSHAKE_TIMEOUT    15
#define	REASON_GROUP_KEY_UPDATE_TIMEOUT   16

// Status code definitions
#define MLME_SUCCESS                      0

⌨️ 快捷键说明

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