mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Remove remainder of code that depends on DM_ODM_SUPPORT_TYPE
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
78015aef77
commit
3a518f1886
12 changed files with 152 additions and 9400 deletions
|
@ -15,128 +15,88 @@ Major Change History:
|
|||
--*/
|
||||
#include "odm_precomp.h"
|
||||
|
||||
//#if( DM_ODM_SUPPORT_TYPE == ODM_MP)
|
||||
//#include "Mp_Precomp.h"
|
||||
//#endif
|
||||
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
// Rate adaptive parameters
|
||||
|
||||
|
||||
static u1Byte 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
|
||||
{8,7,6,4,0,6},//75 , idx=3
|
||||
{10,9,8,6,0,8},//71 , idx=4
|
||||
{10,9,8,4,0,8},//66 , idx=5
|
||||
{10,9,8,2,0,8},//62 , idx=6
|
||||
{10,9,8,0,0,8},//59 , idx=7
|
||||
{18,17,16,8,0,16},//53 , idx=8
|
||||
{26,25,24,16,0,24},//50 , idx=9
|
||||
{34,33,32,24,0,32},//47 , idx=0x0a
|
||||
//{34,33,32,16,0,32},//43 , idx=0x0b
|
||||
//{34,33,32,8,0,32},//40 , idx=0x0c
|
||||
//{34,33,28,8,0,32},//37 , idx=0x0d
|
||||
//{34,33,20,8,0,32},//32 , idx=0x0e
|
||||
//{34,32,24,8,0,32},//26 , idx=0x0f
|
||||
//{49,48,32,16,0,48},//20 , idx=0x10
|
||||
//{49,48,24,0,0,48},//17 , idx=0x11
|
||||
//{49,47,16,16,0,48},//15 , idx=0x12
|
||||
//{49,44,16,16,0,48},//12 , idx=0x13
|
||||
//{49,40,16,0,0,48},//9 , idx=0x14
|
||||
{34,31,28,20,0,32},//43 , idx=0x0b
|
||||
{34,31,27,18,0,32},//40 , idx=0x0c
|
||||
{34,31,26,16,0,32},//37 , idx=0x0d
|
||||
{34,30,22,16,0,32},//32 , idx=0x0e
|
||||
{34,30,24,16,0,32},//26 , idx=0x0f
|
||||
{49,46,40,16,0,48},//20 , idx=0x10
|
||||
{49,45,32,0,0,48},//17 , idx=0x11
|
||||
{49,45,22,18,0,48},//15 , idx=0x12
|
||||
{49,40,24,16,0,48},//12 , idx=0x13
|
||||
{49,32,18,12,0,48},//9 , idx=0x14
|
||||
{49,22,18,14,0,48},//6 , idx=0x15
|
||||
{49,16,16,0,0,48}};//3 //3, idx=0x16
|
||||
{6,5,4,3,0,4},//86 , idx=1
|
||||
{6,5,4,2,0,4},//81 , idx=2
|
||||
{8,7,6,4,0,6},//75 , idx=3
|
||||
{10,9,8,6,0,8},//71 , idx=4
|
||||
{10,9,8,4,0,8},//66 , idx=5
|
||||
{10,9,8,2,0,8},//62 , idx=6
|
||||
{10,9,8,0,0,8},//59 , idx=7
|
||||
{18,17,16,8,0,16},//53 , idx=8
|
||||
{26,25,24,16,0,24},//50 , idx=9
|
||||
{34,33,32,24,0,32},//47 , idx=0x0a
|
||||
{34,31,28,20,0,32},//43 , idx=0x0b
|
||||
{34,31,27,18,0,32},//40 , idx=0x0c
|
||||
{34,31,26,16,0,32},//37 , idx=0x0d
|
||||
{34,30,22,16,0,32},//32 , idx=0x0e
|
||||
{34,30,24,16,0,32},//26 , idx=0x0f
|
||||
{49,46,40,16,0,48},//20 , idx=0x10
|
||||
{49,45,32,0,0,48},//17 , idx=0x11
|
||||
{49,45,22,18,0,48},//15 , idx=0x12
|
||||
{49,40,24,16,0,48},//12 , idx=0x13
|
||||
{49,32,18,12,0,48},//9 , idx=0x14
|
||||
{49,22,18,14,0,48},//6 , idx=0x15
|
||||
{49,16,16,0,0,48}};//3 //3, idx=0x16
|
||||
|
||||
static u1Byte 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};
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
static u1Byte 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
|
||||
{0x0a,0x0a,0x0a,0x0a,0x0c,0x0c,0x0e,0x10,0x11,0x12,0x12,0x13, // SS<TH
|
||||
0x0e,0x0f,0x10,0x10,0x11,0x14,0x14,0x15,
|
||||
9,9,9,9,0x0c,0x0e,0x11,0x13}};
|
||||
|
||||
static u1Byte RETRY_PENALTY_UP_IDX[RATESIZE] = {0x10,0x10,0x10,0x10,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x14, // SS>TH
|
||||
0x13,0x13,0x14,0x14,0x15,0x15,0x15,0x15,
|
||||
0x11,0x11,0x12,0x13,0x13,0x13,0x14,0x15};
|
||||
|
||||
static u1Byte RSSI_THRESHOLD[RATESIZE] = {0,0,0,0,
|
||||
0,0,0,0,0,0x24,0x26,0x2a,
|
||||
0x13,0x15,0x17,0x18,0x1a,0x1c,0x1d,0x1f,
|
||||
0,0,0,0x1f,0x23,0x28,0x2a,0x2c};
|
||||
#else
|
||||
|
||||
// wilson modify
|
||||
static u1Byte 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
|
||||
{0x0a,0x0a,0x0b,0x0c,0x0a,0x0a,0x0b,0x0c,0x0d,0x10,0x13,0x14, // SS<TH
|
||||
0x0b,0x0c,0x0d,0x0e,0x0f,0x11,0x13,0x15,
|
||||
9,9,9,9,0x0c,0x0e,0x11,0x13}};
|
||||
4,4,4,4,6,0x0a,0x0b,0x0d,
|
||||
5,5,7,7,8,0x0b,0x0d,0x0f}, // 0329 R01
|
||||
{0x0a,0x0a,0x0b,0x0c,0x0a,0x0a,0x0b,0x0c,0x0d,0x10,0x13,0x14, // SS<TH
|
||||
0x0b,0x0c,0x0d,0x0e,0x0f,0x11,0x13,0x15,
|
||||
9,9,9,9,0x0c,0x0e,0x11,0x13}};
|
||||
|
||||
static u1Byte 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};
|
||||
0x0f,0x10,0x10,0x12,0x12,0x13,0x14,0x15,
|
||||
0x11,0x11,0x12,0x13,0x13,0x13,0x14,0x15};
|
||||
|
||||
static u1Byte 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};
|
||||
0,0,0,0,0,0x24,0x26,0x2a,
|
||||
0x18,0x1a,0x1d,0x1f,0x21,0x27,0x29,0x2a,
|
||||
0,0,0,0x1f,0x23,0x28,0x2a,0x2c};
|
||||
|
||||
#endif
|
||||
|
||||
/*static u1Byte RSSI_THRESHOLD[RATESIZE] = {0,0,0,0,
|
||||
0,0,0,0,0,0x24,0x26,0x2a,
|
||||
0x1a,0x1c,0x1e,0x21,0x24,0x2a,0x2b,0x2d,
|
||||
0,0,0,0x1f,0x23,0x28,0x2a,0x2c};*/
|
||||
static u2Byte 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};
|
||||
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] = {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};
|
||||
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] = {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
|
||||
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] = {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};
|
||||
|
||||
|
||||
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]={0x0f8ff015, // 0: 40M BGN mode
|
||||
0x0f8ff010, // 1: 40M GN mode
|
||||
0x0f8ff005, // 2: BN mode/ 40M BGN mode
|
||||
0x0f8ff000, // 3: N mode
|
||||
0x00000ff5, // 4: BG mode
|
||||
0x00000ff0, // 5: G mode
|
||||
0x0000000d, // 6: B mode
|
||||
0, // 7:
|
||||
0, // 8:
|
||||
0, // 9:
|
||||
0, // 10:
|
||||
0, // 11:
|
||||
0, // 12:
|
||||
0, // 13:
|
||||
0, // 14:
|
||||
0, // 15:
|
||||
|
||||
0x0f8ff010, // 1: 40M GN mode
|
||||
0x0f8ff005, // 2: BN mode/ 40M BGN mode
|
||||
0x0f8ff000, // 3: N mode
|
||||
0x00000ff5, // 4: BG mode
|
||||
0x00000ff0, // 5: G mode
|
||||
0x0000000d, // 6: B mode
|
||||
0, // 7:
|
||||
0, // 8:
|
||||
0, // 9:
|
||||
0, // 10:
|
||||
0, // 11:
|
||||
0, // 12:
|
||||
0, // 13:
|
||||
0, // 14:
|
||||
0, // 15:
|
||||
};
|
||||
static u1Byte PendingForRateUpFail[5]={2,10,24,40,60};
|
||||
static u2Byte DynamicTxRPTTiming[6]={0x186a, 0x30d4, 0x493e, 0x61a8, 0x7a12 ,0x927c}; // 200ms-1200ms
|
||||
|
@ -631,11 +591,7 @@ odm_RATxRPTTimerSetting(
|
|||
if(pDM_Odm->CurrminRptTime != minRptTime){
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
(" CurrminRptTime =0x%04x minRptTime=0x%04x\n", pDM_Odm->CurrminRptTime, minRptTime));
|
||||
#if(DM_ODM_SUPPORT_TYPE & (ODM_MP|ODM_AP))
|
||||
ODM_RA_Set_TxRPT_Time(pDM_Odm,minRptTime);
|
||||
#else
|
||||
rtw_rpt_timer_cfg_cmd(pDM_Odm->Adapter,minRptTime);
|
||||
#endif
|
||||
pDM_Odm->CurrminRptTime = minRptTime;
|
||||
}
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,(" <=====odm_RATxRPTTimerSetting()\n"));
|
||||
|
@ -838,9 +794,6 @@ ODM_RA_Set_TxRPT_Time(
|
|||
IN u2Byte minRptTime
|
||||
)
|
||||
{
|
||||
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
if (minRptTime != 0xffff)
|
||||
#endif
|
||||
ODM_Write2Byte(pDM_Odm, REG_TX_RPT_TIME, minRptTime);
|
||||
}
|
||||
|
||||
|
@ -879,7 +832,6 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
if(valid)
|
||||
{
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_MP|ODM_CE))
|
||||
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);
|
||||
|
@ -887,15 +839,6 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
pRAInfo->RTY[4] = (u2Byte)GET_TX_REPORT_TYPE1_RERTY_4(pBuffer);
|
||||
pRAInfo->DROP = (u2Byte)GET_TX_REPORT_TYPE1_DROP_0(pBuffer);
|
||||
pRAInfo->DROP1= (u2Byte)GET_TX_REPORT_TYPE1_DROP_1(pBuffer);
|
||||
#else
|
||||
pRAInfo->RTY[0] = (unsigned short)(pBuffer[1] << 8 | pBuffer[0]);
|
||||
pRAInfo->RTY[1] = pBuffer[2];
|
||||
pRAInfo->RTY[2] = pBuffer[3];
|
||||
pRAInfo->RTY[3] = pBuffer[4];
|
||||
pRAInfo->RTY[4] = pBuffer[5];
|
||||
pRAInfo->DROP = pBuffer[6];
|
||||
pRAInfo->DROP1= pBuffer[7];
|
||||
#endif
|
||||
pRAInfo->TOTAL = pRAInfo->RTY[0] + \
|
||||
pRAInfo->RTY[1] + \
|
||||
pRAInfo->RTY[2] + \
|
||||
|
@ -941,15 +884,6 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
odm_RateDecision_8188E(pDM_Odm, pRAInfo);
|
||||
#endif
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
extern void RTL8188E_SetStationTxRateInfo(PDM_ODM_T, PODM_RA_INFO_T, int);
|
||||
RTL8188E_SetStationTxRateInfo(pDM_Odm, pRAInfo, MacId);
|
||||
#ifdef DETECT_STA_EXISTANCE
|
||||
void RTL8188E_DetectSTAExistance(PDM_ODM_T pDM_Odm, PODM_RA_INFO_T pRAInfo, int MacID);
|
||||
RTL8188E_DetectSTAExistance(pDM_Odm, pRAInfo, MacId);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
|
||||
("macid=%d R0=%d R1=%d R2=%d R3=%d R4=%d drop=%d valid0=%x RateID=%d SGI=%d\n",
|
||||
MacId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue