📄 dsdef.h
字号:
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
#if defined(IF_SDIO) || defined(IF_GSPI)
///crlo:RadioMeasure ++
/// It's possible that the size of the beacon-table is big (more than 1550)
/// related information: There is an limitation to the AP items on the list
/// ref: CCX specification 2.8, S32, the beacon-table's AP item is limited
/// to 30. But there is no limitation to the table.
#ifdef CCX_RADIOMEASURE
#define SDIO_MAX_PKT_LEN 4096
#else
#define SDIO_MAX_PKT_LEN 1550
#endif ///CCX_RADIOMEASURE
///crlo:RadioMeasure --
#define SDIO_MAX_CMD_LEN 1024
typedef struct _SDIO_TX_PKT_T
{
WCB Wcb;
UCHAR Pkt[SDIO_MAX_PKT_LEN];
} SDIO_TX_PKT_T, *PSDIO_TX_PKT_T;
typedef struct _SDIO_TX_PKT
{
// lenth of the sdio communication packet
USHORT Len;
// type of the sdio communication packet
USHORT Type;
union
{
SDIO_TX_PKT_T TxDataBuf;
UCHAR CmdBuf[SDIO_MAX_CMD_LEN];
} Buf;
} SDIO_TX_PKT, *PSDIO_TX_PKT;
// to calculate the SDIO packet length, len is the original length
#define ADD_SDIO_PKT_HDR_LENGTH(len) len + sizeof(USHORT) + sizeof(USHORT)
#endif //IF_SDIO
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 //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; // Pointer to CFP table
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 }, /* US FCC */
{ "CA", 0x10 }, /* IC Canada */
{ "SG", 0x10 }, /* Singapore */
{ "EU", 0x30 }, /* ETSI */
{ "AU", 0x30 }, /* Australia */
{ "KR", 0x30 }, /* Republic Of Korea */
{ "ES", 0x31 }, /* Spain */
{ "FR", 0x32 }, /* France */
{ "JP", 0x40 } /* Japan */
};
/* 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}
};
// 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, 0x0b, 0x16, 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 };
//dralee_20060529, copy from Linux
//the rates supported in A mode for ad-hoc
static UCHAR AdhocRates_A[G_SUPPORTED_RATES] =
{ 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0};
//the rates supported for ad-hoc G mode
static UCHAR AdhocRates_G[G_SUPPORTED_RATES] =
{ 0x82, 0x84, 0x8b, 0x96, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0};
//the rates supported for ad-hoc B mode
static UCHAR AdhocRates_B[4] =
{ 0x82, 0x84, 0x8b, 0x96};
#if defined(IF_SDIO) || defined(IF_GSPI)
typedef struct _WPA_NOTIFY_OS
{
//NDIS_802_11_STATUS_INDICATION status;
NDIS_802_11_STATUS_TYPE status;
NDIS_802_11_AUTHENTICATION_REQUEST request;
} WPA_NOTIFY_OS, *PWPA_NOTIFY_OS;
#endif ///IF_SDIO | IF_GSPI
///String of the interface
#if defined (IF_SDIO)
#define IFSTRN "SDIO"
#elif defined (IF_GSPI)
#define IFSTRN "GSPI"
#elif defined (IF_CF)
#define IFSTRN "CF"
#elif defined (IF_USB)
#define IFSTRN "USB"
///Note: Don't add the default one so that we will get a compile error
/// if we forget to add it for the new interface
#endif
///String of the baseband chip
#if defined (MRV_CHIP_8305)
#define CHIPSTRN "8305"
#elif defined (MRV_CHIP_8381)
#define CHIPSTRN "8381"
#elif defined (MRV_CHIP_8385)
#define CHIPSTRN "8385"
#elif defined (MRV_CHIP_8385)
#define CHIPSTRN "8385"
#elif defined (MRV_CHIP_8388)
#define CHIPSTRN "8388"
#elif defined (MRV_CHIP_8399)
#define CHIPSTRN "8399"
#elif defined (MRV_CHIP_8686)
#define CHIPSTRN "8686"
#else
#error "Unsupported Baseband Chip"
#endif
///String of the RF chip
#if defined (MRV_RF_8010)
#define RFSTRN "8010"
#elif defined (MRV_RF_8015)
#define RFSTRN "8015"
#elif defined (MRV_RF_8030)
#define RFSTRN "8030"
#elif defined (MRV_RF_8031)
#define RFSTRN "8031"
#else
#error "Unsupported RF Chip"
#endif
#endif _DSDEF_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -