?? wt_def.h
字號:
#ifndef _WT_DEF_H#define _WT_DEF_H//#define WT_ON_SMP#ifdef WT_ON_SMP#define WT_SPIN_LOCK(x) spin_lock(x)#define WT_SPIN_UNLOCK(x) spin_unlock(x)#define WT_SPIN_LOCK_IRQSAVE(x,y) spin_lock_irqsave(x,y)#define WT_SPIN_UNLOCK_IRQRESTORE(x,y) spin_unlock_irqrestore(x,y)#define WT_SPIN_LOCK_IRQ(x) spin_lock_irq(x)#define WT_SPIN_UNLOCK_IRQ(x) spin_unlock_irq(x)#else#define WT_SPIN_LOCK(x) #define WT_SPIN_UNLOCK(x) #define WT_SPIN_LOCK_IRQSAVE(x,y) #define WT_SPIN_UNLOCK_IRQRESTORE(x,y) #define WT_SPIN_LOCK_IRQ(x) #define WT_SPIN_UNLOCK_IRQ(x) #endif// memory tag for this driver #define NIC_TAG ((ULONG)'04TW')#define NIC_DBG_STRING ("**WT40**") // packet and header sizes#define NIC_MAX_PACKET_SIZE 1514//1472+28+14#define NIC_MIN_PACKET_SIZE 60#define NIC_HEADER_SIZE 14#define NIC_ALIGN_SIZE 128#define MAX_TX_CELL_SIZE ( MAX_TX_AUX_BUF_LEN + MAX_TX_CELL_LEN + MAX_HW_HEAD_LEN) #define MAX_RX_CELL_SIZE ( MAX_RX_AUX_BUF_LEN + MAX_RX_CELL_LEN + MAX_HW_HEAD_LEN) // multicast list size #define NIC_MAX_MCAST_LIST 4// 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 0x00020001// 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// media type, we use ethernet, change if necessary#define NIC_MEDIA_TYPE NdisMedium802_3// interface type, we use PCI#define NIC_INTERFACE_TYPE_PCI NdisInterfacePci#define NIC_INTERFACE_TYPE_CARDBUS NdisInterfacePcMcia#define NIC_INTERFACE_TYPE_PCMCIA NdisInterfacePcMcia#define NIC_INTERRUPT_MODE NdisInterruptLevelSensitive // NIC PCI Device and vendor IDs #define NIC_PCI_DEVICE_ID 0x8200#define NIC_PCI_VENDOR_ID 0x6809// buffer size passed in NdisMQueryAdapterResources // We should only need three adapter resources (IO, interrupt and memory),// Some devices get extra resources, so have room for 10 resources #define NIC_RESOURCE_BUF_SIZE (sizeof(NDIS_RESOURCE_LIST) + \ (10*sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)))// IO space length#define NIC_MAP_CFGSPACE_LENGTH 256#define NIC_MAP_MAINMEMSPACE_LENGTH 0x10000// PCS config space including the Device Specific part of it/#define NIC_PCI_WT40_HDR_LENGTH 0xe2// change to your company name instead of using Microsoft#define NIC_VENDOR_DESC "LHWT"// number of RFDs - min, default and max#define NIC_MIN_RFDS 2#define NIC_DEF_RFDS 4#define NIC_MAX_RFDS 256#define NIC_MIN_RXBUF 4#define NIC_DEF_RXBUF 20#define NIC_MAX_RXBUF 1024// only grow the RFDs up to this number#define NIC_MAX_GROW_RFDS 128 // How many intervals before the RFD list is shrinked?#define NIC_RFD_SHRINK_THRESHOLD 10// local data buffer size (to copy send packet data into a local buffer)#define NIC_BUFFER_SIZE 1520// max lookahead size#define NIC_MAX_LOOKAHEAD (NIC_MAX_PACKET_SIZE - NIC_HEADER_SIZE)// max number of send packets the MiniportSendPackets function can accept #define NIC_MAX_SEND_PACKETS 10// supported filters#define NIC_SUPPORTED_FILTERS ( \ NDIS_PACKET_TYPE_DIRECTED | \ NDIS_PACKET_TYPE_MULTICAST | \ NDIS_PACKET_TYPE_BROADCAST | \ NDIS_PACKET_TYPE_PROMISCUOUS | \ NDIS_PACKET_TYPE_ALL_MULTICAST)// Threshold for a remove #define NIC_HARDWARE_ERROR_THRESHOLD 5// The CheckForHang intervals before we decide the send is stuck#define NIC_SEND_HANG_THRESHOLD 5 // 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#define ERRLOG_READ_PCMCIA_SLOT_FAILED 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// Constants for various purposes of NdisStallExecution#define NIC_DELAY_POST_RESET 50#define NIC_DELAY_DURING_RESET 120//#define NIC_DELAY_DURING_RESET 5// Wait 5 milliseconds for the self-test to complete#define NIC_DELAY_POST_SELF_TEST_MS 5#define NIC_RF_RESET_DELAY 120//#define NIC_RF_RESET_DELAY 5// delay used for link detection to minimize the init time// change this value to match your hardware #define DEFAULTDOT11SHORTRETRYLIMIT 3#define DEFAULTDOT11LONGRETRYLIMIT 3#define DEFAULTFRAGMENTATION_THRESHOLD 2346#define DEFAULTRTS_THRESHOLD 2346#endif // _WT_DEF_H
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -