rtl8188eu: Remove some of the alternatives to u32

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-11-30 16:12:11 -06:00
parent 1e72b90b99
commit 248ac6b84b
9 changed files with 106 additions and 110 deletions

View file

@ -857,7 +857,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
{ {
_irqL irqL; _irqL irqL;
_list *plist, *phead; _list *plist, *phead;
ULONG bssid_ex_sz; u32 bssid_ex_sz;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
#ifdef CONFIG_P2P #ifdef CONFIG_P2P

View file

@ -1293,7 +1293,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
u8 u8
mpt_to_mgnt_rate( mpt_to_mgnt_rate(
ULONG MptRateIdx u32 MptRateIdx
) )
{ {
/* Mapped to MGN_XXX defined in MgntGen.h */ /* Mapped to MGN_XXX defined in MgntGen.h */
@ -1777,7 +1777,7 @@ u8 rtw_mpRateParseFunc(PADAPTER pAdapter, u8 *targetStr)
return _FAIL; return _FAIL;
} }
ULONG mpt_ProQueryCalTxPower( u32 mpt_ProQueryCalTxPower(
PADAPTER pAdapter, PADAPTER pAdapter,
u8 RfPath u8 RfPath
) )
@ -1786,7 +1786,7 @@ ULONG mpt_ProQueryCalTxPower(
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx); PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx);
ULONG TxPower = 1; u32 TxPower = 1;
u1Byte rate = 0; u1Byte rate = 0;
struct txpwr_idx_comp tic; struct txpwr_idx_comp tic;
u8 mgn_rate = mpt_to_mgnt_rate(pMptCtx->mpt_rate_index); u8 mgn_rate = mpt_to_mgnt_rate(pMptCtx->mpt_rate_index);
@ -1886,7 +1886,7 @@ void CCK_generator(
double LengthExact; double LengthExact;
double LengthPSDU; double LengthPSDU;
u8 i; u8 i;
UINT PacketLength = pPMacTxInfo->PacketLength; u32 PacketLength = pPMacTxInfo->PacketLength;
if (pPMacTxInfo->bSPreamble) if (pPMacTxInfo->bSPreamble)
pPMacTxInfo->SFD = 0x05CF; pPMacTxInfo->SFD = 0x05CF;
@ -1930,7 +1930,7 @@ void CCK_generator(
LengthExtBit = 0; LengthExtBit = 0;
pPMacTxInfo->LENGTH = (UINT)LengthPSDU; pPMacTxInfo->LENGTH = (u32)LengthPSDU;
/* CRC16_in(1,16:31) = LengthPSDU[0:15]*/ /* CRC16_in(1,16:31) = LengthPSDU[0:15]*/
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
crc16_in[i + 16] = (pPMacTxInfo->LENGTH >> i) & 0x1; crc16_in[i + 16] = (pPMacTxInfo->LENGTH >> i) & 0x1;
@ -2024,13 +2024,13 @@ void PMAC_Get_Pkt_Param(
} }
UINT LDPC_parameter_generator( u32 LDPC_parameter_generator(
UINT N_pld_int, u32 N_pld_int,
UINT N_CBPSS, u32 N_CBPSS,
UINT N_SS, u32 N_SS,
UINT R, u32 R,
UINT m_STBC, u32 m_STBC,
UINT N_TCB_int u32 N_TCB_int
) )
{ {
double CR = 0.; double CR = 0.;
@ -2040,7 +2040,7 @@ UINT LDPC_parameter_generator(
double L_LDPC = 0., K_LDPC = 0., L_LDPC_info = 0.; double L_LDPC = 0., K_LDPC = 0., L_LDPC_info = 0.;
double N_punc = 0., N_ppcw = 0., N_fpunc = 0., N_rep = 0., N_rpcw = 0., N_frep = 0.; double N_punc = 0., N_ppcw = 0., N_fpunc = 0., N_rep = 0., N_rpcw = 0., N_frep = 0.;
double R_eff = 0.; double R_eff = 0.;
UINT VHTSIGA2B3 = 0;/* extra symbol from VHT-SIG-A2 Bit 3*/ u32 VHTSIGA2B3 = 0;/* extra symbol from VHT-SIG-A2 Bit 3*/
if (R == 0) if (R == 0)
CR = 0.5; CR = 0.5;
@ -2108,13 +2108,13 @@ void PMAC_Nsym_generator(
PRT_PMAC_TX_INFO pPMacTxInfo, PRT_PMAC_TX_INFO pPMacTxInfo,
PRT_PMAC_PKT_INFO pPMacPktInfo) PRT_PMAC_PKT_INFO pPMacPktInfo)
{ {
UINT SIGA2B3 = 0; u32 SIGA2B3 = 0;
u8 TX_RATE = pPMacTxInfo->TX_RATE; u8 TX_RATE = pPMacTxInfo->TX_RATE;
UINT R, R_list[10] = {0, 0, 2, 0, 2, 1, 2, 3, 2, 3}; u32 R, R_list[10] = {0, 0, 2, 0, 2, 1, 2, 3, 2, 3};
double CR = 0; double CR = 0;
UINT N_SD, N_BPSC_list[10] = {1, 2, 2, 4, 4, 6, 6, 6, 8, 8}; u32 N_SD, N_BPSC_list[10] = {1, 2, 2, 4, 4, 6, 6, 6, 8, 8};
UINT N_BPSC = 0, N_CBPS = 0, N_DBPS = 0, N_ES = 0, N_SYM = 0, N_pld = 0, N_TCB = 0; u32 N_BPSC = 0, N_CBPS = 0, N_DBPS = 0, N_ES = 0, N_SYM = 0, N_pld = 0, N_TCB = 0;
int D_R = 0; int D_R = 0;
RTW_INFO("TX_RATE = %d\n", TX_RATE); RTW_INFO("TX_RATE = %d\n", TX_RATE);
@ -2157,14 +2157,14 @@ void PMAC_Nsym_generator(
N_BPSC = N_BPSC_list[MCS_temp]; N_BPSC = N_BPSC_list[MCS_temp];
N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss; N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss;
N_DBPS = (UINT)((double)N_CBPS * CR); N_DBPS = (u32)((double)N_CBPS * CR);
if (pPMacTxInfo->bLDPC == FALSE) { if (pPMacTxInfo->bLDPC == FALSE) {
N_ES = (UINT)ceil((double)(N_DBPS * pPMacPktInfo->Nss) / 4. / 300.); N_ES = (u32)ceil((double)(N_DBPS * pPMacPktInfo->Nss) / 4. / 300.);
RTW_INFO("N_ES = %d\n", N_ES); RTW_INFO("N_ES = %d\n", N_ES);
/* N_SYM = m_STBC* (8*length+16+6*N_ES) / (m_STBC*N_DBPS)*/ /* N_SYM = m_STBC* (8*length+16+6*N_ES) / (m_STBC*N_DBPS)*/
N_SYM = pPMacTxInfo->m_STBC * (UINT)ceil((double)(pPMacTxInfo->PacketLength * 8 + 16 + N_ES * 6) / N_SYM = pPMacTxInfo->m_STBC * (u32)ceil((double)(pPMacTxInfo->PacketLength * 8 + 16 + N_ES * 6) /
(double)(N_DBPS * pPMacTxInfo->m_STBC)); (double)(N_DBPS * pPMacTxInfo->m_STBC));
} else { } else {
@ -2172,7 +2172,7 @@ void PMAC_Nsym_generator(
/* N_pld = length * 8 + 16*/ /* N_pld = length * 8 + 16*/
N_pld = pPMacTxInfo->PacketLength * 8 + 16; N_pld = pPMacTxInfo->PacketLength * 8 + 16;
RTW_INFO("N_pld = %d\n", N_pld); RTW_INFO("N_pld = %d\n", N_pld);
N_SYM = pPMacTxInfo->m_STBC * (UINT)ceil((double)(N_pld) / N_SYM = pPMacTxInfo->m_STBC * (u32)ceil((double)(N_pld) /
(double)(N_DBPS * pPMacTxInfo->m_STBC)); (double)(N_DBPS * pPMacTxInfo->m_STBC));
RTW_INFO("N_SYM = %d\n", N_SYM); RTW_INFO("N_SYM = %d\n", N_SYM);
/* N_avbits = N_CBPS *m_STBC *(N_pld/N_CBPS*R*m_STBC)*/ /* N_avbits = N_CBPS *m_STBC *(N_pld/N_CBPS*R*m_STBC)*/
@ -2202,19 +2202,19 @@ void PMAC_Nsym_generator(
} }
N_BPSC = N_BPSC_list[pPMacPktInfo->MCS]; N_BPSC = N_BPSC_list[pPMacPktInfo->MCS];
N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss; N_CBPS = N_BPSC * N_SD * pPMacPktInfo->Nss;
N_DBPS = (UINT)((double)N_CBPS * CR); N_DBPS = (u32)((double)N_CBPS * CR);
if (pPMacTxInfo->bLDPC == FALSE) { if (pPMacTxInfo->bLDPC == FALSE) {
if (pPMacTxInfo->bSGI) if (pPMacTxInfo->bSGI)
N_ES = (UINT)ceil((double)(N_DBPS) / 3.6 / 600.); N_ES = (u32)ceil((double)(N_DBPS) / 3.6 / 600.);
else else
N_ES = (UINT)ceil((double)(N_DBPS) / 4. / 600.); N_ES = (u32)ceil((double)(N_DBPS) / 4. / 600.);
/* N_SYM = m_STBC* (8*length+16+6*N_ES) / (m_STBC*N_DBPS)*/ /* N_SYM = m_STBC* (8*length+16+6*N_ES) / (m_STBC*N_DBPS)*/
N_SYM = pPMacTxInfo->m_STBC * (UINT)ceil((double)(pPMacTxInfo->PacketLength * 8 + 16 + N_ES * 6) / (double)(N_DBPS * pPMacTxInfo->m_STBC)); N_SYM = pPMacTxInfo->m_STBC * (u32)ceil((double)(pPMacTxInfo->PacketLength * 8 + 16 + N_ES * 6) / (double)(N_DBPS * pPMacTxInfo->m_STBC));
SIGA2B3 = 0; SIGA2B3 = 0;
} else { } else {
N_ES = 1; N_ES = 1;
/* N_SYM = m_STBC* (8*length+N_service) / (m_STBC*N_DBPS)*/ /* N_SYM = m_STBC* (8*length+N_service) / (m_STBC*N_DBPS)*/
N_SYM = pPMacTxInfo->m_STBC * (UINT)ceil((double)(pPMacTxInfo->PacketLength * 8 + 16) / (double)(N_DBPS * pPMacTxInfo->m_STBC)); N_SYM = pPMacTxInfo->m_STBC * (u32)ceil((double)(pPMacTxInfo->PacketLength * 8 + 16) / (double)(N_DBPS * pPMacTxInfo->m_STBC));
/* N_avbits = N_sys_init * N_CBPS*/ /* N_avbits = N_sys_init * N_CBPS*/
N_TCB = N_CBPS * N_SYM; N_TCB = N_CBPS * N_SYM;
/* N_pld = N_sys_init * N_DBPS*/ /* N_pld = N_sys_init * N_DBPS*/
@ -2256,12 +2256,12 @@ void PMAC_Nsym_generator(
========================================*/ ========================================*/
void L_SIG_generator( void L_SIG_generator(
UINT N_SYM, /* Max: 750*/ u32 N_SYM, /* Max: 750*/
PRT_PMAC_TX_INFO pPMacTxInfo, PRT_PMAC_TX_INFO pPMacTxInfo,
PRT_PMAC_PKT_INFO pPMacPktInfo) PRT_PMAC_PKT_INFO pPMacPktInfo)
{ {
u8 sig_bi[24] = {0}; /* 24 BIT*/ u8 sig_bi[24] = {0}; /* 24 BIT*/
UINT mode, LENGTH; u32 mode, LENGTH;
int i; int i;
if (MPT_IS_OFDM_RATE(pPMacTxInfo->TX_RATE)) { if (MPT_IS_OFDM_RATE(pPMacTxInfo->TX_RATE)) {
@ -2270,7 +2270,7 @@ void L_SIG_generator(
} else { } else {
u8 N_LTF; u8 N_LTF;
double T_data; double T_data;
UINT OFDM_symbol; u32 OFDM_symbol;
mode = 0; mode = 0;
@ -2287,9 +2287,9 @@ void L_SIG_generator(
/*(L-SIG, HT-SIG, HT-STF, HT-LTF....HT-LTF, Data)*/ /*(L-SIG, HT-SIG, HT-STF, HT-LTF....HT-LTF, Data)*/
if (MPT_IS_VHT_RATE(pPMacTxInfo->TX_RATE)) if (MPT_IS_VHT_RATE(pPMacTxInfo->TX_RATE))
OFDM_symbol = (UINT)ceil((double)(8 + 4 + N_LTF * 4 + N_SYM * T_data + 4) / 4.); OFDM_symbol = (u32)ceil((double)(8 + 4 + N_LTF * 4 + N_SYM * T_data + 4) / 4.);
else else
OFDM_symbol = (UINT)ceil((double)(8 + 4 + N_LTF * 4 + N_SYM * T_data) / 4.); OFDM_symbol = (u32)ceil((double)(8 + 4 + N_LTF * 4 + N_SYM * T_data) / 4.);
RTW_INFO("%s , OFDM_symbol =%d\n", __func__, OFDM_symbol); RTW_INFO("%s , OFDM_symbol =%d\n", __func__, OFDM_symbol);
LENGTH = OFDM_symbol * 3 - 3; LENGTH = OFDM_symbol * 3 - 3;
@ -2406,7 +2406,7 @@ void HT_SIG_generator(
PRT_PMAC_PKT_INFO pPMacPktInfo PRT_PMAC_PKT_INFO pPMacPktInfo
) )
{ {
UINT i; u32 i;
bool sig_bi[48] = {0}, crc8[8] = {0}; bool sig_bi[48] = {0}, crc8[8] = {0};
/* MCS Field*/ /* MCS Field*/
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
@ -2473,7 +2473,7 @@ void VHT_SIG_A_generator(
PRT_PMAC_TX_INFO pPMacTxInfo, PRT_PMAC_TX_INFO pPMacTxInfo,
PRT_PMAC_PKT_INFO pPMacPktInfo) PRT_PMAC_PKT_INFO pPMacPktInfo)
{ {
UINT i; u32 i;
bool sig_bi[48], crc8[8]; bool sig_bi[48], crc8[8];
memset(sig_bi, 0, 48); memset(sig_bi, 0, 48);
@ -2537,8 +2537,8 @@ void VHT_SIG_B_generator(
PRT_PMAC_TX_INFO pPMacTxInfo) PRT_PMAC_TX_INFO pPMacTxInfo)
{ {
bool sig_bi[32], crc8_bi[8]; bool sig_bi[32], crc8_bi[8];
UINT i, len, res, tail = 6, total_len, crc8_in_len; u32 i, len, res, tail = 6, total_len, crc8_in_len;
UINT sigb_len; u32 sigb_len;
memset(sig_bi, 0, 32); memset(sig_bi, 0, 32);
memset(crc8_bi, 0, 8); memset(crc8_bi, 0, 8);
@ -2608,8 +2608,8 @@ void VHT_Delimiter_generator(
) )
{ {
bool sig_bi[32] = {0}, crc8[8] = {0}; bool sig_bi[32] = {0}, crc8[8] = {0};
UINT crc8_in_len = 16; u32 crc8_in_len = 16;
UINT PacketLength = pPMacTxInfo->PacketLength; u32 PacketLength = pPMacTxInfo->PacketLength;
int j; int j;
/* Delimiter[0]: EOF*/ /* Delimiter[0]: EOF*/

View file

@ -54,8 +54,8 @@ void hal_mpt_SwitchRfSetting(PADAPTER pAdapter)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx); PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.mpt_ctx);
u8 ChannelToSw = pMptCtx->MptChannelToSw; u8 ChannelToSw = pMptCtx->MptChannelToSw;
ULONG ulRateIdx = pMptCtx->mpt_rate_index; u32 ulRateIdx = pMptCtx->mpt_rate_index;
ULONG ulbandwidth = pMptCtx->MptBandWidth; u32 ulbandwidth = pMptCtx->MptBandWidth;
/* <20120525, Kordan> Dynamic mechanism for APK, asked by Dennis.*/ /* <20120525, Kordan> Dynamic mechanism for APK, asked by Dennis.*/
if (IS_HARDWARE_TYPE_8188E(pAdapter)) { if (IS_HARDWARE_TYPE_8188E(pAdapter)) {
@ -103,7 +103,7 @@ void hal_mpt_CCKTxPowerAdjust(PADAPTER Adapter, bool bInCH14)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.mpt_ctx); PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.mpt_ctx);
u1Byte u1Channel = pHalData->current_channel; u1Byte u1Channel = pHalData->current_channel;
ULONG ulRateIdx = pMptCtx->mpt_rate_index; u32 ulRateIdx = pMptCtx->mpt_rate_index;
u1Byte DataRate = 0xFF; u1Byte DataRate = 0xFF;
DataRate = mpt_to_mgnt_rate(ulRateIdx); DataRate = mpt_to_mgnt_rate(ulRateIdx);

View file

@ -49,8 +49,8 @@
#define u8 u8 #define u8 u8
#define u16 u16 #define u16 u16
#define UINT u32 #define u32 u32
#define ULONG u32 #define u32 u32
typedef void (*proc_t)(void *); typedef void (*proc_t)(void *);

View file

@ -390,7 +390,7 @@ struct registry_priv {
}; };
/* For registry parameters */ /* For registry parameters */
#define RGTRY_OFT(field) ((ULONG)FIELD_OFFSET(struct registry_priv, field)) #define RGTRY_OFT(field) ((u32)FIELD_OFFSET(struct registry_priv, field))
#define RGTRY_SZ(field) sizeof(((struct registry_priv *) 0)->field) #define RGTRY_SZ(field) sizeof(((struct registry_priv *) 0)->field)
#define GetRegAmplifierType2G(_Adapter) (_Adapter->registrypriv.AmplifierType_2G) #define GetRegAmplifierType2G(_Adapter) (_Adapter->registrypriv.AmplifierType_2G)
@ -404,7 +404,7 @@ struct registry_priv {
#define GetRegGLNAType(_Adapter) (_Adapter->registrypriv.GLNA_Type) #define GetRegGLNAType(_Adapter) (_Adapter->registrypriv.GLNA_Type)
#define GetRegPowerTrackingType(_Adapter) (_Adapter->registrypriv.PowerTracking_Type) #define GetRegPowerTrackingType(_Adapter) (_Adapter->registrypriv.PowerTracking_Type)
#define BSSID_OFT(field) ((ULONG)FIELD_OFFSET(WLAN_BSSID_EX, field)) #define BSSID_OFT(field) ((u32)FIELD_OFFSET(WLAN_BSSID_EX, field))
#define BSSID_SZ(field) sizeof(((PWLAN_BSSID_EX) 0)->field) #define BSSID_SZ(field) sizeof(((PWLAN_BSSID_EX) 0)->field)
#define BW_MODE_2G(bw_mode) ((bw_mode) & 0x0F) #define BW_MODE_2G(bw_mode) ((bw_mode) & 0x0F)

View file

@ -178,9 +178,9 @@ NDIS_STATUS
MPTBT_SendOidBT( MPTBT_SendOidBT(
IN PADAPTER pAdapter, IN PADAPTER pAdapter,
IN void * InformationBuffer, IN void * InformationBuffer,
IN ULONG InformationBufferLength, IN u32 InformationBufferLength,
OUT PULONG BytesRead, OUT u32 * BytesRead,
OUT PULONG BytesNeeded OUT u32 * BytesNeeded
); );
void void

View file

@ -106,15 +106,11 @@ struct mp_tx {
#define s8Byte s64 #define s8Byte s64
#define ps8Byte s64* #define ps8Byte s64*
#define UINT u32
#define ULONG u32
#define PULONG u32*
typedef struct _RT_PMAC_PKT_INFO { typedef struct _RT_PMAC_PKT_INFO {
u8 MCS; u8 MCS;
u8 Nss; u8 Nss;
u8 Nsts; u8 Nsts;
UINT N_sym; u32 N_sym;
u8 SIGA2B3; u8 SIGA2B3;
} RT_PMAC_PKT_INFO, *PRT_PMAC_PKT_INFO; } RT_PMAC_PKT_INFO, *PRT_PMAC_PKT_INFO;
@ -133,8 +129,8 @@ typedef struct _RT_PMAC_TX_INFO {
u8 BandWidth:3; /* 0: 20 1:40 2:80Mhz */ u8 BandWidth:3; /* 0: 20 1:40 2:80Mhz */
u8 m_STBC; /* bSTBC + 1 */ u8 m_STBC; /* bSTBC + 1 */
u16 PacketPeriod; u16 PacketPeriod;
UINT PacketCount; u32 PacketCount;
UINT PacketLength; u32 PacketLength;
u8 PacketPattern; u8 PacketPattern;
u16 SFD; u16 SFD;
u8 SignalField; u8 SignalField;
@ -181,27 +177,27 @@ typedef struct _MPT_CONTEXT {
MPT_WORK_ITEM_HANDLER CurrMptAct; MPT_WORK_ITEM_HANDLER CurrMptAct;
/* 1=Start, 0=Stop from UI. */ /* 1=Start, 0=Stop from UI. */
ULONG MptTestStart; u32 MptTestStart;
/* _TEST_MODE, defined in MPT_Req2.h */ /* _TEST_MODE, defined in MPT_Req2.h */
ULONG MptTestItem; u32 MptTestItem;
/* Variable needed in each implementation of CurrMptAct. */ /* Variable needed in each implementation of CurrMptAct. */
ULONG MptActType; /* Type of action performed in CurrMptAct. */ u32 MptActType; /* Type of action performed in CurrMptAct. */
/* The Offset of IO operation is depend of MptActType. */ /* The Offset of IO operation is depend of MptActType. */
ULONG MptIoOffset; u32 MptIoOffset;
/* The Value of IO operation is depend of MptActType. */ /* The Value of IO operation is depend of MptActType. */
ULONG MptIoValue; u32 MptIoValue;
/* The RfPath of IO operation is depend of MptActType. */ /* The RfPath of IO operation is depend of MptActType. */
ULONG mpt_rf_path; u32 mpt_rf_path;
WIRELESS_MODE MptWirelessModeToSw; /* Wireless mode to switch. */ WIRELESS_MODE MptWirelessModeToSw; /* Wireless mode to switch. */
u8 MptChannelToSw; /* Channel to switch. */ u8 MptChannelToSw; /* Channel to switch. */
u8 MptInitGainToSet; /* Initial gain to set. */ u8 MptInitGainToSet; /* Initial gain to set. */
/* ULONG bMptAntennaA; */ /* TRUE if we want to use antenna A. */ /* u32 bMptAntennaA; */ /* TRUE if we want to use antenna A. */
ULONG MptBandWidth; /* bandwidth to switch. */ u32 MptBandWidth; /* bandwidth to switch. */
ULONG mpt_rate_index;/* rate index. */ u32 mpt_rate_index;/* rate index. */
/* Register value kept for Single Carrier Tx test. */ /* Register value kept for Single Carrier Tx test. */
u8 btMpCckTxPower; u8 btMpCckTxPower;
@ -211,13 +207,13 @@ typedef struct _MPT_CONTEXT {
u8 TxPwrLevel[4]; /* rf-A, rf-B*/ u8 TxPwrLevel[4]; /* rf-A, rf-B*/
u32 RegTxPwrLimit; u32 RegTxPwrLimit;
/* Content of RCR Regsiter for Mass Production Test. */ /* Content of RCR Regsiter for Mass Production Test. */
ULONG MptRCR; u32 MptRCR;
/* TRUE if we only receive packets with specific pattern. */ /* TRUE if we only receive packets with specific pattern. */
bool bMptFilterPattern; bool bMptFilterPattern;
/* Rx OK count, statistics used in Mass Production Test. */ /* Rx OK count, statistics used in Mass Production Test. */
ULONG MptRxOkCnt; u32 MptRxOkCnt;
/* Rx CRC32 error count, statistics used in Mass Production Test. */ /* Rx CRC32 error count, statistics used in Mass Production Test. */
ULONG MptRxCrcErrCnt; u32 MptRxCrcErrCnt;
bool bCckContTx; /* TRUE if we are in CCK Continuous Tx test. */ bool bCckContTx; /* TRUE if we are in CCK Continuous Tx test. */
bool bOfdmContTx; /* TRUE if we are in OFDM Continuous Tx test. */ bool bOfdmContTx; /* TRUE if we are in OFDM Continuous Tx test. */
@ -237,7 +233,7 @@ typedef struct _MPT_CONTEXT {
/* ACK counter asked by K.Y.. */ /* ACK counter asked by K.Y.. */
bool bMptEnableAckCounter; bool bMptEnableAckCounter;
ULONG MptAckCounter; u32 MptAckCounter;
/* SD3 Willis For 8192S to save 1T/2T RF table for ACUT Only fro ACUT delete later ~~~! */ /* SD3 Willis For 8192S to save 1T/2T RF table for ACUT Only fro ACUT delete later ~~~! */
/* s1Byte BufOfLines[2][MAX_LINES_HWCONFIG_TXT][MAX_BYTES_LINE_HWCONFIG_TXT]; */ /* s1Byte BufOfLines[2][MAX_LINES_HWCONFIG_TXT][MAX_BYTES_LINE_HWCONFIG_TXT]; */
@ -260,7 +256,7 @@ typedef struct _MPT_CONTEXT {
u1Byte c2hBuf[32]; u1Byte c2hBuf[32];
u1Byte btInBuf[100]; u1Byte btInBuf[100];
ULONG mptOutLen; u32 mptOutLen;
u1Byte mptOutBuf[100]; u1Byte mptOutBuf[100];
RT_PMAC_TX_INFO PMacTxInfo; RT_PMAC_TX_INFO PMacTxInfo;
RT_PMAC_PKT_INFO PMacPktInfo; RT_PMAC_PKT_INFO PMacPktInfo;
@ -704,7 +700,7 @@ void hal_mpt_SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
void mpt_ProSetPMacTx(PADAPTER Adapter); void mpt_ProSetPMacTx(PADAPTER Adapter);
void MP_PHY_SetRFPathSwitch(PADAPTER pAdapter , bool bMain); void MP_PHY_SetRFPathSwitch(PADAPTER pAdapter , bool bMain);
u8 MP_PHY_QueryRFPathSwitch(PADAPTER pAdapter); u8 MP_PHY_QueryRFPathSwitch(PADAPTER pAdapter);
ULONG mpt_ProQueryCalTxPower(PADAPTER pAdapter, u8 RfPath); u32 mpt_ProQueryCalTxPower(PADAPTER pAdapter, u8 RfPath);
void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart); void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart);
u8 mpt_to_mgnt_rate(u32 MptRateIdx); u8 mpt_to_mgnt_rate(u32 MptRateIdx);
u8 rtw_mpRateParseFunc(PADAPTER pAdapter, u8 *targetStr); u8 rtw_mpRateParseFunc(PADAPTER pAdapter, u8 *targetStr);
@ -728,7 +724,7 @@ PMAC_Nsym_generator(
); );
void void
L_SIG_generator( L_SIG_generator(
UINT N_SYM, /* Max: 750*/ u32 N_SYM, /* Max: 750*/
PRT_PMAC_TX_INFO pPMacTxInfo, PRT_PMAC_TX_INFO pPMacTxInfo,
PRT_PMAC_PKT_INFO pPMacPktInfo PRT_PMAC_PKT_INFO pPMacPktInfo
); );

View file

@ -22,7 +22,7 @@
#include <usb_vendor_req.h> #include <usb_vendor_req.h>
#define USBD_HALTED(Status) ((ULONG)(Status) >> 30 == 3) #define USBD_HALTED(Status) ((u32)(Status) >> 30 == 3)
u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, RT_USB_BREQUEST brequest, RT_USB_WVALUE wvalue, u8 windex, void *data, u8 datalen, u8 isdirectionin); u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, RT_USB_BREQUEST brequest, RT_USB_WVALUE wvalue, u8 windex, void *data, u8 datalen, u8 isdirectionin);

View file

@ -32,11 +32,11 @@ typedef long NDIS_802_11_RSSI; /* in dBm */
typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */ typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */ typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
typedef ULONG NDIS_802_11_KEY_INDEX; typedef u32 NDIS_802_11_KEY_INDEX;
typedef unsigned long long NDIS_802_11_KEY_RSC; typedef unsigned long long NDIS_802_11_KEY_RSC;
typedef struct _NDIS_802_11_SSID { typedef struct _NDIS_802_11_SSID {
ULONG SsidLength; u32 SsidLength;
u8 Ssid[32]; u8 Ssid[32];
} NDIS_802_11_SSID, *PNDIS_802_11_SSID; } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
@ -49,10 +49,10 @@ typedef enum _NDIS_802_11_NETWORK_TYPE {
} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE; } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
typedef struct _NDIS_802_11_CONFIGURATION_FH { typedef struct _NDIS_802_11_CONFIGURATION_FH {
ULONG Length; /* Length of structure */ u32 Length; /* Length of structure */
ULONG HopPattern; /* As defined by 802.11, MSB set */ u32 HopPattern; /* As defined by 802.11, MSB set */
ULONG HopSet; /* to one if non-802.11 */ u32 HopSet; /* to one if non-802.11 */
ULONG DwellTime; /* units are Kusec */ u32 DwellTime; /* units are Kusec */
} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH; } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
/* /*
@ -60,10 +60,10 @@ typedef struct _NDIS_802_11_CONFIGURATION_FH {
ODI Handler will convert the channel number to freq. number. ODI Handler will convert the channel number to freq. number.
*/ */
typedef struct _NDIS_802_11_CONFIGURATION { typedef struct _NDIS_802_11_CONFIGURATION {
ULONG Length; /* Length of structure */ u32 Length; /* Length of structure */
ULONG BeaconPeriod; /* units are Kusec */ u32 BeaconPeriod; /* units are Kusec */
ULONG ATIMWindow; /* units are Kusec */ u32 ATIMWindow; /* units are Kusec */
ULONG DSConfig; /* channel number */ u32 DSConfig; /* channel number */
NDIS_802_11_CONFIGURATION_FH FHConfig; NDIS_802_11_CONFIGURATION_FH FHConfig;
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION; } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
@ -91,7 +91,7 @@ typedef struct _NDIS_802_11_VARIABLE_IEs {
/* /*
Length is the 4 bytes multiples of the sume of Length is the 4 bytes multiples of the sume of
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG) sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (u32)
+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION) + sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
+ sizeof (NDIS_802_11_RATES_EX) + IELength + sizeof (NDIS_802_11_RATES_EX) + IELength
@ -148,15 +148,15 @@ typedef struct _NDIS_802_11_AI_RESFI {
} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION { typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION {
ULONG Length; u32 Length;
u16 AvailableRequestFixedIEs; u16 AvailableRequestFixedIEs;
NDIS_802_11_AI_REQFI RequestFixedIEs; NDIS_802_11_AI_REQFI RequestFixedIEs;
ULONG RequestIELength; u32 RequestIELength;
ULONG OffsetRequestIEs; u32 OffsetRequestIEs;
u16 AvailableResponseFixedIEs; u16 AvailableResponseFixedIEs;
NDIS_802_11_AI_RESFI ResponseFixedIEs; NDIS_802_11_AI_RESFI ResponseFixedIEs;
ULONG ResponseIELength; u32 ResponseIELength;
ULONG OffsetResponseIEs; u32 OffsetResponseIEs;
} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
typedef enum _NDIS_802_11_RELOAD_DEFAULTS { typedef enum _NDIS_802_11_RELOAD_DEFAULTS {
@ -166,31 +166,31 @@ typedef enum _NDIS_802_11_RELOAD_DEFAULTS {
/* Key mapping keys require a BSSID */ /* Key mapping keys require a BSSID */
typedef struct _NDIS_802_11_KEY { typedef struct _NDIS_802_11_KEY {
ULONG Length; /* Length of this structure */ u32 Length; /* Length of this structure */
ULONG KeyIndex; u32 KeyIndex;
ULONG KeyLength; /* length of key in bytes */ u32 KeyLength; /* length of key in bytes */
NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_MAC_ADDRESS BSSID;
NDIS_802_11_KEY_RSC KeyRSC; NDIS_802_11_KEY_RSC KeyRSC;
u8 KeyMaterial[32]; /* variable length depending on above field */ u8 KeyMaterial[32]; /* variable length depending on above field */
} NDIS_802_11_KEY, *PNDIS_802_11_KEY; } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
typedef struct _NDIS_802_11_REMOVE_KEY { typedef struct _NDIS_802_11_REMOVE_KEY {
ULONG Length; /* Length of this structure */ u32 Length; /* Length of this structure */
ULONG KeyIndex; u32 KeyIndex;
NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_MAC_ADDRESS BSSID;
} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY; } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
typedef struct _NDIS_802_11_WEP { typedef struct _NDIS_802_11_WEP {
ULONG Length; /* Length of this structure */ u32 Length; /* Length of this structure */
ULONG KeyIndex; /* 0 is the per-client key, 1-N are the global keys */ u32 KeyIndex; /* 0 is the per-client key, 1-N are the global keys */
ULONG KeyLength; /* length of key in bytes */ u32 KeyLength; /* length of key in bytes */
u8 KeyMaterial[16];/* variable length depending on above field */ u8 KeyMaterial[16];/* variable length depending on above field */
} NDIS_802_11_WEP, *PNDIS_802_11_WEP; } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST { typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST {
ULONG Length; /* Length of structure */ u32 Length; /* Length of structure */
NDIS_802_11_MAC_ADDRESS Bssid; NDIS_802_11_MAC_ADDRESS Bssid;
ULONG Flags; u32 Flags;
} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST; } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
typedef enum _NDIS_802_11_STATUS_TYPE { typedef enum _NDIS_802_11_STATUS_TYPE {
@ -220,8 +220,8 @@ typedef struct _NDIS_802_11_AUTHENTICATION_EVENT {
} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT; } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
typedef struct _NDIS_802_11_TEST { typedef struct _NDIS_802_11_TEST {
ULONG Length; u32 Length;
ULONG Type; u32 Type;
union { union {
NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent; NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
NDIS_802_11_RSSI RssiTrigger; NDIS_802_11_RSSI RssiTrigger;
@ -256,18 +256,18 @@ typedef struct _WLAN_BCN_INFO {
* WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz() * WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz()
*/ */
typedef struct _WLAN_BSSID_EX { typedef struct _WLAN_BSSID_EX {
ULONG Length; u32 Length;
NDIS_802_11_MAC_ADDRESS MacAddress; NDIS_802_11_MAC_ADDRESS MacAddress;
u8 Reserved[2];/* [0]: IS beacon frame */ u8 Reserved[2];/* [0]: IS beacon frame */
NDIS_802_11_SSID Ssid; NDIS_802_11_SSID Ssid;
ULONG Privacy; u32 Privacy;
NDIS_802_11_RSSI Rssi;/* (in dBM,raw data ,get from PHY) */ NDIS_802_11_RSSI Rssi;/* (in dBM,raw data ,get from PHY) */
NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
NDIS_802_11_CONFIGURATION Configuration; NDIS_802_11_CONFIGURATION Configuration;
NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
NDIS_802_11_RATES_EX SupportedRates; NDIS_802_11_RATES_EX SupportedRates;
WLAN_PHY_INFO PhyInfo; WLAN_PHY_INFO PhyInfo;
ULONG IELength; u32 IELength;
u8 IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */ u8 IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
} }
__attribute__((packed)) __attribute__((packed))
@ -335,12 +335,12 @@ enum UAPSD_MAX_SP {
typedef struct _PMKID_CANDIDATE { typedef struct _PMKID_CANDIDATE {
NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_MAC_ADDRESS BSSID;
ULONG Flags; u32 Flags;
} PMKID_CANDIDATE, *PPMKID_CANDIDATE; } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST { typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST {
ULONG Version; /* Version of the structure */ u32 Version; /* Version of the structure */
ULONG NumCandidates; /* No. of pmkid candidates */ u32 NumCandidates; /* No. of pmkid candidates */
PMKID_CANDIDATE CandidateList[1]; PMKID_CANDIDATE CandidateList[1];
} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST; } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
@ -352,10 +352,10 @@ typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION {
} NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION; } NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
typedef struct _NDIS_802_11_CAPABILITY { typedef struct _NDIS_802_11_CAPABILITY {
ULONG Length; u32 Length;
ULONG Version; u32 Version;
ULONG NoOfPMKIDs; u32 NoOfPMKIDs;
ULONG NoOfAuthEncryptPairsSupported; u32 NoOfAuthEncryptPairsSupported;
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1]; NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;