mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
staging: r8188eu: remove dead code from odm_RxPhyStatus92CSeries_Parsing()
The test "if (dm_odm->SupportICType & (ODM_RTL8188E | ODM_RTL8812))" is always true since SupportICType is always ODM_RTL8188E in this driver. Remove the test and the never executed else arm. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210916094354.15635-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
abe2799976
commit
3862536891
@ -111,7 +111,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
|
||||
pPhyInfo->RxMIMOSignalQuality[RF_PATH_B] = -1;
|
||||
|
||||
if (isCCKrate) {
|
||||
u8 report;
|
||||
u8 cck_agc_rpt;
|
||||
|
||||
dm_odm->PhyDbgInfo.NumQryPhyStatusCCK++;
|
||||
@ -125,7 +124,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
|
||||
/* 2011.11.28 LukeLee: 88E use different LNA & VGA gain table */
|
||||
/* The RSSI formula should be modified according to the gain table */
|
||||
/* In 88E, cck_highpwr is always set to 1 */
|
||||
if (dm_odm->SupportICType & (ODM_RTL8188E | ODM_RTL8812)) {
|
||||
LNA_idx = ((cck_agc_rpt & 0xE0) >> 5);
|
||||
VGA_idx = (cck_agc_rpt & 0x1F);
|
||||
switch (LNA_idx) {
|
||||
@ -172,67 +170,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
|
||||
if (PWDB_ALL > 100)
|
||||
PWDB_ALL = 100;
|
||||
}
|
||||
} else {
|
||||
if (!cck_highpwr) {
|
||||
report = (cck_agc_rpt & 0xc0) >> 6;
|
||||
switch (report) {
|
||||
/* 03312009 modified by cosa */
|
||||
/* Modify the RF RNA gain value to -40, -20, -2, 14 by Jenyu's suggestion */
|
||||
/* Note: different RF with the different RNA gain. */
|
||||
case 0x3:
|
||||
rx_pwr_all = -46 - (cck_agc_rpt & 0x3e);
|
||||
break;
|
||||
case 0x2:
|
||||
rx_pwr_all = -26 - (cck_agc_rpt & 0x3e);
|
||||
break;
|
||||
case 0x1:
|
||||
rx_pwr_all = -12 - (cck_agc_rpt & 0x3e);
|
||||
break;
|
||||
case 0x0:
|
||||
rx_pwr_all = 16 - (cck_agc_rpt & 0x3e);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
report = (cck_agc_rpt & 0x60) >> 5;
|
||||
switch (report) {
|
||||
case 0x3:
|
||||
rx_pwr_all = -46 - ((cck_agc_rpt & 0x1f) << 1);
|
||||
break;
|
||||
case 0x2:
|
||||
rx_pwr_all = -26 - ((cck_agc_rpt & 0x1f) << 1);
|
||||
break;
|
||||
case 0x1:
|
||||
rx_pwr_all = -12 - ((cck_agc_rpt & 0x1f) << 1);
|
||||
break;
|
||||
case 0x0:
|
||||
rx_pwr_all = 16 - ((cck_agc_rpt & 0x1f) << 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PWDB_ALL = odm_QueryRxPwrPercentage(rx_pwr_all);
|
||||
|
||||
/* Modification for ext-LNA board */
|
||||
if (dm_odm->BoardType == ODM_BOARD_HIGHPWR) {
|
||||
if ((cck_agc_rpt >> 7) == 0) {
|
||||
PWDB_ALL = (PWDB_ALL > 94) ? 100 : (PWDB_ALL + 6);
|
||||
} else {
|
||||
if (PWDB_ALL > 38)
|
||||
PWDB_ALL -= 16;
|
||||
else
|
||||
PWDB_ALL = (PWDB_ALL <= 16) ? (PWDB_ALL >> 2) : (PWDB_ALL - 12);
|
||||
}
|
||||
|
||||
/* CCK modification */
|
||||
if (PWDB_ALL > 25 && PWDB_ALL <= 60)
|
||||
PWDB_ALL += 6;
|
||||
} else {/* Modification for int-LNA board */
|
||||
if (PWDB_ALL > 99)
|
||||
PWDB_ALL -= 8;
|
||||
else if (PWDB_ALL > 50 && PWDB_ALL <= 68)
|
||||
PWDB_ALL += 4;
|
||||
}
|
||||
}
|
||||
|
||||
pPhyInfo->RxPWDBAll = PWDB_ALL;
|
||||
pPhyInfo->BTRxRSSIPercentage = PWDB_ALL;
|
||||
|
Loading…
Reference in New Issue
Block a user