* [PATCH 0/3] staging: r8188eu: remove dead code
@ 2022-02-16 19:40 Michael Straube
2022-02-16 19:40 ` [PATCH 1/3] staging: r8188eu: remove unused enum Michael Straube
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Straube @ 2022-02-16 19:40 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
This series removes an unused enum and some dead code related to a
variable that is always zero.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (3):
staging: r8188eu: remove unused enum
staging: r8188eu: bCCKinCH14 is read-only
staging: r8188eu: rename CCKSwingTable_Ch1_Ch13
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 16 +++------
drivers/staging/r8188eu/hal/odm.c | 38 +-------------------
drivers/staging/r8188eu/hal/usb_halinit.c | 5 ---
drivers/staging/r8188eu/include/odm.h | 4 +--
4 files changed, 6 insertions(+), 57 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/3] staging: r8188eu: remove unused enum 2022-02-16 19:40 [PATCH 0/3] staging: r8188eu: remove dead code Michael Straube @ 2022-02-16 19:40 ` Michael Straube 2022-02-16 19:40 ` [PATCH 2/3] staging: r8188eu: bCCKinCH14 is read-only Michael Straube 2022-02-16 19:40 ` [PATCH 3/3] staging: r8188eu: rename CCKSwingTable_Ch1_Ch13 Michael Straube 2 siblings, 0 replies; 4+ messages in thread From: Michael Straube @ 2022-02-16 19:40 UTC (permalink / raw) To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube Remove an unused enum from usb_halinit.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> --- drivers/staging/r8188eu/hal/usb_halinit.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 3b8869455166..ca2833d3e7dc 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -484,11 +484,6 @@ static void _BBTurnOnBlock(struct adapter *Adapter) rtl8188e_PHY_SetBBReg(Adapter, rFPGA0_RFMOD, bOFDMEn, 0x1); } -enum { - Antenna_Lfet = 1, - Antenna_Right = 2, -}; - static void _InitAntenna_Selection(struct adapter *Adapter) { struct hal_data_8188e *haldata = &Adapter->haldata; -- 2.35.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] staging: r8188eu: bCCKinCH14 is read-only 2022-02-16 19:40 [PATCH 0/3] staging: r8188eu: remove dead code Michael Straube 2022-02-16 19:40 ` [PATCH 1/3] staging: r8188eu: remove unused enum Michael Straube @ 2022-02-16 19:40 ` Michael Straube 2022-02-16 19:40 ` [PATCH 3/3] staging: r8188eu: rename CCKSwingTable_Ch1_Ch13 Michael Straube 2 siblings, 0 replies; 4+ messages in thread From: Michael Straube @ 2022-02-16 19:40 UTC (permalink / raw) To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube The variable bCCKinCH14 in struct odm_rf_cal is never set. It stays at its default value 0. Remove bCCKinCH14 from struct odm_rf_cal and remove related dead code. Signed-off-by: Michael Straube <straube.linux@gmail.com> --- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 16 +++------ drivers/staging/r8188eu/hal/odm.c | 36 -------------------- drivers/staging/r8188eu/include/odm.h | 2 -- 3 files changed, 4 insertions(+), 50 deletions(-) diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c index 0fcf094ae594..523d4fedb3cc 100644 --- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c +++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c @@ -149,18 +149,10 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E( TempCCk = dm_odm->RFCalibrateInfo.RegA24; for (i = 0; i < CCK_TABLE_SIZE; i++) { - if (dm_odm->RFCalibrateInfo.bCCKinCH14) { - if (memcmp((void *)&TempCCk, (void *)&CCKSwingTable_Ch14[i][2], 4)) { - CCK_index_old = (u8)i; - dm_odm->BbSwingIdxCckBase = (u8)i; - break; - } - } else { - if (memcmp((void *)&TempCCk, (void *)&CCKSwingTable_Ch1_Ch13[i][2], 4)) { - CCK_index_old = (u8)i; - dm_odm->BbSwingIdxCckBase = (u8)i; - break; - } + if (memcmp((void *)&TempCCk, (void *)&CCKSwingTable_Ch1_Ch13[i][2], 4)) { + CCK_index_old = (u8)i; + dm_odm->BbSwingIdxCckBase = (u8)i; + break; } } diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c index b4be706545ff..24a884bcea3b 100644 --- a/drivers/staging/r8188eu/hal/odm.c +++ b/drivers/staging/r8188eu/hal/odm.c @@ -101,42 +101,6 @@ u8 CCKSwingTable_Ch1_Ch13[CCK_TABLE_SIZE][8] = { {0x09, 0x08, 0x07, 0x06, 0x04, 0x03, 0x01, 0x01} /* 32, -16.0dB */ }; -u8 CCKSwingTable_Ch14[CCK_TABLE_SIZE][8] = { - {0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00}, /* 0, +0dB */ - {0x33, 0x32, 0x2b, 0x19, 0x00, 0x00, 0x00, 0x00}, /* 1, -0.5dB */ - {0x30, 0x2f, 0x29, 0x18, 0x00, 0x00, 0x00, 0x00}, /* 2, -1.0dB */ - {0x2d, 0x2d, 0x17, 0x17, 0x00, 0x00, 0x00, 0x00}, /* 3, -1.5dB */ - {0x2b, 0x2a, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00}, /* 4, -2.0dB */ - {0x28, 0x28, 0x24, 0x14, 0x00, 0x00, 0x00, 0x00}, /* 5, -2.5dB */ - {0x26, 0x25, 0x21, 0x13, 0x00, 0x00, 0x00, 0x00}, /* 6, -3.0dB */ - {0x24, 0x23, 0x1f, 0x12, 0x00, 0x00, 0x00, 0x00}, /* 7, -3.5dB */ - {0x22, 0x21, 0x1d, 0x11, 0x00, 0x00, 0x00, 0x00}, /* 8, -4.0dB */ - {0x20, 0x20, 0x1b, 0x10, 0x00, 0x00, 0x00, 0x00}, /* 9, -4.5dB */ - {0x1f, 0x1e, 0x1a, 0x0f, 0x00, 0x00, 0x00, 0x00}, /* 10, -5.0dB */ - {0x1d, 0x1c, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, /* 11, -5.5dB */ - {0x1b, 0x1a, 0x17, 0x0e, 0x00, 0x00, 0x00, 0x00}, /* 12, -6.0dB */ - {0x1a, 0x19, 0x16, 0x0d, 0x00, 0x00, 0x00, 0x00}, /* 13, -6.5dB */ - {0x18, 0x17, 0x15, 0x0c, 0x00, 0x00, 0x00, 0x00}, /* 14, -7.0dB */ - {0x17, 0x16, 0x13, 0x0b, 0x00, 0x00, 0x00, 0x00}, /* 15, -7.5dB */ - {0x16, 0x15, 0x12, 0x0b, 0x00, 0x00, 0x00, 0x00}, /* 16, -8.0dB */ - {0x14, 0x14, 0x11, 0x0a, 0x00, 0x00, 0x00, 0x00}, /* 17, -8.5dB */ - {0x13, 0x13, 0x10, 0x0a, 0x00, 0x00, 0x00, 0x00}, /* 18, -9.0dB */ - {0x12, 0x12, 0x0f, 0x09, 0x00, 0x00, 0x00, 0x00}, /* 19, -9.5dB */ - {0x11, 0x11, 0x0f, 0x09, 0x00, 0x00, 0x00, 0x00}, /* 20, -10.0dB */ - {0x10, 0x10, 0x0e, 0x08, 0x00, 0x00, 0x00, 0x00}, /* 21, -10.5dB */ - {0x0f, 0x0f, 0x0d, 0x08, 0x00, 0x00, 0x00, 0x00}, /* 22, -11.0dB */ - {0x0e, 0x0e, 0x0c, 0x07, 0x00, 0x00, 0x00, 0x00}, /* 23, -11.5dB */ - {0x0d, 0x0d, 0x0c, 0x07, 0x00, 0x00, 0x00, 0x00}, /* 24, -12.0dB */ - {0x0d, 0x0c, 0x0b, 0x06, 0x00, 0x00, 0x00, 0x00}, /* 25, -12.5dB */ - {0x0c, 0x0c, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x00}, /* 26, -13.0dB */ - {0x0b, 0x0b, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x00}, /* 27, -13.5dB */ - {0x0b, 0x0a, 0x09, 0x05, 0x00, 0x00, 0x00, 0x00}, /* 28, -14.0dB */ - {0x0a, 0x0a, 0x09, 0x05, 0x00, 0x00, 0x00, 0x00}, /* 29, -14.5dB */ - {0x0a, 0x09, 0x08, 0x05, 0x00, 0x00, 0x00, 0x00}, /* 30, -15.0dB */ - {0x09, 0x09, 0x08, 0x05, 0x00, 0x00, 0x00, 0x00}, /* 31, -15.5dB */ - {0x09, 0x08, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00} /* 32, -16.0dB */ -}; - #define RxDefaultAnt1 0x65a9 #define RxDefaultAnt2 0x569a diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h index 698d61d5fc40..f17c707f2cde 100644 --- a/drivers/staging/r8188eu/include/odm.h +++ b/drivers/staging/r8188eu/include/odm.h @@ -252,7 +252,6 @@ struct odm_rf_cal { bool bReloadtxpowerindex; u8 bRfPiEnable; - u8 bCCKinCH14; u8 CCK_index; u8 OFDM_index; bool bDoneTxpower; @@ -449,7 +448,6 @@ enum dm_swas { extern u32 OFDMSwingTable[OFDM_TABLE_SIZE_92D]; extern u8 CCKSwingTable_Ch1_Ch13[CCK_TABLE_SIZE][8]; -extern u8 CCKSwingTable_Ch14 [CCK_TABLE_SIZE][8]; /* check Sta pointer valid or not */ #define IS_STA_VALID(pSta) (pSta) -- 2.35.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] staging: r8188eu: rename CCKSwingTable_Ch1_Ch13 2022-02-16 19:40 [PATCH 0/3] staging: r8188eu: remove dead code Michael Straube 2022-02-16 19:40 ` [PATCH 1/3] staging: r8188eu: remove unused enum Michael Straube 2022-02-16 19:40 ` [PATCH 2/3] staging: r8188eu: bCCKinCH14 is read-only Michael Straube @ 2022-02-16 19:40 ` Michael Straube 2 siblings, 0 replies; 4+ messages in thread From: Michael Straube @ 2022-02-16 19:40 UTC (permalink / raw) To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube After removing CCKSwingTable_Ch14 there is only one table left and we can rename CCKSwingTable_Ch1_Ch13 to simply cck_swing_table. Signed-off-by: Michael Straube <straube.linux@gmail.com> --- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 2 +- drivers/staging/r8188eu/hal/odm.c | 2 +- drivers/staging/r8188eu/include/odm.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c index 523d4fedb3cc..b944c8071a3b 100644 --- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c +++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c @@ -149,7 +149,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E( TempCCk = dm_odm->RFCalibrateInfo.RegA24; for (i = 0; i < CCK_TABLE_SIZE; i++) { - if (memcmp((void *)&TempCCk, (void *)&CCKSwingTable_Ch1_Ch13[i][2], 4)) { + if (memcmp((void *)&TempCCk, (void *)&cck_swing_table[i][2], 4)) { CCK_index_old = (u8)i; dm_odm->BbSwingIdxCckBase = (u8)i; break; diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c index 24a884bcea3b..e0824eefd83a 100644 --- a/drivers/staging/r8188eu/hal/odm.c +++ b/drivers/staging/r8188eu/hal/odm.c @@ -65,7 +65,7 @@ u32 OFDMSwingTable[OFDM_TABLE_SIZE_92D] = { 0x0b40002d,/* 42, -15.0dB */ }; -u8 CCKSwingTable_Ch1_Ch13[CCK_TABLE_SIZE][8] = { +u8 cck_swing_table[CCK_TABLE_SIZE][8] = { {0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04}, /* 0, +0dB */ {0x33, 0x32, 0x2b, 0x23, 0x1a, 0x11, 0x08, 0x04}, /* 1, -0.5dB */ {0x30, 0x2f, 0x29, 0x21, 0x19, 0x10, 0x08, 0x03}, /* 2, -1.0dB */ diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h index f17c707f2cde..9fb09e0a0df9 100644 --- a/drivers/staging/r8188eu/include/odm.h +++ b/drivers/staging/r8188eu/include/odm.h @@ -447,7 +447,7 @@ enum dm_swas { #define CCK_TABLE_SIZE 33 extern u32 OFDMSwingTable[OFDM_TABLE_SIZE_92D]; -extern u8 CCKSwingTable_Ch1_Ch13[CCK_TABLE_SIZE][8]; +extern u8 cck_swing_table[CCK_TABLE_SIZE][8]; /* check Sta pointer valid or not */ #define IS_STA_VALID(pSta) (pSta) -- 2.35.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-16 19:41 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-02-16 19:40 [PATCH 0/3] staging: r8188eu: remove dead code Michael Straube 2022-02-16 19:40 ` [PATCH 1/3] staging: r8188eu: remove unused enum Michael Straube 2022-02-16 19:40 ` [PATCH 2/3] staging: r8188eu: bCCKinCH14 is read-only Michael Straube 2022-02-16 19:40 ` [PATCH 3/3] staging: r8188eu: rename CCKSwingTable_Ch1_Ch13 Michael Straube
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox