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;
_list *plist, *phead;
ULONG bssid_ex_sz;
u32 bssid_ex_sz;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
#ifdef CONFIG_P2P

View file

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