Re: [staging:staging-next 201/268] drivers/staging/rtl8723bs/core/rtw_security.c:89:6: warning: stack frame size of 1120 bytes in function 'rtw_wep_encrypt'

2021-05-22 Thread Fabio Aiuto
Hello Nathan,

On Fri, May 21, 2021 at 12:19:39PM -0700, Nathan Chancellor wrote:
> Hi Fabio,
> 
> On Fri, May 21, 2021 at 04:26:57PM +0200, Fabio Aiuto wrote:
> > Hi robot,
> > 
> > On Thu, May 20, 2021 at 05:03:14PM +0800, kernel test robot wrote:
> > > tree:   
> > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
> > > staging-next
> > > head:   b9f38e913a926b455e5048a95f53a993b515509f
> > > commit: 1b11e893eda0907fc9b28696271e2d9c4337e42d [201/268] staging: 
> > > rtl8723bs: replace private arc4 encryption with in-kernel one
> > > config: powerpc64-randconfig-r011-20210520 (attached as .config)
> > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
> > > bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
> > > reproduce (this is a W=1 build):
> > > wget 
> > > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross 
> > > -O ~/bin/make.cross
> > > chmod +x ~/bin/make.cross
> > > # install powerpc64 cross compiling tool for clang build
> > > # apt-get install binutils-powerpc64-linux-gnu
> > > # 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=1b11e893eda0907fc9b28696271e2d9c4337e42d
> > > git remote add staging 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> > > git fetch --no-tags staging staging-next
> > > git checkout 1b11e893eda0907fc9b28696271e2d9c4337e42d
> > > # save the attached .config to linux build tree
> > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 
> > > ARCH=powerpc64 
> > 
> > can't compile this, I get the following error:
> > 
> > make CONFIG_OF_ALL_DTBS=y CONFIG_DTC=y 
> > HOSTCC=/home/fabio/0day/clang/bin/clang CC=/home/fabio/0day/clang/bin/clang 
> > LD=/home/fabio/0day/clang/bin/ld.lld 
> > HOSTLD=/home/fabio/0day/clang/bin/ld.lld 
> > AR=/home/fabio/0day/clang/bin/llvm-ar NM=/home/fabio/0day/clang/bin/llvm-nm 
> > STRIP=/home/fabio/0day/clang/bin/llvm-strip 
> > OBJDUMP=/home/fabio/0day/clang/bin/llvm-objdump 
> > OBJSIZE=/home/fabio/0day/clang/bin/llvm-size 
> > READELF=/home/fabio/0day/clang/bin/llvm-readelf 
> > HOSTCXX=/home/fabio/0day/clang/bin/clang++ 
> > HOSTAR=/home/fabio/0day/clang/bin/llvm-ar CROSS_COMPILE=powerpc-linux-gnu- 
> > --jobs=8 LLVM_IAS=1 ARCH=powerpc drivers/staging/rtl8723bs/
> >   CC  scripts/mod/empty.o
> > clang: error: unsupported argument '-me500' to option 'Wa,'
> > make[1]: *** [scripts/Makefile.build:272: scripts/mod/empty.o] Error 1
> > make[1]: *** Attesa per i processi non terminati
> > make: *** [Makefile:1226: prepare0] Error 2
> > 
> > moreover I had to add LLVM_IAS=1, and ARCH=powerpc64 is not a valid 
> > architecture (used powerpc instead).
> > 
> > Could you help me?
> > 
> 
> This is not a clang specific issue, I would not bother with trying to
> use the bot's reproducer steps.
> 
> I can reproduce it with GCC 11.1.0 using the following commands:
> 
> $ make -skj"$(nproc)" ARCH=i386 defconfig
> 
> $ scripts/config -e MMC -e STAGING -m RTL8723BS
> 
> $ make -skj"$(nproc)" ARCH=i386 olddefconfig drivers/staging/rtl8723bs/
> drivers/staging/rtl8723bs/core/rtw_security.c: In function ‘rtw_wep_encrypt’:
> drivers/staging/rtl8723bs/core/rtw_security.c:91:1: warning: the frame size 
> of 1084 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>91 | }
>   | ^
> drivers/staging/rtl8723bs/core/rtw_security.c: In function ‘rtw_wep_decrypt’:
> drivers/staging/rtl8723bs/core/rtw_security.c:128:1: warning: the frame size 
> of 1060 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>   128 | }
>   | ^
> drivers/staging/rtl8723bs/core/rtw_security.c: In function ‘rtw_tkip_encrypt’:
> drivers/staging/rtl8723bs/core/rtw_security.c:531:1: warning: the frame size 
> of 1112 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>   531 | }
>   | ^
> drivers/staging/rtl8723bs/core/rtw_security.c: In function ‘rtw_tkip_decrypt’:
> drivers/staging/rtl8723bs/core/rtw_security.c:633:1: warning: the frame size 
> of 1084 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>   633 | }
>   | ^

I could not get these warnings in a x86_64 build, so I tried
to reproduce exactly what the robot says. I should have tried
simply an i386 build :)

> 
> Your commit introduced this because the size of the arc4_ctx structure
> is 1032 bytes so allocating it on the stack will cause it to go over the
> 32-

Re: [staging:staging-next 201/268] drivers/staging/rtl8723bs/core/rtw_security.c:89:6: warning: stack frame size of 1120 bytes in function 'rtw_wep_encrypt'

2021-05-21 Thread Fabio Aiuto
Hi robot,

On Thu, May 20, 2021 at 05:03:14PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
> staging-next
> head:   b9f38e913a926b455e5048a95f53a993b515509f
> commit: 1b11e893eda0907fc9b28696271e2d9c4337e42d [201/268] staging: 
> rtl8723bs: replace private arc4 encryption with in-kernel one
> config: powerpc64-randconfig-r011-20210520 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
> bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
> reproduce (this is a W=1 build):
> wget 
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install powerpc64 cross compiling tool for clang build
> # apt-get install binutils-powerpc64-linux-gnu
> # 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=1b11e893eda0907fc9b28696271e2d9c4337e42d
> git remote add staging 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> git fetch --no-tags staging staging-next
> git checkout 1b11e893eda0907fc9b28696271e2d9c4337e42d
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 
> ARCH=powerpc64 

can't compile this, I get the following error:

make CONFIG_OF_ALL_DTBS=y CONFIG_DTC=y HOSTCC=/home/fabio/0day/clang/bin/clang 
CC=/home/fabio/0day/clang/bin/clang LD=/home/fabio/0day/clang/bin/ld.lld 
HOSTLD=/home/fabio/0day/clang/bin/ld.lld AR=/home/fabio/0day/clang/bin/llvm-ar 
NM=/home/fabio/0day/clang/bin/llvm-nm 
STRIP=/home/fabio/0day/clang/bin/llvm-strip 
OBJDUMP=/home/fabio/0day/clang/bin/llvm-objdump 
OBJSIZE=/home/fabio/0day/clang/bin/llvm-size 
READELF=/home/fabio/0day/clang/bin/llvm-readelf 
HOSTCXX=/home/fabio/0day/clang/bin/clang++ 
HOSTAR=/home/fabio/0day/clang/bin/llvm-ar CROSS_COMPILE=powerpc-linux-gnu- 
--jobs=8 LLVM_IAS=1 ARCH=powerpc drivers/staging/rtl8723bs/
  CC  scripts/mod/empty.o
clang: error: unsupported argument '-me500' to option 'Wa,'
make[1]: *** [scripts/Makefile.build:272: scripts/mod/empty.o] Error 1
make[1]: *** Attesa per i processi non terminati
make: *** [Makefile:1226: prepare0] Error 2

moreover I had to add LLVM_IAS=1, and ARCH=powerpc64 is not a valid 
architecture (used powerpc instead).

Could you help me?

thank you,

fabio
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 02/11] staging: rtl8723bs: moved function prototypes out of core/rtw_efuse.c

2021-03-23 Thread Fabio Aiuto
On Mon, Mar 22, 2021 at 10:29:27PM +0300, Dan Carpenter wrote:
> On Mon, Mar 22, 2021 at 03:31:40PM +0100, Fabio Aiuto wrote:
> > fix the following checkpatch issues:
> > 
> > WARNING: externs should be avoided in .c files
> > 35: FILE: drivers/staging/rtl8723bs/core/rtw_efuse.c:35:
> > +bool
> > 
> > moved two function prototypes in include/rtw_efuse.h
> 
> Can't you just make these functions static instead?
> 
> regards,
> dan carpenter
> 

Hi Dan,

sorry for my recent spamming, I forgot to cc you in my
patchset v2 submit.

Thank you,

fabio
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 9/9] staging: rtl8723bs: remove blank line os_dep/os_intfs.c

2021-03-23 Thread Fabio Aiuto
remove blank line

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index c6c5cc0a9e08..405aa95af579 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -1027,7 +1027,6 @@ void rtw_ips_dev_unload(struct adapter *padapter)
rtw_hal_deinit(padapter);
 }
 
-
 static int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
 {
int status = -1;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 8/9] staging: rtl8723bs: remove unnecessary extern in os_dep/sdio_intf.c

2021-03-23 Thread Fabio Aiuto
remove unnecessary extern.

The function is defined static in os_dep/os_intfs.c and used only once
in the same file

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c 
b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 185919b6963f..156ad91d33ee 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -482,8 +482,6 @@ static void rtw_dev_remove(struct sdio_func *func)
RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("-rtw_dev_remove\n"));
 }
 
-extern int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
-
 static int rtw_sdio_suspend(struct device *dev)
 {
struct sdio_func *func = dev_to_sdio_func(dev);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 7/9] staging: rtl8723bs: remove undefined function prototype in of os_dep/sdio_intf.c

2021-03-23 Thread Fabio Aiuto
fix the following checkpatch issue:

WARNING: externs should be avoided in .c files
486: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:486:
+extern int pm_netdev_close(struct net_device *pnetdev, u8 bnormal);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c 
b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 8f8549eee23e..185919b6963f 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -483,7 +483,6 @@ static void rtw_dev_remove(struct sdio_func *func)
 }
 
 extern int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
-extern int pm_netdev_close(struct net_device *pnetdev, u8 bnormal);
 
 static int rtw_sdio_suspend(struct device *dev)
 {
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 5/9] staging: rtl8723bs: remove function prototypes in hal/odm.c

2021-03-23 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
285: FILE: drivers/staging/rtl8723bs/hal/odm.c:285:
+void odm_CommonInfoSelfInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
287: FILE: drivers/staging/rtl8723bs/hal/odm.c:287:
+void odm_CommonInfoSelfUpdate(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
289: FILE: drivers/staging/rtl8723bs/hal/odm.c:289:
+void odm_CmnInfoInit_Debug(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
291: FILE: drivers/staging/rtl8723bs/hal/odm.c:291:
+void odm_BasicDbgMessage(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
305: FILE: drivers/staging/rtl8723bs/hal/odm.c:305:
+void odm_RefreshRateAdaptiveMaskCE(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
309: FILE: drivers/staging/rtl8723bs/hal/odm.c:309:
+void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
311: FILE: drivers/staging/rtl8723bs/hal/odm.c:311:
+void odm_RSSIMonitorCheckCE(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
313: FILE: drivers/staging/rtl8723bs/hal/odm.c:313:
+void odm_RSSIMonitorCheck(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
315: FILE: drivers/staging/rtl8723bs/hal/odm.c:315:
+void odm_SwAntDetectInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
317: FILE: drivers/staging/rtl8723bs/hal/odm.c:317:
+void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext);
--
WARNING: externs should be avoided in .c files
321: FILE: drivers/staging/rtl8723bs/hal/odm.c:321:
+void odm_GlobalAdapterCheck(void);
--
WARNING: externs should be avoided in .c files
323: FILE: drivers/staging/rtl8723bs/hal/odm.c:323:
+void odm_RefreshRateAdaptiveMask(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
325: FILE: drivers/staging/rtl8723bs/hal/odm.c:325:
+void ODM_TXPowerTrackingCheck(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
327: FILE: drivers/staging/rtl8723bs/hal/odm.c:327:
+void odm_RateAdaptiveMaskInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
330: FILE: drivers/staging/rtl8723bs/hal/odm.c:330:
+void odm_TXPowerTrackingInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
338: FILE: drivers/staging/rtl8723bs/hal/odm.c:338:
+void odm_InitHybridAntDiv(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
340: FILE: drivers/staging/rtl8723bs/hal/odm.c:340:
+bool odm_StaDefAntSel(
--
WARNING: externs should be avoided in .c files
349: FILE: drivers/staging/rtl8723bs/hal/odm.c:349:
+void odm_SetRxIdleAnt(struct dm_odm_t *pDM_Odm, u8 Ant, bool bDualPath);
--
WARNING: externs should be avoided in .c files
353: FILE: drivers/staging/rtl8723bs/hal/odm.c:353:
+void odm_HwAntDiv(struct dm_odm_t *pDM_Odm);

removed function prototypes  and made staics where needed
in hal/odm.c

moved function definition in file to let the compiler work

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/odm.c | 1717 +--
 1 file changed, 824 insertions(+), 893 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.c 
b/drivers/staging/rtl8723bs/hal/odm.c
index 49d552105a65..3d92eee3a840 100644
--- a/drivers/staging/rtl8723bs/hal/odm.c
+++ b/drivers/staging/rtl8723bs/hal/odm.c
@@ -279,1126 +279,1057 @@ u32 TxScalingTable_Jaguar[TXSCALE_TABLE_SIZE] = {
0x3FE  /*  36, +6.0dB */
 };
 
-/*  Local Function predefine. */
-
-/* STARTCOMMON INFO RELATED--- */
-void odm_CommonInfoSelfInit(struct dm_odm_t *pDM_Odm);
-
-void odm_CommonInfoSelfUpdate(struct dm_odm_t *pDM_Odm);
+/* Remove Edca by Yu Chen */
 
-void odm_CmnInfoInit_Debug(struct dm_odm_t *pDM_Odm);
 
-void odm_BasicDbgMessage(struct dm_odm_t *pDM_Odm);
+#define RxDefaultAnt1  0x65a9
+#define RxDefaultAnt2  0x569a
 
-/* ENDCOMMON INFO RELATED--- */
+static void odm_CommonInfoSelfInit(struct dm_odm_t *pDM_Odm)
+{
+   pDM_Odm->bCckHighPower = (bool) PHY_QueryBBReg(pDM_Odm->Adapter, 
ODM_REG(CCK_RPT_FORMAT, pDM_Odm), ODM_BIT(CCK_RPT_FORMAT, pDM_Odm));
+   pDM_Odm->RFPathRxEnable = (u8) PHY_QueryBBReg(pDM_Odm->Adapter, 
ODM_REG(BB_RX_PATH, pDM_Odm), ODM_BIT(BB_RX_PATH, pDM_Odm));
 
-/* START---DIG--- */
+   ODM_InitDebugSetting(pDM_Odm);
 
-/* Remove by Yuchen */
+   pDM_Odm->TxRate = 0xFF;
+}
 
-/* END---DIG--- */
+static void odm_CommonInfoSelfUpdate(struct dm_odm_t *pDM_Odm)
+{
+   u8 EntryCnt = 0;
+   u8 i;
+   PSTA_INFO_T pEntry;
 
-/* START---BB POWER SAVE--- */
-/* Remove BB power Saving by YuChen */
-/* END-BB POWER SAVE--- */
+   if (*(pDM_

[PATCH v2 6/9] staging: rtl8723bs: move function prototypes out of os_dep/int_fs.c

2021-03-23 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
196: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:196:
+int _netdev_open(struct net_device *pnetdev);
--
WARNING: externs should be avoided in .c files
197: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:197:
+int netdev_open(struct net_device *pnetdev);

moved function prototype in include/osdep_intf.h
removed function prototype and made a static
removed unnecessary extern declaration in os_dep/ioctl_cfg80211.c

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/osdep_intf.h| 2 ++
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 --
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 4 +---
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_intf.h 
b/drivers/staging/rtl8723bs/include/osdep_intf.h
index 5ad85416c598..48c90f00cc2e 100644
--- a/drivers/staging/rtl8723bs/include/osdep_intf.h
+++ b/drivers/staging/rtl8723bs/include/osdep_intf.h
@@ -69,4 +69,6 @@ void rtw_ndev_destructor(struct net_device *ndev);
 int rtw_suspend_common(struct adapter *padapter);
 int rtw_resume_common(struct adapter *padapter);
 
+int netdev_open(struct net_device *pnetdev);
+
 #endif /* _OSDEP_INTF_H_ */
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index a577ddcce8cd..03a784558d79 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1259,8 +1259,6 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
return ret;
 }
 
-extern int netdev_open(struct net_device *pnetdev);
-
 static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
 struct net_device *ndev,
 enum nl80211_iftype type,
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 9ae7d46fb501..c6c5cc0a9e08 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -193,8 +193,6 @@ MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable, "0:Disable, 
1:Enable, 2: Depend on efuse
 module_param(rtw_tx_pwr_by_rate, int, 0644);
 MODULE_PARM_DESC(rtw_tx_pwr_by_rate, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
-int _netdev_open(struct net_device *pnetdev);
-int netdev_open(struct net_device *pnetdev);
 static int netdev_close(struct net_device *pnetdev);
 
 static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
@@ -875,7 +873,7 @@ int rtw_drv_register_netdev(struct adapter *if1)
return _rtw_drv_register_netdev(padapter, name);
 }
 
-int _netdev_open(struct net_device *pnetdev)
+static int _netdev_open(struct net_device *pnetdev)
 {
uint status;
struct adapter *padapter = rtw_netdev_priv(pnetdev);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 4/9] staging: rtl8723bs: delete extern declarations in core/rtw_wlan_util.c

2021-03-23 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
28: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:28:
+extern unsigned char RTW_WPA_OUI[];
--
WARNING: externs should be avoided in .c files
29: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:29:
+extern unsigned char WPA_TKIP_CIPHER[4];

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index bfd55a0356f5..760b0ea4e9bd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -25,9 +25,6 @@ static unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
 static unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
 static unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
 
-extern unsigned char RTW_WPA_OUI[];
-extern unsigned char WPA_TKIP_CIPHER[4];
-
 #define R2T_PHY_DELAY  (0)
 
 /* define WAIT_FOR_BCN_TO_MIN  (3000) */
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 3/9] staging: rtl8723bs: removed function prototypes and made statics in core/rtw_recv.c

2021-03-23 Thread Fabio Aiuto
fix the following checkpatch issue:

WARNING: externs should be avoided in .c files
1190: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:1190:
+signed int validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame 
*precv_frame);

removed function prototypes and made statics

moved two static function definitions before their usage
to make code compile

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 441 ++
 1 file changed, 207 insertions(+), 234 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c 
b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 1fa381663b4c..608a59286505 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -305,8 +305,7 @@ struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue)
 
 }
 
-signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame 
*precvframe);
-signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame 
*precvframe)
+static signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame 
*precvframe)
 {
 
signed int  i, res = _SUCCESS;
@@ -436,8 +435,7 @@ signed int recvframe_chkmic(struct adapter *adapter,  union 
recv_frame *precvfra
 }
 
 /* decrypt and set the ivlen, icvlen of the recv_frame */
-union recv_frame *decryptor(struct adapter *padapter, union recv_frame 
*precv_frame);
-union recv_frame *decryptor(struct adapter *padapter, union recv_frame 
*precv_frame)
+static union recv_frame *decryptor(struct adapter *padapter, union recv_frame 
*precv_frame)
 {
 
struct rx_pkt_attrib *prxattrib = _frame->u.hdr.attrib;
@@ -528,8 +526,7 @@ union recv_frame *decryptor(struct adapter *padapter, union 
recv_frame *precv_fr
 }
 
 /* set the security information in the recv_frame */
-union recv_frame *portctrl(struct adapter *adapter, union recv_frame 
*precv_frame);
-union recv_frame *portctrl(struct adapter *adapter, union recv_frame 
*precv_frame)
+static union recv_frame *portctrl(struct adapter *adapter, union recv_frame 
*precv_frame)
 {
u8 *psta_addr = NULL;
u8 *ptr;
@@ -606,8 +603,7 @@ union recv_frame *portctrl(struct adapter *adapter, union 
recv_frame *precv_fram
return prtnframe;
 }
 
-signed int recv_decache(union recv_frame *precv_frame, u8 bretry, struct 
stainfo_rxcache *prxcache);
-signed int recv_decache(union recv_frame *precv_frame, u8 bretry, struct 
stainfo_rxcache *prxcache)
+static signed int recv_decache(union recv_frame *precv_frame, u8 bretry, 
struct stainfo_rxcache *prxcache)
 {
signed int tid = precv_frame->u.hdr.attrib.priority;
 
@@ -634,8 +630,7 @@ signed int recv_decache(union recv_frame *precv_frame, u8 
bretry, struct stainfo
 
 }
 
-void process_pwrbit_data(struct adapter *padapter, union recv_frame 
*precv_frame);
-void process_pwrbit_data(struct adapter *padapter, union recv_frame 
*precv_frame)
+static void process_pwrbit_data(struct adapter *padapter, union recv_frame 
*precv_frame)
 {
unsigned char pwrbit;
u8 *ptr = precv_frame->u.hdr.rx_data;
@@ -671,8 +666,7 @@ void process_pwrbit_data(struct adapter *padapter, union 
recv_frame *precv_frame
}
 }
 
-void process_wmmps_data(struct adapter *padapter, union recv_frame 
*precv_frame);
-void process_wmmps_data(struct adapter *padapter, union recv_frame 
*precv_frame)
+static void process_wmmps_data(struct adapter *padapter, union recv_frame 
*precv_frame)
 {
struct rx_pkt_attrib *pattrib = _frame->u.hdr.attrib;
struct sta_priv *pstapriv = >stapriv;
@@ -723,8 +717,7 @@ void process_wmmps_data(struct adapter *padapter, union 
recv_frame *precv_frame)
}
 }
 
-void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, 
struct sta_info *sta);
-void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, 
struct sta_info *sta)
+static void count_rx_stats(struct adapter *padapter, union recv_frame 
*prframe, struct sta_info *sta)
 {
int sz;
struct sta_info *psta = NULL;
@@ -755,9 +748,7 @@ void count_rx_stats(struct adapter *padapter, union 
recv_frame *prframe, struct
traffic_check_for_leave_lps(padapter, false, 0);
 }
 
-signed int sta2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
-   struct sta_info **psta);
-signed int sta2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
+static signed int sta2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
struct sta_info **psta)
 {
u8 *ptr = precv_frame->u.hdr.rx_data;
@@ -850,9 +841,7 @@ signed int sta2sta_data_frame(struct adapter *adapter, 
union recv_frame *precv_f
return ret;
 }
 
-signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
-  struct sta_info **psta);
-signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame 
*pr

[PATCH v2 2/9] staging: rtl8723bs: moved function prototype out of core/rtw_ioctl_set.c and core/rtw_mlme.c

2021-03-23 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
40: FILE: drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:40:
+u8 rtw_do_join(struct adapter *padapter);

WARNING: externs should be avoided in .c files
15: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:15:
+extern u8 rtw_do_join(struct adapter *padapter);

moved function prototype in include/rtw_ioctl_set.h

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ioctl_set.c| 1 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 --
 drivers/staging/rtl8723bs/include/rtw_ioctl_set.h | 2 ++
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index cb14855742f7..7d858cae2395 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -37,7 +37,6 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
return ret;
 }
 
-u8 rtw_do_join(struct adapter *padapter);
 u8 rtw_do_join(struct adapter *padapter)
 {
struct list_head*plist, *phead;
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 95cfef118a94..1ee86ec2dee7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -12,8 +12,6 @@
 #include 
 #include 
 
-extern u8 rtw_do_join(struct adapter *padapter);
-
 intrtw_init_mlme_priv(struct adapter *padapter)
 {
int i;
diff --git a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
index d6d3c39a69c6..31424bf2d926 100644
--- a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
@@ -22,6 +22,8 @@ u8 rtw_set_802_11_connect(struct adapter *padapter, u8 
*bssid, struct ndis_802_1
 u8 rtw_validate_bssid(u8 *bssid);
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 
+u8 rtw_do_join(struct adapter *padapter);
+
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 
 #endif
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 1/9] staging: rtl8723bs: removed function prototypes in core/rtw_efuse.c

2021-03-23 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
35: FILE: drivers/staging/rtl8723bs/core/rtw_efuse.c:35:
+bool

removed two function prototypes in core/rtw_efuse.c and
made definition static

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_efuse.c | 14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c 
b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index 32ca10f01413..3701336e7ff6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -32,12 +32,7 @@ u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
 #define REG_EFUSE_CTRL 0x0030
 #define EFUSE_CTRL REG_EFUSE_CTRL  /*  E-Fuse 
Control. */
 
-bool
-Efuse_Read1ByteFromFakeContent(
-   struct adapter *padapter,
-   u16 Offset,
-   u8 *Value);
-bool
+static bool
 Efuse_Read1ByteFromFakeContent(
struct adapter *padapter,
u16 Offset,
@@ -53,12 +48,7 @@ Efuse_Read1ByteFromFakeContent(
return true;
 }
 
-bool
-Efuse_Write1ByteToFakeContent(
-   struct adapter *padapter,
-   u16 Offset,
-   u8 Value);
-bool
+static bool
 Efuse_Write1ByteToFakeContent(
struct adapter *padapter,
u16 Offset,
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 0/9] fix extern declarations checkpatch issues

2021-03-23 Thread Fabio Aiuto
Fix extern declaration issues warned by checkpatch.

Changes in v2:
- removal of prototypes when function can be static
- move of static function defs inside file to let the code compile
- split last patch in two patches (one patch for blank line removal)

Fabio Aiuto (9):
  staging: rtl8723bs: removed function prototypes in core/rtw_efuse.c
  staging: rtl8723bs: moved function prototype out of
core/rtw_ioctl_set.c and core/rtw_mlme.c
  staging: rtl8723bs: removed function prototypes and made statics in
core/rtw_recv.c
  staging: rtl8723bs: delete extern declarations in core/rtw_wlan_util.c
  staging: rtl8723bs: remove function prototypes in hal/odm.c
  staging: rtl8723bs: move function prototypes out of os_dep/int_fs.c
  staging: rtl8723bs: remove undefined function prototype in of
os_dep/sdio_intf.c
  staging: rtl8723bs: remove unnecessary extern in os_dep/sdio_intf.c
  staging: rtl8723bs: remove blank line os_dep/os_intfs.c

 drivers/staging/rtl8723bs/core/rtw_efuse.c|   14 +-
 .../staging/rtl8723bs/core/rtw_ioctl_set.c|1 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c |2 -
 drivers/staging/rtl8723bs/core/rtw_recv.c |  441 ++---
 .../staging/rtl8723bs/core/rtw_wlan_util.c|3 -
 drivers/staging/rtl8723bs/hal/odm.c   | 1717 -
 .../staging/rtl8723bs/include/osdep_intf.h|2 +
 .../staging/rtl8723bs/include/rtw_ioctl_set.h |2 +
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |2 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |5 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |3 -
 11 files changed, 1038 insertions(+), 1154 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 02/11] staging: rtl8723bs: moved function prototypes out of core/rtw_efuse.c

2021-03-22 Thread Fabio Aiuto
On Mon, Mar 22, 2021 at 05:07:53PM +0100, Greg KH wrote:
> On Mon, Mar 22, 2021 at 03:31:40PM +0100, Fabio Aiuto wrote:
> > fix the following checkpatch issues:
> > 
> > WARNING: externs should be avoided in .c files
> > 35: FILE: drivers/staging/rtl8723bs/core/rtw_efuse.c:35:
> > +bool
> > 
> > moved two function prototypes in include/rtw_efuse.h
> > 
> > Signed-off-by: Fabio Aiuto 
> > ---
> >  drivers/staging/rtl8723bs/core/rtw_efuse.c| 10 --
> >  drivers/staging/rtl8723bs/include/rtw_efuse.h |  3 +++
> >  2 files changed, 3 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c 
> > b/drivers/staging/rtl8723bs/core/rtw_efuse.c
> > index 32ca10f01413..0772397738d4 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
> > @@ -32,11 +32,6 @@ u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
> >  #define REG_EFUSE_CTRL 0x0030
> >  #define EFUSE_CTRL REG_EFUSE_CTRL  /*  E-Fuse 
> > Control. */
> >  
> > -bool
> > -Efuse_Read1ByteFromFakeContent(
> > -   struct adapter *padapter,
> > -   u16 Offset,
> > -   u8 *Value);
> >  bool
> >  Efuse_Read1ByteFromFakeContent(
> > struct adapter *padapter,
> > @@ -53,11 +48,6 @@ Efuse_Read1ByteFromFakeContent(
> > return true;
> >  }
> >  
> > -bool
> > -Efuse_Write1ByteToFakeContent(
> > -   struct adapter *padapter,
> > -   u16 Offset,
> > -   u8 Value);
> >  bool
> >  Efuse_Write1ByteToFakeContent(
> > struct adapter *padapter,
> > diff --git a/drivers/staging/rtl8723bs/include/rtw_efuse.h 
> > b/drivers/staging/rtl8723bs/include/rtw_efuse.h
> > index 5bae46ecd9de..1f304df8c421 100644
> > --- a/drivers/staging/rtl8723bs/include/rtw_efuse.h
> > +++ b/drivers/staging/rtl8723bs/include/rtw_efuse.h
> > @@ -103,6 +103,9 @@ extern u8 fakeBTEfuseInitMap[];
> >  extern u8 fakeBTEfuseModifiedMap[];
> >  /*Export global 
> > variable*/
> >  
> > +bool Efuse_Read1ByteFromFakeContent(struct adapter *padapter, u16 Offset, 
> > u8 *Value);
> > +bool Efuse_Write1ByteToFakeContent(struct adapter *padapter, u16 Offset, 
> > u8 Value);
> 
> No, there's no need for this to be in a .h file, it is only called from
> one .c file.
> 
> Make the thing static and all should be fine, right?
> 
> thanks,
> 
> greg k-h

ok, better static function when possibile. 

Thank you Greg,

fabio
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/11] staging: rtl8723bs: remove unnecessary extern in os_dep/sdio_intf.c

2021-03-22 Thread Fabio Aiuto
remove unnecessary extern.

The function is defined static in os_dep/os_intfs.c and used only once
in the same file

remove also a blank line

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c  | 1 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 3713c62a477c..321f7c45ed95 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -1027,7 +1027,6 @@ void rtw_ips_dev_unload(struct adapter *padapter)
rtw_hal_deinit(padapter);
 }
 
-
 static int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
 {
int status = -1;
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c 
b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 185919b6963f..156ad91d33ee 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -482,8 +482,6 @@ static void rtw_dev_remove(struct sdio_func *func)
RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("-rtw_dev_remove\n"));
 }
 
-extern int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
-
 static int rtw_sdio_suspend(struct device *dev)
 {
struct sdio_func *func = dev_to_sdio_func(dev);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/11] staging: rtl8723bs: remove undefined function prototype in of os_dep/sdio_intf.c

2021-03-22 Thread Fabio Aiuto
fix the following checkpatch issue:

WARNING: externs should be avoided in .c files
486: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:486:
+extern int pm_netdev_close(struct net_device *pnetdev, u8 bnormal);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c 
b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 8f8549eee23e..185919b6963f 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -483,7 +483,6 @@ static void rtw_dev_remove(struct sdio_func *func)
 }
 
 extern int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
-extern int pm_netdev_close(struct net_device *pnetdev, u8 bnormal);
 
 static int rtw_sdio_suspend(struct device *dev)
 {
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/11] staging: rtl8723bs: move function prototypes out of os_dep/int_fs.c

2021-03-22 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
196: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:196:
+int _netdev_open(struct net_device *pnetdev);
--
WARNING: externs should be avoided in .c files
197: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:197:
+int netdev_open(struct net_device *pnetdev);

moved function prototypes in include/osdep_intf.h

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/osdep_intf.h | 3 +++
 drivers/staging/rtl8723bs/os_dep/os_intfs.c| 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_intf.h 
b/drivers/staging/rtl8723bs/include/osdep_intf.h
index 5ad85416c598..dc279ceb1469 100644
--- a/drivers/staging/rtl8723bs/include/osdep_intf.h
+++ b/drivers/staging/rtl8723bs/include/osdep_intf.h
@@ -69,4 +69,7 @@ void rtw_ndev_destructor(struct net_device *ndev);
 int rtw_suspend_common(struct adapter *padapter);
 int rtw_resume_common(struct adapter *padapter);
 
+int _netdev_open(struct net_device *pnetdev);
+int netdev_open(struct net_device *pnetdev);
+
 #endif /* _OSDEP_INTF_H_ */
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 9ae7d46fb501..3713c62a477c 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -193,8 +193,6 @@ MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable, "0:Disable, 
1:Enable, 2: Depend on efuse
 module_param(rtw_tx_pwr_by_rate, int, 0644);
 MODULE_PARM_DESC(rtw_tx_pwr_by_rate, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
-int _netdev_open(struct net_device *pnetdev);
-int netdev_open(struct net_device *pnetdev);
 static int netdev_close(struct net_device *pnetdev);
 
 static void loadparam(struct adapter *padapter, struct net_device *pnetdev)
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/11] staging: rtl8723bs: move function prototypes out of hal/odm.c

2021-03-22 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
285: FILE: drivers/staging/rtl8723bs/hal/odm.c:285:
+void odm_CommonInfoSelfInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
287: FILE: drivers/staging/rtl8723bs/hal/odm.c:287:
+void odm_CommonInfoSelfUpdate(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
289: FILE: drivers/staging/rtl8723bs/hal/odm.c:289:
+void odm_CmnInfoInit_Debug(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
291: FILE: drivers/staging/rtl8723bs/hal/odm.c:291:
+void odm_BasicDbgMessage(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
305: FILE: drivers/staging/rtl8723bs/hal/odm.c:305:
+void odm_RefreshRateAdaptiveMaskCE(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
309: FILE: drivers/staging/rtl8723bs/hal/odm.c:309:
+void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
311: FILE: drivers/staging/rtl8723bs/hal/odm.c:311:
+void odm_RSSIMonitorCheckCE(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
313: FILE: drivers/staging/rtl8723bs/hal/odm.c:313:
+void odm_RSSIMonitorCheck(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
315: FILE: drivers/staging/rtl8723bs/hal/odm.c:315:
+void odm_SwAntDetectInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
317: FILE: drivers/staging/rtl8723bs/hal/odm.c:317:
+void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext);
--
WARNING: externs should be avoided in .c files
321: FILE: drivers/staging/rtl8723bs/hal/odm.c:321:
+void odm_GlobalAdapterCheck(void);
--
WARNING: externs should be avoided in .c files
323: FILE: drivers/staging/rtl8723bs/hal/odm.c:323:
+void odm_RefreshRateAdaptiveMask(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
325: FILE: drivers/staging/rtl8723bs/hal/odm.c:325:
+void ODM_TXPowerTrackingCheck(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
327: FILE: drivers/staging/rtl8723bs/hal/odm.c:327:
+void odm_RateAdaptiveMaskInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
330: FILE: drivers/staging/rtl8723bs/hal/odm.c:330:
+void odm_TXPowerTrackingInit(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
338: FILE: drivers/staging/rtl8723bs/hal/odm.c:338:
+void odm_InitHybridAntDiv(struct dm_odm_t *pDM_Odm);
--
WARNING: externs should be avoided in .c files
340: FILE: drivers/staging/rtl8723bs/hal/odm.c:340:
+bool odm_StaDefAntSel(
--
WARNING: externs should be avoided in .c files
349: FILE: drivers/staging/rtl8723bs/hal/odm.c:349:
+void odm_SetRxIdleAnt(struct dm_odm_t *pDM_Odm, u8 Ant, bool bDualPath);
--
WARNING: externs should be avoided in .c files
353: FILE: drivers/staging/rtl8723bs/hal/odm.c:353:
+void odm_HwAntDiv(struct dm_odm_t *pDM_Odm);

moved function prototypes in hal/odm.h

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/odm.c | 68 -
 drivers/staging/rtl8723bs/hal/odm.h | 62 ++
 2 files changed, 62 insertions(+), 68 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.c 
b/drivers/staging/rtl8723bs/hal/odm.c
index 49d552105a65..1ede10f0b9da 100644
--- a/drivers/staging/rtl8723bs/hal/odm.c
+++ b/drivers/staging/rtl8723bs/hal/odm.c
@@ -279,80 +279,12 @@ u32 TxScalingTable_Jaguar[TXSCALE_TABLE_SIZE] = {
0x3FE  /*  36, +6.0dB */
 };
 
-/*  Local Function predefine. */
-
-/* STARTCOMMON INFO RELATED--- */
-void odm_CommonInfoSelfInit(struct dm_odm_t *pDM_Odm);
-
-void odm_CommonInfoSelfUpdate(struct dm_odm_t *pDM_Odm);
-
-void odm_CmnInfoInit_Debug(struct dm_odm_t *pDM_Odm);
-
-void odm_BasicDbgMessage(struct dm_odm_t *pDM_Odm);
-
-/* ENDCOMMON INFO RELATED--- */
-
-/* START---DIG--- */
-
-/* Remove by Yuchen */
-
-/* END---DIG--- */
-
-/* START---BB POWER SAVE--- */
-/* Remove BB power Saving by YuChen */
-/* END-BB POWER SAVE--- */
-
-void odm_RefreshRateAdaptiveMaskCE(struct dm_odm_t *pDM_Odm);
-
-/* Remove by YuChen */
-
-void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm);
-
-void odm_RSSIMonitorCheckCE(struct dm_odm_t *pDM_Odm);
-
-void odm_RSSIMonitorCheck(struct dm_odm_t *pDM_Odm);
-
-void odm_SwAntDetectInit(struct dm_odm_t *pDM_Odm);
-
-void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext);
-
-
-
-void odm_GlobalAdapterCheck(void);
-
-void odm_RefreshRateAdaptiveMask(struct dm_odm_t *pDM_Odm);
-
-void ODM_TXPowerTrackingCheck(struct dm_odm_t *pDM_Odm);
-
-void odm_RateAdaptiveMaskInit(struct dm_odm_t *pDM_Odm);
-
-
-void odm_TXPowerTrackingInit(struct dm_odm_t *pDM_Odm);
-
 /* Remove Edca by Yu Chen */
 
 
 #define

[PATCH 07/11] staging: rtl8723bs: delete extern declarations in core/rtw_wlan_util.c

2021-03-22 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
28: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:28:
+extern unsigned char RTW_WPA_OUI[];
--
WARNING: externs should be avoided in .c files
29: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:29:
+extern unsigned char WPA_TKIP_CIPHER[4];

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index bfd55a0356f5..760b0ea4e9bd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -25,9 +25,6 @@ static unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
 static unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
 static unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
 
-extern unsigned char RTW_WPA_OUI[];
-extern unsigned char WPA_TKIP_CIPHER[4];
-
 #define R2T_PHY_DELAY  (0)
 
 /* define WAIT_FOR_BCN_TO_MIN  (3000) */
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/11] staging: rtl8723bs: move function prototype out of core/rtw_recv.c

2021-03-22 Thread Fabio Aiuto
move function prototype in include/rtw_recv.h

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_recv.c| 1 -
 drivers/staging/rtl8723bs/include/rtw_recv.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c 
b/drivers/staging/rtl8723bs/core/rtw_recv.c
index e2a6afed723c..99dede774b7a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1983,7 +1983,6 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl 
*preorder_ctrl, union rec
 
 }
 
-u64 recv_indicatepkts_pkt_loss_cnt(u64 prev_seq, u64 current_seq);
 u64 recv_indicatepkts_pkt_loss_cnt(u64 prev_seq, u64 current_seq)
 {
if (current_seq < prev_seq)
diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index 248e098726fd..1dca18040b98 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -553,6 +553,8 @@ int check_indicate_seq(struct recv_reorder_ctrl 
*preorder_ctrl, u16 seq_num);
 
 int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union 
recv_frame *prframe);
 
+u64 recv_indicatepkts_pkt_loss_cnt(u64 prev_seq, u64 current_seq);
+
 int recv_indicatepkts_in_order(struct adapter *padapter, struct 
recv_reorder_ctrl *preorder_ctrl,
   int bforced);
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/11] staging: rtl8723bs: moved function prototype out of core/rtw_ioctl_set.c and core/rtw_mlme.c

2021-03-22 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
40: FILE: drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:40:
+u8 rtw_do_join(struct adapter *padapter);

WARNING: externs should be avoided in .c files
15: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:15:
+extern u8 rtw_do_join(struct adapter *padapter);

moved function prototype in include/rtw_ioctl_set.h

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ioctl_set.c| 1 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 --
 drivers/staging/rtl8723bs/include/rtw_ioctl_set.h | 2 ++
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index cb14855742f7..7d858cae2395 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -37,7 +37,6 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
return ret;
 }
 
-u8 rtw_do_join(struct adapter *padapter);
 u8 rtw_do_join(struct adapter *padapter)
 {
struct list_head*plist, *phead;
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 95cfef118a94..1ee86ec2dee7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -12,8 +12,6 @@
 #include 
 #include 
 
-extern u8 rtw_do_join(struct adapter *padapter);
-
 intrtw_init_mlme_priv(struct adapter *padapter)
 {
int i;
diff --git a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
index 4b929b84040a..55722c1366aa 100644
--- a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
@@ -28,6 +28,8 @@ u8 rtw_set_802_11_connect(struct adapter *padapter, u8 
*bssid, struct ndis_802_1
 u8 rtw_validate_bssid(u8 *bssid);
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 
+u8 rtw_do_join(struct adapter *padapter);
+
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 
 #endif
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/11] staging: rtl8723bs: remove argument in recv_indicatepkts_pkt_loss_cnt

2021-03-22 Thread Fabio Aiuto
remove debug_priv argument so function prototype can be
easily moved away

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c 
b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 9ef2408ded57..e2a6afed723c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1983,13 +1983,13 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl 
*preorder_ctrl, union rec
 
 }
 
-void recv_indicatepkts_pkt_loss_cnt(struct debug_priv *pdbgpriv, u64 prev_seq, 
u64 current_seq);
-void recv_indicatepkts_pkt_loss_cnt(struct debug_priv *pdbgpriv, u64 prev_seq, 
u64 current_seq)
+u64 recv_indicatepkts_pkt_loss_cnt(u64 prev_seq, u64 current_seq);
+u64 recv_indicatepkts_pkt_loss_cnt(u64 prev_seq, u64 current_seq)
 {
if (current_seq < prev_seq)
-   pdbgpriv->dbg_rx_ampdu_loss_count += (4096 + current_seq - 
prev_seq);
+   return 4096 + current_seq - prev_seq;
else
-   pdbgpriv->dbg_rx_ampdu_loss_count += (current_seq - prev_seq);
+   return current_seq - prev_seq;
 
 }
 
@@ -2029,7 +2029,8 @@ int recv_indicatepkts_in_order(struct adapter *padapter, 
struct recv_reorder_ctr
DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d, NewSeq: %d\n", 
__func__, __LINE__,
preorder_ctrl->indicate_seq, pattrib->seq_num);
#endif
-   recv_indicatepkts_pkt_loss_cnt(pdbgpriv, 
preorder_ctrl->indicate_seq, pattrib->seq_num);
+   pdbgpriv->dbg_rx_ampdu_loss_count += 
recv_indicatepkts_pkt_loss_cnt(
+   preorder_ctrl->indicate_seq, pattrib->seq_num);
preorder_ctrl->indicate_seq = pattrib->seq_num;
 
}
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/11] staging: rtl8723bs: moved function prototypes out of core/rtw_recv.c

2021-03-22 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
1190: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:1190:
+signed int validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame 
*precv_frame);

and then moved all function prototypes but one in include/rtw_recv.h

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_recv.c| 31 +---
 drivers/staging/rtl8723bs/include/rtw_recv.h | 51 
 2 files changed, 52 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c 
b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 1fa381663b4c..9ef2408ded57 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -305,7 +305,6 @@ struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue)
 
 }
 
-signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame 
*precvframe);
 signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame 
*precvframe)
 {
 
@@ -435,8 +434,6 @@ signed int recvframe_chkmic(struct adapter *adapter,  union 
recv_frame *precvfra
 
 }
 
-/* decrypt and set the ivlen, icvlen of the recv_frame */
-union recv_frame *decryptor(struct adapter *padapter, union recv_frame 
*precv_frame);
 union recv_frame *decryptor(struct adapter *padapter, union recv_frame 
*precv_frame)
 {
 
@@ -527,8 +524,6 @@ union recv_frame *decryptor(struct adapter *padapter, union 
recv_frame *precv_fr
return return_packet;
 }
 
-/* set the security information in the recv_frame */
-union recv_frame *portctrl(struct adapter *adapter, union recv_frame 
*precv_frame);
 union recv_frame *portctrl(struct adapter *adapter, union recv_frame 
*precv_frame)
 {
u8 *psta_addr = NULL;
@@ -606,7 +601,6 @@ union recv_frame *portctrl(struct adapter *adapter, union 
recv_frame *precv_fram
return prtnframe;
 }
 
-signed int recv_decache(union recv_frame *precv_frame, u8 bretry, struct 
stainfo_rxcache *prxcache);
 signed int recv_decache(union recv_frame *precv_frame, u8 bretry, struct 
stainfo_rxcache *prxcache)
 {
signed int tid = precv_frame->u.hdr.attrib.priority;
@@ -634,7 +628,6 @@ signed int recv_decache(union recv_frame *precv_frame, u8 
bretry, struct stainfo
 
 }
 
-void process_pwrbit_data(struct adapter *padapter, union recv_frame 
*precv_frame);
 void process_pwrbit_data(struct adapter *padapter, union recv_frame 
*precv_frame)
 {
unsigned char pwrbit;
@@ -671,7 +664,6 @@ void process_pwrbit_data(struct adapter *padapter, union 
recv_frame *precv_frame
}
 }
 
-void process_wmmps_data(struct adapter *padapter, union recv_frame 
*precv_frame);
 void process_wmmps_data(struct adapter *padapter, union recv_frame 
*precv_frame)
 {
struct rx_pkt_attrib *pattrib = _frame->u.hdr.attrib;
@@ -723,7 +715,6 @@ void process_wmmps_data(struct adapter *padapter, union 
recv_frame *precv_frame)
}
 }
 
-void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, 
struct sta_info *sta);
 void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, 
struct sta_info *sta)
 {
int sz;
@@ -755,8 +746,6 @@ void count_rx_stats(struct adapter *padapter, union 
recv_frame *prframe, struct
traffic_check_for_leave_lps(padapter, false, 0);
 }
 
-signed int sta2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
-   struct sta_info **psta);
 signed int sta2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
struct sta_info **psta)
 {
@@ -850,8 +839,6 @@ signed int sta2sta_data_frame(struct adapter *adapter, 
union recv_frame *precv_f
return ret;
 }
 
-signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
-  struct sta_info **psta);
 signed int ap2sta_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
   struct sta_info **psta)
 {
@@ -992,8 +979,6 @@ signed int ap2sta_data_frame(struct adapter *adapter, union 
recv_frame *precv_fr
return ret;
 }
 
-signed int sta2ap_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
-  struct sta_info **psta);
 signed int sta2ap_data_frame(struct adapter *adapter, union recv_frame 
*precv_frame,
   struct sta_info **psta)
 {
@@ -1049,7 +1034,6 @@ signed int sta2ap_data_frame(struct adapter *adapter, 
union recv_frame *precv_fr
return ret;
 }
 
-signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame 
*precv_frame);
 signed int validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame 
*precv_frame)
 {
struct rx_pkt_attrib *pattrib = _frame->u.hdr.attrib;
@@ -1186,8 +1170,6 @@ signed int validate_recv_ctrl_frame(struct adapter 
*padapter, union recv_frame *
 
 }
 
-union recv_frame *recvframe_chk_defrag(struct adapter *padapter, union 
r

[PATCH 02/11] staging: rtl8723bs: moved function prototypes out of core/rtw_efuse.c

2021-03-22 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
35: FILE: drivers/staging/rtl8723bs/core/rtw_efuse.c:35:
+bool

moved two function prototypes in include/rtw_efuse.h

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_efuse.c| 10 --
 drivers/staging/rtl8723bs/include/rtw_efuse.h |  3 +++
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c 
b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index 32ca10f01413..0772397738d4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -32,11 +32,6 @@ u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
 #define REG_EFUSE_CTRL 0x0030
 #define EFUSE_CTRL REG_EFUSE_CTRL  /*  E-Fuse 
Control. */
 
-bool
-Efuse_Read1ByteFromFakeContent(
-   struct adapter *padapter,
-   u16 Offset,
-   u8 *Value);
 bool
 Efuse_Read1ByteFromFakeContent(
struct adapter *padapter,
@@ -53,11 +48,6 @@ Efuse_Read1ByteFromFakeContent(
return true;
 }
 
-bool
-Efuse_Write1ByteToFakeContent(
-   struct adapter *padapter,
-   u16 Offset,
-   u8 Value);
 bool
 Efuse_Write1ByteToFakeContent(
struct adapter *padapter,
diff --git a/drivers/staging/rtl8723bs/include/rtw_efuse.h 
b/drivers/staging/rtl8723bs/include/rtw_efuse.h
index 5bae46ecd9de..1f304df8c421 100644
--- a/drivers/staging/rtl8723bs/include/rtw_efuse.h
+++ b/drivers/staging/rtl8723bs/include/rtw_efuse.h
@@ -103,6 +103,9 @@ extern u8 fakeBTEfuseInitMap[];
 extern u8 fakeBTEfuseModifiedMap[];
 /*Export global variable*/
 
+bool Efuse_Read1ByteFromFakeContent(struct adapter *padapter, u16 Offset, u8 
*Value);
+bool Efuse_Write1ByteToFakeContent(struct adapter *padapter, u16 Offset, u8 
Value);
+
 u16 Efuse_GetCurrentSize(struct adapter *padapter, u8 efuseType, bool 
bPseudoTest);
 u8 Efuse_CalculateWordCnts(u8 word_en);
 void EFUSE_GetEfuseDefinition(struct adapter *padapter, u8 efuseType, u8 type, 
void *pOut, bool bPseudoTest);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/11] staging: rtl8723bs: delete extern declarations in core/rtw_ap.c

2021-03-22 Thread Fabio Aiuto
delete extern declaration in .c file (RTW_WPA_OUI) and
fix the following checkpatch issues:

WARNING: externs should be avoided in .c files
14: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:14:
+extern unsigned char WMM_OUI[];
--
WARNING: externs should be avoided in .c files
15: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:15:
+extern unsigned char WPS_OUI[];
--
WARNING: externs should be avoided in .c files
16: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:16:
+extern unsigned char P2P_OUI[];

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index a01b68274fa0..3cd9c61eec99 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -10,11 +10,6 @@
 #include 
 #include 
 
-extern unsigned char RTW_WPA_OUI[];
-extern unsigned char WMM_OUI[];
-extern unsigned char WPS_OUI[];
-extern unsigned char P2P_OUI[];
-
 void init_mlme_ap_info(struct adapter *padapter)
 {
struct mlme_priv *pmlmepriv = >mlmepriv;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/11] staging: rtl8723bs: fix extern declaration checkpatch issues

2021-03-22 Thread Fabio Aiuto
Fix extern declaration issues warned by checkpatch

Fabio Aiuto (11):
  staging: rtl8723bs: delete extern declarations in core/rtw_ap.c
  staging: rtl8723bs: moved function prototypes out of core/rtw_efuse.c
  staging: rtl8723bs: moved function prototype out of
core/rtw_ioctl_set.c and core/rtw_mlme.c
  staging: rtl8723bs: moved function prototypes out of core/rtw_recv.c
  staging: rtl8723bs: remove argument in recv_indicatepkts_pkt_loss_cnt
  staging: rtl8723bs: move function prototype out of core/rtw_recv.c
  staging: rtl8723bs: delete extern declarations in core/rtw_wlan_util.c
  staging: rtl8723bs: move function prototypes out of hal/odm.c
  staging: rtl8723bs: move function prototypes out of os_dep/int_fs.c
  staging: rtl8723bs: remove undefined function prototype in of
os_dep/sdio_intf.c
  staging: rtl8723bs: remove unnecessary extern in os_dep/sdio_intf.c

 drivers/staging/rtl8723bs/core/rtw_ap.c   |  5 --
 drivers/staging/rtl8723bs/core/rtw_efuse.c| 10 ---
 .../staging/rtl8723bs/core/rtw_ioctl_set.c|  1 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c |  2 -
 drivers/staging/rtl8723bs/core/rtw_recv.c | 41 ++-
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  3 -
 drivers/staging/rtl8723bs/hal/odm.c   | 68 ---
 drivers/staging/rtl8723bs/hal/odm.h   | 62 +
 .../staging/rtl8723bs/include/osdep_intf.h|  3 +
 drivers/staging/rtl8723bs/include/rtw_efuse.h |  3 +
 .../staging/rtl8723bs/include/rtw_ioctl_set.h |  2 +
 drivers/staging/rtl8723bs/include/rtw_recv.h  | 53 +++
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |  3 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |  3 -
 14 files changed, 129 insertions(+), 130 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: rtl8723bs: remove unnecessary logging in os_dep/ioctl_cfg80211.c

2021-03-19 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
239: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:239:
+   /* DBG_8192C("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
569: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:569:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
854: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1408: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1408:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1645: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1645:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c::
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
2230: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2230:
+   DBG_8192C("%s\n", __func__);

Changes in v2:
removed empty #ifdef block

Signed-off-by: Fabio Aiuto 
---
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c   | 17 -
 1 file changed, 17 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index e70bb7f1ca3a..a577ddcce8cd 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -235,9 +235,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter 
*padapter, struct wl
struct wiphy *wiphy = wdev->wiphy;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
-
-   /* DBG_8192C("%s\n", __func__); */
-
bssinf_len = pnetwork->network.IELength + sizeof(struct 
ieee80211_hdr_3addr);
if (bssinf_len > MAX_BSSINFO_LEN) {
DBG_871X("%s IE Length too long > %d byte\n", __func__, 
MAX_BSSINFO_LEN);
@@ -566,8 +563,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device 
*dev, struct ieee_pa
struct security_priv *psecuritypriv =  &(padapter->securitypriv);
struct sta_priv *pstapriv = >stapriv;
 
-   DBG_8192C("%s\n", __func__);
-
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
 
@@ -851,8 +846,6 @@ static int rtw_cfg80211_set_encryption(struct net_device 
*dev, struct ieee_param
struct mlme_priv *pmlmepriv = >mlmepriv;
struct security_priv *psecuritypriv = >securitypriv;
 
-   DBG_8192C("%s\n", __func__);
-
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
 
@@ -1404,10 +1397,6 @@ void rtw_cfg80211_surveydone_event_callback(struct 
adapter *padapter)
struct __queue *queue   = &(pmlmepriv->scanned_queue);
struct  wlan_network*pnetwork = NULL;
 
-#ifdef DEBUG_CFG80211
-   DBG_8192C("%s\n", __func__);
-#endif
-
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
phead = get_list_head(queue);
@@ -1642,12 +1631,9 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
 
 static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 {
-   DBG_8192C("%s\n", __func__);
return 0;
 }
 
-
-
 static int rtw_cfg80211_set_wpa_version(struct security_priv *psecuritypriv, 
u32 wpa_version)
 {
DBG_8192C("%s, wpa_version =%d\n", __func__, wpa_version);
@@ -2219,7 +2205,6 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
struct wireless_dev *wdev,
enum nl80211_tx_power_setting type, int mbm)
 {
-   DBG_8192C("%s\n", __func__);
return 0;
 }
 
@@ -2227,8 +2212,6 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
struct wireless_dev *wdev,
int *dbm)
 {
-   DBG_8192C("%s\n", __func__);
-
*dbm = (12);
 
return 0;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/15] staging: rtl8723bs: remove unnecessary logging in os_dep/wifi_regd.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
153: FILE: drivers/staging/rtl8723bs/os_dep/wifi_regd.c:153:
+   DBG_8192C("%s\n", __func__);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c 
b/drivers/staging/rtl8723bs/os_dep/wifi_regd.c
index b3d87a971398..93a35b94d8bc 100644
--- a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c
+++ b/drivers/staging/rtl8723bs/os_dep/wifi_regd.c
@@ -150,7 +150,5 @@ void rtw_reg_notifier(struct wiphy *wiphy, struct 
regulatory_request *request)
 {
struct rtw_regulatory *reg = NULL;
 
-   DBG_8192C("%s\n", __func__);
-
_rtw_reg_notifier_apply(wiphy, request, reg);
 }
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/15] staging: rtl8723bs: remove unnecessary logging in os_dep/os_intfs.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
977: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:977:
+   DBG_871X("===> %s.\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1030: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1030:
+   DBG_871X("> %s...\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1127: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1127:
+   DBG_871X("===> %s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1177: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1177:
+   DBG_871X("<=== %s\n", __func__);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 3909f149de47..93d696d5cf19 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -974,9 +974,6 @@ static int  ips_netdrv_open(struct adapter *padapter)
 
padapter->net_closed = false;
 
-   DBG_871X("===> %s.\n", __func__);
-
-
padapter->bDriverStopped = false;
padapter->bCardDisableWOHSM = false;
/* padapter->bup = true; */
@@ -1027,8 +1024,6 @@ void rtw_ips_pwr_down(struct adapter *padapter)
 
 void rtw_ips_dev_unload(struct adapter *padapter)
 {
-   DBG_871X("> %s...\n", __func__);
-
 
if (!padapter->bSurpriseRemoved)
rtw_hal_deinit(padapter);
@@ -1124,7 +1119,6 @@ void rtw_dev_unload(struct adapter *padapter)
RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("+%s\n", __func__));
 
if (padapter->bup) {
-   DBG_871X("===> %s\n", __func__);
 
padapter->bDriverStopped = true;
if (padapter->xmitpriv.ack_tx)
@@ -1174,7 +1168,6 @@ void rtw_dev_unload(struct adapter *padapter)
 
padapter->bup = false;
 
-   DBG_871X("<=== %s\n", __func__);
} else {
RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("%s: bup 
==false\n", __func__));
DBG_871X("%s: bup ==false\n", __func__);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/15] staging: rtl8723bs: remove unnecessary logging in os_dep/ioctl_linux.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1207: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1207:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1507: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1507:
+   DBG_871X("=>%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
3390: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3390:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
3687: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3687:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
4143: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:4143:
+   /* DBG_871X("%s\n", __func__); */

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index aac1391bdbf1..590da76e9e8e 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -1204,8 +1204,6 @@ static int rtw_wx_set_mlme(struct net_device *dev,
if (mlme == NULL)
return -1;
 
-   DBG_871X("%s\n", __func__);
-
reason = mlme->reason_code;
 
DBG_871X("%s, cmd =%d, reason =%d\n", __func__, mlme->cmd, reason);
@@ -1504,7 +1502,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
}
 
authmode = padapter->securitypriv.ndisauthtype;
-   DBG_871X("=>%s\n", __func__);
if (wrqu->essid.flags && wrqu->essid.length) {
len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? 
wrqu->essid.length : IW_ESSID_MAX_SIZE;
 
@@ -3387,8 +3384,6 @@ static int rtw_set_encryption(struct net_device *dev, 
struct ieee_param *param,
struct security_priv *psecuritypriv = &(padapter->securitypriv);
struct sta_priv *pstapriv = >stapriv;
 
-   DBG_871X("%s\n", __func__);
-
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
 
@@ -3684,8 +3679,6 @@ static void rtw_hostapd_sta_flush(struct net_device *dev)
struct adapter *padapter = rtw_netdev_priv(dev);
/* struct sta_priv *pstapriv = >stapriv; */
 
-   DBG_871X("%s\n", __func__);
-
flush_all_cam_entry(padapter);  /* clear CAM */
 
rtw_sta_flush(padapter);
@@ -4140,8 +4133,6 @@ static int rtw_hostapd_ioctl(struct net_device *dev, 
struct iw_point *p)
int ret = 0;
struct adapter *padapter = rtw_netdev_priv(dev);
 
-   /* DBG_871X("%s\n", __func__); */
-
/*
* this function is expect to call in master mode, which allows no power 
saving
* so, we just check hw_init_completed
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/15] staging: rtl8723bs: remove unnecessary logging in os_dep/ioctl_cfg80211.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
239: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:239:
+   /* DBG_8192C("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
569: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:569:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
854: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1408: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1408:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1645: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1645:
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c::
+   DBG_8192C("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
2230: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2230:
+   DBG_8192C("%s\n", __func__);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 14 --
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 2ff71d001c07..08fbbf05a8c7 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -235,9 +235,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter 
*padapter, struct wl
struct wiphy *wiphy = wdev->wiphy;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
-
-   /* DBG_8192C("%s\n", __func__); */
-
bssinf_len = pnetwork->network.IELength + sizeof(struct 
ieee80211_hdr_3addr);
if (bssinf_len > MAX_BSSINFO_LEN) {
DBG_871X("%s IE Length too long > %d byte\n", __func__, 
MAX_BSSINFO_LEN);
@@ -566,8 +563,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device 
*dev, struct ieee_pa
struct security_priv *psecuritypriv =  &(padapter->securitypriv);
struct sta_priv *pstapriv = >stapriv;
 
-   DBG_8192C("%s\n", __func__);
-
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
 
@@ -851,8 +846,6 @@ static int rtw_cfg80211_set_encryption(struct net_device 
*dev, struct ieee_param
struct mlme_priv *pmlmepriv = >mlmepriv;
struct security_priv *psecuritypriv = >securitypriv;
 
-   DBG_8192C("%s\n", __func__);
-
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
 
@@ -1405,7 +1398,6 @@ void rtw_cfg80211_surveydone_event_callback(struct 
adapter *padapter)
struct  wlan_network*pnetwork = NULL;
 
 #ifdef DEBUG_CFG80211
-   DBG_8192C("%s\n", __func__);
 #endif
 
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
@@ -1642,12 +1634,9 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
 
 static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 {
-   DBG_8192C("%s\n", __func__);
return 0;
 }
 
-
-
 static int rtw_cfg80211_set_wpa_version(struct security_priv *psecuritypriv, 
u32 wpa_version)
 {
DBG_8192C("%s, wpa_version =%d\n", __func__, wpa_version);
@@ -2219,7 +2208,6 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
struct wireless_dev *wdev,
enum nl80211_tx_power_setting type, int mbm)
 {
-   DBG_8192C("%s\n", __func__);
return 0;
 }
 
@@ -2227,8 +2215,6 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
struct wireless_dev *wdev,
int *dbm)
 {
-   DBG_8192C("%s\n", __func__);
-
*dbm = (12);
 
return 0;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/15] staging: rtl8723bs: remove unnecessary logging in hal/rtl8723b_hal_init.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1685: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1685:
+/* DBG_8192C("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1722: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1722:
+/* DBG_8192C("%s\n", __func__); */

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 9bcceb13ca2d..cc7f9af680b1 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -1681,8 +1681,6 @@ static u8 hal_EfusePgPacketWrite1ByteHeader(
u16 efuse_addr = *pAddr;
u8 repeatcnt = 0;
 
-
-/* DBG_8192C("%s\n", __func__); */
pg_header = ((pTargetPkt->offset << 4) & 0xf0) | pTargetPkt->word_en;
 
do {
@@ -1718,8 +1716,6 @@ static u8 hal_EfusePgPacketWrite2ByteHeader(
u8 pg_header = 0, tmp_header = 0;
u8 repeatcnt = 0;
 
-
-/* DBG_8192C("%s\n", __func__); */
EFUSE_GetEfuseDefinition(padapter, efuseType, 
TYPE_AVAILABLE_EFUSE_BYTES_BANK, _max_available_len, bPseudoTest);
 
efuse_addr = *pAddr;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/15] staging: rtl8723bs: remove unnecessary logging in hal/rtl8723b_cmd.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
129: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:129:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
222: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:222:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
329: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:329:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
696: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:696:
+   DBG_871X("%s()\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
794: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:794:
+   /* DBG_871X("%s>\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
965: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:965:
+   /* DBG_871X("%s>\n", __func__); */

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 61fd643c244f..f6c191863747 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -125,9 +125,6 @@ static void ConstructBeacon(struct adapter *padapter, u8 
*pframe, u32 *pLength)
struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network);
u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
-
-   /* DBG_871X("%s\n", __func__); */
-
pwlanhdr = (struct ieee80211_hdr *)pframe;
 
fctrl = &(pwlanhdr->frame_control);
@@ -219,8 +216,6 @@ static void ConstructPSPoll(struct adapter *padapter, u8 
*pframe, u32 *pLength)
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-   /* DBG_871X("%s\n", __func__); */
-
pwlanhdr = (struct ieee80211_hdr *)pframe;
 
/*  Frame control. */
@@ -326,8 +321,6 @@ static void ConstructProbeRsp(struct adapter *padapter, u8 
*pframe, u32 *pLength
uint wps_ielen;
struct mlme_priv *pmlmepriv = >mlmepriv;
 
-   /* DBG_871X("%s\n", __func__); */
-
pwlanhdr = (struct ieee80211_hdr *)pframe;
 
mac = myid(&(padapter->eeprompriv));
@@ -692,9 +685,6 @@ void rtl8723b_set_FwPsTuneParam_cmd(struct adapter 
*padapter)
 void rtl8723b_set_FwPwrModeInIPS_cmd(struct adapter *padapter, u8 cmd_param)
 {
/* BIT0:enable, BIT1:NoConnect32k */
-
-   DBG_871X("%s()\n", __func__);
-
FillH2CCmd8723B(padapter, H2C_8723B_FWLPS_IN_IPS_, 1, _param);
 }
 
@@ -791,8 +781,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
 
struct RSVDPAGE_LOC RsvdPageLoc;
 
-   /* DBG_871X("%s>\n", __func__); */
-
pxmitpriv = >xmitpriv;
pmlmeext = >mlmeextpriv;
pmlmeinfo = >mlmext_info;
@@ -962,7 +950,6 @@ static void rtl8723b_set_AP_FwRsvdPagePkt(
u32 TotalPacketLen = 0, MaxRsvdPageBufSize = 0;
struct RSVDPAGE_LOC RsvdPageLoc;
 
-   /* DBG_871X("%s>\n", __func__); */
DBG_8192C("+" FUNC_ADPT_FMT ": iface_type =%d\n",
FUNC_ADPT_ARG(padapter), get_iface_type(padapter));
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/15] staging: rtl8723bs: remove unnecessary logging in hal/odm_debug.h

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
134: FILE: drivers/staging/rtl8723bs/hal/odm_debug.h:134:
+#define ODM_dbg_enter() { DbgPrint("==> %s\n", __func__); }
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
135: FILE: drivers/staging/rtl8723bs/hal/odm_debug.h:135:
+#define ODM_dbg_exit() { DbgPrint("<== %s\n", __func__); }

and removed containing unused macros

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/odm_debug.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_debug.h 
b/drivers/staging/rtl8723bs/hal/odm_debug.h
index 22f0e37456e2..f2b2e169a6ac 100644
--- a/drivers/staging/rtl8723bs/hal/odm_debug.h
+++ b/drivers/staging/rtl8723bs/hal/odm_debug.h
@@ -131,8 +131,6 @@
ASSERT(false);\
} \
} while (0)
-#define ODM_dbg_enter() { DbgPrint("==> %s\n", __func__); }
-#define ODM_dbg_exit() { DbgPrint("<== %s\n", __func__); }
 #define ODM_dbg_trace(str) { DbgPrint("%s:%s\n", __func__, str); }
 
 #define ODM_PRINT_ADDR(pDM_Odm, comp, level, title_str, ptr)\
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/15] staging: rtl8723bs: remove unnecessary logging in hal/odm.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1109: FILE: drivers/staging/rtl8723bs/hal/odm.c:1109:
+   /* printk("==> %s\n", __func__); */

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/odm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.c 
b/drivers/staging/rtl8723bs/hal/odm.c
index c7607e7d26c5..80c9a95be870 100644
--- a/drivers/staging/rtl8723bs/hal/odm.c
+++ b/drivers/staging/rtl8723bs/hal/odm.c
@@ -1106,8 +1106,6 @@ void odm_RefreshRateAdaptiveMaskCE(struct DM_ODM_T 
*pDM_Odm)
return;
}
 
-   /* printk("==> %s\n", __func__); */
-
for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) {
PSTA_INFO_T pstat = pDM_Odm->pODM_StaInfo[i];
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/15] staging: rtl8723bs: remove unnecessary logging in hal/hal_com_phycfg.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
201: FILE: drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:201:
+   /* DBG_871X("===>%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
265: FILE: drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:265:
+   /* DBG_871X("<===%s\n", __func__); */

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c 
b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
index 7405f9229117..20d81198f316 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
@@ -198,8 +198,6 @@ struct adapter *padapter
 {
u8 path, base;
 
-   /* DBG_871X("===>%s\n", __func__); */
-
for (path = ODM_RF_PATH_A; path <= ODM_RF_PATH_B; ++path) {
base = PHY_GetTxPowerByRate(padapter, BAND_ON_2_4G, path, 
RF_1TX, MGN_11M);
phy_SetTxPowerByRateBase(padapter, BAND_ON_2_4G, path, CCK, 
RF_1TX, base);
@@ -261,8 +259,6 @@ struct adapter *padapter
phy_SetTxPowerByRateBase(padapter, BAND_ON_5G, path, 
VHT_3SSMCS0_3SSMCS9, RF_3TX, base);
/* DBG_871X("Power index base of 5G path %d 3Tx VHT3SS = > 
0x%x\n", path, base); */
}
-
-   /* DBG_871X("<===%s\n", __func__); */
 }
 
 u8 PHY_GetRateSectionIndexOfTxPowerByRate(
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/15] staging: rtl8723bs: remove unnecessary logging in hal/HalBtcOutSrc.h

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
126: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:126:
+   DbgPrint("%s(): ", __func__);\

and remove the whole unused containing macro BTC_PRINT_F

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h 
b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
index c38baf2bc412..aac8e8ed080d 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
+++ b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
@@ -120,14 +120,6 @@ extern u32 GLBtcDbgType[];
DbgPrint printstr;\
 }
 
-#define BTC_PRINT_F(dbgtype, dbgflag, printstr)\
-{\
-   if (GLBtcDbgType[dbgtype] & dbgflag) {\
-   DbgPrint("%s(): ", __func__);\
-   DbgPrint printstr;\
-   } \
-}
-
 #define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr)\
 {\
if (GLBtcDbgType[dbgtype] & dbgflag) {\
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/15] staging: rtl8723bs: remove unnecessary logging in core/rtw_wlan_util.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1140: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1140:
+   DBG_871X("%s\n", __func__);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 355e43c4cf9a..c267f1b546a4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -1137,8 +1137,6 @@ void HTOnAssocRsp(struct adapter *padapter)
struct mlme_ext_priv *pmlmeext = >mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-   DBG_871X("%s\n", __func__);
-
if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) {
pmlmeinfo->HT_enable = 1;
} else {
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/15] staging: rtl8723bs: remove unnecessary logging in core/rtw_pwrctrl.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
185: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:185:
+   DBG_871X("==>%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
606: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:606:
+   DBG_871X("%s.\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
753: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:753:
+   /* DBG_871X("%s\n", __func__); */

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 2e6c522b74e3..908591a8f3c2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -182,7 +182,6 @@ void rtw_ps_processor(struct adapter *padapter)
goto exit;
 
if ((pwrpriv->rf_pwrstate == rf_on) && 
((pwrpriv->pwr_state_check_cnts%4) == 0)) {
-   DBG_871X("==>%s\n", __func__);
pwrpriv->change_rfpwrstate = rf_off;
{
ips_enter(padapter);
@@ -603,8 +602,6 @@ void LeaveAllPowerSaveModeDirect(struct adapter *Adapter)
struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv);
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(Adapter);
 
-   DBG_871X("%s.\n", __func__);
-
if (Adapter->bSurpriseRemoved) {
DBG_871X(FUNC_ADPT_FMT ": bSurpriseRemoved =%d Skip!\n",
FUNC_ADPT_ARG(Adapter), Adapter->bSurpriseRemoved);
@@ -750,8 +747,6 @@ static void cpwm_event_callback(struct work_struct *work)
struct adapter *adapter = dvobj->if1;
struct reportpwrstate_parm report;
 
-   /* DBG_871X("%s\n", __func__); */
-
report.state = PS_STATE_S2;
cpwm_int_hdl(adapter, );
 }
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/15] staging: rtl8723bs: remove unnecessary logging in core/rtw_mlme_ext.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
987: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:987:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1115: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1115:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1547: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1547:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1760: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1760:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1813: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1813:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
2340: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2340:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
2499: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2499:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
2948: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2948:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
2969: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2969:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
3445: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3445:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
3677: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3677:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
3915: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3915:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
4599: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4599:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
5355: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5355:
+   DBG_871X("=>%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
5366: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5366:
+   DBG_871X("%s\n", __func__);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 36 +--
 1 file changed, 1 insertion(+), 35 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index e60a2ed32de5..1633f868467b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -984,8 +984,6 @@ unsigned int OnAuthClient(struct adapter *padapter, union 
recv_frame *precv_fram
u8 *pframe = precv_frame->u.hdr.rx_data;
uint pkt_len = precv_frame->u.hdr.len;
 
-   DBG_871X("%s\n", __func__);
-
/* check A1 matches or not */
if (memcmp(myid(&(padapter->eeprompriv)), get_da(pframe), ETH_ALEN))
return _SUCCESS;
@@ -,9 +1109,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union 
recv_frame *precv_frame)
left = pkt_len - (sizeof(struct ieee80211_hdr_3addr) + ie_offset);
pos = pframe + (sizeof(struct ieee80211_hdr_3addr) + ie_offset);
 
-
-   DBG_871X("%s\n", __func__);
-
/*  check if this stat has been successfully authenticated/assocated */
if (!((pstat->state) & WIFI_FW_AUTH_SUCCESS)) {
if (!((pstat->state) & WIFI_FW_ASSOC_SUCCESS)) {
@@ -1544,8 +1539,6 @@ unsigned int OnAssocRsp(struct adapter *padapter, union 
recv_frame *precv_frame)
u8 *pframe = precv_frame->u.hdr.rx_data;
uint pkt_len = precv_frame->u.hdr.len;
 
-   DBG_871X("%s\n", __func__);
-
/* check A1 matches or not */
if (memcmp(myid(&(padapter->eeprompriv)), get_da(pframe), ETH_ALEN))
return _SUCCESS;
@@ -1757,7 +1750,6 @@ unsigned int OnDisassoc(struct adapter *padapter, union 
recv_frame *precv_frame)
 
 unsigned int OnAtim(struct adapter *padapter, union recv_frame *precv_frame)
 {
-   DBG_871X("%s\n", __func__);
return _SUCCESS;
 }
 
@@ -1810,8 +1802,6 @@ unsigned int OnAction_back(struct adapter *padapter, 
union recv_frame *precv_fra
u8 *pframe = precv_frame->u.hdr.rx_data;
struct sta_priv *pstapriv = >stapriv;
 
-   DBG_871X("%s\n", __func__);
-
/* check RA matches 

[PATCH 02/15] staging: rtl8723bs: remove unnecessary logging in core/rtw_mlme.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1134: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1134:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1223: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1223:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1528: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1528:
+   DBG_871X("%s\n", __func__);

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 725f699abda9..368f0cdea65c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1131,8 +1131,6 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct 
adapter *padapter, str
 
if (psta) { /* update ptarget_sta */
 
-   DBG_871X("%s\n", __func__);
-
psta->aid  = pnetwork->join_res;
 
update_sta_info(padapter, psta);
@@ -1220,8 +1218,6 @@ static void rtw_joinbss_update_network(struct adapter 
*padapter, struct wlan_net
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct wlan_network  *cur_network = &(pmlmepriv->cur_network);
 
-   DBG_871X("%s\n", __func__);
-
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\nfw_state:%x, 
BSSID:%pM\n"
, get_fwstate(pmlmepriv), 
MAC_ARG(pnetwork->network.MacAddress)));
 
@@ -1525,7 +1521,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, 
u8 *pbuf)
psta->qos_option = 0;
psta->mac_id = (uint)pstassoc->cam_id;
/* psta->aid = (uint)pstassoc->cam_id; */
-   DBG_871X("%s\n", __func__);
+
/* for ad-hoc mode */
rtw_hal_set_odm_var(adapter, HAL_ODM_STA_INFO, psta, true);
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/15] staging: rtl8723bs: remove unnecessary logging in core/rtw_ap.c

2021-03-18 Thread Fabio Aiuto
fix the following checkpatch.pl issues:

WARNING: Unnecessary ftrace-like logging - prefer using ftrace
66: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:66:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
559: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:559:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
716: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:716:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
770: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:770:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1476: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1476:
+   /* DBG_871X("%s\n", __func__); */
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1531: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1531:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1557: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1557:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1564: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1564:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1609: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1609:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1614: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1614:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1619: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1619:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1624: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1624:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1629: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1629:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1647: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1647:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1716: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1716:
+   DBG_871X("%s\n", __func__);
--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
1740: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1740:
+   /* DBG_871X("%s\n", __func__); */

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 26 -
 1 file changed, 26 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 63b339484289..d86ab7d0ddf2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -63,8 +63,6 @@ static void update_BCNTIM(struct adapter *padapter)
struct wlan_bssid_ex *pnetwork_mlmeext = >network;
unsigned char *pie = pnetwork_mlmeext->IEs;
 
-   /* DBG_871X("%s\n", __func__); */
-
/* update TIM IE */
/* if (pstapriv->tim_bitmap) */
if (true) {
@@ -556,8 +554,6 @@ void update_sta_info_apmode(struct adapter *padapter, 
struct sta_info *psta)
/* set intf_tag to if1 */
/* psta->intf_tag = 0; */
 
-   DBG_871X("%s\n", __func__);
-
/* psta->mac_id = psta->aid+4; */
/* psta->mac_id = psta->aid+1;//alloc macid when call 
rtw_alloc_stainfo(), */
/* release macid when call rtw_free_stainfo() */
@@ -713,8 +709,6 @@ static void update_hw_ht_param(struct adapter *padapter)
struct mlme_ext_priv *pmlmeext = >mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-   DBG_871X("%s\n", __func__);
-
/* handle A-MPDU parameter field
 *
 *  AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
@@ -767,8 +761,6 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
struct HT_info_element *pht_info = NULL;
u8 cbw40_enable = 0;
 
-   /* DBG_871X("%s\n", __func__); */
-
bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod;
cur_channel = pnetwork->Configuration.DSConfig;
cur_bwmode = CHANNEL_WIDTH_20;
@@ -1473,8 +1465,6 @@ static int rtw_ap_set_key(
struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
int res = _SUCCESS;
 
-   /* DBG_871X("%s\n", __func__); */
-
pcmd = rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL) {
res = _FAIL;
@@ -1528,8 +1518,6 @@ st

[PATCH 00/15] remove unnecessary logging

2021-03-18 Thread Fabio Aiuto
remove unnsecessary loggings warned by checkpatch

Fabio Aiuto (15):
  staging: rtl8723bs: remove unnecessary logging in core/rtw_ap.c
  staging: rtl8723bs: remove unnecessary logging in core/rtw_mlme.c
  staging: rtl8723bs: remove unnecessary logging in core/rtw_mlme_ext.c
  staging: rtl8723bs: remove unnecessary logging in core/rtw_pwrctrl.c
  staging: rtl8723bs: remove unnecessary logging in core/rtw_wlan_util.c
  staging: rtl8723bs: remove unnecessary logging in hal/HalBtcOutSrc.h
  staging: rtl8723bs: remove unnecessary logging in hal/hal_com_phycfg.c
  staging: rtl8723bs: remove unnecessary logging in hal/odm.c
  staging: rtl8723bs: remove unnecessary logging in hal/odm_debug.h
  staging: rtl8723bs: remove unnecessary logging in hal/rtl8723b_cmd.c
  staging: rtl8723bs: remove unnecessary logging in
hal/rtl8723b_hal_init.c
  staging: rtl8723bs: remove unnecessary logging in
os_dep/ioctl_cfg80211.c
  staging: rtl8723bs: remove unnecessary logging in os_dep/ioctl_linux.c
  staging: rtl8723bs: remove unnecessary logging in os_dep/os_intfs.c
  staging: rtl8723bs: remove unnecessary logging in os_dep/wifi_regd.c

 drivers/staging/rtl8723bs/core/rtw_ap.c   | 26 --
 drivers/staging/rtl8723bs/core/rtw_mlme.c |  6 +---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 36 +--
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  5 ---
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  2 --
 drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h  |  8 -
 .../staging/rtl8723bs/hal/hal_com_phycfg.c|  4 ---
 drivers/staging/rtl8723bs/hal/odm.c   |  2 --
 drivers/staging/rtl8723bs/hal/odm_debug.h |  2 --
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 13 ---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  4 ---
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 14 
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|  9 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |  7 
 drivers/staging/rtl8723bs/os_dep/wifi_regd.c  |  2 --
 15 files changed, 2 insertions(+), 138 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


staging: rtl8723bs: prefer ftrace

2021-03-18 Thread Fabio Aiuto
Hi,

some suggestions before diving in a new task.
The following checkpatch issue:

--
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
#559: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:559:
+   DBG_871X("%s\n", __func__);

simply says to remove the line, due to the existence of the more
appealing ftrace facility, right?

@@ -556,8 +554,6 @@ void update_sta_info_apmode(struct adapter *padapter, 
struct sta_info *psta)
/* set intf_tag to if1 */
/* psta->intf_tag = 0; */
 
-   DBG_871X("%s\n", __func__);
-
/* psta->mac_id = psta->aid+4; */
/* psta->mac_id = psta->aid+1;//alloc macid when call 
rtw_alloc_stainfo(), */
/* release macid when call rtw_free_stainfo() */

thank you,

fabio

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: remove unused code blocks completed

2021-03-17 Thread Fabio Aiuto
Remove related item in TODO list

---

searched for other unused code blocks:

grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' \
drivers/staging/rtl8723bs/

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV)
drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER
drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT

all blocks left are checked by existing defines.

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/TODO | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/TODO b/drivers/staging/rtl8723bs/TODO
index 45065fd3fd5d..afa620ceb2d8 100644
--- a/drivers/staging/rtl8723bs/TODO
+++ b/drivers/staging/rtl8723bs/TODO
@@ -1,5 +1,4 @@
 TODO:
-- find and remove code blocks guarded by never set CONFIG_FOO defines
 - find and remove remaining code valid only for 5 GHz. Most of the obvious
   ones have been removed, but things like channel > 14 still exist.
 - find and remove any code for other chips that is left over
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


staging: rtl8723bs: remove unused code blocks completed?

2021-03-17 Thread Fabio Aiuto
Hi,

I'm trying to search other unused code blocks:

grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' drivers/staging/rtl8723bs/

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV)
drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER
drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT

all blocks left are checked by existing defines.
Could we apply this?

thank you,

fabio

diff --git a/drivers/staging/rtl8723bs/TODO b/drivers/staging/rtl8723bs/TODO
index 45065fd3fd5d..afa620ceb2d8 100644
--- a/drivers/staging/rtl8723bs/TODO
+++ b/drivers/staging/rtl8723bs/TODO
@@ -1,5 +1,4 @@
 TODO:
-- find and remove code blocks guarded by never set CONFIG_FOO defines
 - find and remove remaining code valid only for 5 GHz. Most of the obvious
   ones have been removed, but things like channel > 14 still exist.
 - find and remove any code for other chips that is left over
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


staging: rtl8723bs: remove unused code blocks completed?

2021-03-17 Thread Fabio Aiuto
Hi,

I'm trying to search other unused code blocks:

grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' drivers/staging/rtl8723bs/

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV)
drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER
drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT

all blocks left are checked by existing defines.
Could we apply this?

thank you,

fabio

diff --git a/drivers/staging/rtl8723bs/TODO b/drivers/staging/rtl8723bs/TODO
index 45065fd3fd5d..afa620ceb2d8 100644
--- a/drivers/staging/rtl8723bs/TODO
+++ b/drivers/staging/rtl8723bs/TODO
@@ -1,5 +1,4 @@
 TODO:
-- find and remove code blocks guarded by never set CONFIG_FOO defines
 - find and remove remaining code valid only for 5 GHz. Most of the obvious
   ones have been removed, but things like channel > 14 still exist.
 - find and remove any code for other chips that is left over
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_MULTI_VIR_IFACES

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_MULTI_VIR_IFACES

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/drv_types.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/drv_types.h 
b/drivers/staging/rtl8723bs/include/drv_types.h
index 9c0e7b6946f8..30bf7fc0994d 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -196,9 +196,6 @@ struct registry_priv {
u8 RFE_Type;
u8  check_fw_ps;
 
-#ifdef CONFIG_MULTI_VIR_IFACES
-   u8 ext_iface_num;/* primary/secondary iface is excluded */
-#endif
u8 qos_opt_enable;
 
u8 hiq_filter;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_R871X_TEST

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_R871X_TEST

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/osdep_intf.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_intf.h 
b/drivers/staging/rtl8723bs/include/osdep_intf.h
index aa4337686183..5ad85416c598 100644
--- a/drivers/staging/rtl8723bs/include/osdep_intf.h
+++ b/drivers/staging/rtl8723bs/include/osdep_intf.h
@@ -35,12 +35,6 @@ The protection mechanism is through the pending queue.
struct mutex ioctl_mutex;
 };
 
-
-#ifdef CONFIG_R871X_TEST
-int rtw_start_pseudo_adhoc(struct adapter *padapter);
-int rtw_stop_pseudo_adhoc(struct adapter *padapter);
-#endif
-
 struct dvobj_priv *devobj_init(void);
 void devobj_deinit(struct dvobj_priv *pdvobj);
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_BSD_RX_USE_MBUF

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_BSD_RX_USE_MBUF

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/rtw_recv.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index 3443cb7d0467..b298ec121ee9 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -317,13 +317,8 @@ struct recv_buf {
 */
 struct recv_frame_hdr {
struct list_headlist;
-#ifndef CONFIG_BSD_RX_USE_MBUF
struct sk_buff   *pkt;
struct sk_buff   *pkt_newalloc;
-#else /*  CONFIG_BSD_RX_USE_MBUF */
-   struct sk_buff  *pkt;
-   struct sk_buff *pkt_newalloc;
-#endif /*  CONFIG_BSD_RX_USE_MBUF */
 
struct adapter  *adapter;
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_RX_INDICATE_QUEUE

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_RX_INDICATE_QUEUE

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/rtw_recv.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index acd7a7714740..3443cb7d0467 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -226,10 +226,6 @@ struct recv_priv {
struct tasklet_struct recv_tasklet;
struct sk_buff_head free_recv_skb_queue;
struct sk_buff_head rx_skb_queue;
-#ifdef CONFIG_RX_INDICATE_QUEUE
-   struct task rx_indicate_tasklet;
-   struct ifqueue rx_indicate_queue;
-#endif /*  CONFIG_RX_INDICATE_QUEUE */
 
u8 *pallocated_recv_buf;
u8 *precv_buf;/*  4 alignment */
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SINGLE_RECV_BUF

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_SINGLE_RECV_BUF

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/rtw_recv.h | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index 0a56c3a66ee8..acd7a7714740 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -7,13 +7,9 @@
 #ifndef _RTW_RECV_H_
 #define _RTW_RECV_H_
 
-   #ifdef CONFIG_SINGLE_RECV_BUF
-   #define NR_RECVBUFF (1)
-   #else
-   #define NR_RECVBUFF (8)
-   #endif /* CONFIG_SINGLE_RECV_BUF */
+#define NR_RECVBUFF (8)
 
-   #define NR_PREALLOC_RECV_SKB (8)
+#define NR_PREALLOC_RECV_SKB (8)
 
 #define NR_RECVFRAME 256
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_USB_VENDOR*

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_USB_VENDOR family defines

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/drv_conf.h | 10 --
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/drv_conf.h 
b/drivers/staging/rtl8723bs/include/drv_conf.h
index 7fc88b07a25e..9cef9ce589a1 100644
--- a/drivers/staging/rtl8723bs/include/drv_conf.h
+++ b/drivers/staging/rtl8723bs/include/drv_conf.h
@@ -8,16 +8,6 @@
 #define __DRV_CONF_H__
 #include "autoconf.h"
 
-//About USB VENDOR REQ
-#if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && 
!defined(CONFIG_USB_VENDOR_REQ_MUTEX)
-   #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for 
CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically"
-   #define CONFIG_USB_VENDOR_REQ_MUTEX
-#endif
-#if defined(CONFIG_VENDOR_REQ_RETRY) &&  !defined(CONFIG_USB_VENDOR_REQ_MUTEX)
-   #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for 
CONFIG_VENDOR_REQ_RETRY automatically"
-   #define CONFIG_USB_VENDOR_REQ_MUTEX
-#endif
-
 #define DYNAMIC_CAMID_ALLOC
 
 #ifndef CONFIG_RTW_HIQ_FILTER
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_LAYER2_ROAMING_ACTIVE

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_LAYER2_ROAMING_ACTIVE

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index a9e5c27a42f7..149093c710ae 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -67,9 +67,6 @@ int   rtw_init_mlme_priv(struct adapter *padapter)
pmlmepriv->roam_flags = 0
| RTW_ROAM_ON_EXPIRED
| RTW_ROAM_ON_RESUME
-   #ifdef CONFIG_LAYER2_ROAMING_ACTIVE /* FIXME */
-   | RTW_ROAM_ACTIVE
-   #endif
;
 
pmlmepriv->roam_scanr_exp_ms = RTW_ROAM_SCAN_RESULT_EXP_MS;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_VALIDATE_SSID

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_VALIDATE_SSID

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index c9418bfb2a00..5929a7bf7db6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -33,17 +33,6 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
goto exit;
}
 
-#ifdef CONFIG_VALIDATE_SSID
-   for (i = 0; i < ssid->SsidLength; i++) {
-   /* wifi, printable ascii code must be supported */
-   if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e))) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
("ssid has non-printable ascii\n"));
-   ret = false;
-   break;
-   }
-   }
-#endif /* CONFIG_VALIDATE_SSID */
-
 exit:
return ret;
 }
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 2dd902b04509..ea690dbbfebb 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -1809,15 +1809,7 @@ void process_addba_req(struct adapter *padapter, u8 
*paddba_req, u8 *addr)
 
preorder_ctrl = >recvreorder_ctrl[tid];
 
-   #ifdef CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ
-   preorder_ctrl->indicate_seq = start_seq;
-   #ifdef DBG_RX_SEQ
-   DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d, start_seq: %d\n", 
__func__, __LINE__,
-   preorder_ctrl->indicate_seq, start_seq);
-   #endif
-   #else
preorder_ctrl->indicate_seq = 0x;
-   #endif
 
preorder_ctrl->enable = pmlmeinfo->accept_addba_req;
}
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_DISABLE_MCS13TO15

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_DISABLE_MCS13TO15

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c  | 16 +---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c |  7 ---
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 725f699abda9..a9e5c27a42f7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2679,14 +2679,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter 
*padapter, u8 *in_ie, u8 *out_
if (stbc_rx_enable)
ht_capie.cap_info |= 
cpu_to_le16(IEEE80211_HT_CAP_RX_STBC_2R);/* RX STBC two spatial stream */
 
-   #ifdef CONFIG_DISABLE_MCS13TO15
-   if (((cbw40_enable == 1) && (operation_bw == CHANNEL_WIDTH_40)) 
&& (pregistrypriv->wifi_spec != 1))
-   set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, 
MCS_RATE_2R_13TO15_OFF);
-   else
-   set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, 
MCS_RATE_2R);
-   #else /* CONFIG_DISABLE_MCS13TO15 */
-   set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, MCS_RATE_2R);
-   #endif /* CONFIG_DISABLE_MCS13TO15 */
+   set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, MCS_RATE_2R);
break;
}
 
@@ -2809,14 +2802,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 
*pie, uint ie_len, u8 channe
break;
case RF_2T2R:
default:
-#ifdef CONFIG_DISABLE_MCS13TO15
-   if (pmlmeext->cur_bwmode == CHANNEL_WIDTH_40 && 
pregistrypriv->wifi_spec != 1)
-   
set_mcs_rate_by_mask(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, 
MCS_RATE_2R_13TO15_OFF);
-   else
-   
set_mcs_rate_by_mask(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, MCS_RATE_2R);
-#else /* CONFIG_DISABLE_MCS13TO15 */

set_mcs_rate_by_mask(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, MCS_RATE_2R);
-#endif /* CONFIG_DISABLE_MCS13TO15 */
}
 
/* switch to the 40M Hz mode according to the AP */
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 3e211780cde4..2dd902b04509 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -1071,14 +1071,7 @@ void HT_caps_handler(struct adapter *padapter, struct 
ndis_80211_var_ie *pIE)
break;
case RF_2T2R:
default:
-#ifdef CONFIG_DISABLE_MCS13TO15
-   if (pmlmeext->cur_bwmode == CHANNEL_WIDTH_40 && 
pregistrypriv->wifi_spec != 1)
-   
set_mcs_rate_by_mask(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, 
MCS_RATE_2R_13TO15_OFF);
-   else
-   
set_mcs_rate_by_mask(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, MCS_RATE_2R);
-#else /* CONFIG_DISABLE_MCS13TO15 */

set_mcs_rate_by_mask(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, MCS_RATE_2R);
-#endif /* CONFIG_DISABLE_MCS13TO15 */
}
 
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_INTERRUPT_BASED_TXBCN*

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_INTERRUPT_BASED_TXBCN family defines

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c   | 30 ++-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 21 -
 2 files changed, 3 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 63b339484289..74f0f4d5a0b3 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -920,12 +920,10 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
if (pmlmeext->bstart_bss) {
update_beacon(padapter, WLAN_EID_TIM, NULL, true);
 
-#ifndef CONFIG_INTERRUPT_BASED_TXBCN /* other case will  tx beacon when bcn 
interrupt coming in. */
-   /* issue beacon frame */
-   if (send_beacon(padapter) == _FAIL)
-   DBG_871X("issue_beacon, fail!\n");
+   /* issue beacon frame */
+   if (send_beacon(padapter) == _FAIL)
+   DBG_871X("issue_beacon, fail!\n");
 
-#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
}
 
/* update bc/mc sta_info */
@@ -1685,26 +1683,6 @@ static void update_bcn_wps_ie(struct adapter *padapter)
}
 
kfree(pbackup_remainder_ie);
-
-   /*  deal with the case without set_tx_beacon_cmd() in update_beacon() */
-#if defined(CONFIG_INTERRUPT_BASED_TXBCN)
-   if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
-   u8 sr = 0;
-
-   rtw_get_wps_attr_content(
-   pwps_ie_src,
-   wps_ielen,
-   WPS_ATTR_SELECTED_REGISTRAR,
-   (u8 *)(),
-   NULL
-   );
-
-   if (sr) {
-   set_fwstate(pmlmepriv, WIFI_UNDER_WPS);
-   DBG_871X("%s, set WIFI_UNDER_WPS\n", __func__);
-   }
-   }
-#endif
 }
 
 static void update_bcn_p2p_ie(struct adapter *padapter)
@@ -1802,12 +1780,10 @@ void update_beacon(struct adapter *padapter, u8 ie_id, 
u8 *oui, u8 tx)
 
spin_unlock_bh(>bcn_update_lock);
 
-#ifndef CONFIG_INTERRUPT_BASED_TXBCN
if (tx) {
/* send_beacon(padapter);//send_beacon must execute on TSR 
level */
set_tx_beacon_cmd(padapter);
}
-#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
 }
 
 /*
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 5904b7f9f134..2b81be6f1b32 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3272,17 +3272,6 @@ static void hw_var_set_opmode(struct adapter *padapter, 
u8 variable, u8 *val)
if ((mode == _HW_STATE_STATION_) || (mode == 
_HW_STATE_NOLINK_)) {
{
StopTxBeacon(padapter);
-#ifdef CONFIG_INTERRUPT_BASED_TXBCN
-#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
-   rtw_write8(padapter, REG_DRVERLYINT, 0x05); /*  
restore early int time to 5ms */
-   UpdateInterruptMask8812AU(padapter, true, 0, 
IMR_BCNDMAINT0_8723B);
-#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
-
-#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
-   UpdateInterruptMask8812AU(padapter, true, 0, 
(IMR_TXBCN0ERR_8723B|IMR_TXBCN0OK_8723B));
-#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
-
-#endif /*  CONFIG_INTERRUPT_BASED_TXBCN */
}
 
/*  disable atim wnd */
@@ -3292,16 +3281,6 @@ static void hw_var_set_opmode(struct adapter *padapter, 
u8 variable, u8 *val)
ResumeTxBeacon(padapter);
rtw_write8(padapter, REG_BCN_CTRL, 
DIS_TSF_UDT|EN_BCN_FUNCTION|DIS_BCNQ_SUB);
} else if (mode == _HW_STATE_AP_) {
-#ifdef CONFIG_INTERRUPT_BASED_TXBCN
-#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
-   UpdateInterruptMask8723BU(padapter, true, 
IMR_BCNDMAINT0_8723B, 0);
-#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
-
-#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
-   UpdateInterruptMask8723BU(padapter, true, 
(IMR_TXBCN0ERR_8723B|IMR_TXBCN0OK_8723B), 0);
-#endif /*  CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
-
-#endif /*  CONFIG_INTERRUPT_BASED_TXBCN */
 
ResumeTxBeacon(padapter);
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/12] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_CMCC_TEST

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_CMCC_TEST

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 19 ---
 1 file changed, 19 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 6f08af686f9d..5904b7f9f134 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -2115,16 +2115,6 @@ static void UpdateHalRAMask8723B(struct adapter 
*padapter, u32 mac_id, u8 rssi_l
rate_bitmap = hal_btcoex_GetRaMask(padapter);
mask &= ~rate_bitmap;
 
-#ifdef CONFIG_CMCC_TEST
-   if (pmlmeext->cur_wireless_mode & WIRELESS_11G) {
-   if (mac_id == 0) {
-   DBG_871X("CMCC_BT update raid entry, mask = 0x%x\n", 
mask);
-   mask &= 0xff00; /* disable CCK & <24M OFDM rate for 
11G mode for CMCC */
-   DBG_871X("CMCC_BT update raid entry, mask = 0x%x\n", 
mask);
-   }
-   }
-#endif
-
if (pHalData->fw_ractrl) {
rtl8723b_set_FwMacIdConfig_cmd(padapter, mac_id, psta->raid, 
psta->bw_mode, shortGIrate, mask);
}
@@ -3082,10 +3072,6 @@ static void rtl8723b_fill_default_txdesc(
ptxdesc->data_ldpc = 1;
if (pattrib->stbc)
ptxdesc->data_stbc = 1;
-
-#ifdef CONFIG_CMCC_TEST
-   ptxdesc->data_short = 1; /* use cck short premble */
-#endif
} else {
/*  EAP data packet and ARP packet. */
/*  Use the 1M data rate to send the EAP/ARP packet. */
@@ -3767,11 +3753,6 @@ void SetHwReg8723B(struct adapter *padapter, u8 
variable, u8 *val)
BrateCfg &= rrsr_2g_allow_mask;
masked = BrateCfg;
 
-   #ifdef CONFIG_CMCC_TEST
-   BrateCfg |= (RRSR_11M|RRSR_5_5M|RRSR_1M); /* use 11M to send 
ACK */
-   BrateCfg |= (RRSR_24M|RRSR_18M|RRSR_12M); /* CMCC_OFDM_ACK 
12/18/24M */
-   #endif
-
/* IOT consideration */
if (mlmext_info->assoc_AP_vendor == HT_IOT_PEER_CISCO) {
/* if peer is cisco and didn't use ofdm rate, we enable 
6M ack */
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/12] Remove more unused code blocks

2021-03-16 Thread Fabio Aiuto
Remove unused code clocks, as required in TODO list:

find and remove code blocks guarded by never set CONFIG_FOO defines

Fabio Aiuto (12):
  staging: rtl8723bs: remove unused code blocks
conditioned by never set CONFIG_CMCC_TEST
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_INTERRUPT_BASED_TXBCN*
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_DISABLE_MCS13TO15
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_VALIDATE_SSID
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_LAYER2_ROAMING_ACTIVE
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_USB_VENDOR*
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SINGLE_RECV_BUF
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_RX_INDICATE_QUEUE
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_BSD_RX_USE_MBUF
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_R871X_TEST
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_MULTI_VIR_IFACES

 drivers/staging/rtl8723bs/core/rtw_ap.c   | 30 ++
 .../staging/rtl8723bs/core/rtw_ioctl_set.c| 11 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 19 +
 .../staging/rtl8723bs/core/rtw_wlan_util.c| 15 ---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 40 ---
 drivers/staging/rtl8723bs/include/drv_conf.h  | 10 -
 drivers/staging/rtl8723bs/include/drv_types.h |  3 --
 .../staging/rtl8723bs/include/osdep_intf.h|  6 ---
 drivers/staging/rtl8723bs/include/rtw_recv.h  | 17 +---
 9 files changed, 6 insertions(+), 145 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_GPIO_API

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_GPIO_API

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Changes in v2:
rebase of conflicting code in public staging-testing

Signed-off-by: Fabio Aiuto 
---
 .../staging/rtl8723bs/core/rtw_wlan_util.c| 95 ---
 drivers/staging/rtl8723bs/include/drv_types.h |  6 --
 .../staging/rtl8723bs/os_dep/ioctl_linux.c| 40 
 3 files changed, 141 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index d04514d36b49..3e211780cde4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2014,98 +2014,3 @@ struct adapter *dvobj_get_port0_adapter(struct 
dvobj_priv *dvobj)
 
return dvobj->padapters;
 }
-
-#ifdef CONFIG_GPIO_API
-int rtw_get_gpio(struct net_device *netdev, int gpio_num)
-{
-   u8 value;
-   u8 direction;
-   struct adapter *adapter = rtw_netdev_priv(netdev);
-   struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
-
-   rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
-   DBG_871X("rf_pwrstate = 0x%02x\n", pwrpriv->rf_pwrstate);
-   LeaveAllPowerSaveModeDirect(adapter);
-
-   /* Read GPIO Direction */
-   direction = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) & BIT(gpio_num)) 
>> gpio_num;
-
-   /* According the direction to read register value */
-   if (direction)
-   value = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) & 
BIT(gpio_num)) >> gpio_num;
-   else
-   value = (rtw_read8(adapter, REG_GPIO_PIN_CTRL) & BIT(gpio_num)) 
>> gpio_num;
-
-   rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
-   DBG_871X("%s direction =%d value =%d\n", __func__, direction, value);
-
-   return value;
-}
-EXPORT_SYMBOL(rtw_get_gpio);
-
-int  rtw_set_gpio_output_value(struct net_device *netdev, int gpio_num, bool 
isHigh)
-{
-   u8 direction = 0;
-   u8 res = -1;
-   struct adapter *adapter = rtw_netdev_priv(netdev);
-
-   /* Check GPIO is 4~7 */
-   if (gpio_num > 7 || gpio_num < 4) {
-   DBG_871X("%s The gpio number does not included 4~7.\n", 
__func__);
-   return -1;
-   }
-
-   rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
-   LeaveAllPowerSaveModeDirect(adapter);
-
-   /* Read GPIO direction */
-   direction = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) & BIT(gpio_num)) 
>> gpio_num;
-
-   /* If GPIO is output direction, setting value. */
-   if (direction) {
-   if (isHigh)
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 1, 
rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) | BIT(gpio_num));
-   else
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 1, 
rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) & ~BIT(gpio_num));
-
-   DBG_871X("%s Set gpio %x[%d]=%d\n", __func__, 
REG_GPIO_PIN_CTRL+1, gpio_num, isHigh);
-   res = 0;
-   } else {
-   DBG_871X("%s The gpio is input, not be set!\n", __func__);
-   res = -1;
-   }
-
-   rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
-   return res;
-}
-EXPORT_SYMBOL(rtw_set_gpio_output_value);
-
-int rtw_config_gpio(struct net_device *netdev, int gpio_num, bool isOutput)
-{
-   struct adapter *adapter = rtw_netdev_priv(netdev);
-
-   if (gpio_num > 7 || gpio_num < 4) {
-   DBG_871X("%s The gpio number does not included 4~7.\n", 
__func__);
-   return -1;
-   }
-
-   DBG_871X("%s gpio_num =%d direction =%d\n", __func__, gpio_num, 
isOutput);
-
-   rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
-   LeaveAllPowerSaveModeDirect(adapter);
-
-   if (isOutput)
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(adapter, 
REG_GPIO_PIN_CTRL + 2) | BIT(gpio_num));
-   else
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(adapter, 
REG_GPIO_PIN_CTRL + 2) & ~BIT(gpio_num));
-
-   rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
-
-   return 0;
-}
-EXPORT_SYMBOL(rtw_config_gpio);
-#endif
-
diff --git a/drivers/staging/rtl8723bs/include/drv_types.h 
b/drivers/staging/rtl8723bs/include/drv_types.h
index 9d482a6115ab..9c0e7b6946f8 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -528,12 +528,6 @@ static inline void RTW_ENABLE_FUNC(struct adapter 
*padapter, int func_bit)
 (padapter)->bSurpriseRemoved || \
 RTW_IS_FUNC_DISABLED((padapter), DF_TX_BIT))
 
-#ifdef CONFIG_GPIO_API
-int rtw_get_gpio(struct net_device *netdev, int gpio_num);
-int rtw_set_gpio_output_value(struct net_device *netdev, int gpio_num, bool 
isHigh);
-int rtw_config_gpi

[PATCH v2] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AP_WOWLAN

2021-03-16 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_AP_WOWLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Changes in v2:
rebase of conflicting code with public tree

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  35 --
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  31 --
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 339 --
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  33 --
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 105 --
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |  35 --
 .../rtl8723bs/include/drv_types_sdio.h|   5 -
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  30 --
 drivers/staging/rtl8723bs/include/hal_intf.h  |   3 -
 .../staging/rtl8723bs/include/osdep_service.h |   9 +-
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   6 -
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |   4 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   7 -
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   4 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 134 ---
 16 files changed, 1 insertion(+), 782 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 2e6c522b74e3..b942cf49cd27 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -350,17 +350,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
-#ifdef CONFIG_AP_WOWLAN
-   if (pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
-   return true;
-   else if (pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
-   return true;
-   else if (pwrpriv->bInSuspend)
-   return false;
-#else
if (pwrpriv->bInSuspend)
return false;
-#endif
 
curr_time = jiffies;
 
@@ -391,9 +382,6 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
 void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 
bcn_ant_mode, const char *msg)
 {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-#ifdef CONFIG_AP_WOWLAN
-   struct debug_priv *pdbgpriv = >dvobj->drv_dbg;
-#endif
 
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
 ("%s: PowerMode =%d Smart_PS =%d\n",
@@ -422,29 +410,6 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, 
u8 smart_ps, u8 bcn_a
pwrpriv->pwr_mode = ps_mode;
rtw_set_rpwm(padapter, PS_STATE_S4);
 
-#ifdef CONFIG_AP_WOWLAN
-   if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
-   unsigned long start_time;
-   u32 delay_ms;
-   u8 val8;
-   delay_ms = 20;
-   start_time = jiffies;
-   do {
-   rtw_hal_get_hwreg(padapter, 
HW_VAR_SYS_CLKR, );
-   if (!(val8 & BIT(4))) { /* 0x08 bit4 = 
1 --> in 32k, bit4 = 0 --> leave 32k */
-   pwrpriv->cpwm = PS_STATE_S4;
-   break;
-   }
-   if (jiffies_to_msecs(jiffies - 
start_time) > delay_ms) {
-   DBG_871X("%s: Wait for FW 32K 
leave more than %u ms!!!\n",
-   __func__, 
delay_ms);
-   
pdbgpriv->dbg_wow_leave_ps_fail_cnt++;
-   break;
-   }
-   msleep(1);
-   } while (1);
-   }
-#endif
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 
*)(_mode));
pwrpriv->bFwCurrentInPSMode = false;
 
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 355e43c4cf9a..d04514d36b49 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -10,10 +10,6 @@
 #include 
 #include 
 
-#ifdef CONFIG_AP_WOWLAN
-#include 
-#endif
-
 static unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
 static unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
 
@@ -2113,30 +2109,3 @@ int rtw_config_gpio(struct net_device *netdev, int 
gpio_num, bool isOutput)
 EXPORT_SYMBOL(rtw_config_gpio);
 #endif
 

Re: [PATCH 05/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PM

2021-03-16 Thread Fabio Aiuto
On Tue, Mar 16, 2021 at 12:39:19PM +0100, Greg KH wrote:
> On Mon, Mar 15, 2021 at 11:15:02AM +0100, Fabio Aiuto wrote:
> > remove conditional code blocks checked by unused CONFIG_PM
> > 
> > cleaning required in TODO file:
> > 
> > find and remove code blocks guarded by never set CONFIG_FOO defines
> > 
> > Signed-off-by: Fabio Aiuto 
> > ---
> >  drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 
> >  1 file changed, 8 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
> > b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> > index 2ff71d001c07..5748e1c1a25c 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> > @@ -3198,14 +3198,6 @@ static void rtw_cfg80211_preinit_wiphy(struct 
> > adapter *padapter, struct wiphy *w
> > wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
> > wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
> >  
> > -#if defined(CONFIG_PM)
> > -   wiphy->max_sched_scan_reqs = 1;
> > -#endif
> > -
> > -#if defined(CONFIG_PM)
> > -   wiphy->wowlan = _stub;
> > -#endif
> 
> How this is "unused"?  This is a real config option, did you just change
> the logic here?
> 
> thanks,
> 
> greg k-h

Hi Greg,

ignore this patch. I missed that definition of PM config option.
I dropped it off my own local repo.

Thank you,

fabio
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_ODM_ADAPTIVITY

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_ODM_ADAPTIVITY

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
index dce70fff0fae..4eb487cf70f0 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
@@ -91,9 +91,6 @@ static void Update_ODM_ComInfo_8723b(struct adapter *Adapter)
| ODM_MAC_EDCA_TURBO
| ODM_RF_TX_PWR_TRACK
| ODM_RF_CALIBRATION
-#ifdef CONFIG_ODM_ADAPTIVITY
-   | ODM_BB_ADAPTIVITY
-#endif
;
 
/*  */
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_C2H_PACKET_EN

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_C2H_PACKET_EN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c 
b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 0ea97e85e6a2..170a28f4b191 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -974,7 +974,6 @@ void sd_int_dpc(struct adapter *adapter)
 
if (hal->sdio_hisr & SDIO_HISR_TXBCNERR)
DBG_8192C("%s: SDIO_HISR_TXBCNERR\n", __func__);
-#ifndef CONFIG_C2H_PACKET_EN
if (hal->sdio_hisr & SDIO_HISR_C2HCMD) {
struct c2h_evt_hdr_88xx *c2h_evt;
 
@@ -997,7 +996,6 @@ void sd_int_dpc(struct adapter *adapter)
_set_workitem(>evtpriv.c2h_wk);
}
}
-#endif
 
if (hal->sdio_hisr & SDIO_HISR_RXFOVW)
DBG_8192C("%s: Rx Overflow\n", __func__);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SW_CHANNEL_PLAN

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_SW_CHANNEL_PLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/hal_com.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c 
b/drivers/staging/rtl8723bs/hal/hal_com.c
index bf07251a07d7..368807e05830 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -132,10 +132,8 @@ u8 hal_com_config_channel_plan(
 
hw_chnlPlan = hw_channel_plan & 
(~EEPROM_CHANNEL_PLAN_BY_HW_MASK);
if (rtw_is_channel_plan_valid(hw_chnlPlan)) {
-#ifndef CONFIG_SW_CHANNEL_PLAN
if (hw_channel_plan & EEPROM_CHANNEL_PLAN_BY_HW_MASK)
pHalData->bDisableSWChannelPlan = true;
-#endif /*  !CONFIG_SW_CHANNEL_PLAN */
 
chnlPlan = hw_chnlPlan;
}
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SDIO_TX_TASKLET

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_SDIO_TX_TASKLET

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c| 8 
 drivers/staging/rtl8723bs/include/rtw_xmit.h  | 4 
 3 files changed, 16 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 5854590e5811..eddf01c71e24 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -4398,19 +4398,16 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum 
HAL_DEF_VARIABLE variable, v
 
 void rtl8723b_start_thread(struct adapter *padapter)
 {
-#ifndef CONFIG_SDIO_TX_TASKLET
struct xmit_priv *xmitpriv = >xmitpriv;
 
xmitpriv->SdioXmitThread = kthread_run(rtl8723bs_xmit_thread, padapter, 
"RTWHALXT");
if (IS_ERR(xmitpriv->SdioXmitThread)) {
RT_TRACE(_module_hal_xmit_c_, _drv_err_, ("%s: start 
rtl8723bs_xmit_thread FAIL!!\n", __func__));
}
-#endif
 }
 
 void rtl8723b_stop_thread(struct adapter *padapter)
 {
-#ifndef CONFIG_SDIO_TX_TASKLET
struct xmit_priv *xmitpriv = >xmitpriv;
 
/*  stop xmit_buf_thread */
@@ -4419,5 +4416,4 @@ void rtl8723b_stop_thread(struct adapter *padapter)
wait_for_completion(>SdioXmitTerminate);
xmitpriv->SdioXmitThread = NULL;
}
-#endif
 }
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c 
b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index a3bd9c2002c9..597cf3a88c51 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -124,10 +124,6 @@ static s32 rtl8723_dequeue_writeport(struct adapter 
*padapter)
/* pxmitbuf->priv_data = NULL; */
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
 
-#ifdef CONFIG_SDIO_TX_TASKLET
-   tasklet_hi_schedule(>xmit_tasklet);
-#endif
-
return _FAIL;
 }
 
@@ -601,11 +597,7 @@ s32rtl8723bs_hal_xmitframe_enqueue(
 
pxmitpriv->tx_drop++;
} else {
-#ifdef CONFIG_SDIO_TX_TASKLET
-   tasklet_hi_schedule(>xmit_tasklet);
-#else
complete(>SdioXmitStart);
-#endif
}
 
return err;
diff --git a/drivers/staging/rtl8723bs/include/rtw_xmit.h 
b/drivers/staging/rtl8723bs/include/rtw_xmit.h
index a6fb8be8c63a..b482821c9af8 100644
--- a/drivers/staging/rtl8723bs/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723bs/include/rtw_xmit.h
@@ -412,13 +412,9 @@ struct xmit_priv {
 
u8 wmm_para_seq[4];/* sequence for wmm ac parameter strength from large 
to small. it's value is 0->vo, 1->vi, 2->be, 3->bk. */
 
-#ifdef CONFIG_SDIO_TX_TASKLET
-   struct tasklet_struct xmit_tasklet;
-#else
void *SdioXmitThread;
struct completion SdioXmitStart;
struct completion SdioXmitTerminate;
-#endif /* CONFIG_SDIO_TX_TASKLET */
 
struct __queue free_xmitbuf_queue;
struct __queue pending_xmitbuf_queue;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_CHECK_BT_HANG

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_CHECK_BT_HANG

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 31 ---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  7 -
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  7 -
 3 files changed, 45 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 9f059fb78c7d..5854590e5811 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -4421,34 +4421,3 @@ void rtl8723b_stop_thread(struct adapter *padapter)
}
 #endif
 }
-
-#if defined(CONFIG_CHECK_BT_HANG)
-extern void check_bt_status_work(void *data);
-void rtl8723bs_init_checkbthang_workqueue(struct adapter *adapter)
-{
-   adapter->priv_checkbt_wq = alloc_workqueue("sdio_wq", 0, 0);
-   INIT_DELAYED_WORK(>checkbt_work, (void *)check_bt_status_work);
-}
-
-void rtl8723bs_free_checkbthang_workqueue(struct adapter *adapter)
-{
-   if (adapter->priv_checkbt_wq) {
-   cancel_delayed_work_sync(>checkbt_work);
-   flush_workqueue(adapter->priv_checkbt_wq);
-   destroy_workqueue(adapter->priv_checkbt_wq);
-   adapter->priv_checkbt_wq = NULL;
-   }
-}
-
-void rtl8723bs_cancle_checkbthang_workqueue(struct adapter *adapter)
-{
-   if (adapter->priv_checkbt_wq)
-   cancel_delayed_work_sync(>checkbt_work);
-}
-
-void rtl8723bs_hal_check_bt_hang(struct adapter *adapter)
-{
-   if (adapter->priv_checkbt_wq)
-   queue_delayed_work(adapter->priv_checkbt_wq, 
&(adapter->checkbt_work), 0);
-}
-#endif
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index d0e5b482f382..82b54131c9ec 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1420,11 +1420,4 @@ void rtl8723bs_set_hal_ops(struct adapter *padapter)
pHalFunc->hal_xmit = _hal_xmit;
pHalFunc->mgnt_xmit = _mgnt_xmit;
pHalFunc->hal_xmitframe_enqueue = _hal_xmitframe_enqueue;
-
-#if defined(CONFIG_CHECK_BT_HANG)
-   pHalFunc->hal_init_checkbthang_workqueue = 
_init_checkbthang_workqueue;
-   pHalFunc->hal_free_checkbthang_workqueue = 
_free_checkbthang_workqueue;
-   pHalFunc->hal_cancle_checkbthang_workqueue = 
_cancle_checkbthang_workqueue;
-   pHalFunc->hal_checke_bt_hang = _hal_check_bt_hang;
-#endif
 }
diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h 
b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
index 0f787ec44b5b..6449238fb2a5 100644
--- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
+++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h
@@ -240,13 +240,6 @@ void _8051Reset8723(struct adapter *padapter);
 void rtl8723b_start_thread(struct adapter *padapter);
 void rtl8723b_stop_thread(struct adapter *padapter);
 
-#if defined(CONFIG_CHECK_BT_HANG)
-void rtl8723bs_init_checkbthang_workqueue(struct adapter *adapter);
-void rtl8723bs_free_checkbthang_workqueue(struct adapter *adapter);
-void rtl8723bs_cancle_checkbthang_workqueue(struct adapter *adapter);
-void rtl8723bs_hal_check_bt_hang(struct adapter *adapter);
-#endif
-
 int FirmwareDownloadBT(struct adapter *adapter, struct rt_firmware *firmware);
 
 void CCX_FwC2HTxRpt_8723b(struct adapter *padapter, u8 *pdata, u8 len);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_EXT_CLK

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_EXT_CLK

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 14 --
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index a64274fa9907..d0e5b482f382 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -53,20 +53,6 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
 
 
/*  all of these MUST be configured before power on */
-#ifdef CONFIG_EXT_CLK
-   /*  Use external crystal(XTAL) */
-   value8 = rtw_read8(padapter, REG_PAD_CTRL1_8723B + 2);
-   value8 |=  BIT(7);
-   rtw_write8(padapter, REG_PAD_CTRL1_8723B + 2, value8);
-
-   /*  CLK_REQ High active or Low Active */
-   /*  Request GPIO polarity: */
-   /*  0: low active */
-   /*  1: high active */
-   value8 = rtw_read8(padapter, REG_MULTI_FUNC_CTRL + 1);
-   value8 |= BIT(5);
-   rtw_write8(padapter, REG_MULTI_FUNC_CTRL + 1, value8);
-#endif /*  CONFIG_EXT_CLK */
 
/*  only cmd52 can be used before power on(card enable) */
ret = CardEnable(padapter);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_GPIO_API

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_GPIO_API

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 .../staging/rtl8723bs/core/rtw_wlan_util.c| 95 ---
 drivers/staging/rtl8723bs/include/drv_types.h |  6 --
 .../staging/rtl8723bs/os_dep/ioctl_linux.c| 40 
 3 files changed, 141 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index d04514d36b49..3e211780cde4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2014,98 +2014,3 @@ struct adapter *dvobj_get_port0_adapter(struct 
dvobj_priv *dvobj)
 
return dvobj->padapters;
 }
-
-#ifdef CONFIG_GPIO_API
-int rtw_get_gpio(struct net_device *netdev, int gpio_num)
-{
-   u8 value;
-   u8 direction;
-   struct adapter *adapter = rtw_netdev_priv(netdev);
-   struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
-
-   rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
-   DBG_871X("rf_pwrstate = 0x%02x\n", pwrpriv->rf_pwrstate);
-   LeaveAllPowerSaveModeDirect(adapter);
-
-   /* Read GPIO Direction */
-   direction = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) & BIT(gpio_num)) 
>> gpio_num;
-
-   /* According the direction to read register value */
-   if (direction)
-   value = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) & 
BIT(gpio_num)) >> gpio_num;
-   else
-   value = (rtw_read8(adapter, REG_GPIO_PIN_CTRL) & BIT(gpio_num)) 
>> gpio_num;
-
-   rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
-   DBG_871X("%s direction =%d value =%d\n", __func__, direction, value);
-
-   return value;
-}
-EXPORT_SYMBOL(rtw_get_gpio);
-
-int  rtw_set_gpio_output_value(struct net_device *netdev, int gpio_num, bool 
isHigh)
-{
-   u8 direction = 0;
-   u8 res = -1;
-   struct adapter *adapter = rtw_netdev_priv(netdev);
-
-   /* Check GPIO is 4~7 */
-   if (gpio_num > 7 || gpio_num < 4) {
-   DBG_871X("%s The gpio number does not included 4~7.\n", 
__func__);
-   return -1;
-   }
-
-   rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
-   LeaveAllPowerSaveModeDirect(adapter);
-
-   /* Read GPIO direction */
-   direction = (rtw_read8(adapter, REG_GPIO_PIN_CTRL + 2) & BIT(gpio_num)) 
>> gpio_num;
-
-   /* If GPIO is output direction, setting value. */
-   if (direction) {
-   if (isHigh)
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 1, 
rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) | BIT(gpio_num));
-   else
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 1, 
rtw_read8(adapter, REG_GPIO_PIN_CTRL + 1) & ~BIT(gpio_num));
-
-   DBG_871X("%s Set gpio %x[%d]=%d\n", __func__, 
REG_GPIO_PIN_CTRL+1, gpio_num, isHigh);
-   res = 0;
-   } else {
-   DBG_871X("%s The gpio is input, not be set!\n", __func__);
-   res = -1;
-   }
-
-   rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
-   return res;
-}
-EXPORT_SYMBOL(rtw_set_gpio_output_value);
-
-int rtw_config_gpio(struct net_device *netdev, int gpio_num, bool isOutput)
-{
-   struct adapter *adapter = rtw_netdev_priv(netdev);
-
-   if (gpio_num > 7 || gpio_num < 4) {
-   DBG_871X("%s The gpio number does not included 4~7.\n", 
__func__);
-   return -1;
-   }
-
-   DBG_871X("%s gpio_num =%d direction =%d\n", __func__, gpio_num, 
isOutput);
-
-   rtw_ps_deny(adapter, PS_DENY_IOCTL);
-
-   LeaveAllPowerSaveModeDirect(adapter);
-
-   if (isOutput)
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(adapter, 
REG_GPIO_PIN_CTRL + 2) | BIT(gpio_num));
-   else
-   rtw_write8(adapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(adapter, 
REG_GPIO_PIN_CTRL + 2) & ~BIT(gpio_num));
-
-   rtw_ps_deny_cancel(adapter, PS_DENY_IOCTL);
-
-   return 0;
-}
-EXPORT_SYMBOL(rtw_config_gpio);
-#endif
-
diff --git a/drivers/staging/rtl8723bs/include/drv_types.h 
b/drivers/staging/rtl8723bs/include/drv_types.h
index 56ebf18a4c05..a7d30bab744c 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -528,12 +528,6 @@ static inline void RTW_ENABLE_FUNC(struct adapter 
*padapter, int func_bit)
 (padapter)->bSurpriseRemoved || \
 RTW_IS_FUNC_DISABLED((padapter), DF_TX_BIT))
 
-#ifdef CONFIG_GPIO_API
-int rtw_get_gpio(struct net_device *netdev, int gpio_num);
-int rtw_set_gpio_output_value(struct net_device *netdev, int gpio_num, bool 
isHigh);
-int rtw_config_gpio(struct net_device *netdev, int gpio_num, bool isOutput);
-#endi

[PATCH 07/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_BACKGROUND_NOISE_MONITOR

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_BACKGROUND_NOISE_MONITOR

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 12 -
 drivers/staging/rtl8723bs/hal/hal_com.c   | 35 -
 drivers/staging/rtl8723bs/include/hal_com.h   | 10 
 drivers/staging/rtl8723bs/include/hal_data.h  |  5 --
 .../staging/rtl8723bs/os_dep/ioctl_linux.c| 50 +--
 5 files changed, 1 insertion(+), 111 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 5d0611c5119b..e60a2ed32de5 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -4211,18 +4211,6 @@ void site_survey(struct adapter *padapter)
channel_scan_time_ms = pmlmeext->chan_scan_time;
 
set_survey_timer(pmlmeext, channel_scan_time_ms);
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
-   {
-   struct noise_info info;
-
-   info.bPauseDIG = false;
-   info.IGIValue = 0;
-   info.max_time = channel_scan_time_ms/2;/* ms */
-   info.chan = survey_channel;
-   rtw_hal_set_odm_var(padapter, HAL_ODM_NOISE_MONITOR, 
, false);
-   }
-#endif
-
} else {
 
/*  channel number is 0 or this channel is not valid. */
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c 
b/drivers/staging/rtl8723bs/hal/hal_com.c
index 7c65ec60a982..bf07251a07d7 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -1262,20 +1262,6 @@ void GetHalODMVar(
 )
 {
switch (eVariable) {
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
-   case HAL_ODM_NOISE_MONITOR:
-   {
-   struct hal_com_data *pHalData = 
GET_HAL_DATA(Adapter);
-   u8 chan = *(u8 *)pValue1;
-   *(s16 *)pValue2 = pHalData->noise[chan];
-   #ifdef DBG_NOISE_MONITOR
-   DBG_8192C("### Noise monitor chan(%d)-noise:%d (dBm) 
###\n",
-   chan, pHalData->noise[chan]);
-   #endif
-
-   }
-   break;
-#endif/* ifdef CONFIG_BACKGROUND_NOISE_MONITOR */
default:
break;
}
@@ -1313,27 +1299,6 @@ void SetHalODMVar(
case HAL_ODM_WIFI_DISPLAY_STATE:
ODM_CmnInfoUpdate(podmpriv, ODM_CMNINFO_WIFI_DISPLAY, 
bSet);
break;
-   #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
-   case HAL_ODM_NOISE_MONITOR:
-   {
-   struct noise_info *pinfo = pValue1;
-
-   #ifdef DBG_NOISE_MONITOR
-   DBG_8192C("### Noise monitor chan(%d)-bPauseDIG:%d, 
IGIValue:0x%02x, max_time:%d (ms) ###\n",
-   pinfo->chan, pinfo->bPauseDIG, pinfo->IGIValue, 
pinfo->max_time);
-   #endif
-
-   pHalData->noise[pinfo->chan] = 
ODM_InbandNoise_Monitor(podmpriv, pinfo->bPauseDIG, pinfo->IGIValue, 
pinfo->max_time);
-   DBG_871X("chan_%d, noise = %d (dBm)\n", pinfo->chan, 
pHalData->noise[pinfo->chan]);
-   #ifdef DBG_NOISE_MONITOR
-   DBG_871X("noise_a = %d, noise_b = %d  noise_all:%d\n",
-   podmpriv->noise_level.noise[ODM_RF_PATH_A],
-   podmpriv->noise_level.noise[ODM_RF_PATH_B],
-   podmpriv->noise_level.noise_all);
-   #endif
-   }
-   break;
-   #endif/* ifdef CONFIG_BACKGROUND_NOISE_MONITOR */
 
default:
break;
diff --git a/drivers/staging/rtl8723bs/include/hal_com.h 
b/drivers/staging/rtl8723bs/include/hal_com.h
index c4b83eb16326..8669155dcddc 100644
--- a/drivers/staging/rtl8723bs/include/hal_com.h
+++ b/drivers/staging/rtl8723bs/include/hal_com.h
@@ -286,14 +286,4 @@ void SetHalODMVar(
enum HAL_ODM_VARIABLE   eVariable,
void *  pValue1,
boolbSet);
-
-#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
-struct noise_info {
-   u8 bPauseDIG;
-   u8 IGIValue;
-   u32 max_time;/* ms */
-   u8 chan;
-};
-#endif
-
 #endif /* __HAL_COMMON_H__ */
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h 
b/drivers/staging/rtl8723bs/include/hal_data.h
index 8f5de747ae4e..8e75a334c60b 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -439,11 +439,6 @@ struct hal_com_data {
/* 

[PATCH 08/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SKIP_SIGNAL_SCALE_MAPPING

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused
CONFIG_SKIP_SIGNAL_SCALE_MAPPING

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/odm_HWConfig.c  |  9 
 drivers/staging/rtl8723bs/include/rtw_recv.h  |  5 -
 .../staging/rtl8723bs/os_dep/ioctl_linux.c| 21 ---
 3 files changed, 35 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index de63e4a2932e..5f2f17b49173 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -226,19 +226,10 @@ static void odm_RxPhyStatus92CSeries_Parsing(
/* UI BSS List signal strength(in percentage), make it good looking, 
from 0~100. */
/* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp(). */
if (isCCKrate) {
-#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
-   pPhyInfo->SignalStrength = (u8)PWDB_ALL;
-#else
pPhyInfo->signal_strength = 
(u8)(odm_SignalScaleMapping(pDM_Odm, PWDB_ALL));/* PWDB_ALL; */
-#endif
} else {
if (rf_rx_num != 0) {
-#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
-   total_rssi /= rf_rx_num;
-   pPhyInfo->signal_strength = (u8)total_rssi;
-#else
pPhyInfo->signal_strength = 
(u8)(odm_SignalScaleMapping(pDM_Odm, total_rssi /= rf_rx_num));
-#endif
}
}
 
diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index 484e9d62ef92..0a56c3a66ee8 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -512,14 +512,9 @@ static inline s32 translate_percentage_to_dbm(u32 
SignalStrengthIndex)
 {
s32 SignalPower; /*  in dBm. */
 
-#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
-   /*  Translate to dBm (x =y-100) */
-   SignalPower = SignalStrengthIndex - 100;
-#else
/*  Translate to dBm (x = 0.5y-95). */
SignalPower = (s32)((SignalStrengthIndex + 1) >> 1);
SignalPower -= 95;
-#endif
 
return SignalPower;
 }
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index b6ae7dfc51fe..d0e77465ad9a 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -325,17 +325,7 @@ static char *translate_scan(struct adapter *padapter,
}
 
 
-   #ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
-   {
-   /* Do signal scale mapping when using percentage as the unit of 
signal strength, since the scale mapping is skipped in odm */
-
-   struct hal_com_data *pHal = GET_HAL_DATA(padapter);
-
-   iwe.u.qual.level = (u8)odm_SignalScaleMapping(>odmpriv, 
ss);
-   }
-   #else
iwe.u.qual.level = (u8)ss;/*  */
-   #endif
 
iwe.u.qual.qual = (u8)sq;   /*  signal quality */
 
@@ -4691,18 +4681,7 @@ static struct iw_statistics 
*rtw_get_wireless_stats(struct net_device *dev)
piwstats->qual.noise = 0;
/* DBG_871X("No link  level:%d, qual:%d, noise:%d\n", 
tmp_level, tmp_qual, tmp_noise); */
} else {
-   #ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
-   {
-   /* Do signal scale mapping when using percentage as the 
unit of signal strength, since the scale mapping is skipped in odm */
-
-   struct hal_com_data *pHal = GET_HAL_DATA(padapter);
-
-   tmp_level = (u8)odm_SignalScaleMapping(>odmpriv, 
padapter->recvpriv.signal_strength);
-   }
-   #else
tmp_level = padapter->recvpriv.signal_strength;
-   #endif
-
tmp_qual = padapter->recvpriv.signal_qual;
tmp_noise = padapter->recvpriv.noise;
DBG_871X("level:%d, qual:%d, noise:%d, rssi (%d)\n", tmp_level, 
tmp_qual, tmp_noise, padapter->recvpriv.rssi);
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SIGNAL_DISPLAY_DBM

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_SIGNAL_DISPLAY_DBM

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c |  2 +-
 drivers/staging/rtl8723bs/hal/hal_com.c   |  4 ++--
 .../staging/rtl8723bs/os_dep/ioctl_linux.c| 21 +++
 3 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 0ca3ddfc8b08..5d0611c5119b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -4211,7 +4211,7 @@ void site_survey(struct adapter *padapter)
channel_scan_time_ms = pmlmeext->chan_scan_time;
 
set_survey_timer(pmlmeext, channel_scan_time_ms);
-#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && 
defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
{
struct noise_info info;
 
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c 
b/drivers/staging/rtl8723bs/hal/hal_com.c
index 4a1ca57c2e15..7c65ec60a982 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -1262,7 +1262,7 @@ void GetHalODMVar(
 )
 {
switch (eVariable) {
-#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && 
defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
case HAL_ODM_NOISE_MONITOR:
{
struct hal_com_data *pHalData = 
GET_HAL_DATA(Adapter);
@@ -1313,7 +1313,7 @@ void SetHalODMVar(
case HAL_ODM_WIFI_DISPLAY_STATE:
ODM_CmnInfoUpdate(podmpriv, ODM_CMNINFO_WIFI_DISPLAY, 
bSet);
break;
-   #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && 
defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+   #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
case HAL_ODM_NOISE_MONITOR:
{
struct noise_info *pinfo = pValue1;
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 822e6b650c6b..a52d04582aa1 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -313,14 +313,11 @@ static char *translate_scan(struct adapter *padapter,
/* Add quality statistics */
iwe.cmd = IWEVQUAL;
iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED
-   #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && 
defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+   #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
| IW_QUAL_NOISE_UPDATED
#else
| IW_QUAL_NOISE_INVALID
#endif
-   #ifdef CONFIG_SIGNAL_DISPLAY_DBM
-   | IW_QUAL_DBM
-   #endif
;
 
if (check_fwstate(pmlmepriv, _FW_LINKED) == true &&
@@ -333,9 +330,6 @@ static char *translate_scan(struct adapter *padapter,
}
 
 
-   #ifdef CONFIG_SIGNAL_DISPLAY_DBM
-   iwe.u.qual.level = (u8)translate_percentage_to_dbm(ss);/* dbm */
-   #else
#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
{
/* Do signal scale mapping when using percentage as the unit of 
signal strength, since the scale mapping is skipped in odm */
@@ -347,11 +341,10 @@ static char *translate_scan(struct adapter *padapter,
#else
iwe.u.qual.level = (u8)ss;/*  */
#endif
-   #endif
 
iwe.u.qual.qual = (u8)sq;   /*  signal quality */
 
-   #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && 
defined(CONFIG_BACKGROUND_NOISE_MONITOR)
+   #ifdef CONFIG_BACKGROUND_NOISE_MONITOR
{
s16 tmp_noise = 0;
rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR, 
&(pnetwork->network.Configuration.DSConfig), &(tmp_noise));
@@ -4728,9 +4721,6 @@ static struct iw_statistics 
*rtw_get_wireless_stats(struct net_device *dev)
piwstats->qual.noise = 0;
/* DBG_871X("No link  level:%d, qual:%d, noise:%d\n", 
tmp_level, tmp_qual, tmp_noise); */
} else {
-   #ifdef CONFIG_SIGNAL_DISPLAY_DBM
-   tmp_level = 
translate_percentage_to_dbm(padapter->recvpriv.signal_strength);
-   #else
#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
{
/* Do signal scale mapping when using percentage as the 
unit of signal strength, since the scale mapping is skipped in odm */
@@ -4742,10 +4732,9 @@ static struct iw_statistics 
*rtw_get_wireless_stats(struct net_device *dev)
#else
tmp_level = padapter->recvpriv.signal_strength;
#endif
-   #endif
 
tmp_qual = padapter->recvpriv.signal_qual;
-#if def

[PATCH 05/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PM

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_PM

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 2ff71d001c07..5748e1c1a25c 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -3198,14 +3198,6 @@ static void rtw_cfg80211_preinit_wiphy(struct adapter 
*padapter, struct wiphy *w
wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
 
-#if defined(CONFIG_PM)
-   wiphy->max_sched_scan_reqs = 1;
-#endif
-
-#if defined(CONFIG_PM)
-   wiphy->wowlan = _stub;
-#endif
-
if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE)
wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;
else
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AP_WOWLAN

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_AP_WOWLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  35 --
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  31 --
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 339 --
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  33 --
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 105 --
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |  35 --
 .../rtl8723bs/include/drv_types_sdio.h|   5 -
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  30 --
 drivers/staging/rtl8723bs/include/hal_intf.h  |   3 -
 .../staging/rtl8723bs/include/osdep_service.h |   7 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   6 -
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |   4 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   7 -
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   4 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 134 ---
 16 files changed, 781 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 2e6c522b74e3..b942cf49cd27 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -350,17 +350,8 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
-#ifdef CONFIG_AP_WOWLAN
-   if (pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
-   return true;
-   else if (pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
-   return true;
-   else if (pwrpriv->bInSuspend)
-   return false;
-#else
if (pwrpriv->bInSuspend)
return false;
-#endif
 
curr_time = jiffies;
 
@@ -391,9 +382,6 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
 void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 
bcn_ant_mode, const char *msg)
 {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-#ifdef CONFIG_AP_WOWLAN
-   struct debug_priv *pdbgpriv = >dvobj->drv_dbg;
-#endif
 
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
 ("%s: PowerMode =%d Smart_PS =%d\n",
@@ -422,29 +410,6 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, 
u8 smart_ps, u8 bcn_a
pwrpriv->pwr_mode = ps_mode;
rtw_set_rpwm(padapter, PS_STATE_S4);
 
-#ifdef CONFIG_AP_WOWLAN
-   if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
-   unsigned long start_time;
-   u32 delay_ms;
-   u8 val8;
-   delay_ms = 20;
-   start_time = jiffies;
-   do {
-   rtw_hal_get_hwreg(padapter, 
HW_VAR_SYS_CLKR, );
-   if (!(val8 & BIT(4))) { /* 0x08 bit4 = 
1 --> in 32k, bit4 = 0 --> leave 32k */
-   pwrpriv->cpwm = PS_STATE_S4;
-   break;
-   }
-   if (jiffies_to_msecs(jiffies - 
start_time) > delay_ms) {
-   DBG_871X("%s: Wait for FW 32K 
leave more than %u ms!!!\n",
-   __func__, 
delay_ms);
-   
pdbgpriv->dbg_wow_leave_ps_fail_cnt++;
-   break;
-   }
-   msleep(1);
-   } while (1);
-   }
-#endif
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 
*)(_mode));
pwrpriv->bFwCurrentInPSMode = false;
 
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 355e43c4cf9a..d04514d36b49 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -10,10 +10,6 @@
 #include 
 #include 
 
-#ifdef CONFIG_AP_WOWLAN
-#include 
-#endif
-
 static unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
 static unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
 
@@ -2113,30 +2109,3 @@ int rtw_config_gpio(struct net_device *netdev, int 
gpio_num, bool isOutput)
 EXPORT_SYMBOL(rtw_config_gpio);
 #endif
 
-#ifdef CONFIG_AP_WOWLAN
-void rtw_get_current_ip_address(struct adapter *padapter, u8 *

[PATCH 03/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_QOS_OPTIMIZATION

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_QOS_OPTIMIZATION

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index d643e9a59e6b..270f93e90e07 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -121,11 +121,7 @@ int rtw_mc2u_disable = 0;
 
 static int rtw_80211d;
 
-#ifdef CONFIG_QOS_OPTIMIZATION
-static int rtw_qos_opt_enable = 1;/* 0: disable, 1:enable */
-#else
 static int rtw_qos_opt_enable;/* 0: disable, 1:enable */
-#endif
 module_param(rtw_qos_opt_enable, int, 0644);
 
 static char *ifname = "wlan%d";
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_HW_PWRP_DETECTION

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_HW_PWRP_DETECTION

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index d8cdce0539af..d643e9a59e6b 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -113,11 +113,7 @@ static int rtw_enusbss;/* 0:disable, 1:enable */
 
 static int rtw_hwpdn_mode = 2;/* 0:disable, 1:enable, 2: by EFUSE config */
 
-#ifdef CONFIG_HW_PWRP_DETECTION
-static int rtw_hwpwrp_detect = 1;
-#else
 static int rtw_hwpwrp_detect; /* HW power  ping detect 0:disable , 1:enable */
-#endif
 
 static int rtw_hw_wps_pbc;
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/15] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AUTO_AP_MODE

2021-03-15 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_AUTO_AP_MODE

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c   |   4 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 238 --
 drivers/staging/rtl8723bs/core/rtw_recv.c |  32 ---
 drivers/staging/rtl8723bs/core/rtw_xmit.c |   5 -
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |   3 -
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |  41 ---
 8 files changed, 331 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index abb2a2299511..63b339484289 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -270,10 +270,6 @@ void expire_timeout_chk(struct adapter *padapter)
while (phead != plist) {
psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
-#ifdef CONFIG_AUTO_AP_MODE
-   if (psta->isrc)
-   continue;
-#endif
if (chk_sta_is_alive(psta) || !psta->expire_to) {
psta->expire_to = pstapriv->expire_to;
psta->keep_alive_trycnt = 0;
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 723187a78484..725f699abda9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1478,8 +1478,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, 
u8 *pbuf)
 
rtw_sta_media_status_rpt(adapter, psta, 1);
 
-#ifndef CONFIG_AUTO_AP_MODE
-
ap_sta_info_defer_update(adapter, psta);
 
/* report to upper layer */
@@ -1503,7 +1501,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, 
u8 *pbuf)
 
kfree(passoc_req);
}
-#endif /* CONFIG_AUTO_AP_MODE */
}
return;
}
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 23362b39082b..0ca3ddfc8b08 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -619,115 +619,6 @@ unsigned int OnProbeReq(struct adapter *padapter, union 
recv_frame *precv_frame)
 
/* DBG_871X("+OnProbeReq\n"); */
 
-#ifdef CONFIG_AUTO_AP_MODE
-   if (check_fwstate(pmlmepriv, _FW_LINKED) &&
-   pmlmepriv->cur_network.join_res) {
-   struct sta_info *psta;
-   u8 *mac_addr, *peer_addr;
-   struct sta_priv *pstapriv = >stapriv;
-   u8 RC_OUI[4] = {0x00, 0xE0, 0x4C, 0x0A};
-   /* EID[1] + EID_LEN[1] + RC_OUI[4] + MAC[6] + PairingID[2] + 
ChannelNum[2] */
-
-   p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, 
WLAN_EID_VENDOR_SPECIFIC, (int *),
-   len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
-
-   if (!p || ielen != 14)
-   goto _non_rc_device;
-
-   if (memcmp(p+2, RC_OUI, sizeof(RC_OUI)))
-   goto _non_rc_device;
-
-   if (memcmp(p+6, get_sa(pframe), ETH_ALEN)) {
-   DBG_871X("%s, do rc pairing (%pM), but mac addr 
mismatch!(%pM)\n", __func__,
-   MAC_ARG(get_sa(pframe)), MAC_ARG(p+6));
-
-   goto _non_rc_device;
-   }
-
-   DBG_871X("%s, got the pairing device(%pM)\n", __func__,  
MAC_ARG(get_sa(pframe)));
-
-   /* new a station */
-   psta = rtw_get_stainfo(pstapriv, get_sa(pframe));
-   if (psta == NULL) {
-   /*  allocate a new one */
-   DBG_871X("going to alloc stainfo for rc =%pM\n",  
MAC_ARG(get_sa(pframe)));
-   psta = rtw_alloc_stainfo(pstapriv, get_sa(pframe));
-   if (!psta) {
-   /* TODO: */
-   DBG_871X(" Exceed the upper limit of supported 
clients...\n");
-   return _SUCCESS;
-   }
-
-   spin_lock_bh(>asoc_list_lock);
-   if (list_empty(>asoc_list)) {
-   psta->expire_to = pstapriv->expire_to;
-   list_add_tail(>asoc_list, 
>asoc_list);
-   pstapriv->asoc_list_cnt++;
-   }
-   spin_unlock_bh(>asoc_list_lock);
-
-

[PATCH 00/15] staging: rtl8723bs: remove unused code blocks

2021-03-15 Thread Fabio Aiuto
Remove unused code blocks as required in TODO file

Fabio Aiuto (15):
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_AUTO_AP_MODE
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_HW_PWRP_DETECTION
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_QOS_OPTIMIZATION
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_AP_WOWLAN
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_PM
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SIGNAL_DISPLAY_DBM
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_BACKGROUND_NOISE_MONITOR
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SKIP_SIGNAL_SCALE_MAPPING
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_GPIO_API
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_EXT_CLK
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_CHECK_BT_HANG
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SDIO_TX_TASKLET
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_SW_CHANNEL_PLAN
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_C2H_PACKET_EN
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_ODM_ADAPTIVITY

 drivers/staging/rtl8723bs/core/rtw_ap.c   |   4 -
 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 250 -
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  35 --
 drivers/staging/rtl8723bs/core/rtw_recv.c |  32 --
 .../staging/rtl8723bs/core/rtw_wlan_util.c| 126 ---
 drivers/staging/rtl8723bs/core/rtw_xmit.c |   5 -
 drivers/staging/rtl8723bs/hal/hal_com.c   |  37 --
 drivers/staging/rtl8723bs/hal/odm_HWConfig.c  |   9 -
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 339 --
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c   |   3 -
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  71 
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c|   8 -
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 126 ---
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |  37 --
 drivers/staging/rtl8723bs/include/drv_types.h |   6 -
 .../rtl8723bs/include/drv_types_sdio.h|   5 -
 drivers/staging/rtl8723bs/include/hal_com.h   |  10 -
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  30 --
 drivers/staging/rtl8723bs/include/hal_data.h  |   5 -
 drivers/staging/rtl8723bs/include/hal_intf.h  |   3 -
 .../staging/rtl8723bs/include/osdep_service.h |   7 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   6 -
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  11 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 drivers/staging/rtl8723bs/include/rtw_recv.h  |   5 -
 drivers/staging/rtl8723bs/include/rtw_xmit.h  |   4 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   7 -
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |   8 -
 .../staging/rtl8723bs/os_dep/ioctl_linux.c| 130 +--
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 142 
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |  41 ---
 33 files changed, 1 insertion(+), 1512 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 0/4] staging: rtl8723bs: remove unused code blocks

2021-03-14 Thread Fabio Aiuto
On Sun, Mar 14, 2021 at 04:57:38PM +0100, Greg KH wrote:
> On Fri, Mar 12, 2021 at 07:33:13PM +0100, Fabio Aiuto wrote:
> > This patch set removes unused code blocks as required in TODO file:
> > 
> > find and remove code blocks guarded by never set CONFIG_FOO defines
> > 
> > Changes in v2:
> > - modified sunject lines to make them unique
> > - added a patch previously excluded (removal of
> >   CONFIG_PNO_SET_DEBUG code)
> > 
> > Fabio Aiuto (4):
> >   staging: rtl8723bs: remove unused code blocks conditioned by never set
> > CONFIG_PNO_SET_DEBUG
> >   staging: rtl8723bs: remove unused code blocks conditioned by never set
> > CONFIG_PNO_SUPPORT
> >   staging: rtl8723bs: remove unused code blocks conditioned by never set
> > CONFIG_WOWLAN
> >   staging: rtl8723bs: remove unused code blocks conditioned by never set
> > CONFIG_TCP_CSUM_OFFLOAD_RX
> 
> The first 2 patches here worked, the others did not apply to my tree due
> to other changes from other developers.  Can you please rebase them and
> resend?
> 
> thanks,
> 
> greg k-h

just sent,

thank you,

fabio
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 2/2] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_WOWLAN

2021-03-14 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_WOWLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |   6 +-
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  53 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 556 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  43 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 240 +---
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |   4 +-
 drivers/staging/rtl8723bs/include/autoconf.h  |   3 -
 drivers/staging/rtl8723bs/include/drv_types.h |   5 -
 .../rtl8723bs/include/drv_types_sdio.h|   2 +-
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  71 +--
 drivers/staging/rtl8723bs/include/hal_intf.h  |   5 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   4 +-
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |   7 -
 .../staging/rtl8723bs/include/rtl8723b_spec.h |  10 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |   9 -
 .../staging/rtl8723bs/include/rtw_security.h  |   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   8 +-
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   3 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 231 +---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |   5 -
 23 files changed, 29 insertions(+), 1250 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 57370091dc9f..723187a78484 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2098,9 +2098,6 @@ int rtw_select_and_join_from_scanned_queue(struct 
mlme_priv *pmlmepriv)
 
if (!candidate) {
DBG_871X("%s: return _FAIL(candidate == NULL)\n", __func__);
-#ifdef CONFIG_WOWLAN
-   _clr_fwstate_(pmlmepriv, _FW_LINKED|_FW_UNDER_LINKING);
-#endif
ret = _FAIL;
goto exit;
} else {
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 8059aeea9d47..2e6c522b74e3 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -350,7 +350,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
if (pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
return true;
else if (pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
@@ -391,7 +391,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
 void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 
bcn_ant_mode, const char *msg)
 {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
struct debug_priv *pdbgpriv = >dvobj->drv_dbg;
 #endif
 
@@ -422,7 +422,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, 
u8 smart_ps, u8 bcn_a
pwrpriv->pwr_mode = ps_mode;
rtw_set_rpwm(padapter, PS_STATE_S4);
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
unsigned long start_time;
u32 delay_ms;
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index ae577178534f..355e43c4cf9a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -10,7 +10,7 @@
 #include 
 #include 
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
 #include 
 #endif
 
@@ -2113,7 +2113,7 @@ int rtw_config_gpio(struct net_device *netdev, int 
gpio_num, bool isOutput)
 EXPORT_SYMBOL(rtw_config_gpio);
 #endif
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
 void rtw_get_current_ip_address(struct adapter *padapter, u8 *pcurrentip)
 {
struct mlme_ext_priv *pmlmeext = >mlmeextpriv;
@@ -2139,53 +2139,4 @@ void rtw_get_current_ip_address(struct adapter 
*padapter, u8 *pcurrentip)
}
 }
 #endif
-#ifdef CONFIG_WOWLAN
-void rtw_get_sec_iv(struct adapter *padapter, u8 *pcur_dot11txpn, u8 *StaAddr)
-{
-   struct sta_info *psta;
-   struct security_priv *psecpriv = >securitypriv;
-
-   memset(pcur_dot11txpn, 0, 8);
-   if (!StaAddr)
-   return;
-   psta = rtw_get_stainfo(>stapriv, Sta

[PATCH v3 1/2] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PNO_SUPPORT

2021-03-14 Thread Fabio Aiuto
Remove conditional code blocks checked by unused CONFIG_PNO_SUPPORT

Cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  18 --
 .../staging/rtl8723bs/core/rtw_wlan_util.c|   8 -
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 269 --
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |   8 -
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  17 --
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  10 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |  53 
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  56 
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |   7 -
 9 files changed, 446 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index c9f4a18b24b9..8059aeea9d47 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -1149,29 +1149,11 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
 
pwrctrlpriv->wowlan_mode = false;
pwrctrlpriv->wowlan_ap_mode = false;
-
-#ifdef CONFIG_PNO_SUPPORT
-   pwrctrlpriv->pno_inited = false;
-   pwrctrlpriv->pnlo_info = NULL;
-   pwrctrlpriv->pscan_info = NULL;
-   pwrctrlpriv->pno_ssid_list = NULL;
-   pwrctrlpriv->pno_in_resume = true;
-#endif
 }
 
 
 void rtw_free_pwrctrl_priv(struct adapter *adapter)
 {
-#ifdef CONFIG_PNO_SUPPORT
-   if (pwrctrlpriv->pnlo_info)
-   printk("** pnlo_info memory leak\n");
-
-   if (pwrctrlpriv->pscan_info)
-   printk("** pscan_info memory leak\n");
-
-   if (pwrctrlpriv->pno_ssid_list)
-   printk("** pno_ssid_list memory leak\n");
-#endif
 }
 
 inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 96feced698ac..ae577178534f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2189,11 +2189,3 @@ void rtw_set_sec_pn(struct adapter *padapter)
 }
 #endif /* CONFIG_WOWLAN */
 
-#ifdef CONFIG_PNO_SUPPORT
-#defineCSCAN_TLV_TYPE_SSID_IE  'S'
-#define CIPHER_IE "key_mgmt ="
-#define CIPHER_NONE "NONE"
-#define CIPHER_WPA_PSK "WPA-PSK"
-#define CIPHER_WPA_EAP "WPA-EAP IEEE8021X"
-
-#endif /* CONFIG_PNO_SUPPORT */
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index d246ba2117b5..59d42bd4f032 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -462,125 +462,6 @@ static void ConstructARPResponse(
}
 }
 
-#ifdef CONFIG_PNO_SUPPORT
-static void ConstructPnoInfo(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-
-   struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
-
-   u8 *pPnoInfoPkt = pframe;
-   pPnoInfoPkt = (u8 *)(pframe + *pLength);
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_num, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->fast_scan_period, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->fast_scan_iterations, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->slow_scan_period, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_length,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_cipher_info,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_channel_info,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-}
-
-static void ConstructSSIDList(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-   int i = 0;
-   u8 *pSSIDListPkt = pframe;
-   struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
-
-   pSSIDListPkt = (u8 *)(pframe + *pLength);
-
-   for (i = 0; i < pwrctl->pnlo_info->ssid_num ; i++) {
-   memcpy(pSSIDListPkt, >pno_ssid_list->node[i].SSID,
-   pwrctl->pnlo_info->ssid_length[i]);
-
-   *pLength += WLAN_SSID_MAXLEN;
-   pSSIDListPkt += WLAN_SSID_MAXLEN;
-   }
-}
-
-static void ConstructScanInfo(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-   int i = 0;
-   u8 *pScanInf

[PATCH v3 0/2] staging: rtl8723bs: remove unused code blocks

2021-03-14 Thread Fabio Aiuto
This patch set removes unused code clocks as required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Changes in v3:
- rebase of remaining conflicting patches

Changes in v2:
- modified subject lines to make them unique
- added a patch previously excluded (removal of
  CONFIG_PNO_SET_DEBUG code) 

Fabio Aiuto (2):
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_PNO_SUPPORT
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_WOWLAN

 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  24 +-
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  61 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 825 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  43 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 248 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |   4 +-
 drivers/staging/rtl8723bs/include/autoconf.h  |   3 -
 drivers/staging/rtl8723bs/include/drv_types.h |   5 -
 .../rtl8723bs/include/drv_types_sdio.h|   2 +-
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  88 +-
 drivers/staging/rtl8723bs/include/hal_intf.h  |   5 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   4 +-
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  17 -
 .../staging/rtl8723bs/include/rtl8723b_spec.h |  10 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |  62 --
 .../staging/rtl8723bs/include/rtw_security.h  |   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   8 +-
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  56 --
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   3 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 238 +
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |   5 -
 24 files changed, 29 insertions(+), 1696 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 4/4] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_TCP_CSUM_OFFLOAD_RX

2021-03-12 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_TCP_CSUM_OFFLOAD_RX

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/rtw_recv.h  | 5 -
 drivers/staging/rtl8723bs/os_dep/recv_linux.c | 8 
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index b4aeb44d5d6e..078854a55a31 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -159,11 +159,6 @@ struct rx_pkt_attrib   {
 
u8 ack_policy;
 
-/* ifdef CONFIG_TCP_CSUM_OFFLOAD_RX */
-   u8 tcpchk_valid; /*  0: invalid, 1: valid */
-   u8 ip_chkrpt; /* 0: incorrect, 1: correct */
-   u8 tcp_chkrpt; /* 0: incorrect, 1: correct */
-/* endif */
u8 key_index;
 
u8 data_rate;
diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c 
b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
index f52802f24466..78d5b6913467 100644
--- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
@@ -138,15 +138,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, 
_pkt *pkt, struct rx_pkt
pkt->protocol = eth_type_trans(pkt, padapter->pnetdev);
pkt->dev = padapter->pnetdev;
 
-#ifdef CONFIG_TCP_CSUM_OFFLOAD_RX
-   if ((pattrib->tcpchk_valid == 1) && (pattrib->tcp_chkrpt == 1))
-   pkt->ip_summed = CHECKSUM_UNNECESSARY;
-   else
-   pkt->ip_summed = CHECKSUM_NONE;
-
-#else /* !CONFIG_TCP_CSUM_OFFLOAD_RX */
pkt->ip_summed = CHECKSUM_NONE;
-#endif /* CONFIG_TCP_CSUM_OFFLOAD_RX */
 
ret = rtw_netif_rx(padapter->pnetdev, pkt);
}
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 3/4] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_WOWLAN

2021-03-12 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_WOWLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |   6 +-
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  53 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 555 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  43 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 240 +---
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |   4 +-
 drivers/staging/rtl8723bs/include/autoconf.h  |   3 -
 drivers/staging/rtl8723bs/include/drv_types.h |   5 -
 .../rtl8723bs/include/drv_types_sdio.h|   2 +-
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  71 +--
 drivers/staging/rtl8723bs/include/hal_intf.h  |   5 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   4 +-
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |   7 -
 .../staging/rtl8723bs/include/rtl8723b_spec.h |  10 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |   9 -
 .../staging/rtl8723bs/include/rtw_security.h  |   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   8 +-
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   3 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 231 +---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |   5 -
 23 files changed, 28 insertions(+), 1250 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 2c9425e2a1e9..7412295f0a04 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2098,9 +2098,6 @@ int rtw_select_and_join_from_scanned_queue(struct 
mlme_priv *pmlmepriv)
 
if (!candidate) {
DBG_871X("%s: return _FAIL(candidate == NULL)\n", __func__);
-#ifdef CONFIG_WOWLAN
-   _clr_fwstate_(pmlmepriv, _FW_LINKED|_FW_UNDER_LINKING);
-#endif
ret = _FAIL;
goto exit;
} else {
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 8059aeea9d47..2e6c522b74e3 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -350,7 +350,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
if (pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
return true;
else if (pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
@@ -391,7 +391,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
 void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 
bcn_ant_mode, const char *msg)
 {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
struct debug_priv *pdbgpriv = >dvobj->drv_dbg;
 #endif
 
@@ -422,7 +422,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, 
u8 smart_ps, u8 bcn_a
pwrpriv->pwr_mode = ps_mode;
rtw_set_rpwm(padapter, PS_STATE_S4);
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
unsigned long start_time;
u32 delay_ms;
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index ae577178534f..355e43c4cf9a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -10,7 +10,7 @@
 #include 
 #include 
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
 #include 
 #endif
 
@@ -2113,7 +2113,7 @@ int rtw_config_gpio(struct net_device *netdev, int 
gpio_num, bool isOutput)
 EXPORT_SYMBOL(rtw_config_gpio);
 #endif
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
 void rtw_get_current_ip_address(struct adapter *padapter, u8 *pcurrentip)
 {
struct mlme_ext_priv *pmlmeext = >mlmeextpriv;
@@ -2139,53 +2139,4 @@ void rtw_get_current_ip_address(struct adapter 
*padapter, u8 *pcurrentip)
}
 }
 #endif
-#ifdef CONFIG_WOWLAN
-void rtw_get_sec_iv(struct adapter *padapter, u8 *pcur_dot11txpn, u8 *StaAddr)
-{
-   struct sta_info *psta;
-   struct security_priv *psecpriv = >securitypriv;
-
-   memset(pcur_dot11txpn, 0, 8);
-   if (!StaAddr)
-   return;
-   psta = rtw_get_stainfo(>stapriv, Sta

[PATCH v2 2/4] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PNO_SUPPORT

2021-03-12 Thread Fabio Aiuto
Remove conditional code blocks checked by unused CONFIG_PNO_SUPPORT

Cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  18 --
 .../staging/rtl8723bs/core/rtw_wlan_util.c|   8 -
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 269 --
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |   8 -
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  17 --
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  10 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |  53 
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  56 
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |   7 -
 9 files changed, 446 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index c9f4a18b24b9..8059aeea9d47 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -1149,29 +1149,11 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
 
pwrctrlpriv->wowlan_mode = false;
pwrctrlpriv->wowlan_ap_mode = false;
-
-#ifdef CONFIG_PNO_SUPPORT
-   pwrctrlpriv->pno_inited = false;
-   pwrctrlpriv->pnlo_info = NULL;
-   pwrctrlpriv->pscan_info = NULL;
-   pwrctrlpriv->pno_ssid_list = NULL;
-   pwrctrlpriv->pno_in_resume = true;
-#endif
 }
 
 
 void rtw_free_pwrctrl_priv(struct adapter *adapter)
 {
-#ifdef CONFIG_PNO_SUPPORT
-   if (pwrctrlpriv->pnlo_info)
-   printk("** pnlo_info memory leak\n");
-
-   if (pwrctrlpriv->pscan_info)
-   printk("** pscan_info memory leak\n");
-
-   if (pwrctrlpriv->pno_ssid_list)
-   printk("** pno_ssid_list memory leak\n");
-#endif
 }
 
 inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 96feced698ac..ae577178534f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2189,11 +2189,3 @@ void rtw_set_sec_pn(struct adapter *padapter)
 }
 #endif /* CONFIG_WOWLAN */
 
-#ifdef CONFIG_PNO_SUPPORT
-#defineCSCAN_TLV_TYPE_SSID_IE  'S'
-#define CIPHER_IE "key_mgmt ="
-#define CIPHER_NONE "NONE"
-#define CIPHER_WPA_PSK "WPA-PSK"
-#define CIPHER_WPA_EAP "WPA-EAP IEEE8021X"
-
-#endif /* CONFIG_PNO_SUPPORT */
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 479623d6eb79..b6958d3db855 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -462,125 +462,6 @@ static void ConstructARPResponse(
}
 }
 
-#ifdef CONFIG_PNO_SUPPORT
-static void ConstructPnoInfo(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-
-   struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
-
-   u8 *pPnoInfoPkt = pframe;
-   pPnoInfoPkt = (u8 *)(pframe + *pLength);
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_num, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->fast_scan_period, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->fast_scan_iterations, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->slow_scan_period, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_length,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_cipher_info,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_channel_info,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-}
-
-static void ConstructSSIDList(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-   int i = 0;
-   u8 *pSSIDListPkt = pframe;
-   struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
-
-   pSSIDListPkt = (u8 *)(pframe + *pLength);
-
-   for (i = 0; i < pwrctl->pnlo_info->ssid_num ; i++) {
-   memcpy(pSSIDListPkt, >pno_ssid_list->node[i].SSID,
-   pwrctl->pnlo_info->ssid_length[i]);
-
-   *pLength += WLAN_SSID_MAXLEN;
-   pSSIDListPkt += WLAN_SSID_MAXLEN;
-   }
-}
-
-static void ConstructScanInfo(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-   int i = 0;
-   u8 *pScanInf

[PATCH v2 0/4] staging: rtl8723bs: remove unused code blocks

2021-03-12 Thread Fabio Aiuto
This patch set removes unused code blocks as required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Changes in v2:
- modified sunject lines to make them unique
- added a patch previously excluded (removal of
  CONFIG_PNO_SET_DEBUG code)

Fabio Aiuto (4):
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_PNO_SET_DEBUG
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_PNO_SUPPORT
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_WOWLAN
  staging: rtl8723bs: remove unused code blocks conditioned by never set
CONFIG_TCP_CSUM_OFFLOAD_RX

 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  24 +-
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  61 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 872 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  43 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 253 +
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |   4 +-
 drivers/staging/rtl8723bs/include/autoconf.h  |   3 -
 drivers/staging/rtl8723bs/include/drv_types.h |   5 -
 .../rtl8723bs/include/drv_types_sdio.h|   2 +-
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  88 +-
 drivers/staging/rtl8723bs/include/hal_intf.h  |   5 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   4 +-
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  17 -
 .../staging/rtl8723bs/include/rtl8723b_spec.h |  10 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |  62 --
 drivers/staging/rtl8723bs/include/rtw_recv.h  |   5 -
 .../staging/rtl8723bs/include/rtw_security.h  |   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   8 +-
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  56 --
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   3 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 238 +
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |   8 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |   5 -
 26 files changed, 28 insertions(+), 1762 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 1/4] staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PNO_SET_DEBUG

2021-03-12 Thread Fabio Aiuto
Remove conditional code block checked by unused CONFIG_PNO_SET_DEBUG

Cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 48 
 drivers/staging/rtl8723bs/hal/sdio_halinit.c |  5 --
 2 files changed, 53 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 0480e32701f0..479623d6eb79 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -1668,18 +1668,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
rtl8723b_fill_fake_txdesc(padapter,
[BufIndex-TxDescLen],
ProbeReqLength, false, false, false);
-#ifdef CONFIG_PNO_SET_DEBUG
-   {
-   int gj;
-   printk("probe req pkt =>\n");
-   for (gj = 0; gj < ProbeReqLength+TxDescLen; gj++) {
-   printk(" %02x ", 
ReservedPagePacket[BufIndex-TxDescLen+gj]);
-   if ((gj+1)%8 == 0)
-   printk("\n");
-   }
-   printk(" <=end\n");
-   }
-#endif
CurtPktPageNum =
(u8)PageNum_128(TxDescLen + ProbeReqLength);
 
@@ -1690,18 +1678,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
/* PNO INFO Page */
RsvdPageLoc.LocPNOInfo = TotalPageNum;
ConstructPnoInfo(padapter, 
[BufIndex-TxDescLen], );
-#ifdef CONFIG_PNO_SET_DEBUG
-   {
-   int gj;
-   printk("PNO pkt =>\n");
-   for (gj = 0; gj < PNOLength; gj++) {
-   printk(" %02x ", 
ReservedPagePacket[BufIndex-TxDescLen+gj]);
-   if ((gj + 1)%8 == 0)
-   printk("\n");
-   }
-   printk(" <=end\n");
-   }
-#endif
 
CurtPktPageNum = (u8)PageNum_128(PNOLength);
TotalPageNum += CurtPktPageNum;
@@ -1710,18 +1686,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
/* SSID List Page */
RsvdPageLoc.LocSSIDInfo = TotalPageNum;
ConstructSSIDList(padapter, 
[BufIndex-TxDescLen], );
-#ifdef CONFIG_PNO_SET_DEBUG
-   {
-   int gj;
-   printk("SSID list pkt =>\n");
-   for (gj = 0; gj < SSIDLegnth; gj++) {
-   printk(" %02x ", 
ReservedPagePacket[BufIndex-TxDescLen+gj]);
-   if ((gj + 1)%8 == 0)
-   printk("\n");
-   }
-   printk(" <=end\n");
-   }
-#endif
CurtPktPageNum = (u8)PageNum_128(SSIDLegnth);
TotalPageNum += CurtPktPageNum;
BufIndex += (CurtPktPageNum*PageSize);
@@ -1729,18 +1693,6 @@ static void rtl8723b_set_FwRsvdPagePkt(
/* Scan Info Page */
RsvdPageLoc.LocScanInfo = TotalPageNum;
ConstructScanInfo(padapter, 
[BufIndex-TxDescLen], );
-#ifdef CONFIG_PNO_SET_DEBUG
-   {
-   int gj;
-   printk("Scan info pkt =>\n");
-   for (gj = 0; gj < ScanInfoLength; gj++) {
-   printk(" %02x ", 
ReservedPagePacket[BufIndex-TxDescLen+gj]);
-   if ((gj + 1)%8 == 0)
-   printk("\n");
-   }
-   printk(" <=end\n");
-   }
-#endif
CurtPktPageNum = (u8)PageNum_128(ScanInfoLength);
TotalPageNum += CurtPktPageNum;
BufIndex += (CurtPktPageNum*PageSize);
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 9dd3f3249e01..3266839031f8 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1476,11 +1476,6 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 
variable, u8 *val)
rtw_read32(padapter, 0x2fc),
rtw_read32(padapter, 0x8c)
);
-#ifdef CONFIG_PNO_SET_DEBUG
-   DBG_871X("0x1b9: 0x%02x, 0x632: 0x%02x\n", 
rtw_read8(padapter, 0x1b9), rtw_read8(padapte

[PATCH 3/3] staging: rtl8723bs: remove unused code blocks

2021-03-12 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_TCP_CSUM_OFFLOAD_RX

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/include/rtw_recv.h  | 5 -
 drivers/staging/rtl8723bs/os_dep/recv_linux.c | 8 
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index b4aeb44d5d6e..078854a55a31 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -159,11 +159,6 @@ struct rx_pkt_attrib   {
 
u8 ack_policy;
 
-/* ifdef CONFIG_TCP_CSUM_OFFLOAD_RX */
-   u8 tcpchk_valid; /*  0: invalid, 1: valid */
-   u8 ip_chkrpt; /* 0: incorrect, 1: correct */
-   u8 tcp_chkrpt; /* 0: incorrect, 1: correct */
-/* endif */
u8 key_index;
 
u8 data_rate;
diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c 
b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
index f52802f24466..78d5b6913467 100644
--- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
@@ -138,15 +138,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, 
_pkt *pkt, struct rx_pkt
pkt->protocol = eth_type_trans(pkt, padapter->pnetdev);
pkt->dev = padapter->pnetdev;
 
-#ifdef CONFIG_TCP_CSUM_OFFLOAD_RX
-   if ((pattrib->tcpchk_valid == 1) && (pattrib->tcp_chkrpt == 1))
-   pkt->ip_summed = CHECKSUM_UNNECESSARY;
-   else
-   pkt->ip_summed = CHECKSUM_NONE;
-
-#else /* !CONFIG_TCP_CSUM_OFFLOAD_RX */
pkt->ip_summed = CHECKSUM_NONE;
-#endif /* CONFIG_TCP_CSUM_OFFLOAD_RX */
 
ret = rtw_netif_rx(padapter->pnetdev, pkt);
}
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] staging: rtl8723bs: remove unused code blocks

2021-03-12 Thread Fabio Aiuto
remove conditional code blocks checked by unused CONFIG_WOWLAN

cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |   6 +-
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  53 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 555 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  43 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 240 +---
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |   4 +-
 drivers/staging/rtl8723bs/include/autoconf.h  |   3 -
 drivers/staging/rtl8723bs/include/drv_types.h |   5 -
 .../rtl8723bs/include/drv_types_sdio.h|   2 +-
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  71 +--
 drivers/staging/rtl8723bs/include/hal_intf.h  |   5 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   4 +-
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |   7 -
 .../staging/rtl8723bs/include/rtl8723b_spec.h |  10 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |   9 -
 .../staging/rtl8723bs/include/rtw_security.h  |   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   8 +-
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   3 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 231 +---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |   5 -
 23 files changed, 28 insertions(+), 1250 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c 
b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 2c9425e2a1e9..7412295f0a04 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2098,9 +2098,6 @@ int rtw_select_and_join_from_scanned_queue(struct 
mlme_priv *pmlmepriv)
 
if (!candidate) {
DBG_871X("%s: return _FAIL(candidate == NULL)\n", __func__);
-#ifdef CONFIG_WOWLAN
-   _clr_fwstate_(pmlmepriv, _FW_LINKED|_FW_UNDER_LINKING);
-#endif
ret = _FAIL;
goto exit;
} else {
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 8059aeea9d47..2e6c522b74e3 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -350,7 +350,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
if (pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
return true;
else if (pwrpriv->bInSuspend && pwrpriv->wowlan_ap_mode)
@@ -391,7 +391,7 @@ static u8 PS_RDY_CHECK(struct adapter *padapter)
 void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 
bcn_ant_mode, const char *msg)
 {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
struct debug_priv *pdbgpriv = >dvobj->drv_dbg;
 #endif
 
@@ -422,7 +422,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, 
u8 smart_ps, u8 bcn_a
pwrpriv->pwr_mode = ps_mode;
rtw_set_rpwm(padapter, PS_STATE_S4);
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
unsigned long start_time;
u32 delay_ms;
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index ae577178534f..355e43c4cf9a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -10,7 +10,7 @@
 #include 
 #include 
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
 #include 
 #endif
 
@@ -2113,7 +2113,7 @@ int rtw_config_gpio(struct net_device *netdev, int 
gpio_num, bool isOutput)
 EXPORT_SYMBOL(rtw_config_gpio);
 #endif
 
-#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
+#ifdef CONFIG_AP_WOWLAN
 void rtw_get_current_ip_address(struct adapter *padapter, u8 *pcurrentip)
 {
struct mlme_ext_priv *pmlmeext = >mlmeextpriv;
@@ -2139,53 +2139,4 @@ void rtw_get_current_ip_address(struct adapter 
*padapter, u8 *pcurrentip)
}
 }
 #endif
-#ifdef CONFIG_WOWLAN
-void rtw_get_sec_iv(struct adapter *padapter, u8 *pcur_dot11txpn, u8 *StaAddr)
-{
-   struct sta_info *psta;
-   struct security_priv *psecpriv = >securitypriv;
-
-   memset(pcur_dot11txpn, 0, 8);
-   if (!StaAddr)
-   return;
-   psta = rtw_get_stainfo(>stapriv, Sta

[PATCH 1/3] staging: rtl8723bs: remove unused code blocks

2021-03-12 Thread Fabio Aiuto
Remove conditional code blocks checked by unused CONFIG_PNO_SUPPORT

Cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  18 --
 .../staging/rtl8723bs/core/rtw_wlan_util.c|   8 -
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 269 --
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |   8 -
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  17 --
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  10 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |  53 
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  56 
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   |   7 -
 9 files changed, 446 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index c9f4a18b24b9..8059aeea9d47 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -1149,29 +1149,11 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
 
pwrctrlpriv->wowlan_mode = false;
pwrctrlpriv->wowlan_ap_mode = false;
-
-#ifdef CONFIG_PNO_SUPPORT
-   pwrctrlpriv->pno_inited = false;
-   pwrctrlpriv->pnlo_info = NULL;
-   pwrctrlpriv->pscan_info = NULL;
-   pwrctrlpriv->pno_ssid_list = NULL;
-   pwrctrlpriv->pno_in_resume = true;
-#endif
 }
 
 
 void rtw_free_pwrctrl_priv(struct adapter *adapter)
 {
-#ifdef CONFIG_PNO_SUPPORT
-   if (pwrctrlpriv->pnlo_info)
-   printk("** pnlo_info memory leak\n");
-
-   if (pwrctrlpriv->pscan_info)
-   printk("** pscan_info memory leak\n");
-
-   if (pwrctrlpriv->pno_ssid_list)
-   printk("** pno_ssid_list memory leak\n");
-#endif
 }
 
 inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 96feced698ac..ae577178534f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2189,11 +2189,3 @@ void rtw_set_sec_pn(struct adapter *padapter)
 }
 #endif /* CONFIG_WOWLAN */
 
-#ifdef CONFIG_PNO_SUPPORT
-#defineCSCAN_TLV_TYPE_SSID_IE  'S'
-#define CIPHER_IE "key_mgmt ="
-#define CIPHER_NONE "NONE"
-#define CIPHER_WPA_PSK "WPA-PSK"
-#define CIPHER_WPA_EAP "WPA-EAP IEEE8021X"
-
-#endif /* CONFIG_PNO_SUPPORT */
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 479623d6eb79..b6958d3db855 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -462,125 +462,6 @@ static void ConstructARPResponse(
}
 }
 
-#ifdef CONFIG_PNO_SUPPORT
-static void ConstructPnoInfo(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-
-   struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
-
-   u8 *pPnoInfoPkt = pframe;
-   pPnoInfoPkt = (u8 *)(pframe + *pLength);
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_num, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->fast_scan_period, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->fast_scan_iterations, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->slow_scan_period, 4);
-
-   *pLength += 4;
-   pPnoInfoPkt += 4;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_length,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_cipher_info,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-   memcpy(pPnoInfoPkt, >pnlo_info->ssid_channel_info,
-   MAX_PNO_LIST_COUNT);
-
-   *pLength += MAX_PNO_LIST_COUNT;
-   pPnoInfoPkt += MAX_PNO_LIST_COUNT;
-}
-
-static void ConstructSSIDList(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-   int i = 0;
-   u8 *pSSIDListPkt = pframe;
-   struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
-
-   pSSIDListPkt = (u8 *)(pframe + *pLength);
-
-   for (i = 0; i < pwrctl->pnlo_info->ssid_num ; i++) {
-   memcpy(pSSIDListPkt, >pno_ssid_list->node[i].SSID,
-   pwrctl->pnlo_info->ssid_length[i]);
-
-   *pLength += WLAN_SSID_MAXLEN;
-   pSSIDListPkt += WLAN_SSID_MAXLEN;
-   }
-}
-
-static void ConstructScanInfo(
-   struct adapter *padapter, u8 *pframe, u32 *pLength
-)
-{
-   int i = 0;
-   u8 *pScanInf

[PATCH 0/3] staging: rtl8723bs: remove unused code blocks

2021-03-12 Thread Fabio Aiuto
This patch set removes unused code blocks as required in
TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Fabio Aiuto (3):
  staging: rtl8723bs: remove unused code blocks
  staging: rtl8723bs: remove unused code blocks
  staging: rtl8723bs: remove unused code blocks

 drivers/staging/rtl8723bs/core/rtw_mlme.c |   3 -
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  24 +-
 .../staging/rtl8723bs/core/rtw_wlan_util.c|  61 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 824 +-
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  43 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 248 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |   4 +-
 drivers/staging/rtl8723bs/include/autoconf.h  |   3 -
 drivers/staging/rtl8723bs/include/drv_types.h |   5 -
 .../rtl8723bs/include/drv_types_sdio.h|   2 +-
 .../staging/rtl8723bs/include/hal_com_h2c.h   |  88 +-
 drivers/staging/rtl8723bs/include/hal_intf.h  |   5 -
 .../staging/rtl8723bs/include/rtl8723b_cmd.h  |   4 +-
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  17 -
 .../staging/rtl8723bs/include/rtl8723b_spec.h |  10 -
 drivers/staging/rtl8723bs/include/rtw_mp.h|   3 -
 .../staging/rtl8723bs/include/rtw_pwrctrl.h   |  62 --
 drivers/staging/rtl8723bs/include/rtw_recv.h  |   5 -
 .../staging/rtl8723bs/include/rtw_security.h  |   3 -
 drivers/staging/rtl8723bs/include/sdio_ops.h  |   8 +-
 drivers/staging/rtl8723bs/include/sta_info.h  |   5 -
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  56 --
 .../staging/rtl8723bs/os_dep/ioctl_linux.c|   3 -
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 238 +
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |   8 -
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |   5 -
 26 files changed, 28 insertions(+), 1709 deletions(-)

-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: put quoted string in a single line

2021-03-12 Thread Fabio Aiuto
fix the following checkpatch issues:

WARNING: quoted string split across lines
+   DBG_871X("HT: STA %pM HT Capabilities "
+  "Info: 0x%04x\n", MAC_ARG(psta->hwaddr), ht_capab);

WARNING: quoted string split across lines
+   DBG_871X("%s STA %pM - no "
+  "greenfield, num of non-gf stations %d\n",

WARNING: quoted string split across lines
+   DBG_871X("%s STA %pM - 20 MHz HT, "
+      "num of 20MHz HT STAs %d\n",

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index b6f944b37b08..b8706e1eb8ca 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -2009,8 +2009,8 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, 
struct sta_info *psta)
if (psta->flags & WLAN_STA_HT) {
u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info);
 
-   DBG_871X("HT: STA %pM HT Capabilities "
-  "Info: 0x%04x\n", MAC_ARG(psta->hwaddr), ht_capab);
+   DBG_871X("HT: STA %pM HT Capabilities Info: 0x%04x\n",
+MAC_ARG(psta->hwaddr), ht_capab);
 
if (psta->no_ht_set) {
psta->no_ht_set = 0;
@@ -2022,10 +2022,9 @@ void bss_cap_update_on_sta_join(struct adapter 
*padapter, struct sta_info *psta)
psta->no_ht_gf_set = 1;
pmlmepriv->num_sta_ht_no_gf++;
}
-   DBG_871X("%s STA %pM - no "
-  "greenfield, num of non-gf stations %d\n",
-  __func__, MAC_ARG(psta->hwaddr),
-  pmlmepriv->num_sta_ht_no_gf);
+   DBG_871X("%s STA %pM - no greenfield, num of non-gf 
stations %d\n",
+__func__, MAC_ARG(psta->hwaddr),
+pmlmepriv->num_sta_ht_no_gf);
}
 
if ((ht_capab & IEEE80211_HT_CAP_SUP_WIDTH) == 0) {
@@ -2033,10 +2032,9 @@ void bss_cap_update_on_sta_join(struct adapter 
*padapter, struct sta_info *psta)
psta->ht_20mhz_set = 1;
pmlmepriv->num_sta_ht_20mhz++;
}
-   DBG_871X("%s STA %pM - 20 MHz HT, "
-  "num of 20MHz HT STAs %d\n",
-  __func__, MAC_ARG(psta->hwaddr),
-  pmlmepriv->num_sta_ht_20mhz);
+   DBG_871X("%s STA %pM - 20 MHz HT, num of 20MHz HT STAs 
%d\n",
+__func__, MAC_ARG(psta->hwaddr),
+pmlmepriv->num_sta_ht_20mhz);
}
 
} else {
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: rtl8723bs: align and beautify comments

2021-03-10 Thread Fabio Aiuto
fix the following checkpatch warnings:

WARNING: Block comments use * on subsequent lines
+   /*
+   AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
--
WARNING: Block comments use * on subsequent lines
+/*
+op_mode

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 32 -
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index b6f944b37b08..6d203814260f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -719,11 +719,11 @@ static void update_hw_ht_param(struct adapter *padapter)
 
DBG_871X("%s\n", __func__);
 
-   /* handle A-MPDU parameter field */
-   /*
-   AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
-   AMPDU_para [4:2]:Min MPDU Start Spacing
-   */
+   /* handle A-MPDU parameter field
+*
+*  AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
+*  AMPDU_para [4:2]:Min MPDU Start Spacing
+*/
max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
 
min_MPDU_spacing = (
@@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 ie_id, 
u8 *oui, u8 tx)
 }
 
 /*
-op_mode
-Set to 0 (HT pure) under the following conditions
-   - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
-   - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
-Set to 1 (HT non-member protection) if there may be non-HT STAs
-   in both the primary and the secondary channel
-Set to 2 if only HT STAs are associated in BSS,
-   however and at least one 20 MHz HT STA is associated
-Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
-   (currently non-GF HT station is considered as non-HT STA also)
-*/
+ * op_mode
+ * Set to 0 (HT pure) under the following conditions
+ *   - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
+ *   - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
+ * Set to 1 (HT non-member protection) if there may be non-HT STAs
+ *   in both the primary and the secondary channel
+ * Set to 2 if only HT STAs are associated in BSS,
+ *   however and at least one 20 MHz HT STA is associated
+ * Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
+ *   (currently non-GF HT station is considered as non-HT STA also)
+ */
 static int rtw_ht_operation_update(struct adapter *padapter)
 {
u16 cur_op_mode, new_op_mode;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8723bs: align comments

2021-03-10 Thread Fabio Aiuto
On Wed, Mar 10, 2021 at 04:51:44PM +0100, Greg KH wrote:
> On Wed, Mar 10, 2021 at 04:37:21PM +0100, Fabio Aiuto wrote:
> > fix the following checkpatch warnings:
> > 
> > WARNING: Block comments use * on subsequent lines
> > +   /*
> > +   AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
> > --
> > WARNING: Block comments use * on subsequent lines
> > +/*
> > +op_mode
> > 
> > Signed-off-by: Fabio Aiuto 
> > ---
> >  drivers/staging/rtl8723bs/core/rtw_ap.c | 28 -
> >  1 file changed, 14 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
> > b/drivers/staging/rtl8723bs/core/rtw_ap.c
> > index b6f944b37b08..3a0e4f64466a 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> > @@ -721,9 +721,9 @@ static void update_hw_ht_param(struct adapter *padapter)
> >  
> > /* handle A-MPDU parameter field */
> > /*
> > -   AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
> > -   AMPDU_para [4:2]:Min MPDU Start Spacing
> > -   */
> > +*  AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
> > +*  AMPDU_para [4:2]:Min MPDU Start Spacing
> > +*/
> > max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
> >  
> > min_MPDU_spacing = (
> > @@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 
> > ie_id, u8 *oui, u8 tx)
> >  }
> >  
> >  /*
> > -op_mode
> > -Set to 0 (HT pure) under the following conditions
> > -   - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
> > -   - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
> > -Set to 1 (HT non-member protection) if there may be non-HT STAs
> > -   in both the primary and the secondary channel
> > -Set to 2 if only HT STAs are associated in BSS,
> > -   however and at least one 20 MHz HT STA is associated
> > -Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
> > -   (currently non-GF HT station is considered as non-HT STA also)
> > -*/
> > + *op_mode
> > + *Set to 0 (HT pure) under the following conditions
> > + *  - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
> > + *  - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
> > + *Set to 1 (HT non-member protection) if there may be non-HT STAs
> > + *  in both the primary and the secondary channel
> > + *Set to 2 if only HT STAs are associated in BSS,
> > + *  however and at least one 20 MHz HT STA is associated
> > + *Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
> > + *  (currently non-GF HT station is considered as non-HT STA also)
> > + */
> 
> Add a space after the ' ' to make it look correct please.
> 
> thanks,
> 
> greg k-h
I am sorry, I fear I don't understand, checkpatch.sh script says the patch is 
ok.
Where have I to add a ' ' (a blank?)?

thank you,

fabio

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: align comments

2021-03-10 Thread Fabio Aiuto
fix the following checkpatch warnings:

WARNING: Block comments use * on subsequent lines
+   /*
+   AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
--
WARNING: Block comments use * on subsequent lines
+/*
+op_mode

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 28 -
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index b6f944b37b08..3a0e4f64466a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -721,9 +721,9 @@ static void update_hw_ht_param(struct adapter *padapter)
 
/* handle A-MPDU parameter field */
/*
-   AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
-   AMPDU_para [4:2]:Min MPDU Start Spacing
-   */
+*  AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
+*  AMPDU_para [4:2]:Min MPDU Start Spacing
+*/
max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
 
min_MPDU_spacing = (
@@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 ie_id, 
u8 *oui, u8 tx)
 }
 
 /*
-op_mode
-Set to 0 (HT pure) under the following conditions
-   - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
-   - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
-Set to 1 (HT non-member protection) if there may be non-HT STAs
-   in both the primary and the secondary channel
-Set to 2 if only HT STAs are associated in BSS,
-   however and at least one 20 MHz HT STA is associated
-Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
-   (currently non-GF HT station is considered as non-HT STA also)
-*/
+ *op_mode
+ *Set to 0 (HT pure) under the following conditions
+ *  - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or
+ *  - all STAs in the BSS are 20 MHz HT in 20 MHz BSS
+ *Set to 1 (HT non-member protection) if there may be non-HT STAs
+ *  in both the primary and the secondary channel
+ *Set to 2 if only HT STAs are associated in BSS,
+ *  however and at least one 20 MHz HT STA is associated
+ *Set to 3 (HT mixed mode) when one or more non-HT STAs are associated
+ *  (currently non-GF HT station is considered as non-HT STA also)
+ */
 static int rtw_ht_operation_update(struct adapter *padapter)
 {
u16 cur_op_mode, new_op_mode;
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: remove unused code block

2021-03-10 Thread Fabio Aiuto
Remove conditional code block checked by unused CONFIG_GPIO_WAKEUP

Cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  |  8 ---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  | 69 ---
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  4 --
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  | 57 ---
 4 files changed, 138 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 86f31d98349a..0480e32701f0 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -1183,11 +1183,6 @@ static void rtl8723b_set_FwWoWlanCtrl_Cmd(struct adapter 
*padapter, u8 bFuncEn)
u8 gpio_high_active = 0; /* 0: low active, 1: high active */
u8 magic_pkt = 0;
 
-#ifdef CONFIG_GPIO_WAKEUP
-   gpionum = WAKEUP_GPIO_IDX;
-   sdio_wakeup_enable = 0;
-#endif
-
 #ifdef CONFIG_PNO_SUPPORT
if (!ppwrpriv->wowlan_pno_enable)
magic_pkt = 1;
@@ -1358,9 +1353,6 @@ static void rtl8723b_set_FwAPWoWlanCtrl_Cmd(struct 
adapter *padapter, u8 bFuncEn
u8 gpionum = 0, gpio_dur = 0;
u8 gpio_high_active = 1; /* 0: low active, 1: high active */
u8 gpio_pulse = bFuncEn;
-#ifdef CONFIG_GPIO_WAKEUP
-   gpionum = WAKEUP_GPIO_IDX;
-#endif
 
DBG_871X("%s(): bFuncEn =%d\n", __func__, bFuncEn);
 
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c 
b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 718ee9eee87c..9dd3f3249e01 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -42,63 +42,6 @@ static u8 CardEnable(struct adapter *padapter)
return ret;
 }
 
-#ifdef CONFIG_GPIO_WAKEUP
-/* we set it high under init and fw will */
-/* give us Low Pulse when host wake up */
-void HostWakeUpGpioClear(struct adapter *Adapter)
-{
-   u32 value32;
-
-   value32 = rtw_read32(Adapter, REG_GPIO_PIN_CTRL_2);
-
-   /* set GPIO 12 1 */
-   value32 |= BIT(12);/* 4+8 */
-   /* GPIO 12 out put */
-   value32 |= BIT(20);/* 4+16 */
-
-   rtw_write32(Adapter, REG_GPIO_PIN_CTRL_2, value32);
-} /* HostWakeUpGpioClear */
-
-void HalSetOutPutGPIO(struct adapter *padapter, u8 index, u8 OutPutValue)
-{
-   if (index <= 7) {
-   /* config GPIO mode */
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL + 3, rtw_read8(padapter, 
REG_GPIO_PIN_CTRL + 3) & ~BIT(index));
-
-   /* config GPIO Sel */
-   /* 0: input */
-   /* 1: output */
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(padapter, 
REG_GPIO_PIN_CTRL + 2) | BIT(index));
-
-   /* set output value */
-   if (OutPutValue)
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL + 1, 
rtw_read8(padapter, REG_GPIO_PIN_CTRL + 1) | BIT(index));
-   else
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL + 1, 
rtw_read8(padapter, REG_GPIO_PIN_CTRL + 1) & ~BIT(index));
-   } else {
-   /* 88C Series: */
-   /* index: 11~8 transform to 3~0 */
-   /* 8723 Series: */
-   /* index: 12~8 transform to 4~0 */
-   index -= 8;
-
-   /* config GPIO mode */
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 3, 
rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 3) & ~BIT(index));
-
-   /* config GPIO Sel */
-   /* 0: input */
-   /* 1: output */
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 2, 
rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 2) | BIT(index));
-
-   /* set output value */
-   if (OutPutValue)
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 1, 
rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 1) | BIT(index));
-   else
-   rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 1, 
rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 1) & ~BIT(index));
-   }
-}
-#endif
-
 static
 u8 _InitPowerOn_8723BS(struct adapter *padapter)
 {
@@ -190,10 +133,6 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
rtw_write8(padapter, REG_PAD_CTRL1_8723B, value8);
 /* DBG_8192C("%s: REG_PAD_CTRL1(0x%x) = 0x%02X\n", __func__, 
REG_PAD_CTRL1_8723B, rtw_read8(padapter, REG_PAD_CTRL1_8723B)); */
 
-#ifdef CONFIG_GPIO_WAKEUP
-   HostWakeUpGpioClear(padapter);
-#endif
-
return _SUCCESS;
 }
 
@@ -1609,10 +1548,6 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 
variable, u8 *val)
DBG_871X_LEVEL(_drv_always_, "Re-download 
Normal FW!\n");
SetFwRelatedForWoWLAN8723b(padapter, false);
}
-#ifdef CONFIG_GPIO_WAKEUP
-  

[PATCH] staging: rtl8723bs: removed unused code block

2021-03-05 Thread Fabio Aiuto
Removed conditional code block checked by unused CONFIG_TX_BCAST2UNI

This patch does the cleaning required in TODO file:

find and remove code blocks guarded by never set CONFIG_FOO defines

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c 
b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 1c23fbe58881..a89b88eaed39 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -212,9 +212,6 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
&& check_fwstate(pmlmepriv, WIFI_AP_STATE) == true
&& (IP_MCAST_MAC(pkt->data)
|| ICMPV6_MCAST_MAC(pkt->data)
-   #ifdef CONFIG_TX_BCAST2UNI
-   || is_broadcast_mac_addr(pkt->data)
-   #endif
)
&& padapter->registrypriv.wifi_spec == 0) {
if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) {
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel