2021-06-15 11:46:26

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 0/8] staging: rtl8723bs: remove unneeded files from tree

This patchset removes some unneeded files.

autoconf.h seems to be the output of some automatic
header file generation foreign to the linux kernel
configuration and build system.

To toggle some part of code one is asked to
force an edit by hand on this file.

Other unneeded definitions were deleted recently,
now we complete the job.

Removed core/rtw_eeprom.c and include/drv_conf.h as well,
for they are excluded from the build process.

Tested-by: Fabio Aiuto <[email protected]>

Fabio Aiuto (8):
staging: rtl8723bs: remove unused debug macro
staging: rtl8723bs: remove unneeded comments
staging: rtl8723bs: remove unused WAKEUP_GPIO_IDX macro definition
staging: rtl8723bs: remove unneeded DISABLE_BB_RF macro
staging: rtl8723bs: remove HAL_{BB,MAC,RF,FW}_ENABLE macros
staging: rtl8723bs: move LPS_RPWM_WAIT_MS macro
staging: rtl8723bs: remove include/autoconf.h header file from tree
staging: rtl8723bs: remove two unused files from tree

drivers/staging/rtl8723bs/core/rtw_eeprom.c | 208 ------------------
.../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 7 -
.../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 16 --
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 15 --
drivers/staging/rtl8723bs/include/autoconf.h | 50 -----
drivers/staging/rtl8723bs/include/drv_conf.h | 19 --
drivers/staging/rtl8723bs/include/drv_types.h | 1 -
.../staging/rtl8723bs/include/hal_btcoex.h | 2 +
drivers/staging/rtl8723bs/include/hal_phy.h | 14 --
.../staging/rtl8723bs/include/rtl8723b_spec.h | 2 -
10 files changed, 2 insertions(+), 332 deletions(-)
delete mode 100644 drivers/staging/rtl8723bs/core/rtw_eeprom.c
delete mode 100644 drivers/staging/rtl8723bs/include/autoconf.h
delete mode 100644 drivers/staging/rtl8723bs/include/drv_conf.h

--
2.20.1


2021-06-15 11:46:31

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 1/8] staging: rtl8723bs: remove unused debug macro

remove unused debug macro definition in
include/autoconf.h

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/autoconf.h | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/autoconf.h b/drivers/staging/rtl8723bs/include/autoconf.h
index 944a7d2a1e53..aeb9479d1327 100644
--- a/drivers/staging/rtl8723bs/include/autoconf.h
+++ b/drivers/staging/rtl8723bs/include/autoconf.h
@@ -40,11 +40,5 @@
*/
#define WAKEUP_GPIO_IDX 12 /* WIFI Chip Side */

-/*
- * Debug Related Config
- */
-
-#define DBG 0 /* for ODM & BTCOEX debug */
-
/* define DBG_XMIT_BUF */
/* define DBG_XMIT_BUF_EXT */
--
2.20.1

2021-06-15 11:46:36

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 2/8] staging: rtl8723bs: remove unneeded comments

remove unneeded comments in include/autoconf.h

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/autoconf.h | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/autoconf.h b/drivers/staging/rtl8723bs/include/autoconf.h
index aeb9479d1327..4b2cf86b8aa4 100644
--- a/drivers/staging/rtl8723bs/include/autoconf.h
+++ b/drivers/staging/rtl8723bs/include/autoconf.h
@@ -4,15 +4,6 @@
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-
-/*
- * Automatically generated C config: don't edit
- */
-
-/*
- * Functions Config
- */
-
#ifndef CONFIG_WIRELESS_EXT
#error CONFIG_WIRELESS_EXT needs to be enabled for this driver to work
#endif
@@ -39,6 +30,3 @@
* Platform dependent
*/
#define WAKEUP_GPIO_IDX 12 /* WIFI Chip Side */
-
-/* define DBG_XMIT_BUF */
-/* define DBG_XMIT_BUF_EXT */
--
2.20.1

2021-06-15 11:46:39

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 3/8] staging: rtl8723bs: remove unused WAKEUP_GPIO_IDX macro definition

remove unused WAKEUP_GPIO_IDX macro definition.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/autoconf.h | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/autoconf.h b/drivers/staging/rtl8723bs/include/autoconf.h
index 4b2cf86b8aa4..eab934229789 100644
--- a/drivers/staging/rtl8723bs/include/autoconf.h
+++ b/drivers/staging/rtl8723bs/include/autoconf.h
@@ -25,8 +25,3 @@
#define HAL_BB_ENABLE 1
#define HAL_RF_ENABLE 1
#endif
-
-/*
- * Platform dependent
- */
-#define WAKEUP_GPIO_IDX 12 /* WIFI Chip Side */
--
2.20.1

2021-06-15 11:47:09

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 7/8] staging: rtl8723bs: remove include/autoconf.h header file from tree

remove include/autoconf.h header file from tree.
It just contains a compiler configuration check
which is not needed.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/autoconf.h | 14 --------------
drivers/staging/rtl8723bs/include/drv_conf.h | 1 -
drivers/staging/rtl8723bs/include/drv_types.h | 1 -
drivers/staging/rtl8723bs/include/rtl8723b_spec.h | 2 --
4 files changed, 18 deletions(-)
delete mode 100644 drivers/staging/rtl8723bs/include/autoconf.h

diff --git a/drivers/staging/rtl8723bs/include/autoconf.h b/drivers/staging/rtl8723bs/include/autoconf.h
deleted file mode 100644
index 8587b746c720..000000000000
--- a/drivers/staging/rtl8723bs/include/autoconf.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
- *
- ******************************************************************************/
-#ifndef CONFIG_WIRELESS_EXT
-#error CONFIG_WIRELESS_EXT needs to be enabled for this driver to work
-#endif
-
-/*
- * Auto Config Section
- */
-#define LPS_RPWM_WAIT_MS 300
diff --git a/drivers/staging/rtl8723bs/include/drv_conf.h b/drivers/staging/rtl8723bs/include/drv_conf.h
index 9cef9ce589a1..9e8c37b29a7f 100644
--- a/drivers/staging/rtl8723bs/include/drv_conf.h
+++ b/drivers/staging/rtl8723bs/include/drv_conf.h
@@ -6,7 +6,6 @@
******************************************************************************/
#ifndef __DRV_CONF_H__
#define __DRV_CONF_H__
-#include "autoconf.h"

#define DYNAMIC_CAMID_ALLOC

diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
index 49b404e5cfaf..cc0dac355589 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -15,7 +15,6 @@
#define __DRV_TYPES_H__

#include <linux/sched/signal.h>
-#include <autoconf.h>
#include <basic_types.h>
#include <osdep_service.h>
#include <rtw_byteorder.h>
diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_spec.h b/drivers/staging/rtl8723bs/include/rtl8723b_spec.h
index 999555476ebc..6816040a6aff 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_spec.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_spec.h
@@ -7,8 +7,6 @@
#ifndef __RTL8723B_SPEC_H__
#define __RTL8723B_SPEC_H__

-#include <autoconf.h>
-
#define HAL_NAV_UPPER_UNIT_8723B 128 /* micro-second */

/* */
--
2.20.1

2021-06-15 11:47:30

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 8/8] staging: rtl8723bs: remove two unused files from tree

remove unused files from tree, for they are excluded
by the build process.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_eeprom.c | 208 -------------------
drivers/staging/rtl8723bs/include/drv_conf.h | 18 --
2 files changed, 226 deletions(-)
delete mode 100644 drivers/staging/rtl8723bs/core/rtw_eeprom.c
delete mode 100644 drivers/staging/rtl8723bs/include/drv_conf.h

diff --git a/drivers/staging/rtl8723bs/core/rtw_eeprom.c b/drivers/staging/rtl8723bs/core/rtw_eeprom.c
deleted file mode 100644
index 4dcee4d2e513..000000000000
--- a/drivers/staging/rtl8723bs/core/rtw_eeprom.c
+++ /dev/null
@@ -1,208 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- ******************************************************************************/
-#include <drv_conf.h>
-#include <osdep_service.h>
-#include <drv_types.h>
-
-void up_clk(_adapter *padapter, u16 *x)
-{
-_func_enter_;
- *x = *x | _EESK;
- rtw_write8(padapter, EE_9346CR, (u8)*x);
- udelay(CLOCK_RATE);
-
-_func_exit_;
-
-}
-
-void down_clk(_adapter *padapter, u16 *x)
-{
-_func_enter_;
- *x = *x & ~_EESK;
- rtw_write8(padapter, EE_9346CR, (u8)*x);
- udelay(CLOCK_RATE);
-_func_exit_;
-}
-
-void shift_out_bits(_adapter *padapter, u16 data, u16 count)
-{
- u16 x, mask;
-_func_enter_;
-
- if (padapter->bSurpriseRemoved)
- goto out;
-
- mask = 0x01 << (count - 1);
- x = rtw_read8(padapter, EE_9346CR);
-
- x &= ~(_EEDO | _EEDI);
-
- do {
- x &= ~_EEDI;
- if (data & mask)
- x |= _EEDI;
- if (padapter->bSurpriseRemoved)
- goto out;
-
- rtw_write8(padapter, EE_9346CR, (u8)x);
- udelay(CLOCK_RATE);
- up_clk(padapter, &x);
- down_clk(padapter, &x);
- mask = mask >> 1;
- } while (mask);
- if (padapter->bSurpriseRemoved)
- goto out;
-
- x &= ~_EEDI;
- rtw_write8(padapter, EE_9346CR, (u8)x);
-out:
-_func_exit_;
-}
-
-u16 shift_in_bits(_adapter *padapter)
-{
- u16 x, d = 0, i;
-_func_enter_;
- if (padapter->bSurpriseRemoved)
- goto out;
-
- x = rtw_read8(padapter, EE_9346CR);
-
- x &= ~(_EEDO | _EEDI);
- d = 0;
-
- for (i = 0; i < 16; i++) {
- d = d << 1;
- up_clk(padapter, &x);
- if (padapter->bSurpriseRemoved)
- goto out;
-
- x = rtw_read8(padapter, EE_9346CR);
-
- x &= ~(_EEDI);
- if (x & _EEDO)
- d |= 1;
-
- down_clk(padapter, &x);
- }
-out:
-_func_exit_;
-
- return d;
-}
-
-void standby(_adapter *padapter)
-{
- u8 x;
-_func_enter_;
- x = rtw_read8(padapter, EE_9346CR);
-
- x &= ~(_EECS | _EESK);
- rtw_write8(padapter, EE_9346CR, x);
-
- udelay(CLOCK_RATE);
- x |= _EECS;
- rtw_write8(padapter, EE_9346CR, x);
- udelay(CLOCK_RATE);
-_func_exit_;
-}
-
-void eeprom_clean(_adapter *padapter)
-{
- u16 x;
-_func_enter_;
- if (padapter->bSurpriseRemoved)
- goto out;
-
- x = rtw_read8(padapter, EE_9346CR);
- if (padapter->bSurpriseRemoved)
- goto out;
-
- x &= ~(_EECS | _EEDI);
- rtw_write8(padapter, EE_9346CR, (u8)x);
- if (padapter->bSurpriseRemoved)
- goto out;
-
- up_clk(padapter, &x);
- if (padapter->bSurpriseRemoved)
- goto out;
-
- down_clk(padapter, &x);
-out:
-_func_exit_;
-}
-
-u16 eeprom_read16(_adapter *padapter, u16 reg) /*ReadEEprom*/
-{
-
- u16 x;
- u16 data = 0;
-
-_func_enter_;
-
- if (padapter->bSurpriseRemoved)
- goto out;
-
- /* select EEPROM, reset bits, set _EECS*/
- x = rtw_read8(padapter, EE_9346CR);
-
- if (padapter->bSurpriseRemoved)
- goto out;
-
- x &= ~(_EEDI | _EEDO | _EESK | _EEM0);
- x |= _EEM1 | _EECS;
- rtw_write8(padapter, EE_9346CR, (unsigned char)x);
-
- /* write the read opcode and register number in that order*/
- /* The opcode is 3bits in length, reg is 6 bits long*/
- shift_out_bits(padapter, EEPROM_READ_OPCODE, 3);
- shift_out_bits(padapter, reg, padapter->EepromAddressSize);
-
- /* Now read the data (16 bits) in from the selected EEPROM word*/
- data = shift_in_bits(padapter);
-
- eeprom_clean(padapter);
-out:
-_func_exit_;
- return data;
-
-
-}
-
-/*addr_off : address offset of the entry in eeprom (not the tuple number of eeprom (reg); that is addr_off !=reg)*/
-u8 eeprom_read(_adapter *padapter, u32 addr_off, u8 sz, u8 *rbuf)
-{
- u8 quotient, remainder, addr_2align_odd;
- u16 reg, stmp, i = 0, idx = 0;
-_func_enter_;
- reg = (u16)(addr_off >> 1);
- addr_2align_odd = (u8)(addr_off & 0x1);
-
- /*read that start at high part: e.g 1,3,5,7,9,...*/
- if (addr_2align_odd) {
- stmp = eeprom_read16(padapter, reg);
- rbuf[idx++] = (u8) ((stmp>>8)&0xff); /*return hogh-part of the short*/
- reg++; sz--;
- }
-
- quotient = sz >> 1;
- remainder = sz & 0x1;
-
- for (i = 0; i < quotient; i++) {
- stmp = eeprom_read16(padapter, reg+i);
- rbuf[idx++] = (u8) (stmp&0xff);
- rbuf[idx++] = (u8) ((stmp>>8)&0xff);
- }
-
- reg = reg+i;
- if (remainder) { /*end of read at lower part of short : 0,2,4,6,...*/
- stmp = eeprom_read16(padapter, reg);
- rbuf[idx] = (u8)(stmp & 0xff);
- }
-_func_exit_;
- return true;
-}
diff --git a/drivers/staging/rtl8723bs/include/drv_conf.h b/drivers/staging/rtl8723bs/include/drv_conf.h
deleted file mode 100644
index 9e8c37b29a7f..000000000000
--- a/drivers/staging/rtl8723bs/include/drv_conf.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- ******************************************************************************/
-#ifndef __DRV_CONF_H__
-#define __DRV_CONF_H__
-
-#define DYNAMIC_CAMID_ALLOC
-
-#ifndef CONFIG_RTW_HIQ_FILTER
- #define CONFIG_RTW_HIQ_FILTER 1
-#endif
-
-//#include <rtl871x_byteorder.h>
-
-#endif // __DRV_CONF_H__
--
2.20.1

2021-06-15 11:47:35

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 4/8] staging: rtl8723bs: remove unneeded DISABLE_BB_RF macro

remove unneeded DISABLE_BB_RF macro.

This is just a symbolic constant used to disable
by hand-edit some core hardware capabilities which
we want to be always enabled. So just remove it.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 7 -------
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 16 ----------------
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 9 ---------
drivers/staging/rtl8723bs/include/autoconf.h | 15 +++------------
drivers/staging/rtl8723bs/include/hal_phy.h | 16 +++++-----------
5 files changed, 8 insertions(+), 55 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
index 8b42b19cc089..1b0f47b58110 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
@@ -1656,9 +1656,6 @@ void PHY_IQCalibrate_8723B(
if (bSingleTone || bCarrierSuppression)
return;

-#if DISABLE_BB_RF
- return;
-#endif
if (pDM_Odm->RFCalibrateInfo.bIQKInProgress)
return;

@@ -1845,10 +1842,6 @@ void PHY_LCCalibrate_8723B(struct dm_odm_t *pDM_Odm)
bool bSingleTone = false, bCarrierSuppression = false;
u32 timeout = 2000, timecount = 0;

-#if DISABLE_BB_RF
- return;
-#endif
-
if (!(pDM_Odm->SupportAbility & ODM_RF_CALIBRATION))
return;

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index 011b42e1b991..3a2e3d0e88e8 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -53,10 +53,6 @@ u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask)
{
u32 OriginalValue, BitShift;

-#if (DISABLE_BB_RF == 1)
- return 0;
-#endif
-
OriginalValue = rtw_read32(Adapter, RegAddr);
BitShift = phy_CalculateBitShift(BitMask);

@@ -88,10 +84,6 @@ void PHY_SetBBReg_8723B(
/* u16 BBWaitCounter = 0; */
u32 OriginalValue, BitShift;

-#if (DISABLE_BB_RF == 1)
- return;
-#endif
-
if (BitMask != bMaskDWord) { /* if not "double word" write */
OriginalValue = rtw_read32(Adapter, RegAddr);
BitShift = phy_CalculateBitShift(BitMask);
@@ -252,10 +244,6 @@ u32 PHY_QueryRFReg_8723B(
{
u32 Original_Value, BitShift;

-#if (DISABLE_BB_RF == 1)
- return 0;
-#endif
-
Original_Value = phy_RFSerialRead_8723B(Adapter, eRFPath, RegAddr);
BitShift = phy_CalculateBitShift(BitMask);

@@ -285,10 +273,6 @@ void PHY_SetRFReg_8723B(
{
u32 Original_Value, BitShift;

-#if (DISABLE_BB_RF == 1)
- return;
-#endif
-
/* RF data is 12 bits only */
if (BitMask != bRFRegOffsetMask) {
Original_Value = phy_RFSerialRead_8723B(Adapter, eRFPath, RegAddr);
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index a63f2f6bf7c1..38acde4be94d 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -560,11 +560,6 @@ static void _InitRFType(struct adapter *padapter)
{
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);

-#if DISABLE_BB_RF
- pHalData->rf_chip = RF_PSEUDO_11N;
- return;
-#endif
-
pHalData->rf_chip = RF_6052;

pHalData->rf_type = RF_1T1R;
@@ -1035,11 +1030,7 @@ static void _ReadRFType(struct adapter *Adapter)
{
struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);

-#if DISABLE_BB_RF
- pHalData->rf_chip = RF_PSEUDO_11N;
-#else
pHalData->rf_chip = RF_6052;
-#endif
}


diff --git a/drivers/staging/rtl8723bs/include/autoconf.h b/drivers/staging/rtl8723bs/include/autoconf.h
index eab934229789..d1a97fea8065 100644
--- a/drivers/staging/rtl8723bs/include/autoconf.h
+++ b/drivers/staging/rtl8723bs/include/autoconf.h
@@ -12,16 +12,7 @@
* Auto Config Section
*/
#define LPS_RPWM_WAIT_MS 300
-#ifndef DISABLE_BB_RF
-#define DISABLE_BB_RF 0
-#endif

-#if DISABLE_BB_RF
- #define HAL_MAC_ENABLE 0
- #define HAL_BB_ENABLE 0
- #define HAL_RF_ENABLE 0
-#else
- #define HAL_MAC_ENABLE 1
- #define HAL_BB_ENABLE 1
- #define HAL_RF_ENABLE 1
-#endif
+#define HAL_MAC_ENABLE 1
+#define HAL_BB_ENABLE 1
+#define HAL_RF_ENABLE 1
diff --git a/drivers/staging/rtl8723bs/include/hal_phy.h b/drivers/staging/rtl8723bs/include/hal_phy.h
index 521eb1c2efad..e9944ffed100 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy.h
@@ -8,17 +8,11 @@
#define __HAL_PHY_H__


-#if DISABLE_BB_RF
-#define HAL_FW_ENABLE 0
-#define HAL_MAC_ENABLE 0
-#define HAL_BB_ENABLE 0
-#define HAL_RF_ENABLE 0
-#else /* FPGA_PHY and ASIC */
-#define HAL_FW_ENABLE 1
-#define HAL_MAC_ENABLE 1
-#define HAL_BB_ENABLE 1
-#define HAL_RF_ENABLE 1
-#endif
+/* FPGA_PHY and ASIC */
+#define HAL_FW_ENABLE 1
+#define HAL_MAC_ENABLE 1
+#define HAL_BB_ENABLE 1
+#define HAL_RF_ENABLE 1

/* */
/* Antenna detection method, i.e., using single tone detection or RSSI reported from each antenna detected. */
--
2.20.1

2021-06-15 11:48:05

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 5/8] staging: rtl8723bs: remove HAL_{BB,MAC,RF,FW}_ENABLE macros

remove HAL_{BB,MAC,RF,FW}_ENABLE macros.
They are used to turn on/off by hand some core
capabilities we want to be always 'on'.

So remove usages and definitions.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ------
drivers/staging/rtl8723bs/include/autoconf.h | 4 ----
drivers/staging/rtl8723bs/include/hal_phy.h | 8 --------
3 files changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 38acde4be94d..3738727feb60 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -683,29 +683,23 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter)
/* <Roger_Notes> Current Channel will be updated again later. */
pHalData->CurrentChannel = 6;

-#if (HAL_MAC_ENABLE == 1)
ret = PHY_MACConfig8723B(padapter);
if (ret != _SUCCESS)
return ret;
-#endif
/* */
/* d. Initialize BB related configurations. */
/* */
-#if (HAL_BB_ENABLE == 1)
ret = PHY_BBConfig8723B(padapter);
if (ret != _SUCCESS)
return ret;
-#endif

/* If RF is on, we need to init RF. Otherwise, skip the procedure. */
/* We need to follow SU method to change the RF cfg.txt. Default disable RF TX/RX mode. */
/* if (pHalData->eRFPowerState == eRfOn) */
{
-#if (HAL_RF_ENABLE == 1)
ret = PHY_RFConfig8723B(padapter);
if (ret != _SUCCESS)
return ret;
-#endif
}

/* */
diff --git a/drivers/staging/rtl8723bs/include/autoconf.h b/drivers/staging/rtl8723bs/include/autoconf.h
index d1a97fea8065..8587b746c720 100644
--- a/drivers/staging/rtl8723bs/include/autoconf.h
+++ b/drivers/staging/rtl8723bs/include/autoconf.h
@@ -12,7 +12,3 @@
* Auto Config Section
*/
#define LPS_RPWM_WAIT_MS 300
-
-#define HAL_MAC_ENABLE 1
-#define HAL_BB_ENABLE 1
-#define HAL_RF_ENABLE 1
diff --git a/drivers/staging/rtl8723bs/include/hal_phy.h b/drivers/staging/rtl8723bs/include/hal_phy.h
index e9944ffed100..19221289b8ce 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy.h
@@ -6,14 +6,6 @@
******************************************************************************/
#ifndef __HAL_PHY_H__
#define __HAL_PHY_H__
-
-
-/* FPGA_PHY and ASIC */
-#define HAL_FW_ENABLE 1
-#define HAL_MAC_ENABLE 1
-#define HAL_BB_ENABLE 1
-#define HAL_RF_ENABLE 1
-
/* */
/* Antenna detection method, i.e., using single tone detection or RSSI reported from each antenna detected. */
/* Added by Roger, 2013.05.22. */
--
2.20.1

2021-06-15 11:48:29

by Fabio Aiuto

[permalink] [raw]
Subject: [PATCH 6/8] staging: rtl8723bs: move LPS_RPWM_WAIT_MS macro

move LPS_RPWM_WAIT_MS macro from include/autoconf.h to
include/hal_btcoex.h in order to empty unneeded
autoconf.h.

Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index eb9d0ba861a5..849fb90b43b7 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -9,6 +9,8 @@

#include <drv_types.h>

+#define LPS_RPWM_WAIT_MS 300
+
/* Some variables can't get from outsrc BT-Coex, */
/* so we need to save here */
struct bt_coexist {
--
2.20.1

2021-06-15 12:13:12

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 0/8] staging: rtl8723bs: remove unneeded files from tree

Hi,

On 6/15/21 1:45 PM, Fabio Aiuto wrote:
> This patchset removes some unneeded files.
>
> autoconf.h seems to be the output of some automatic
> header file generation foreign to the linux kernel
> configuration and build system.
>
> To toggle some part of code one is asked to
> force an edit by hand on this file.
>
> Other unneeded definitions were deleted recently,
> now we complete the job.
>
> Removed core/rtw_eeprom.c and include/drv_conf.h as well,
> for they are excluded from the build process.
>
> Tested-by: Fabio Aiuto <[email protected]>

Thank you, series looks good to me:

Reviewed-by: Hans de Goede <[email protected]>

for the series,

Regards,

Hans

>
> Fabio Aiuto (8):
> staging: rtl8723bs: remove unused debug macro
> staging: rtl8723bs: remove unneeded comments
> staging: rtl8723bs: remove unused WAKEUP_GPIO_IDX macro definition
> staging: rtl8723bs: remove unneeded DISABLE_BB_RF macro
> staging: rtl8723bs: remove HAL_{BB,MAC,RF,FW}_ENABLE macros
> staging: rtl8723bs: move LPS_RPWM_WAIT_MS macro
> staging: rtl8723bs: remove include/autoconf.h header file from tree
> staging: rtl8723bs: remove two unused files from tree
>
> drivers/staging/rtl8723bs/core/rtw_eeprom.c | 208 ------------------
> .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 7 -
> .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 16 --
> drivers/staging/rtl8723bs/hal/sdio_halinit.c | 15 --
> drivers/staging/rtl8723bs/include/autoconf.h | 50 -----
> drivers/staging/rtl8723bs/include/drv_conf.h | 19 --
> drivers/staging/rtl8723bs/include/drv_types.h | 1 -
> .../staging/rtl8723bs/include/hal_btcoex.h | 2 +
> drivers/staging/rtl8723bs/include/hal_phy.h | 14 --
> .../staging/rtl8723bs/include/rtl8723b_spec.h | 2 -
> 10 files changed, 2 insertions(+), 332 deletions(-)
> delete mode 100644 drivers/staging/rtl8723bs/core/rtw_eeprom.c
> delete mode 100644 drivers/staging/rtl8723bs/include/autoconf.h
> delete mode 100644 drivers/staging/rtl8723bs/include/drv_conf.h
>

2021-06-15 13:27:27

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 6/8] staging: rtl8723bs: move LPS_RPWM_WAIT_MS macro

On Tue, Jun 15, 2021 at 01:45:36PM +0200, Fabio Aiuto wrote:
> move LPS_RPWM_WAIT_MS macro from include/autoconf.h to
> include/hal_btcoex.h in order to empty unneeded
> autoconf.h.
>
> Signed-off-by: Fabio Aiuto <[email protected]>
> ---
> drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
> index eb9d0ba861a5..849fb90b43b7 100644
> --- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
> +++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
> @@ -9,6 +9,8 @@
>
> #include <drv_types.h>
>
> +#define LPS_RPWM_WAIT_MS 300
> +
> /* Some variables can't get from outsrc BT-Coex, */
> /* so we need to save here */
> struct bt_coexist {
> --
> 2.20.1
>
>

Note, this did not "move" anything, it just added it.

I'll take it, but be more careful in the future please.

thanks,

greg k-h

2021-06-15 13:27:55

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 7/8] staging: rtl8723bs: remove include/autoconf.h header file from tree

On Tue, Jun 15, 2021 at 01:45:37PM +0200, Fabio Aiuto wrote:
> remove include/autoconf.h header file from tree.
> It just contains a compiler configuration check
> which is not needed.

It also still contains the LPS_RPWM_WAIT_MS define :(

2021-06-15 14:21:46

by Fabio Aiuto

[permalink] [raw]
Subject: Re: [PATCH 7/8] staging: rtl8723bs: remove include/autoconf.h header file from tree

On Tue, Jun 15, 2021 at 03:24:11PM +0200, Greg KH wrote:
> On Tue, Jun 15, 2021 at 01:45:37PM +0200, Fabio Aiuto wrote:
> > remove include/autoconf.h header file from tree.
> > It just contains a compiler configuration check
> > which is not needed.
>
> It also still contains the LPS_RPWM_WAIT_MS define :(
>

Sorry Greg, I will be more careful next time,

thank you,

fabio