The function that this comment describes is not present in the
r8188eu driver. The comment can be removed.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/usb_halinit.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 83813388de24..ab7b80144403 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -624,21 +624,6 @@ static void _InitAntenna_Selection(struct adapter *Adapter)
DBG_88E("%s,Cur_ant:(%x)%s\n", __func__, haldata->CurAntenna, (haldata->CurAntenna == Antenna_A) ? "Antenna_A" : "Antenna_B");
}
-/*-----------------------------------------------------------------------------
- * Function: HwSuspendModeEnable92Cu()
- *
- * Overview: HW suspend mode switch.
- *
- * Input: NONE
- *
- * Output: NONE
- *
- * Return: NONE
- *
- * Revised History:
- * When Who Remark
- * 08/23/2010 MHC HW suspend mode switch test..
- *---------------------------------------------------------------------------*/
enum rt_rf_power_state RfOnOffDetect(struct adapter *adapt)
{
u8 val8;
--
2.20.1
RegTxPause and RegBcnCtrlVal from struct hal_data_8188e are set but never
read. Remove them.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/usb_halinit.c | 2 --
drivers/staging/r8188eu/include/rtl8188e_hal.h | 3 ---
2 files changed, 5 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index bd3ba6ab364f..1e6885d75bf3 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -556,8 +556,6 @@ static void _InitBeaconParameters(struct adapter *Adapter)
/* beacause test chip does not contension before sending beacon. by tynli. 2009.11.03 */
rtw_write16(Adapter, REG_BCNTCFG, 0x660F);
- haldata->RegBcnCtrlVal = rtw_read8(Adapter, REG_BCN_CTRL);
- haldata->RegTxPause = rtw_read8(Adapter, REG_TXPAUSE);
haldata->RegFwHwTxQCtrl = rtw_read8(Adapter, REG_FWHW_TXQ_CTRL + 2);
haldata->RegReg542 = rtw_read8(Adapter, REG_TBTT_PROHIBIT + 2);
haldata->RegCR_1 = rtw_read8(Adapter, REG_CR + 1);
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index bfe32864ded6..b374398bad24 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -307,9 +307,6 @@ struct hal_data_8188e {
u8 LastHMEBoxNum;
u8 fw_ractrl;
- u8 RegTxPause;
- /* Beacon function related global variable. */
- u32 RegBcnCtrlVal;
u8 RegFwHwTxQCtrl;
u8 RegReg542;
u8 RegCR_1;
--
2.20.1
bSWLedCtrl in struct LED_871x is not used. Remove it.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/include/rtw_led.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h
index ebe6395642ae..c035fe267635 100644
--- a/drivers/staging/r8188eu/include/rtw_led.h
+++ b/drivers/staging/r8188eu/include/rtw_led.h
@@ -107,8 +107,6 @@ struct LED_871x {
struct timer_list BlinkTimer; /* Timer object for led blinking. */
- u8 bSWLedCtrl;
-
/* ALPHA, added by chiyoko, 20090106 */
u8 bLedNoLinkBlinkInProgress;
u8 bLedLinkBlinkInProgress;
--
2.20.1
HwRxPageSize from struct hal_data_8188e is set but never read. Remove
the component and the code to initialise it.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/usb_halinit.c | 20 -------------------
.../staging/r8188eu/include/rtl8188e_hal.h | 1 -
.../staging/r8188eu/include/rtl8188e_spec.h | 4 ----
3 files changed, 25 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index ab7b80144403..f71f25e234ab 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -524,26 +524,6 @@ usb_AggSettingRxUpdate(
/* TODO: */
break;
}
-
- switch (PBP_128) {
- case PBP_128:
- haldata->HwRxPageSize = 128;
- break;
- case PBP_64:
- haldata->HwRxPageSize = 64;
- break;
- case PBP_256:
- haldata->HwRxPageSize = 256;
- break;
- case PBP_512:
- haldata->HwRxPageSize = 512;
- break;
- case PBP_1024:
- haldata->HwRxPageSize = 1024;
- break;
- default:
- break;
- }
} /* usb_AggSettingRxUpdate */
static void InitUsbAggregationSetting(struct adapter *Adapter)
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 08dedf4c91b8..fc6acbba17e7 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -360,7 +360,6 @@ struct hal_data_8188e {
u8 C2hArray[16];
u8 UsbTxAggMode;
u8 UsbTxAggDescNum;
- u16 HwRxPageSize; /* Hardware setting */
u32 MaxUsbRxAggBlock;
enum usb_rx_agg_mode UsbRxAggMode;
diff --git a/drivers/staging/r8188eu/include/rtl8188e_spec.h b/drivers/staging/r8188eu/include/rtl8188e_spec.h
index 1c96f7b81245..01aeaa4ac605 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_spec.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_spec.h
@@ -893,11 +893,7 @@ Current IOREG MAP
#define _PSRX(x) (x)
#define _PSTX(x) ((x) << 4)
-#define PBP_64 0x0
#define PBP_128 0x1
-#define PBP_256 0x2
-#define PBP_512 0x3
-#define PBP_1024 0x4
/* 2 TX/RXDMA */
#define RXDMA_ARBBW_EN BIT(0)
--
2.20.1
The IntrMask array is set but never read. Remove it.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/usb_halinit.c | 3 ---
drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 -
2 files changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index f71f25e234ab..bd3ba6ab364f 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -119,18 +119,15 @@ static void _InitInterrupt(struct adapter *Adapter)
{
u32 imr, imr_ex;
u8 usb_opt;
- struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter);
/* HISR write one to clear */
rtw_write32(Adapter, REG_HISR_88E, 0xFFFFFFFF);
/* HIMR - */
imr = IMR_PSTIMEOUT_88E | IMR_TBDER_88E | IMR_CPWM_88E | IMR_CPWM2_88E;
rtw_write32(Adapter, REG_HIMR_88E, imr);
- haldata->IntrMask[0] = imr;
imr_ex = IMR_TXERR_88E | IMR_RXERR_88E | IMR_TXFOVW_88E | IMR_RXFOVW_88E;
rtw_write32(Adapter, REG_HIMRE_88E, imr_ex);
- haldata->IntrMask[1] = imr_ex;
/* REG_USB_SPECIAL_OPTION - BIT(4) */
/* 0; Use interrupt endpoint to upload interrupt pkt */
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index fc6acbba17e7..bfe32864ded6 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -356,7 +356,6 @@ struct hal_data_8188e {
/* Interrupt relatd register information. */
u32 IntArray[3];/* HISR0,HISR1,HSISR */
- u32 IntrMask[3];
u8 C2hArray[16];
u8 UsbTxAggMode;
u8 UsbTxAggDescNum;
--
2.20.1
chip_type in struct adapter is never read. Remove the component
and the code to initialise it.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/usb_ops_linux.c | 6 ------
drivers/staging/r8188eu/include/drv_types.h | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 10 ----------
drivers/staging/r8188eu/include/usb_ops.h | 3 ---
drivers/staging/r8188eu/os_dep/usb_intf.c | 7 -------
5 files changed, 27 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index 9544300fab65..4c1974cc9a16 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -558,9 +558,3 @@ void rtl8188eu_xmit_tasklet(unsigned long priv)
break;
}
}
-
-void rtl8188eu_set_hw_type(struct adapter *adapt)
-{
- adapt->chip_type = RTL8188E;
- DBG_88E("CHIP TYPE: RTL8188E\n");
-}
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 9fa561ad340b..9b9f7d89519c 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -205,7 +205,6 @@ struct adapter {
* replace module. */
int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
int bDongle;/* build-in module or external dongle */
- u16 chip_type;
u16 interface_type;/* USB,SDIO,SPI,PCI */
struct dvobj_priv *dvobj;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index ee8e67dafe7c..89bd6f4b06e2 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -15,16 +15,6 @@ enum RTL871X_HCI_TYPE {
RTW_GSPI = BIT(3),
};
-enum _CHIP_TYPE {
- NULL_CHIP_TYPE,
- RTL8712_8188S_8191S_8192S,
- RTL8188C_8192C,
- RTL8192D,
- RTL8723A,
- RTL8188E,
- MAX_CHIP_TYPE
-};
-
enum hw_variables {
HW_VAR_MEDIA_STATUS,
HW_VAR_MEDIA_STATUS1,
diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8188eu/include/usb_ops.h
index 1939b781b097..0a1155bbc7b8 100644
--- a/drivers/staging/r8188eu/include/usb_ops.h
+++ b/drivers/staging/r8188eu/include/usb_ops.h
@@ -19,9 +19,6 @@
#include "usb_ops_linux.h"
-void rtl8188eu_set_hw_type(struct adapter *padapter);
-#define hal_set_hw_type rtl8188eu_set_hw_type
-
/*
* Increase and check if the continual_urb_error of this @param dvobjprivei
* is larger than MAX_CONTINUAL_URB_ERR
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index b5e0c6561108..193b5faac56a 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -172,12 +172,6 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
}
-static void chip_by_usb_id(struct adapter *padapter)
-{
- padapter->chip_type = NULL_CHIP_TYPE;
- hal_set_hw_type(padapter);
-}
-
static void usb_intf_start(struct adapter *padapter)
{
rtl8188eu_inirp_init(padapter);
@@ -387,7 +381,6 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
/* step 1-1., decide the chip_type via vid/pid */
padapter->interface_type = RTW_USB;
- chip_by_usb_id(padapter);
if (rtw_handle_dualmac(padapter, 1) != _SUCCESS)
goto free_adapter;
--
2.20.1
This driver only supports chips that connect via usb. Remove
interface_type from struct adapter, use a constant in the one
place where the interface type is needed.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/rtl8188e_dm.c | 5 +----
drivers/staging/r8188eu/include/drv_types.h | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 7 -------
drivers/staging/r8188eu/os_dep/usb_intf.c | 3 ---
4 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
index 21494adf2a19..1a0176a60704 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
@@ -40,10 +40,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_PLATFORM, ODM_CE);
- if (Adapter->interface_type == RTW_GSPI)
- ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_SDIO);
- else
- ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, Adapter->interface_type);/* RTL871X_HCI_TYPE */
+ ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_USB);
ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_IC_TYPE, ODM_RTL8188E);
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 9b9f7d89519c..3c972acf329c 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -205,7 +205,6 @@ struct adapter {
* replace module. */
int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
int bDongle;/* build-in module or external dongle */
- u16 interface_type;/* USB,SDIO,SPI,PCI */
struct dvobj_priv *dvobj;
struct mlme_priv mlmepriv;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 89bd6f4b06e2..ffed6ddadd3f 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -8,13 +8,6 @@
#include "drv_types.h"
#include "Hal8188EPhyCfg.h"
-enum RTL871X_HCI_TYPE {
- RTW_PCIE = BIT(0),
- RTW_USB = BIT(1),
- RTW_SDIO = BIT(2),
- RTW_GSPI = BIT(3),
-};
-
enum hw_variables {
HW_VAR_MEDIA_STATUS,
HW_VAR_MEDIA_STATUS1,
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index 193b5faac56a..5699c44a722b 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -379,9 +379,6 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
padapter->hw_init_mutex = &usb_drv->hw_init_mutex;
- /* step 1-1., decide the chip_type via vid/pid */
- padapter->interface_type = RTW_USB;
-
if (rtw_handle_dualmac(padapter, 1) != _SUCCESS)
goto free_adapter;
--
2.20.1
We set ODM_CMNINFO_INTERFACE to ODM_ITRF_USB as this driver supports
only usb. Therefore, dm_odm->SupportInterface is always ODM_ITRF_USB.
Simplify some if conditions accordingly. Remove/replace two empty
functions.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/odm_HWConfig.c | 58 +++++++---------------
1 file changed, 19 insertions(+), 39 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/odm_HWConfig.c b/drivers/staging/r8188eu/hal/odm_HWConfig.c
index 86c2e03dcdce..2383f965f689 100644
--- a/drivers/staging/r8188eu/hal/odm_HWConfig.c
+++ b/drivers/staging/r8188eu/hal/odm_HWConfig.c
@@ -17,54 +17,34 @@ static u8 odm_QueryRxPwrPercentage(s8 AntPower)
return 100 + AntPower;
}
-/* 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer. */
-/* IF other SW team do not support the feature, remove this section.?? */
-static s32 odm_sig_patch_lenove(struct odm_dm_struct *dm_odm, s32 CurrSig)
-{
- return 0;
-}
-
-static s32 odm_sig_patch_netcore(struct odm_dm_struct *dm_odm, s32 CurrSig)
-{
- return 0;
-}
-
static s32 odm_SignalScaleMapping_92CSeries(struct odm_dm_struct *dm_odm, s32 CurrSig)
{
s32 RetSig = 0;
- if ((dm_odm->SupportInterface == ODM_ITRF_USB) ||
- (dm_odm->SupportInterface == ODM_ITRF_SDIO)) {
- if (CurrSig >= 51 && CurrSig <= 100)
- RetSig = 100;
- else if (CurrSig >= 41 && CurrSig <= 50)
- RetSig = 80 + ((CurrSig - 40) * 2);
- else if (CurrSig >= 31 && CurrSig <= 40)
- RetSig = 66 + (CurrSig - 30);
- else if (CurrSig >= 21 && CurrSig <= 30)
- RetSig = 54 + (CurrSig - 20);
- else if (CurrSig >= 10 && CurrSig <= 20)
- RetSig = 42 + (((CurrSig - 10) * 2) / 3);
- else if (CurrSig >= 5 && CurrSig <= 9)
- RetSig = 22 + (((CurrSig - 5) * 3) / 2);
- else if (CurrSig >= 1 && CurrSig <= 4)
- RetSig = 6 + (((CurrSig - 1) * 3) / 2);
- else
- RetSig = CurrSig;
- }
+ if (CurrSig >= 51 && CurrSig <= 100)
+ RetSig = 100;
+ else if (CurrSig >= 41 && CurrSig <= 50)
+ RetSig = 80 + ((CurrSig - 40) * 2);
+ else if (CurrSig >= 31 && CurrSig <= 40)
+ RetSig = 66 + (CurrSig - 30);
+ else if (CurrSig >= 21 && CurrSig <= 30)
+ RetSig = 54 + (CurrSig - 20);
+ else if (CurrSig >= 10 && CurrSig <= 20)
+ RetSig = 42 + (((CurrSig - 10) * 2) / 3);
+ else if (CurrSig >= 5 && CurrSig <= 9)
+ RetSig = 22 + (((CurrSig - 5) * 3) / 2);
+ else if (CurrSig >= 1 && CurrSig <= 4)
+ RetSig = 6 + (((CurrSig - 1) * 3) / 2);
+ else
+ RetSig = CurrSig;
+
return RetSig;
}
static s32 odm_SignalScaleMapping(struct odm_dm_struct *dm_odm, s32 CurrSig)
{
- if ((dm_odm->SupportPlatform == ODM_MP) &&
- (dm_odm->SupportInterface != ODM_ITRF_PCIE) && /* USB & SDIO */
- (dm_odm->PatchID == 10))
- return odm_sig_patch_netcore(dm_odm, CurrSig);
- else if ((dm_odm->SupportPlatform == ODM_MP) &&
- (dm_odm->SupportInterface == ODM_ITRF_PCIE) &&
- (dm_odm->PatchID == 19))
- return odm_sig_patch_lenove(dm_odm, CurrSig);
+ if ((dm_odm->SupportPlatform == ODM_MP) && (dm_odm->PatchID == 10))
+ return 0;
else
return odm_SignalScaleMapping_92CSeries(dm_odm, CurrSig);
}
--
2.20.1
HardwareType in struct adapter is never read, it can be removed.
Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/usb_ops_linux.c | 1 -
drivers/staging/r8188eu/include/drv_types.h | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
3 files changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index c15a75513c8c..9544300fab65 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -562,6 +562,5 @@ void rtl8188eu_xmit_tasklet(unsigned long priv)
void rtl8188eu_set_hw_type(struct adapter *adapt)
{
adapt->chip_type = RTL8188E;
- adapt->HardwareType = HARDWARE_TYPE_RTL8188EU;
DBG_88E("CHIP TYPE: RTL8188E\n");
}
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 6d63429d06c6..9fa561ad340b 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -206,7 +206,6 @@ struct adapter {
int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
int bDongle;/* build-in module or external dongle */
u16 chip_type;
- u16 HardwareType;
u16 interface_type;/* USB,SDIO,SPI,PCI */
struct dvobj_priv *dvobj;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 29ca90a86844..ee8e67dafe7c 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -137,8 +137,6 @@ struct hal_ops {
#define RF_CHANGE_BY_HW BIT(30)
#define RF_CHANGE_BY_SW BIT(31)
-#define HARDWARE_TYPE_RTL8188EU 17
-
#define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
void rtl8188eu_set_hal_ops(struct adapter *padapter);
--
2.20.1
On 10/5/21 22:08, Martin Kaiser wrote:
> The function that this comment describes is not present in the
> r8188eu driver. The comment can be removed.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/usb_halinit.c | 15 ---------------
> 1 file changed, 15 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
> index 83813388de24..ab7b80144403 100644
> --- a/drivers/staging/r8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/r8188eu/hal/usb_halinit.c
> @@ -624,21 +624,6 @@ static void _InitAntenna_Selection(struct adapter *Adapter)
> DBG_88E("%s,Cur_ant:(%x)%s\n", __func__, haldata->CurAntenna, (haldata->CurAntenna == Antenna_A) ? "Antenna_A" : "Antenna_B");
> }
>
> -/*-----------------------------------------------------------------------------
> - * Function: HwSuspendModeEnable92Cu()
> - *
> - * Overview: HW suspend mode switch.
> - *
> - * Input: NONE
> - *
> - * Output: NONE
> - *
> - * Return: NONE
> - *
> - * Revised History:
> - * When Who Remark
> - * 08/23/2010 MHC HW suspend mode switch test..
> - *---------------------------------------------------------------------------*/
> enum rt_rf_power_state RfOnOffDetect(struct adapter *adapt)
> {
> u8 val8;
>
Hi Martin,
patch looks good, just one note. The function RfOnOffDetect() is not
used and could be removed as well.
Regards,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> bSWLedCtrl in struct LED_871x is not used. Remove it.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/include/rtw_led.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h
> index ebe6395642ae..c035fe267635 100644
> --- a/drivers/staging/r8188eu/include/rtw_led.h
> +++ b/drivers/staging/r8188eu/include/rtw_led.h
> @@ -107,8 +107,6 @@ struct LED_871x {
>
> struct timer_list BlinkTimer; /* Timer object for led blinking. */
>
> - u8 bSWLedCtrl;
> -
> /* ALPHA, added by chiyoko, 20090106 */
> u8 bLedNoLinkBlinkInProgress;
> u8 bLedLinkBlinkInProgress;
>
Looks good to me.
Acked-by: Michael Straube <[email protected]>
Thanks,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> HwRxPageSize from struct hal_data_8188e is set but never read. Remove
> the component and the code to initialise it.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/usb_halinit.c | 20 -------------------
> .../staging/r8188eu/include/rtl8188e_hal.h | 1 -
> .../staging/r8188eu/include/rtl8188e_spec.h | 4 ----
> 3 files changed, 25 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
> index ab7b80144403..f71f25e234ab 100644
> --- a/drivers/staging/r8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/r8188eu/hal/usb_halinit.c
> @@ -524,26 +524,6 @@ usb_AggSettingRxUpdate(
> /* TODO: */
> break;
> }
> -
> - switch (PBP_128) {
> - case PBP_128:
> - haldata->HwRxPageSize = 128;
> - break;
> - case PBP_64:
> - haldata->HwRxPageSize = 64;
> - break;
> - case PBP_256:
> - haldata->HwRxPageSize = 256;
> - break;
> - case PBP_512:
> - haldata->HwRxPageSize = 512;
> - break;
> - case PBP_1024:
> - haldata->HwRxPageSize = 1024;
> - break;
> - default:
> - break;
> - }
> } /* usb_AggSettingRxUpdate */
>
> static void InitUsbAggregationSetting(struct adapter *Adapter)
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> index 08dedf4c91b8..fc6acbba17e7 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> @@ -360,7 +360,6 @@ struct hal_data_8188e {
> u8 C2hArray[16];
> u8 UsbTxAggMode;
> u8 UsbTxAggDescNum;
> - u16 HwRxPageSize; /* Hardware setting */
> u32 MaxUsbRxAggBlock;
>
> enum usb_rx_agg_mode UsbRxAggMode;
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_spec.h b/drivers/staging/r8188eu/include/rtl8188e_spec.h
> index 1c96f7b81245..01aeaa4ac605 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_spec.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_spec.h
> @@ -893,11 +893,7 @@ Current IOREG MAP
> #define _PSRX(x) (x)
> #define _PSTX(x) ((x) << 4)
>
> -#define PBP_64 0x0
> #define PBP_128 0x1
> -#define PBP_256 0x2
> -#define PBP_512 0x3
> -#define PBP_1024 0x4
>
> /* 2 TX/RXDMA */
> #define RXDMA_ARBBW_EN BIT(0)
>
Looks good to me.
Acked-by: Michael Straube <[email protected]>
Thanks,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> RegTxPause and RegBcnCtrlVal from struct hal_data_8188e are set but never
> read. Remove them.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/usb_halinit.c | 2 --
> drivers/staging/r8188eu/include/rtl8188e_hal.h | 3 ---
> 2 files changed, 5 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
> index bd3ba6ab364f..1e6885d75bf3 100644
> --- a/drivers/staging/r8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/r8188eu/hal/usb_halinit.c
> @@ -556,8 +556,6 @@ static void _InitBeaconParameters(struct adapter *Adapter)
> /* beacause test chip does not contension before sending beacon. by tynli. 2009.11.03 */
> rtw_write16(Adapter, REG_BCNTCFG, 0x660F);
>
> - haldata->RegBcnCtrlVal = rtw_read8(Adapter, REG_BCN_CTRL);
> - haldata->RegTxPause = rtw_read8(Adapter, REG_TXPAUSE);
> haldata->RegFwHwTxQCtrl = rtw_read8(Adapter, REG_FWHW_TXQ_CTRL + 2);
> haldata->RegReg542 = rtw_read8(Adapter, REG_TBTT_PROHIBIT + 2);
> haldata->RegCR_1 = rtw_read8(Adapter, REG_CR + 1);
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> index bfe32864ded6..b374398bad24 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> @@ -307,9 +307,6 @@ struct hal_data_8188e {
> u8 LastHMEBoxNum;
>
> u8 fw_ractrl;
> - u8 RegTxPause;
> - /* Beacon function related global variable. */
> - u32 RegBcnCtrlVal;
> u8 RegFwHwTxQCtrl;
> u8 RegReg542;
> u8 RegCR_1;
>
Looks good to me.
Acked-by: Michael Straube <[email protected]>
Thanks,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> HardwareType in struct adapter is never read, it can be removed.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/usb_ops_linux.c | 1 -
> drivers/staging/r8188eu/include/drv_types.h | 1 -
> drivers/staging/r8188eu/include/hal_intf.h | 2 --
> 3 files changed, 4 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
> index c15a75513c8c..9544300fab65 100644
> --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
> +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
> @@ -562,6 +562,5 @@ void rtl8188eu_xmit_tasklet(unsigned long priv)
> void rtl8188eu_set_hw_type(struct adapter *adapt)
> {
> adapt->chip_type = RTL8188E;
> - adapt->HardwareType = HARDWARE_TYPE_RTL8188EU;
> DBG_88E("CHIP TYPE: RTL8188E\n");
> }
> diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
> index 6d63429d06c6..9fa561ad340b 100644
> --- a/drivers/staging/r8188eu/include/drv_types.h
> +++ b/drivers/staging/r8188eu/include/drv_types.h
> @@ -206,7 +206,6 @@ struct adapter {
> int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
> int bDongle;/* build-in module or external dongle */
> u16 chip_type;
> - u16 HardwareType;
> u16 interface_type;/* USB,SDIO,SPI,PCI */
>
> struct dvobj_priv *dvobj;
> diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
> index 29ca90a86844..ee8e67dafe7c 100644
> --- a/drivers/staging/r8188eu/include/hal_intf.h
> +++ b/drivers/staging/r8188eu/include/hal_intf.h
> @@ -137,8 +137,6 @@ struct hal_ops {
> #define RF_CHANGE_BY_HW BIT(30)
> #define RF_CHANGE_BY_SW BIT(31)
>
> -#define HARDWARE_TYPE_RTL8188EU 17
> -
> #define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
>
> void rtl8188eu_set_hal_ops(struct adapter *padapter);
>
Looks good to me.
Acked-by: Michael Straube <[email protected]>
Thanks,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> chip_type in struct adapter is never read. Remove the component
> and the code to initialise it.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/usb_ops_linux.c | 6 ------
> drivers/staging/r8188eu/include/drv_types.h | 1 -
> drivers/staging/r8188eu/include/hal_intf.h | 10 ----------
> drivers/staging/r8188eu/include/usb_ops.h | 3 ---
> drivers/staging/r8188eu/os_dep/usb_intf.c | 7 -------
> 5 files changed, 27 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
> index 9544300fab65..4c1974cc9a16 100644
> --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
> +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
> @@ -558,9 +558,3 @@ void rtl8188eu_xmit_tasklet(unsigned long priv)
> break;
> }
> }
> -
> -void rtl8188eu_set_hw_type(struct adapter *adapt)
> -{
> - adapt->chip_type = RTL8188E;
> - DBG_88E("CHIP TYPE: RTL8188E\n");
> -}
> diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
> index 9fa561ad340b..9b9f7d89519c 100644
> --- a/drivers/staging/r8188eu/include/drv_types.h
> +++ b/drivers/staging/r8188eu/include/drv_types.h
> @@ -205,7 +205,6 @@ struct adapter {
> * replace module. */
> int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
> int bDongle;/* build-in module or external dongle */
> - u16 chip_type;
> u16 interface_type;/* USB,SDIO,SPI,PCI */
>
> struct dvobj_priv *dvobj;
> diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
> index ee8e67dafe7c..89bd6f4b06e2 100644
> --- a/drivers/staging/r8188eu/include/hal_intf.h
> +++ b/drivers/staging/r8188eu/include/hal_intf.h
> @@ -15,16 +15,6 @@ enum RTL871X_HCI_TYPE {
> RTW_GSPI = BIT(3),
> };
>
> -enum _CHIP_TYPE {
> - NULL_CHIP_TYPE,
> - RTL8712_8188S_8191S_8192S,
> - RTL8188C_8192C,
> - RTL8192D,
> - RTL8723A,
> - RTL8188E,
> - MAX_CHIP_TYPE
> -};
> -
> enum hw_variables {
> HW_VAR_MEDIA_STATUS,
> HW_VAR_MEDIA_STATUS1,
> diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8188eu/include/usb_ops.h
> index 1939b781b097..0a1155bbc7b8 100644
> --- a/drivers/staging/r8188eu/include/usb_ops.h
> +++ b/drivers/staging/r8188eu/include/usb_ops.h
> @@ -19,9 +19,6 @@
>
> #include "usb_ops_linux.h"
>
> -void rtl8188eu_set_hw_type(struct adapter *padapter);
> -#define hal_set_hw_type rtl8188eu_set_hw_type
> -
> /*
> * Increase and check if the continual_urb_error of this @param dvobjprivei
> * is larger than MAX_CONTINUAL_URB_ERR
> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index b5e0c6561108..193b5faac56a 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -172,12 +172,6 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
>
> }
>
> -static void chip_by_usb_id(struct adapter *padapter)
> -{
> - padapter->chip_type = NULL_CHIP_TYPE;
> - hal_set_hw_type(padapter);
> -}
> -
> static void usb_intf_start(struct adapter *padapter)
> {
> rtl8188eu_inirp_init(padapter);
> @@ -387,7 +381,6 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
>
> /* step 1-1., decide the chip_type via vid/pid */
> padapter->interface_type = RTW_USB;
> - chip_by_usb_id(padapter);
>
> if (rtw_handle_dualmac(padapter, 1) != _SUCCESS)
> goto free_adapter;
>
Looks good to me.
Acked-by: Michael Straube <[email protected]>
Thanks,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> This driver only supports chips that connect via usb. Remove
> interface_type from struct adapter, use a constant in the one
> place where the interface type is needed.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/rtl8188e_dm.c | 5 +----
> drivers/staging/r8188eu/include/drv_types.h | 1 -
> drivers/staging/r8188eu/include/hal_intf.h | 7 -------
> drivers/staging/r8188eu/os_dep/usb_intf.c | 3 ---
> 4 files changed, 1 insertion(+), 15 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> index 21494adf2a19..1a0176a60704 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> @@ -40,10 +40,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
>
> ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_PLATFORM, ODM_CE);
>
> - if (Adapter->interface_type == RTW_GSPI)
> - ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_SDIO);
> - else
> - ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, Adapter->interface_type);/* RTL871X_HCI_TYPE */
> + ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_USB);
>
> ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_IC_TYPE, ODM_RTL8188E);
>
> diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
> index 9b9f7d89519c..3c972acf329c 100644
> --- a/drivers/staging/r8188eu/include/drv_types.h
> +++ b/drivers/staging/r8188eu/include/drv_types.h
> @@ -205,7 +205,6 @@ struct adapter {
> * replace module. */
> int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
> int bDongle;/* build-in module or external dongle */
> - u16 interface_type;/* USB,SDIO,SPI,PCI */
>
> struct dvobj_priv *dvobj;
> struct mlme_priv mlmepriv;
> diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
> index 89bd6f4b06e2..ffed6ddadd3f 100644
> --- a/drivers/staging/r8188eu/include/hal_intf.h
> +++ b/drivers/staging/r8188eu/include/hal_intf.h
> @@ -8,13 +8,6 @@
> #include "drv_types.h"
> #include "Hal8188EPhyCfg.h"
>
> -enum RTL871X_HCI_TYPE {
> - RTW_PCIE = BIT(0),
> - RTW_USB = BIT(1),
> - RTW_SDIO = BIT(2),
> - RTW_GSPI = BIT(3),
> -};
> -
> enum hw_variables {
> HW_VAR_MEDIA_STATUS,
> HW_VAR_MEDIA_STATUS1,
> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index 193b5faac56a..5699c44a722b 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -379,9 +379,6 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
>
> padapter->hw_init_mutex = &usb_drv->hw_init_mutex;
>
> - /* step 1-1., decide the chip_type via vid/pid */
> - padapter->interface_type = RTW_USB;
> -
> if (rtw_handle_dualmac(padapter, 1) != _SUCCESS)
> goto free_adapter;
>
>
Looks good to me.
Acked-by: Michael Straube <[email protected]>
Thanks,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> The IntrMask array is set but never read. Remove it.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/usb_halinit.c | 3 ---
> drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 -
> 2 files changed, 4 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
> index f71f25e234ab..bd3ba6ab364f 100644
> --- a/drivers/staging/r8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/r8188eu/hal/usb_halinit.c
> @@ -119,18 +119,15 @@ static void _InitInterrupt(struct adapter *Adapter)
> {
> u32 imr, imr_ex;
> u8 usb_opt;
> - struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter);
>
> /* HISR write one to clear */
> rtw_write32(Adapter, REG_HISR_88E, 0xFFFFFFFF);
> /* HIMR - */
> imr = IMR_PSTIMEOUT_88E | IMR_TBDER_88E | IMR_CPWM_88E | IMR_CPWM2_88E;
> rtw_write32(Adapter, REG_HIMR_88E, imr);
> - haldata->IntrMask[0] = imr;
>
> imr_ex = IMR_TXERR_88E | IMR_RXERR_88E | IMR_TXFOVW_88E | IMR_RXFOVW_88E;
> rtw_write32(Adapter, REG_HIMRE_88E, imr_ex);
> - haldata->IntrMask[1] = imr_ex;
>
> /* REG_USB_SPECIAL_OPTION - BIT(4) */
> /* 0; Use interrupt endpoint to upload interrupt pkt */
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> index fc6acbba17e7..bfe32864ded6 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> @@ -356,7 +356,6 @@ struct hal_data_8188e {
>
> /* Interrupt relatd register information. */
> u32 IntArray[3];/* HISR0,HISR1,HSISR */
> - u32 IntrMask[3];
> u8 C2hArray[16];
> u8 UsbTxAggMode;
> u8 UsbTxAggDescNum;
>
Looks good to me.
Acked-by: Michael Straube <[email protected]>
Thanks,
Michael
On 10/5/21 22:08, Martin Kaiser wrote:
> We set ODM_CMNINFO_INTERFACE to ODM_ITRF_USB as this driver supports
> only usb. Therefore, dm_odm->SupportInterface is always ODM_ITRF_USB.
>
> Simplify some if conditions accordingly. Remove/replace two empty
> functions.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/staging/r8188eu/hal/odm_HWConfig.c | 58 +++++++---------------
> 1 file changed, 19 insertions(+), 39 deletions(-)
>
<...>
>
> static s32 odm_SignalScaleMapping(struct odm_dm_struct *dm_odm, s32 CurrSig)
> {
> - if ((dm_odm->SupportPlatform == ODM_MP) &&
> - (dm_odm->SupportInterface != ODM_ITRF_PCIE) && /* USB & SDIO */
> - (dm_odm->PatchID == 10))
> - return odm_sig_patch_netcore(dm_odm, CurrSig);
> - else if ((dm_odm->SupportPlatform == ODM_MP) &&
> - (dm_odm->SupportInterface == ODM_ITRF_PCIE) &&
> - (dm_odm->PatchID == 19))
> - return odm_sig_patch_lenove(dm_odm, CurrSig);
> + if ((dm_odm->SupportPlatform == ODM_MP) && (dm_odm->PatchID == 10))
> + return 0;
> else
> return odm_SignalScaleMapping_92CSeries(dm_odm, CurrSig);
> }
>
dm_odm->SupportPlatform is always ODM_CE, so this could be just:
return odm_SignalScaleMapping_92CSeries(dm_odm, CurrSig);
And then it's just an unnecessary wrapper. ;)
Regards,
Michael
Thus wrote Michael Straube ([email protected]):
> On 10/5/21 22:08, Martin Kaiser wrote:
> > We set ODM_CMNINFO_INTERFACE to ODM_ITRF_USB as this driver supports
> > only usb. Therefore, dm_odm->SupportInterface is always ODM_ITRF_USB.
> > Simplify some if conditions accordingly. Remove/replace two empty
> > functions.
> > Signed-off-by: Martin Kaiser <[email protected]>
> > ---
> > drivers/staging/r8188eu/hal/odm_HWConfig.c | 58 +++++++---------------
> > 1 file changed, 19 insertions(+), 39 deletions(-)
> <...>
> > static s32 odm_SignalScaleMapping(struct odm_dm_struct *dm_odm, s32 CurrSig)
> > {
> > - if ((dm_odm->SupportPlatform == ODM_MP) &&
> > - (dm_odm->SupportInterface != ODM_ITRF_PCIE) && /* USB & SDIO */
> > - (dm_odm->PatchID == 10))
> > - return odm_sig_patch_netcore(dm_odm, CurrSig);
> > - else if ((dm_odm->SupportPlatform == ODM_MP) &&
> > - (dm_odm->SupportInterface == ODM_ITRF_PCIE) &&
> > - (dm_odm->PatchID == 19))
> > - return odm_sig_patch_lenove(dm_odm, CurrSig);
> > + if ((dm_odm->SupportPlatform == ODM_MP) && (dm_odm->PatchID == 10))
> > + return 0;
> > else
> > return odm_SignalScaleMapping_92CSeries(dm_odm, CurrSig);
> > }
> dm_odm->SupportPlatform is always ODM_CE, so this could be just:
> return odm_SignalScaleMapping_92CSeries(dm_odm, CurrSig);
> And then it's just an unnecessary wrapper. ;)
I see. I'll send more patches to clean up this area as time permits.
Thanks,
Martin