rtl8188eu: Convert non-standard variable types to regular ones

These include changing s1Byte to s8, etc.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-08-14 12:03:28 -05:00
parent 9dd1827027
commit 2db42a3fbf
39 changed files with 1041 additions and 1120 deletions

View file

@ -17,7 +17,7 @@ Major Change History:
/* Rate adaptive parameters */
static u1Byte RETRY_PENALTY[PERENTRY][RETRYSIZE+1] = {
static u8 RETRY_PENALTY[PERENTRY][RETRYSIZE+1] = {
{5, 4, 3, 2, 0, 3}, /* 92 , idx = 0 */
{6, 5, 4, 3, 0, 4}, /* 86 , idx = 1 */
{6, 5, 4, 2, 0, 4}, /* 81 , idx = 2 */
@ -43,12 +43,12 @@ static u1Byte RETRY_PENALTY[PERENTRY][RETRYSIZE+1] = {
{49, 16, 16, 0, 0, 48}
}; /* 3, idx = 0x16 */
static u1Byte RETRY_PENALTY_UP[RETRYSIZE+1] = {49, 44, 16, 16, 0, 48}; /* 12% for rate up */
static u8 RETRY_PENALTY_UP[RETRYSIZE+1] = {49, 44, 16, 16, 0, 48}; /* 12% for rate up */
static u1Byte PT_PENALTY[RETRYSIZE+1] = {34, 31, 30, 24, 0, 32};
static u8 PT_PENALTY[RETRYSIZE+1] = {34, 31, 30, 24, 0, 32};
/* wilson modify */
static u1Byte RETRY_PENALTY_IDX[2][RATESIZE] = {
static u8 RETRY_PENALTY_IDX[2][RATESIZE] = {
{4, 4, 4, 5, 4, 4, 5, 7, 7, 7, 8, 0x0a, /* SS>TH */
4, 4, 4, 4, 6, 0x0a, 0x0b, 0x0d,
5, 5, 7, 7, 8, 0x0b, 0x0d, 0x0f}, /* 0329 R01 */
@ -58,41 +58,41 @@ static u1Byte RETRY_PENALTY_IDX[2][RATESIZE] = {
9, 9, 9, 9, 0x0c, 0x0e, 0x11, 0x13}
};
static u1Byte RETRY_PENALTY_UP_IDX[RATESIZE] = {
static u8 RETRY_PENALTY_UP_IDX[RATESIZE] = {
0x0c, 0x0d, 0x0d, 0x0f, 0x0d, 0x0e,
0x0f, 0x0f, 0x10, 0x12, 0x13, 0x14, /* SS>TH */
0x0f, 0x10, 0x10, 0x12, 0x12, 0x13, 0x14, 0x15,
0x11, 0x11, 0x12, 0x13, 0x13, 0x13, 0x14, 0x15};
static u1Byte RSSI_THRESHOLD[RATESIZE] = {
static u8 RSSI_THRESHOLD[RATESIZE] = {
0, 0, 0, 0,
0, 0, 0, 0, 0, 0x24, 0x26, 0x2a,
0x18, 0x1a, 0x1d, 0x1f, 0x21, 0x27, 0x29, 0x2a,
0, 0, 0, 0x1f, 0x23, 0x28, 0x2a, 0x2c};
static u2Byte N_THRESHOLD_HIGH[RATESIZE] = {
static u16 N_THRESHOLD_HIGH[RATESIZE] = {
4, 4, 8, 16,
24, 36, 48, 72, 96, 144, 192, 216,
60, 80, 100, 160, 240, 400, 560, 640,
300, 320, 480, 720, 1000, 1200, 1600, 2000};
static u2Byte N_THRESHOLD_LOW[RATESIZE] = {
static u16 N_THRESHOLD_LOW[RATESIZE] = {
2, 2, 4, 8,
12, 18, 24, 36, 48, 72, 96, 108,
30, 40, 50, 80, 120, 200, 280, 320,
150, 160, 240, 360, 500, 600, 800, 1000};
static u1Byte TRYING_NECESSARY[RATESIZE] = {
static u8 TRYING_NECESSARY[RATESIZE] = {
2, 2, 2, 2,
2, 2, 3, 3, 4, 4, 5, 7,
4, 4, 7, 10, 10, 12, 12, 18,
5, 7, 7, 8, 11, 18, 36, 60}; /* 0329 1207 */
static u1Byte DROPING_NECESSARY[RATESIZE] = {
static u8 DROPING_NECESSARY[RATESIZE] = {
1, 1, 1, 1,
1, 2, 3, 4, 5, 6, 7, 8,
1, 2, 3, 4, 5, 6, 7, 8,
5, 6, 7, 8, 9, 10, 11, 12};
static u4Byte INIT_RATE_FALLBACK_TABLE[16] = {
static u32 INIT_RATE_FALLBACK_TABLE[16] = {
0x0f8ff015, /* 0: 40M BGN mode */
0x0f8ff010, /* 1: 40M GN mode */
0x0f8ff005, /* 2: BN mode/ 40M BGN mode */
@ -111,8 +111,8 @@ static u4Byte INIT_RATE_FALLBACK_TABLE[16] = {
0, /* 15: */
};
static u1Byte PendingForRateUpFail[5] = {2, 10, 24, 40, 60};
static u2Byte DynamicTxRPTTiming[6] = {
static u8 PendingForRateUpFail[5] = {2, 10, 24, 40, 60};
static u16 DynamicTxRPTTiming[6] = {
0x186a, 0x30d4, 0x493e, 0x61a8, 0x7a12 , 0x927c}; /* 200ms-1200ms */
/* End Rate adaptive parameters */
@ -120,10 +120,10 @@ static u2Byte DynamicTxRPTTiming[6] = {
static void odm_SetTxRPTTiming_8188E(
struct odm_dm_struct *dm_odm,
struct odm_ra_info *pRaInfo,
u1Byte extend
u8 extend
)
{
u1Byte idx = 0;
u8 idx = 0;
for (idx = 0; idx < 5; idx++)
if (DynamicTxRPTTiming[idx] == pRaInfo->RptTime)
@ -146,8 +146,8 @@ static void odm_SetTxRPTTiming_8188E(
static int odm_RateDown_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_info *pRaInfo)
{
u1Byte RateID, LowestRate, HighestRate;
u1Byte i;
u8 RateID, LowestRate, HighestRate;
u8 i;
ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE, ("=====>odm_RateDown_8188E()\n"));
if (NULL == pRaInfo) {
@ -205,8 +205,8 @@ static int odm_RateUp_8188E(
struct odm_ra_info *pRaInfo
)
{
u1Byte RateID, HighestRate;
u1Byte i;
u8 RateID, HighestRate;
u8 i;
ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE, ("=====>odm_RateUp_8188E()\n"));
if (NULL == pRaInfo) {
@ -258,7 +258,7 @@ RateUpfinish:
static void odm_ResetRaCounter_8188E(struct odm_ra_info *pRaInfo)
{
u1Byte RateID;
u8 RateID;
RateID = pRaInfo->DecisionRate;
pRaInfo->NscUp = (N_THRESHOLD_HIGH[RateID]+N_THRESHOLD_LOW[RateID])>>1;
@ -269,9 +269,9 @@ static void odm_RateDecision_8188E(struct odm_dm_struct *dm_odm,
struct odm_ra_info *pRaInfo
)
{
u1Byte RateID = 0, RtyPtID = 0, PenaltyID1 = 0, PenaltyID2 = 0;
/* u4Byte pool_retry; */
static u1Byte DynamicTxRPTTimingCounter;
u8 RateID = 0, RtyPtID = 0, PenaltyID1 = 0, PenaltyID2 = 0;
/* u32 pool_retry; */
static u8 DynamicTxRPTTimingCounter;
ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE, ("=====>odm_RateDecision_8188E()\n"));
@ -357,8 +357,8 @@ static void odm_RateDecision_8188E(struct odm_dm_struct *dm_odm,
static int odm_ARFBRefresh_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_info *pRaInfo)
{ /* Wilson 2011/10/26 */
u4Byte MaskFromReg;
s1Byte i;
u32 MaskFromReg;
s8 i;
switch (pRaInfo->RateID) {
case RATR_INX_WIRELESS_NGB:
@ -498,11 +498,11 @@ static void odm_PTTryState_8188E(struct odm_ra_info *pRaInfo)
static void odm_PTDecision_8188E(struct odm_ra_info *pRaInfo)
{
u1Byte j;
u1Byte temp_stage;
u4Byte numsc;
u4Byte num_total;
u1Byte stage_id;
u8 j;
u8 temp_stage;
u32 numsc;
u32 num_total;
u8 stage_id;
numsc = 0;
num_total = pRaInfo->TOTAL * PT_PENALTY[5];
@ -534,7 +534,7 @@ static void odm_PTDecision_8188E(struct odm_ra_info *pRaInfo)
static void
odm_RATxRPTTimerSetting(
struct odm_dm_struct *dm_odm,
u2Byte minRptTime
u16 minRptTime
)
{
ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE, (" =====>odm_RATxRPTTimerSetting()\n"));
@ -560,11 +560,11 @@ ODM_RASupport_Init(
dm_odm->RaSupport88E = true;
}
int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u1Byte macid)
int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u8 macid)
{
struct odm_ra_info *pRaInfo = &dm_odm->RAInfo[macid];
u1Byte WirelessMode = 0xFF; /* invalid value */
u1Byte max_rate_idx = 0x13; /* MCS7 */
u8 WirelessMode = 0xFF; /* invalid value */
u8 max_rate_idx = 0x13; /* MCS7 */
if (dm_odm->pWirelessMode != NULL)
WirelessMode = *(dm_odm->pWirelessMode);
@ -619,7 +619,7 @@ int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u1Byte macid)
int ODM_RAInfo_Init_all(struct odm_dm_struct *dm_odm)
{
u1Byte macid = 0;
u8 macid = 0;
ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("=====>\n"));
dm_odm->CurrminRptTime = 0;
@ -630,7 +630,7 @@ int ODM_RAInfo_Init_all(struct odm_dm_struct *dm_odm)
return 0;
}
u1Byte ODM_RA_GetShortGI_8188E(struct odm_dm_struct *dm_odm, u1Byte macid)
u8 ODM_RA_GetShortGI_8188E(struct odm_dm_struct *dm_odm, u8 macid)
{
if ((NULL == dm_odm) || (macid >= ASSOCIATE_ENTRY_NUM))
return 0;
@ -639,9 +639,9 @@ u1Byte ODM_RA_GetShortGI_8188E(struct odm_dm_struct *dm_odm, u1Byte macid)
return dm_odm->RAInfo[macid].RateSGI;
}
u1Byte ODM_RA_GetDecisionRate_8188E(struct odm_dm_struct *dm_odm, u1Byte macid)
u8 ODM_RA_GetDecisionRate_8188E(struct odm_dm_struct *dm_odm, u8 macid)
{
u1Byte DecisionRate = 0;
u8 DecisionRate = 0;
if ((NULL == dm_odm) || (macid >= ASSOCIATE_ENTRY_NUM))
return 0;
@ -651,9 +651,9 @@ u1Byte ODM_RA_GetDecisionRate_8188E(struct odm_dm_struct *dm_odm, u1Byte macid)
return DecisionRate;
}
u1Byte ODM_RA_GetHwPwrStatus_8188E(struct odm_dm_struct *dm_odm, u1Byte macid)
u8 ODM_RA_GetHwPwrStatus_8188E(struct odm_dm_struct *dm_odm, u8 macid)
{
u1Byte PTStage = 5;
u8 PTStage = 5;
if ((NULL == dm_odm) || (macid >= ASSOCIATE_ENTRY_NUM))
return 0;
@ -663,7 +663,7 @@ u1Byte ODM_RA_GetHwPwrStatus_8188E(struct odm_dm_struct *dm_odm, u1Byte macid)
return PTStage;
}
void ODM_RA_UpdateRateInfo_8188E(struct odm_dm_struct *dm_odm, u1Byte macid, u1Byte RateID, u4Byte RateMask, u1Byte SGIEnable)
void ODM_RA_UpdateRateInfo_8188E(struct odm_dm_struct *dm_odm, u8 macid, u8 RateID, u32 RateMask, u8 SGIEnable)
{
struct odm_ra_info *pRaInfo = NULL;
@ -680,7 +680,7 @@ void ODM_RA_UpdateRateInfo_8188E(struct odm_dm_struct *dm_odm, u1Byte macid, u1B
odm_ARFBRefresh_8188E(dm_odm, pRaInfo);
}
void ODM_RA_SetRSSI_8188E(struct odm_dm_struct *dm_odm, u1Byte macid, u1Byte Rssi)
void ODM_RA_SetRSSI_8188E(struct odm_dm_struct *dm_odm, u8 macid, u8 Rssi)
{
struct odm_ra_info *pRaInfo = NULL;
@ -693,18 +693,18 @@ void ODM_RA_SetRSSI_8188E(struct odm_dm_struct *dm_odm, u1Byte macid, u1Byte Rss
pRaInfo->RssiStaRA = Rssi;
}
void ODM_RA_Set_TxRPT_Time(struct odm_dm_struct *dm_odm, u2Byte minRptTime)
void ODM_RA_Set_TxRPT_Time(struct odm_dm_struct *dm_odm, u16 minRptTime)
{
ODM_Write2Byte(dm_odm, REG_TX_RPT_TIME, minRptTime);
}
void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, pu1Byte TxRPT_Buf, u2Byte TxRPT_Len, u4Byte macid_entry0, u4Byte macid_entry1)
void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, u8 *TxRPT_Buf, u16 TxRPT_Len, u32 macid_entry0, u32 macid_entry1)
{
struct odm_ra_info *pRAInfo = NULL;
u1Byte MacId = 0;
pu1Byte pBuffer = NULL;
u4Byte valid = 0, ItemNum = 0;
u2Byte minRptTime = 0x927c;
u8 MacId = 0;
u8 *pBuffer = NULL;
u32 valid = 0, ItemNum = 0;
u16 minRptTime = 0x927c;
ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
("=====>ODM_RA_TxRPT2Handle_8188E(): valid0 =%d valid1 =%d BufferLength =%d\n",
@ -723,12 +723,12 @@ void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, pu1Byte TxRPT_Buf,
pRAInfo = &(dm_odm->RAInfo[MacId]);
if (valid) {
pRAInfo->RTY[0] = (u2Byte)GET_TX_REPORT_TYPE1_RERTY_0(pBuffer);
pRAInfo->RTY[1] = (u2Byte)GET_TX_REPORT_TYPE1_RERTY_1(pBuffer);
pRAInfo->RTY[2] = (u2Byte)GET_TX_REPORT_TYPE1_RERTY_2(pBuffer);
pRAInfo->RTY[3] = (u2Byte)GET_TX_REPORT_TYPE1_RERTY_3(pBuffer);
pRAInfo->RTY[4] = (u2Byte)GET_TX_REPORT_TYPE1_RERTY_4(pBuffer);
pRAInfo->DROP = (u2Byte)GET_TX_REPORT_TYPE1_DROP_0(pBuffer);
pRAInfo->RTY[0] = (u16)GET_TX_REPORT_TYPE1_RERTY_0(pBuffer);
pRAInfo->RTY[1] = (u16)GET_TX_REPORT_TYPE1_RERTY_1(pBuffer);
pRAInfo->RTY[2] = (u16)GET_TX_REPORT_TYPE1_RERTY_2(pBuffer);
pRAInfo->RTY[3] = (u16)GET_TX_REPORT_TYPE1_RERTY_3(pBuffer);
pRAInfo->RTY[4] = (u16)GET_TX_REPORT_TYPE1_RERTY_4(pBuffer);
pRAInfo->DROP = (u16)GET_TX_REPORT_TYPE1_DROP_0(pBuffer);
pRAInfo->TOTAL = pRAInfo->RTY[0] + pRAInfo->RTY[1] +
pRAInfo->RTY[2] + pRAInfo->RTY[3] +
pRAInfo->RTY[4] + pRAInfo->DROP;