📄 dsdef.h
字号:
{10,11,12,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //France
{ 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13, 14} }; //Japan MKK
#ifdef MRV_CHIP_8385PN
static const UCHAR MrvDrvSupportedRates[] = {
0x02, // 1Mbps
0x04, // 2Mbps
0x0b, // 5.5Mbps
0x16, // 11Mbps
0x00, // reserved
0x0c, // 6Mbps
0x12, // 9Mbps
0x18, // 12Mbps
0x24, // 18Mbps
0x30, // 24Mbps
0x48, // 36Mbps
0x60, // 48Mbps
0x6c, // 54Mbps
};
#elif defined(MRV_CHIP_8385H)
static const UCHAR MrvDrvSupportedRates[] = {
0x02, // 1Mbps
0x04, // 2Mbps
0x0b, // 5.5Mbps
0x16, // 11Mbps
0x00, // reserved
0x0c, // 6Mbps
0x12, // 9Mbps
0x18, // 12Mbps
0x24, // 18Mbps
0x30, // 24Mbps
0x48, // 36Mbps
0x60, // 48Mbps
0x6c, // 54Mbps
};
#else
static const UCHAR MrvDrvSupportedRates[] = {
0x02, // 1Mbps
0x04, // 2Mbps
0x0b, // 5.5Mbps
0x16 // 11Mbps
};
#endif // #ifdef MRV_CHIP_8385PN
#define MRVDRV_NUM_SUPPORTED_RATES sizeof(MrvDrvSupportedRates)
#ifndef ETH_ADDR_LENGTH
#define ETH_ADDR_LENGTH 6
#endif
#pragma pack()
#ifdef UNDER_CE
// Structure describing Registry values
typedef struct _REG_VALUE_DESCR
{
LPWSTR val_name;
DWORD val_type;
PBYTE val_data;
} REG_VALUE_DESCR, *PREG_VALUE_DESCR;
#endif
typedef struct _PENDING_OID
{
BOOLEAN bIsPendingOID;
NDIS_OID PendingOID;
PVOID InformationBuffer;
ULONG InformationBufferLength;
PULONG BytesReadWrite;
PULONG BytesNeeded;
} PENDING_OID, *PPENDING_OID;
#define MRVDRV_802_11_BAND_B 0x00
#define MRVDRV_802_11_BAND_BG 0x01
#define MRVDRV_802_11_BAND_A 0x02
#define MRVDRV_SCAN_CMD_START 0x20
#define MRVDRV_SCAN_CMD_END 0x10
#define MAX_CHAN_NUM 255
#define UNIVERSAL_REGION_CODE 0xff
#define MRVDRV_MAX_SUBBAND_802_11D 83
#define COUNTRY_CODE_LEN 3
#define MAX_NO_OF_CHAN 40
#define OID_802_11D_ENABLE 0x00008020
typedef struct _CHANNEL_FREQ_POWER
{
USHORT Channel; // Channel Number
ULONG Freq; // Frequency of this Channel
USHORT MaxTxPower; // Max allowed Tx power level
} CHANNEL_FREQ_POWER, *PCHANNEL_FREQ_POWER;
#define MAX_REGION_BAND_NUM 2
#define MAX_PSCAN_CH_NUM 34
typedef struct _REGION_CHANNEL
{
BOOLEAN Valid; // TRUE if this entry is valid
UCHAR Region; // Region code for US, Japan ...
UCHAR Band; // B, G, or A, used for BAND_CONFIG cmd
UCHAR NrCFP; // Actual No. of elements in the array below
CHANNEL_FREQ_POWER *CFP;
UCHAR ScanType[MAX_PSCAN_CH_NUM]; // ACTIVE=0, PASSIVE=1
UCHAR TxPower[MAX_PSCAN_CH_NUM]; // Tx Power Level for channel
} REGION_CHANNEL, *PREGION_CHANNEL;
//
// Format { Channel, Frequency (MHz), MaxTxPower }
//
#define TX_PWR_DEFAULT 10
typedef struct _region_code_mapping
{
CHAR region[COUNTRY_CODE_LEN];
UCHAR code;
} region_code_mapping_t;
static region_code_mapping_t region_code_mapping[] =
{
{ "US ", 0x10 },
{ "CA ", 0x20 },
{ "EU ", 0x30 },
{ "ES ", 0x31 },
{ "FR ", 0x32 },
{ "JP ", 0x40 }
};
/* Following 2 structure defines the supported channels */
static CHANNEL_FREQ_POWER channel_freq_power_UN_BG[] = {
{1, 2412, TX_PWR_DEFAULT},
{2, 2417, TX_PWR_DEFAULT},
{3, 2422, TX_PWR_DEFAULT},
{4, 2427, TX_PWR_DEFAULT},
{5, 2432, TX_PWR_DEFAULT},
{6, 2437, TX_PWR_DEFAULT},
{7, 2442, TX_PWR_DEFAULT},
{8, 2447, TX_PWR_DEFAULT},
{9, 2452, TX_PWR_DEFAULT},
{10, 2457, TX_PWR_DEFAULT},
{11, 2462, TX_PWR_DEFAULT},
{12, 2467, TX_PWR_DEFAULT},
{13, 2472, TX_PWR_DEFAULT},
{14, 2484, TX_PWR_DEFAULT}
};
static CHANNEL_FREQ_POWER channel_freq_power_UN_AJ[] = {
// {8, 5040, TX_PWR_DEFAULT},
// {12, 5060, TX_PWR_DEFAULT},
// {16, 5080, TX_PWR_DEFAULT},
// {34, 5170, TX_PWR_DEFAULT},
{36, 5180, TX_PWR_DEFAULT},
// {38, 5190, TX_PWR_DEFAULT},
{40, 5200, TX_PWR_DEFAULT},
// {42, 5210, TX_PWR_DEFAULT},
{44, 5220, TX_PWR_DEFAULT},
// {46, 5230, TX_PWR_DEFAULT},
{48, 5240, TX_PWR_DEFAULT},
{52, 5260, TX_PWR_DEFAULT},
{56, 5280, TX_PWR_DEFAULT},
{60, 5300, TX_PWR_DEFAULT},
{64, 5320, TX_PWR_DEFAULT},
{100, 5500, TX_PWR_DEFAULT},
{104, 5520, TX_PWR_DEFAULT},
{108, 5540, TX_PWR_DEFAULT},
{112, 5560, TX_PWR_DEFAULT},
{116, 5580, TX_PWR_DEFAULT},
{120, 5600, TX_PWR_DEFAULT},
{124, 5620, TX_PWR_DEFAULT},
{128, 5640, TX_PWR_DEFAULT},
{132, 5660, TX_PWR_DEFAULT},
{136, 5680, TX_PWR_DEFAULT},
{140, 5700, TX_PWR_DEFAULT},
{149, 5745, TX_PWR_DEFAULT},
{153, 5765, TX_PWR_DEFAULT},
{157, 5785, TX_PWR_DEFAULT},
{161, 5805, TX_PWR_DEFAULT},
{165, 5825, TX_PWR_DEFAULT}
// {240, 4920, TX_PWR_DEFAULT},
// {244, 4940, TX_PWR_DEFAULT},
// {248, 4960, TX_PWR_DEFAULT},
// {252, 4980, TX_PWR_DEFAULT},
};
// Band: 'B/G', Region: USA FCC/Canada IC
static CHANNEL_FREQ_POWER channel_freq_power_US_BG[] = {
{1, 2412, TX_PWR_DEFAULT},
{2, 2417, TX_PWR_DEFAULT},
{3, 2422, TX_PWR_DEFAULT},
{4, 2427, TX_PWR_DEFAULT},
{5, 2432, TX_PWR_DEFAULT},
{6, 2437, TX_PWR_DEFAULT},
{7, 2442, TX_PWR_DEFAULT},
{8, 2447, TX_PWR_DEFAULT},
{9, 2452, TX_PWR_DEFAULT},
{10, 2457, TX_PWR_DEFAULT},
{11, 2462, TX_PWR_DEFAULT}
};
// Band: 'B/G', Region: Europe ETSI
static CHANNEL_FREQ_POWER channel_freq_power_EU_BG[] = {
{1, 2412, TX_PWR_DEFAULT},
{2, 2417, TX_PWR_DEFAULT},
{3, 2422, TX_PWR_DEFAULT},
{4, 2427, TX_PWR_DEFAULT},
{5, 2432, TX_PWR_DEFAULT},
{6, 2437, TX_PWR_DEFAULT},
{7, 2442, TX_PWR_DEFAULT},
{8, 2447, TX_PWR_DEFAULT},
{9, 2452, TX_PWR_DEFAULT},
{10, 2457, TX_PWR_DEFAULT},
{11, 2462, TX_PWR_DEFAULT},
{12, 2467, TX_PWR_DEFAULT},
{13, 2472, TX_PWR_DEFAULT}
};
// Band: 'B/G', Region: Spain
static CHANNEL_FREQ_POWER channel_freq_power_SPN_BG[] = {
{10, 2457, TX_PWR_DEFAULT},
{11, 2462, TX_PWR_DEFAULT}
};
// Band: 'B/G', Region: France
static CHANNEL_FREQ_POWER channel_freq_power_FR_BG[] = {
{10, 2457, TX_PWR_DEFAULT},
{11, 2462, TX_PWR_DEFAULT},
{12, 2467, TX_PWR_DEFAULT},
{13, 2472, TX_PWR_DEFAULT}
};
// Band: 'B/G', Region: Japan
static CHANNEL_FREQ_POWER channel_freq_power_JPN_BG[] = {
{1, 2412, TX_PWR_DEFAULT},
{2, 2417, TX_PWR_DEFAULT},
{3, 2422, TX_PWR_DEFAULT},
{4, 2427, TX_PWR_DEFAULT},
{5, 2432, TX_PWR_DEFAULT},
{6, 2437, TX_PWR_DEFAULT},
{7, 2442, TX_PWR_DEFAULT},
{8, 2447, TX_PWR_DEFAULT},
{9, 2452, TX_PWR_DEFAULT},
{10, 2457, TX_PWR_DEFAULT},
{11, 2462, TX_PWR_DEFAULT},
{12, 2467, TX_PWR_DEFAULT},
{13, 2472, TX_PWR_DEFAULT},
{14, 2484, TX_PWR_DEFAULT}
};
//#ifdef MULTI_BANDS
// Band: 'A', Region: USA FCC, Canada IC, Spain, France
static CHANNEL_FREQ_POWER channel_freq_power_A[] = {
{36, 5180, TX_PWR_DEFAULT},
{40, 5200, TX_PWR_DEFAULT},
{44, 5220, TX_PWR_DEFAULT},
{48, 5240, TX_PWR_DEFAULT},
{52, 5260, TX_PWR_DEFAULT},
{56, 5280, TX_PWR_DEFAULT},
{60, 5300, TX_PWR_DEFAULT},
{64, 5320, TX_PWR_DEFAULT},
{149, 5745, TX_PWR_DEFAULT},
{153, 5765, TX_PWR_DEFAULT},
{157, 5785, TX_PWR_DEFAULT},
{161, 5805, TX_PWR_DEFAULT},
{165, 5825, TX_PWR_DEFAULT}
};
// Band: 'A', Region: Europe ETSI
static CHANNEL_FREQ_POWER channel_freq_power_EU_A[] = {
{36, 5180, TX_PWR_DEFAULT},
{40, 5200, TX_PWR_DEFAULT},
{44, 5220, TX_PWR_DEFAULT},
{48, 5240, TX_PWR_DEFAULT},
{52, 5260, TX_PWR_DEFAULT},
{56, 5280, TX_PWR_DEFAULT},
{60, 5300, TX_PWR_DEFAULT},
{64, 5320, TX_PWR_DEFAULT},
{100, 5500, TX_PWR_DEFAULT},
{104, 5520, TX_PWR_DEFAULT},
{108, 5540, TX_PWR_DEFAULT},
{112, 5560, TX_PWR_DEFAULT},
{116, 5580, TX_PWR_DEFAULT},
{120, 5600, TX_PWR_DEFAULT},
{124, 5620, TX_PWR_DEFAULT},
{128, 5640, TX_PWR_DEFAULT},
{132, 5660, TX_PWR_DEFAULT},
{136, 5680, TX_PWR_DEFAULT},
{140, 5700, TX_PWR_DEFAULT}
};
// Band: 'A', Region: Japan
static CHANNEL_FREQ_POWER channel_freq_power_JPN_A[] = {
{8, 5040, TX_PWR_DEFAULT},
{12, 5060, TX_PWR_DEFAULT},
{16, 5080, TX_PWR_DEFAULT},
{34, 5170, TX_PWR_DEFAULT},
{38, 5190, TX_PWR_DEFAULT},
{42, 5210, TX_PWR_DEFAULT},
{46, 5230, TX_PWR_DEFAULT},
{240, 4920, TX_PWR_DEFAULT},
{244, 4940, TX_PWR_DEFAULT},
{248, 4960, TX_PWR_DEFAULT},
{252, 4980, TX_PWR_DEFAULT}
};
static UCHAR SupportedRates[G_SUPPORTED_RATES];
//First two rates are basic rates
static UCHAR SupportedRates_B[B_SUPPORTED_RATES] =
{ 0x82, 0x84, 0x8b, 0x96, 0, 0, 0, 0 };
// First four rates are basic rates
static UCHAR SupportedRates_G[G_SUPPORTED_RATES] =
{ 0x82, 0x84, 0x8b, 0x96, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0, 0};
// TODO: Check which are basic rates for band 'a'
// First two rates are basic rates
static UCHAR SupportedRates_A[G_SUPPORTED_RATES] =
{ 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0, 0, 0, 0, 0, 0 };
#endif _DSDEF_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -