Commit graph

1601 commits

Author SHA1 Message Date
Fabio Aiuto
a1b8a9bbce staging: rtl8723bs: moved contexts for arc4 encryption in struct security_priv
moved struct arc4_ctx in struct security_priv to avoid stack allocation
inside encryption routines.

this has been done to fix the following 0-DAY issues:

>> drivers/staging/rtl8723bs/core/rtw_security.c:89:6: warning:
stack frame size of 1120 bytes in function 'rtw_wep_encrypt'
[-Wframe-$
   void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
        ^
>> drivers/staging/rtl8723bs/core/rtw_security.c:145:6:
warning: stack frame size of 1088 bytes in function 'rtw_wep_decrypt'
[-Wframe$
   void rtw_wep_decrypt(struct adapter  *padapter, u8 *precvframe)
        ^
>> drivers/staging/rtl8723bs/core/rtw_security.c:514:5:
warning: stack frame size of 1136 bytes in function 'rtw_tkip_encrypt'
[-Wfram$
   u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
       ^
>> drivers/staging/rtl8723bs/core/rtw_security.c:586:5:
warning: stack frame size of 1104 bytes in function 'rtw_tkip_decrypt'
[-Wfram$
   u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
       ^

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210521144158.2440-1-fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-25 18:23:07 +02:00
Greg Kroah-Hartman
1b4c0f3bbd staging: rtl8723bs: rename get_ra() due to global symbol collision
Turns out that powerpc already has a get_ra() function, which conflicts
with this staging driver's inlined function (which is just picking a
byte out of an array for some odd reason), so rename it to fix the
powerpc build as that's the more important thing here.

Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20210520064801.1961972-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-20 11:41:28 +02:00
Greg Kroah-Hartman
7ca8d993d0 staging: rtl8723bs: rtl8723b_hal_init.c: fix build warnings about unused variables
0-day keeps spitting out annoying messages:

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3895:18: warning: variable 'ra_info2' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3895:8: warning: variable 'ra_info1' set but not used [-Wunused-but-set-variable]

Oddly, it's not catching all of the "set but not used" variables in this
switch statement.  Fix it up just removing the storage of the values
read.  Leave the read from the hardware as odds are it is required in
order to keep it working properly as I do not have the hardware to test
with.

I bet the whole case can be removed, but that will have to wait until
later...

Link: https://lore.kernel.org/r/20210520064144.1953251-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-20 11:41:20 +02:00
Greg Kroah-Hartman
d23dc8cd13 staging: rtl8723bs: HalBtc8723b1Ant.c: fix build warnings about unused variables
0-day keeps spitting out annoying messages:

drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2117:6: warning: variable 'u4Tmp' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:17: warning: variable 'u1Tmpb' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:5: warning: variable 'u1Tmpa' set but not used [-Wunused-but-set-variable]

So fix this up by just removing the storage of the values read.  Leave
the read from the hardware as odds are it is required in order to keep
it working properly as I do not have the hardware to test with.

Link: https://lore.kernel.org/r/20210520064133.1953156-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-20 11:41:13 +02:00
Bryan Brattlof
403e6946d1 staging: rtl8723bs: remove if (true) statement
'if (true) { ... }' will always evaluate to true. Remove it and
save a few tabs for somewhere else.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210518144335.1677320-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 18:00:10 +02:00
Bryan Brattlof
73861d26a5 staging: rtl8723bs: remove _rtw_sd_f0_read8()
Both the _rtw_sd_f0_read8() function and the rtw_sd_f0_read8()
redefinition are used anywhere in the driver and can be removed.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/5f025724ea7149e6ff11f94352b3321833f9bcaf.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:36 +02:00
Bryan Brattlof
3bdc1bc67e staging: rtl8723bs: remove duplicate name for _rtw_write_port()
_rtw_write_port() is being redefined as rtw_write_port(). Because
rtw_write_port() is the only name used in the driver, remove the
duplicate definition and rename the function from _rtw_write_port()
to rtw_write_port()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/5b8543127a774ca65595588711c05cce28b17bf6.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:35 +02:00
Bryan Brattlof
4d6bfc6f62 staging: rtl8723bs: remove duplicate names for _rtw_write32()
_rtw_write32() is redefined as rtw_write32() and
PlatformEFIOWrite4Byte(). Because rtw_write32() is the only name used in
the driver, remove the duplicate definitions and rename the function
from _rtw_write32() to rtw_write32()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/43917aee34e85139e613578cf6f14938211c8835.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:35 +02:00
Bryan Brattlof
1c42d72e47 staging: rtl8723bs: remove duplicate names for _rtw_write16()
_rtw_write16() is redefined as rtw_write16() and
PlatformEFIOWrite2Byte(). Because rtw_write16() is the only name used in
the driver, remove the duplicate definitions and rename the function
from _rtw_write16() to rtw_write16()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/7d53fb295f67f01c72640045afb88150391bce35.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:35 +02:00
Bryan Brattlof
7f06caf9a4 staging: rtl8723bs: remove duplicate names for _rtw_write8()
_rtw_write8() is redefined as rtw_write8() and PlatformEFIOWrite1Byte().
Because rtw_write8() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_write8() to
rtw_write8()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/35ffc9cd5af7009b317361033a6ca5263307d61a.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:35 +02:00
Bryan Brattlof
16b1b3c822 staging: rtl8723bs: remove duplicate names for _rtw_read32()
_rtw_read32() is redefined as rtw_read32() and PlatformEFIORead4Byte().
Because rtw_read32() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_read32() to
rtw_read32()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/15956707341f76de683245c392063b8121a805ea.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:35 +02:00
Bryan Brattlof
8ff74e4307 staging: rtl8723bs: remove duplicate names for _rtw_read16()
_rtw_read16() is redefined as rtw_read16() and PlatformEFIORead2Byte().
Because rtw_read16() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_read16() to
rtw_read16()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/11458342572f21d9df58b3969ad1f16fdff157f4.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:35 +02:00
Bryan Brattlof
51d4aa6d6b staging: rtl8723bs: remove duplicate names for _rtw_read8()
_rtw_read8() is redefined as rtw_read8() and PlatformEFIORead1Byte().
Because rtw_read8() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_read8() to
rtw_read8()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/9880c86c2aad7d95a714d8b03b28b83634f98c1e.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:58:35 +02:00
Desmond Cheong Zhi Xi
0c21b72a7f Staging: rtl8723bs: remove dead code in HalBtc8723b1Ant.c
This commit removes dead code to resolve the following checkpatch.pl
warning:

WARNING: Block comments use * on subsequent lines
+		/*
+		CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x ", "Latest error condition(should be 0)", \

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Link: https://lore.kernel.org/r/20210518044119.2960494-8-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
f7d21f444a Staging: rtl8723bs: fix line continuations in HalBtc8723b1Ant.c
In addition to removing line continuations, the indentation of some
lines were fixed. This was done to avoid the introduction of new
warnings because removing the line continuations caused checkpatch.pl
to emit "CHECK: Alignment should match open parenthesis".

This commit fixes the following checkpatch.pl warnings:

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d/ %d", "Ant PG Num/ Ant Mech/ Ant Pos:", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %s / %d", "BT stack/ hci ext ver", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d_%x/ 0x%x/ 0x%x(%d)", "CoexVer/ FwVer/ PatchVer", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d / %d(%d)", "Dot11 channel / HsChnl(HsMode)", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %02x %02x %02x ", "H2C Wifi inform bt chnl Info", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d", "Wifi rssi/ HS rssi", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d/ %d/ %s", "Wifi bLink/ bRoam/ bScan/ bHi-Pri", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %s / %s/ %s/ AP =%d/ %s ", "Wifi status", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d/ %d/ %d/ %d", "sta/vwifi/hs/p2pGo/p2pGc", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = [%s/ %d/ %d/ %d] ", "BT [status/ rssi/ retryCnt/ popCnt]", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d / %d / %d / %d", "SCO/HID/PAN/A2DP", \

WARNING: Avoid unnecessary line continuations
+		CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s", "BT Role", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %s", "BT Info A2DP rate", \

WARNING: Avoid unnecessary line continuations
+				"\r\n %-35s = %02x %02x %02x %02x %02x %02x %02x(%d)", GLBtInfoSrc8723b1Ant[i], \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %s/%s, (0x%x/0x%x)", "PS state, IPS/LPS, (lps/rpwm)", \

WARNING: Avoid unnecessary line continuations
+			"\r\n %-35s = %d", "SM[LowPenaltyRA]", \

WARNING: Avoid unnecessary line continuations
+			"\r\n %-35s = %s/ %s/ %d ", "DelBA/ BtCtrlAgg/ AggSize", \

WARNING: Avoid unnecessary line continuations
+			"\r\n %-35s = 0x%x ", "Rate Mask", \

WARNING: Avoid unnecessary line continuations
+		CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x case-%d (auto:%d)", "PS TDMA", \

WARNING: Avoid unnecessary line continuations
+		CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "Coex Table Type", \

WARNING: Avoid unnecessary line continuations
+		CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "IgnWlanAct", \

WARNING: Avoid unnecessary line continuations
+	CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "backup ARFR1/ARFR2/RL/AMaxTime", \

WARNING: Avoid unnecessary line continuations
+	CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "0x430/0x434/0x42a/0x456", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x778/0x6cc/0x880[29:25]", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x948/ 0x67[5] / 0x764 / 0x76e", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x92c[1:0]/ 0x930[7:0]/0x944[1:0]", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x38[11]/0x40/0x4c[24:23]/0x64[0]", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x", "0x550(bcn ctrl)/0x522", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x", "0xc50(dig)/0x49c(null-drop)", \

WARNING: Avoid unnecessary line continuations
+		(u4Tmp[1] & 0xffff) +  (u4Tmp[2] & 0xffff) + \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "OFDM-CCA/OFDM-FA/CCK-FA", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d/ %d/ %d", "CRC_OK CCK/11g/11n/11n-Agg", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d/ %d/ %d", "CRC_Err CCK/11g/11n/11n-Agg", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x6c0/0x6c4/0x6c8(coexTable)", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d", "0x770(high-pri rx/tx)", \

WARNING: Avoid unnecessary line continuations
+		"\r\n %-35s = %d/ %d", "0x774(low-pri rx/tx)", \

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Link: https://lore.kernel.org/r/20210518044119.2960494-7-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
557c232536 Staging: rtl8723bs: add missing blank line in HalBtc8723b1Ant.c
This commit fixes the following checkpatch.pl warning:

WARNING: Missing a blank line after declarations
+	struct btc_bt_link_info *pBtLinkInfo = &pBtCoexist->btLinkInfo;
+	halbtc8723b1ant_BtRssiState(2, 28, 0);

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Link: https://lore.kernel.org/r/20210518044119.2960494-6-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
aa62018944 Staging: rtl8723bs: fix comparison formatting in HalBtc8723b1Ant.c
This commit fixes the following checkpatch.pl warnings:

WARNING: Comparisons should place the constant on the right side of the test
+		BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE == pCoexDm->btStatus

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE != pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN == wifiStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN == wifiStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT == wifiStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		if (BT_8723B_1ANT_WIFI_STATUS_CONNECTED_IDLE == wifiStatus) {

WARNING: Comparisons should place the constant on the right side of the test
+	if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) {

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+	if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) {

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus &&

WARNING: Comparisons should place the constant on the right side of the test
+		if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) {

WARNING: Comparisons should place the constant on the right side of the test
+			(BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+			(BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) {

WARNING: Comparisons should place the constant on the right side of the test
+			(BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+			(BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		((bWifiUnderBMode) ? "11b" : ((BTC_WIFI_BW_LEGACY == wifiBw) ? "11bg" : (((BTC_WIFI_BW_HT40 == wifiBw) ? "HT40" : "HT20")))),

WARNING: Comparisons should place the constant on the right side of the test
+		((!bWifiBusy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX == wifiTrafficDir) ? "uplink" : "downlink")),

WARNING: Comparisons should place the constant on the right side of the test
+		((pBtCoexist->btInfo.bBtDisabled) ? ("disabled") : ((pCoexSta->bC2hBtInquiryPage) ? ("inquiry/page scan") : ((BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE == pCoexDm->btStatus) ? "non-connected idle" :

WARNING: Comparisons should place the constant on the right side of the test
+		((BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE == pCoexDm->btStatus) ? "connected-idle" : "busy")))),

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_IPS_ENTER == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	} else if (BTC_IPS_LEAVE == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_LPS_ENABLE == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	} else if (BTC_LPS_DISABLE == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_SCAN_START == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_SCAN_START == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	} else if (BTC_SCAN_FINISH == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_ASSOCIATE_START == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_ASSOCIATE_START == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	} else if (BTC_ASSOCIATE_FINISH == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_MEDIA_CONNECT == type) {

WARNING: Comparisons should place the constant on the right side of the test
+	if ((BTC_MEDIA_CONNECT == type) && (wifiCentralChnl <= 14)) {

WARNING: Comparisons should place the constant on the right side of the test
+		if (BTC_WIFI_BW_HT40 == wifiBw)

WARNING: Comparisons should place the constant on the right side of the test
+		BTC_PACKET_DHCP == type ||

WARNING: Comparisons should place the constant on the right side of the test
+		BTC_PACKET_EAPOL == type ||

WARNING: Comparisons should place the constant on the right side of the test
+		BTC_PACKET_ARP == type

WARNING: Comparisons should place the constant on the right side of the test
+		if (BTC_PACKET_ARP == type) {

WARNING: Comparisons should place the constant on the right side of the test
+		BTC_PACKET_DHCP == type ||

WARNING: Comparisons should place the constant on the right side of the test
+		BTC_PACKET_EAPOL == type ||

WARNING: Comparisons should place the constant on the right side of the test
+		((BTC_PACKET_ARP == type) && (pCoexSta->bWiFiIsHighPriTask))

WARNING: Comparisons should place the constant on the right side of the test
+	if (BT_INFO_SRC_8723B_1ANT_WIFI_FW != rspSource) {

WARNING: Comparisons should place the constant on the right side of the test
+		if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY != pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) ||

WARNING: Comparisons should place the constant on the right side of the test
+		(BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus)

WARNING: Comparisons should place the constant on the right side of the test
+	if (BTC_WIFI_PNP_SLEEP == pnpState) {

WARNING: Comparisons should place the constant on the right side of the test
+	} else if (BTC_WIFI_PNP_WAKE_UP == pnpState) {

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Link: https://lore.kernel.org/r/20210518044119.2960494-5-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
3750ae9e79 Staging: rtl8723bs: fix indentation in HalBtc8723b1Ant.c
This commit fixes the following checkpatch.pl errors:

WARNING: suspect code indent for conditional statements (32, 33)
+				if (nCCKLockCounter < 5)
+				 nCCKLockCounter++;

WARNING: suspect code indent for conditional statements (32, 33)
+				if (nCCKLockCounter > 0)
+				 nCCKLockCounter--;

WARNING: suspect code indent for conditional statements (24, 26)
+			if (nCCKLockCounter > 0)
+			  nCCKLockCounter--;

WARNING: suspect code indent for conditional statements (16, 17)
+		if (nCCKLockCounter >= 5)
+		 pCoexSta->bCCKLock = true;

WARNING: suspect code indent for conditional statements (16, 17)
+		else
+		 pCoexSta->bCCKLock = false;

WARNING: suspect code indent for conditional statements (16, 17)
+		if (nCCKLockCounter == 0)
+		 pCoexSta->bCCKLock = false;

WARNING: suspect code indent for conditional statements (16, 17)
+		else
+		 pCoexSta->bCCKLock = true;

WARNING: suspect code indent for conditional statements (16, 25)
+		if (bScan || bLink || bRoam) {
+			 if (bScan)

WARNING: Statements should start on a tabstop
+			 if (bScan)

WARNING: Statements should start on a tabstop
+			 else

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Link: https://lore.kernel.org/r/20210518044119.2960494-4-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
426ddc5298 Staging: rtl8723bs: fix spaces in HalBtc8723b1Ant.c
This commit fixes the following checkpatch.pl errors:

WARNING: please, no space before tabs
+^I/* ^IRx Aggregation related setting */$

WARNING: please, no space before tabs
+^Iu8 ^IH2C_Parameter[1] = {0};$

WARNING: please, no space before tabs
+^Iu8 ^IH2C_Parameter[6] = {0};$

WARNING: please, no space before tabs
+^I/* u32 ^I^IfwVer = 0; */$

WARNING: please, no space before tabs
+/* ^ISoftware Coex Mechanism start */$

WARNING: please, no space before tabs
+/* ^INon-Software Coex Mechanism start */$

WARNING: please, no space before tabs
+^I/* ^IBIT0: "0" for no antenna inverse; "1" for antenna inverse */$

WARNING: please, no space before tabs
+^I/* ^IBIT1: "0" for internal switch; "1" for external switch */$

WARNING: please, no space before tabs
+^I/* ^IBIT2: "0" for one antenna; "1" for two antenna */$

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Link: https://lore.kernel.org/r/20210518044119.2960494-3-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
83e9f677a4 Staging: rtl8723bs: remove unnecessary braces in HalBtc8723b1Ant.c
This commit fixes the following checkpatch.pl warnings:

WARNING: braces {} are not necessary for any arm of this statement
+			if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) {
[...]
+			} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+			if (btRssi < rssiThresh) {
[...]
+			} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+		if (rssiThresh > rssiThresh1) {
+			return pCoexSta->preBtRssiState;
+		}

WARNING: braces {} are not necessary for any arm of this statement
+			if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) {
[...]
+			} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+			if (btRssi >= (rssiThresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) {
[...]
+			} else if (btRssi < rssiThresh) {
[...]
+			} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+			if (btRssi < rssiThresh1) {
[...]
+			} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+	if (!pBtLinkInfo->bBtLinkExist) {
+		return algorithm;
+	}

WARNING: braces {} are not necessary for any arm of this statement
+				if (bBtHsOn) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+				if (bBtHsOn) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+				if (bBtHsOn) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+				if (bBtHsOn) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+				if (bBtHsOn) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+				if (bBtHsOn) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+				if (bBtHsOn) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for any arm of this statement
+				if (u1Tmp & BIT0) {
[...]
+				} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+	if (pBtCoexist->bManualControl) {
+		return;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (pBtCoexist->bStopCoexDm) {
+		return;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (pCoexSta->bUnderIps) {
+		return;
+	}

WARNING: braces {} are not necessary for any arm of this statement
+		if ((pBtLinkInfo->bA2dpExist) && (pCoexSta->bC2hBtInquiryPage)) {
[...]
+		} else
[...]

WARNING: braces {} are not necessary for any arm of this statement
+	if (BTC_LPS_ENABLE == type) {
[...]
+	} else if (BTC_LPS_DISABLE == type) {
[...]

WARNING: braces {} are not necessary for single statement blocks
+			if (!pBtCoexist->bManualControl && !pBtCoexist->bStopCoexDm) {
+				halbtc8723b1ant_IgnoreWlanAct(pBtCoexist, FORCE_EXEC, false);
+			}

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Link: https://lore.kernel.org/r/20210518044119.2960494-2-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:50:55 +02:00
Shreyansh Chouhan
7f02d57e7c staging: rtl8723bs: fix coding style for if comparisions
Placed constants on the right side of the equality tests in rtw_xmit.c

Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>
Link: https://lore.kernel.org/r/20210515081446.676500-1-chouhan.shreyansh630@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 17:49:10 +02:00
Greg Kroah-Hartman
d8218b0de5 Merge 5.13-rc2 into staging-next
We need the staging and iio fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-17 09:47:44 +02:00
Fabio M. De Francesco
09be0d0db5 staging: rtl8723bs: hal: Remove set but unused variable
Removed set but unused variable. Issue reported by kernel test robot
building with GCC W=1 for PowerPC target architecture.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210514090401.16123-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14 13:55:01 +02:00
Fabio M. De Francesco
30e0686747 staging: rtl8723bs: hal: Remove three set but unused variables
Removed three set but unused variables. Issue detected by GCC while
building for x86_64.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210514090401.16123-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14 13:55:01 +02:00
Bryan Brattlof
5f8e9aff1a staging: rtl8723bs: remove unused argument 'msg'
After the removal of the DBG_871X macros, the 'msg' argument
for rtw_sctx_wait() is no longer used.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210513160848.1057564-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:08:09 +02:00
Fabio M. De Francesco
76dfbca475 staging: rtl8723bs: core: Remove unnecessary lines of code
Removed unnecessary lines of code inside an "else if" block.
That code acquires a spinlock and iterates over each item in
a linked list for no purpose.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210512153208.9584-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:06:32 +02:00
Fabio M. De Francesco
7ac5ed5095 staging: rtl8723bs: hal: Remove set but unused variable
Removed "delta_IQK" and its occurrences in comments
and code because the variable is set but not used.
Issue detected by GCC.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210512073852.14085-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:05:45 +02:00
Fabio Aiuto
1f5adcfe87 staging: rtl8723bs: remove unneeded comments to silence 'line too long' warning
remove unneeded comments to fix the following post commit hook
checkpatch warnings:

WARNING: line length of 110 exceeds 100 columns
115: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:510:
+					*((__le32 *)crc)
 = ~crc32_le(~0, payload, length);/* modified by Amy*/

WARNING: line length of 110 exceeds 100 columns
124: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:518:
+					*((__le32 *)crc)
 = ~crc32_le(~0, payload, length);/* modified by Amy*/

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/bb479715e3603ab78863576783dbbf49c5f6f703.1620652505.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:05:15 +02:00
Fabio Aiuto
b97fad10de staging: rtl8723bs: replace private CRC-32 routines with in-kernel ones
replace private CRC-32 routines with in-kernel ones.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/cdd9bc521b7119a9c2787b46109eb76f94bd295a.1620652505.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:05:15 +02:00
Zhen Lei
1cd3acd4e9 staging: rtl8723bs: Delete two redundant condition branches
The statement of the "if (check_fwstate(pmlmepriv, WIFI_AP_STATE))" branch
is the same as the "else" branch. Delete it to simplify code.

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210510084901.3421-1-thunder.leizhen@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:35 +02:00
Fabio Aiuto
1b11e893ed staging: rtl8723bs: replace private arc4 encryption with in-kernel one
replace private arc4 encryption with in-kernel one.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/af960dc728f039d64f4fb28fcece3ca92d24fbe4.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Fabio Aiuto
8adffa4bf1 staging: rtl8723bs: remove unused symbolic constant _AES_IV_LEN_
remove unused symbolic constant _AES_IV_LEN_

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ac3f5a400dcb61f46db259cca6979ec41f98feae.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Fabio Aiuto
6d0753d26e staging: rtl8723bs: remove more unused encryption macros
remove more unused logical macros used in removed
private aes encryption.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c65d2b2dd06c52c3e0418d8a927521d05109849c.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Fabio Aiuto
0c7ac91087 staging: rtl8723bs: remove unused macros, arrays and an inline function def
remove unused macros, arrays and a function definition.
Many of these facilities were used in removed private
aes encryption.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ada64bfc622dbfe6d4ff03c46dff48b25ebc641e.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Arnd Bergmann
14b6cff54e staging: rtl8723bs: avoid bogus gcc warning
gcc gets confused by some of the type casts and produces an
apparently senseless warning about an out-of-bound memcpy to
an unrelated array in the same structure:

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function 'rtw_cfg80211_ap_set_encryption':
cc1: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
In file included from drivers/staging/rtl8723bs/include/drv_types.h:32,
                 from drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:10:
drivers/staging/rtl8723bs/include/rtw_security.h:98:15: note: at offset [184, 4264] into destination object 'dot11AuthAlgrthm' of size 4
   98 |         u32   dot11AuthAlgrthm;         /*  802.11 auth, could be open, shared, 8021x and authswitch */
      |               ^~~~~~~~~~~~~~~~
cc1: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=]
drivers/staging/rtl8723bs/include/rtw_security.h:98:15: note: at offset [264, 4344] into destination object 'dot11AuthAlgrthm' of size 4

This is a known gcc bug, and the patch here is only a workaround,
but the approach of using a temporary variable to hold a pointer
to the key also improves readability in addition to avoiding the
warning, so overall this should still help.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99673
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210422152648.2891996-1-arnd@kernel.org
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:26:24 +02:00
Fabio Aiuto
3d3a170f6d staging: rtl8723bs: use in-kernel aes encryption
replace private aes encryption subroutines with
public in-kernel ones in data frame encryption.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/bd1f47994d3a1d0f434de5b2095c327f5a25f6ef.1620139727.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
7d40753d88 staging: rtl8723bs: use in-kernel aes encryption in OMAC1 routines
replace private aes encryption subroutines with
public in-kernel ones in OMAC1 computation routines.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/11ac26487aab92ded28747c1f0cb42a94183130d.1620139727.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
41c014b865 staging: rtl8723bs: align argument position in a new line
align function arguments position on a new line to
open parentheses.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/f195bc7d72c122e5e16b3857cf99ae1f84734915.1620139727.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
0d59ca5a7e staging: rtl8723bs: remove odm_debug.h header file
remove obsolete odm_debug.h header file.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/58f3ed0c7706fdb33614d3e38ed802d56d77f0ec.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
1cad68fc83 staging: rtl8723bs: remove DebugLevel member in dm_odm_t struct
remove DebugLevel in dm_odm_t struct,
remove private debug level tracing.

remove unused variable as well to suppress compiler warning.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ac4afb00f904511e0cbb23136f8e7a3e204ad7ed.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
ae75f93465 staging: rtl8723bs: remove member in dm_odm_t struct
remove DebugComponent in dm_odm_t struct,
remove private debug component tracing.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/313d08514d2105c826ef3c92555fa557def2b9c2.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
83147d899e staging: rtl8723bs: remove empty hal/odm_debug.c file
remove file left empty after function deletion.
remove related target in Makefile.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0bd6ce2da09a5e2a671dc4a53f1c2e7ba1a64066.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
4f7cffcfe4 staging: rtl8723bs: remove ODM_InitDebugSetting() function
remove ODM_InitDebugSetting() function. It was
intended to initialize removed private debug
system. So remove it.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/6a8524b780674d05f33977eb86878d95c7338a1a.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
603693d1cf staging: rtl8723bs: remove RT_DISP macro definition
remove unused RT_DISP macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8983c3077979830aec02427ed895507213b38f95.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
3a96d356b9 staging: rtl8723bs: remove commented out *RT_DISP logs
remove commented out ODM_RT_DISP and RT_DISP logs.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/23b7764fc40e1b201952be79e94e0782cf33d546.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
367fce0d9e staging: rtl8723bs: remove unused DbgPrint macro
remove unused DbgPrint macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/00e9b407fa1a7c911295b2fec215d82f5da058f8.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
2ce75c4f9e staging: rtl8723bs: remove commented out DbgPrint logs
remove commented out DbgPrint logs.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/63eb0244a9e25d5633d78b67fd5a0c61cb48d83e.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
76c80b8931 staging: rtl8723bs: remove obsolete debug macros
remove obsolete debug macros.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a35b084444ca423ba3b8a212c38b974535a7048c.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
f71c344766 staging: rtl8723bs: remove unused enum
remove unused enum.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/029a9639ef046e44defc59854d6bb9a86dd3db4f.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
b0a21a60af staging: rtl8723bs: remove obsolete GLBtcDbgType array declarations
remove obsolete GLBtcDbgType declarations for it was intended
for private debug facilities.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/000825941048c41cc53a0cc675fae2b45b781aad.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
e7f0be6415 staging: rtl8723bs: remove unnecessary halbtcoutsrc_DbgInit() function
halbtcoutsrc_DbgInit() static function was intended for
manual activation of private tracing facilities.

So remove it.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/f6c4f680b2d0ee8850f97532ca76dd405c1d50c3.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
c8fc131b49 staging: rtl8723bs: remove hal_btcoex_GetDBG() function
remove unused hal_btcoex_GetDBG() function definition and
prototype.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8b06dc12a65ef15f3e67bd32d097dc4db3f78586.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
2732143564 staging: rtl8723bs: remove unsed hal_btcoex_SetDBG() function
remove unused hal_btcoex_SetDBG() function definition and
prototype.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4f8aa4e4312777aff1aea621d26c00e81754025a.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
ad91b3d47b staging: rtl8723bs: remove empty #ifdef block
remove empty #ifdef block.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9a2095cfd69647dd304eb9e059a6aa9aa00694e6.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
87c596b03b staging: rtl8723bs: remove BTC_PRINT_F macro definition
remove unused BTC_PRINT_F macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/503423caee1cc2b7a8fe321e0efb546556f2887f.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
2875b3bf04 staging: rtl8723bs: remove BTC_PRINT_DATA definitions
remove unused BTC_PRINT_DATA definitions.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0b83b96133af86e73bed64d7fe35ea96b2940208.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
1bd9ebfd7d staging: rtl8723bs: remove BTC_PRINT_ADDR macro definitions
remove unused BTC_PRINT_ADDR macro definitions.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/31af3e56cfd52f2797499d3beb38741bddaff65d.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
698a405f08 staging: rtl8723bs: remove BTC_PRINT macro definitions
remove unused BTC_PRINT macro definitions.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0f0129063880553001a2c1d8272d10079abc7132.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
f003ab00a5 staging: rtl8723bs: remove commented out BTC_PRINT logs
remove commented out BTC_PRINT logs.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/dd6ea6b65cb7db15254ac6ab3fbdfcabb7e66a1a.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
ec0e82b45f staging: rtl8723bs: remove braces around single statement in if block
fix following post-commit hook checkatch issue:

WARNING: braces {} are not necessary for single statement blocks
21: FILE: drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:609:
+				if (!bBtHsOn) {
 					algorithm =
		BT_8723B_1ANT_COEX_ALGO_PANEDR_HID;
 				}

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1c95d3d0d4ccd74d4e97ee496f7a04eadd1f8ff0.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
fda6c767fb staging: rtl8723bs: remove empty if-else blocks after BTC_PRINT removal
remove if-else blocks left empty after BTC_PRINT removal.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/102455368fa9535dc78584d7d24cd12ee4160737.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:37 +02:00
Fabio Aiuto
8e30fb99d7 staging: rtl8723bs: remove BTC_PRINT logs
Remove BTC_PRINT logs.

BTC_PRINT macro's default behavoiur is _do nothing_.
It's enabled by uncommenting some code in hal/hal_btcoex.c
file.

So just remove it.

Applied following semantic patch:

@@
@@

-	BTC_PRINT(...);

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9a9a8ce817929f1705b623c470cbafcc75fb3e72.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
292611481c staging: rtl8723bs: remove unused RT_PRINTK macro
remove unused RT_PRINTK macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/edf86e39fce8a53f52c8c8463d134ea426f58b60.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
2172a65763 staging: rtl8723bs: remove commented out RT_ASSERT occurrences
remove commented out obsoete RT_ASSERT macro occurences.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/3ee98d7bf1685af627e625f413de355fce58d52d.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
22a555bb47 staging: rtl8723bs: remove empty #ifndef block
remove empty ifndef block.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2caae2efcfbe74cafe6aa000ca7b330cc371dca2.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
ae5351da40 staging: rtl8723bs: remove unused ASSERT macro
remove unused do nothing ASSERT macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/f13bc57cc3a821c40443dddc38258b87962774a7.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
2a96647024 staging: rtl8723bs: remove empty ifdef block
remove empty ifdef block

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e30ccbe6cf20069e1a24a7a150d0b6241a7b57f8.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
a8a21160c2 staging: rtl8723bs: remove unused ODM_dbg_exit macro
remove unused ODM_dbg_exit macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/84b76bc814f44e3b2da92318b05f101f59cf0889.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
187f0a9733 staging: rtl8723bs: remove unused ODM_dbg_enter
remove unused ODM_dbg_enter macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b52f307265b7662bc6a02eac56dec92b3613a58c.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
b5edd20dfe staging: rtl8723bs: remove unused ODM_dbg_trace macro
remove unused ODM_dbg_trace macro definitions.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ed3cc3b2c0df4f3c3f691b353f181f7c22309dbd.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
3706683797 staging: rtl8723bs: remove unused ODM_PRINT_ADDR macro
remove unused ODM_PRINT_ADDR macro definitions.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8f04c3b8b841efc4271d4a7ef71a95e04894d64a.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:36 +02:00
Fabio Aiuto
7c87fd54d5 staging: rtl8723bs: remove unused ODM_RT_ASSERT macro
remove unused ODM_RT_ASSERT macro declarations.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4d9fd27f60d1ef4bf8384d411885d05c6d40768e.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
57c73cb6fd staging: rtl8723bs: replace ODM_RT_ASSERT with netdev_dbg()
replace ODM_RT_ASSERT with netdev dbg.

Marco ODM_RT_ASSERT wraps a raw prink and prints a message
everytime second argument is false. This occurrence prints
always, so replace it with netdev_dbg()

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/3f172aaefb84aaac639f1850c5eb45678578e393.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
9e517aca02 staging: rtl8723bs: remove all commented out ODM_RT_TRACE logs
remove all commented out ODM_RT_TRACE logs.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a98ce6637bb15de79997325a78672fc81c48cd6a.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
364787f941 staging: rtl8723bs: remove ODM_RT_TRACE* unused macro defs
remove unused ODM_RT_TRACE* macro defs.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/f0feec848702a12594bb67acceb42f4be647088e.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
7081d290d3 staging: rtl8723bs: remove empty header file
remove empty header file.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5f38543b96f491cf9a11bb8cda17e5be754a3636.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
466bd36585 staging: rtl8723bs: remove undefined function prototypes
remove undefined function prototypes.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/77c0c9027448be020a00e7ded9ffeb967341b588.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
8b2a605a6e staging: rtl8723bs: remove empty hal/odm_PathDiv.c source file
remove empty hal/odm_PathDiv.c source file.
remove related target in Makefile.

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/90ebcf46a58375ae25d51638ae91fa40521c6c06.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
2523c9978e staging: rtl8723bs: remove empty functions
remove functions left empty after ODM_RT_TRACE deletion.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2a0606394fec2cbb32df6ec0bf4b5974416195f6.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
7fa2973a1a staging: rtl8723bs: remove if-else blocks left empty by ODM_RT_TRACE deletion
remove if-else blocks left empty by ODM_RT_TRACE deletion.
remove unused variables to suppress compiler warnings.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0e1196ebf56787f62dcbfbcba1fcbc2ed37a65ce.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Fabio Aiuto
a76455587f staging: rtl8723bs: remove ODM_RT_TRACE logs
remove all ODM_RT_TRACE logs.

ODM_RT_TRACE macro default behaviour
is _trace nothing_. To enable it a hand code
edit is needed in hal/odm_debug.c.
So just remove it.

Applied the semantic patch:

@@
@@

-	ODM_RT_TRACE(...);

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/23e21c100ba4f0753c6f03a1bb28d9bd7729b64b.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:35 +02:00
Guenter Roeck
b3cd518c5a staging: rtl8723bs: Use list iterators and helpers
The rtl8723bs driver manually re-implements list helper functions
and macros in various ways. Replace with existing list helpers.

The following coccinelle script was used to convert the code.

@@
identifier v1, v2, v3, v4;
symbol next;
expression e;
iterator name list_for_each;
statement S;
@@

<+...
(
- e = v1->next;
|
- e = get_next(v1);
)
  ... when != e
- while ( \( v1 != e \| e != v1 \) )
+ list_for_each (e, v1)
  {
    ...
-   v2 = container_of(e, struct v3, v4);
+   v2 = list_entry(e, struct v3, v4);
?-  if (!v2) S
    ...
(
-   e = e->next;
|
- e = get_next(e);
)
    ... when != e
  }
...+>

@@
identifier v1, v2, v3, v4;
symbol next;
expression e;
iterator name list_for_each;
statement S;
@@

<+...
(
- e = v1->next;
|
- e = get_next(v1);
)
  ... when != e
- while (1)
+ list_for_each (e, v1)
  {
- if ( \( e == v1 \| v1 == e \) )
-   break;
    ...
-   v2 = container_of(e, struct v3, v4);
+   v2 = list_entry(e, struct v3, v4);
?-  if (!v2) S
    ...
(
-   e = e->next;
|
- e = get_next(e);
)
    ... when != e
  }
...+>

Manually fixed up formatting, and added auto-removed comments back in.
Compile tested only.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210428173301.149619-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:34 +02:00
Saurav Girepunje
a616d1212a staging: rtl8723bs: Change the return type
Remove the ret variable in rtw_suspend_common() and change
the return type from int to void as rtw_suspend_common()
always return zero unconditionally.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/20210428175520.GA8921@user
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:34 +02:00
Fabio M. De Francesco
5e7106f6c9 staging: rtl8723bs: core: Remove set but unused variable
Removed set but unused variable. Issue detected by gcc.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210430095319.23226-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:34 +02:00
Fabio M. De Francesco
bd8d4ba394 staging: rtl8723bs: hal: Remove set but unused variables
Removed four set but unused variables. Issue detected by gcc.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210430095319.23226-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:34 +02:00
Saurav Girepunje
cab7759088 staging: rtl8723bs: core: remove unneeded variable
Below are the changes:

Remove unneeded variable "u8 *pbuf" from function start_bss_network
argument as this can be get from first argument "padapter"

Remove the struct wlan_bssid_ex *network from createbss_hdl function
as this is only used to pass as second argument to start_bss_network()

Remove the struct mlme_priv *mlmepriv from rtw_ap_restore_network
function as this is only used to pass as second argument
to start_bss_network()

Signed-off-by: Saurav Girepunje <saurav.girepunje@google.com>
Link: https://lore.kernel.org/r/20210428154011.GA5571@user
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:34 +02:00
Fabio Aiuto
ac76b43834 staging: rtl8723bs: remove unused macro DRIVER_PREFIX
remove unused macro DRIVER_PREFIX.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2fac5d7f2334f0a9765f2ddfb31502323e49fce1.1619594707.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:33 +02:00
Fabio Aiuto
89bbf2a513 staging: rtl8723bs: remove unnecessary hex dumps
Remove unnecessary hex dumps in kernel log.

This deletion has been done with the following
semantic patch:

@@
@@

-	print_hex_dump_debug(...);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8bbf5ce17f2d778a67e86cb948395e9ed27478d9.1619594707.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:33 +02:00
Fabio Aiuto
acbc0849bd staging: rtl8723bs: macro DRIVER_PREFIX expands to lowercase driver name
macro DRIVER_PREFIX expands to lowercase driver name.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c986e9a3c9b2f73cb784bd5dc7c877eb9a669c89.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:33 +02:00
Fabio Aiuto
5a155c08c0 staging: rtl8723bs: remove last unused debug macros
remove last unused debug macros.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/3baf120a9e99d087968e8db55e2b1c33ae5c5e8a.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:33 +02:00
Fabio Aiuto
4a98eb30e4 staging: rtl8723bs: remove unsed debug macros tied to no particular code debug
remove unused debug macros tied to no particular code debug

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a16431ce89e313029c09381f78bb0f58c23fd7e2.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:33 +02:00
Fabio Aiuto
2f3103bf4f staging: rtl8723bs: remove unused macros tied to core/rtw_efuse.c debug
remove unused macros tied to core/rtw_efuse.c debug.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/13673f9241ca482e6f02cfb16a765dd0c4feaa84.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:33 +02:00
Fabio Aiuto
e5ec9bf4a0 staging: rtl8723bs: remove unused debug macro definitions
remove unused debug macro definitions.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/02f0a7ad7ad00dbafeaee1796f62f8f2e921d772.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:33 +02:00
Fabio Aiuto
c9727c5587 staging: rtl8723bs: remove commented out macro definition
remove commented out debug macro definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2b56922e8e4c5fde6e594a9bbeb888bf7717015d.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
7d8fff53cd staging: rtl8723bs: remove unused macros tied to _RTL8712_CMD_C_ definition
remove unused macros tied to
_RTL8712_CMD_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5e4a8015eaca090e8a4df872760c9a1556ff551f.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
d0ffbfae13 staging: rtl8723bs: remove unused macros tied to _RTL871X_IOCTL_LINUX_C definition
remove unused macros tied to
_RTL871X_IOCTL_LINUX_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/6c836355bb4a51a3f9925e0cc75cbce3c0b63df8.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
72b2b0467b staging: rtl8723bs: remove unused macros tied to _HCI_OPS_OS_C_ definition
remove unused macros tied to
_HCI_OPS_OS_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8cddae8116da58df3f5a9be48e618418a4c686ef.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
3dc3456e0d staging: rtl8723bs: remove unused _module_mp_ def
remove unused _module_mp_ def.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9e8945a3f4f58b32eb2ed3e943f8cc0cd6c26823.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
43a0faffd4 staging: rtl8723bs: remove unused debug macros tied to os_dep/osdep_service.c debug
remove unused debug macros tied to
os_dep/osdep_service.c debug.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c6e1367c0cc08a06e4eefe60f1aadd25d46675c3.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
57e3a85216 staging: rtl8723bs: remove unused debug macros tied to hal/sdio_ops.c debug
remove unused debug macros tied to
hal/sdio_ops.c debug.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8f3acec03ecd9ece6d60404520a9ac188f718a55.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
c7432a3c7a staging: rtl8723bs: remove unused debug macros tied to _HCI_OPS_C_ definition
remove unused debug macros tied to
_HCI_OPS_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/044b8f9e0ea4f09287b73be0c65a526606c86d89.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
65b00505f1 staging: rtl8723bs: remove unused macros tied to os_dep/sdio_intf.c debug
remove unused macro definitions tied to
os_dep/sdio_intf.c debug.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c6f3a9d8eb1d868c869b0e37753cf7cfe15bad91.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
e8bc244c28 staging: rtl8723bs: remove unused macros tied to core/rtw_pwrctrl.c debug
remove unused macro definitions tied to
core/rtw_pwrctrl.c debug.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0f746668ec65d6c188ba422778d6edc2b6eb7d91.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:32 +02:00
Fabio Aiuto
74a0738db3 staging: rtl8723bs: remove unused debug macros tied to _RTL871X_PWRCTRL_C_ definition
remove unused debug macros tied to
_RTL871X_PWRCTRL_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/97a5e6be392933da40c4c31cebe7ad2d8d21cf33.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
0744b91b59 staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_QUERY_C_ definition
remove unused debug macros tied to
_RTL871X_IOCTL_QUERY_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9157d4b219072ef48e5e91814718d2b19d0e3b77.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
8b63686eab staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_SET_C_ definition
remove unused debug macros tied to
 _RTL871X_IOCTL_SET_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/f21423d909f1c2b95cac10a715ea49af76b776b1.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
ebb0a22ea4 staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_C_ definition
remove unused private debug macros tied to
_RTL871X_IOCTL_C_ definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/216def2b5e244490debe86aafdc23cabc32f3c1e.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
c529c96139 staging: rtl8723bs: remove debug macros related to hal/sdio_halinit.c tracing
remove debug macro definitions related to hal/sdio_halinit.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0de5a9cd0c70f1a5609320e545206376a7cf4498.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
3ddc92d111 staging: rtl8723bs: remove debug macros related to hal/hal_intf.c tracing
remove debug macro definitions related to hal/hal_intf.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7f64d5d78b42874364f24a2fb11f664ad9988d99.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
8edee4306a staging: rtl8723bs: remove debug macros related to core/rtw_eeprom.c tracing
remove debug macro definitions related to core/rtw_eeprom.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/d11884043d17db211793e35e9d07a570951110e8.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
5610af57dc staging: rtl8723bs: remove debug macros related to core/rtw_security.c tracing
remove debug macro definitions related to core/rtw_security.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/510d1f1223156d1b613c6562aeaf86385734214c.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
4c53cdb3b3 staging: rtl8723bs: remove debug macros related to os_dep/os_intfs.c tracing
remove debug macro definitions related to os_dep/os_intfs.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/53110c205451e641f8e24c07d36fe6cc5d087e60.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
7c75c38553 staging: rtl8723bs: remove obsolete _IO_OSDEP_C_ debug macro definition
remove _IO_OSDEP_C_ debug macro definition
untied to any tracing component.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ba3b9ef9a999f6039f204f5b06be45584c267af2.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:31 +02:00
Fabio Aiuto
c479026ce6 staging: rtl8723bs: remove debug macros related to core/rtw_io.c tracing
remove debug macro definitions related to core/rtw_io.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2c97fc0121e3dfbc97bbc1ce5bb9d4a05e5c88d4.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
e45199eaa0 staging: rtl8723bs: remove obsolete debug macro definitions
remove debug macro definition untied to any tracing component.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5bc9e69d8ba03d2bd8031bcff73b22aeed5c0912.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
3c747a9904 staging: rtl8723bs: remove debug macros related to core/rtw_cmd.c tracing
remove debug macro definitions related to core/rtw_cmd.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7b32950581f7584b448ee277627fc57beb113026.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
8acdc8db86 staging: rtl8723bs: remove debug macros related to core/rtw_sta_mgt.c tracing
remove debug macro definitions related to core/rtw_sta_mgt.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7f82e61bc21e53a6c3e5bdcd2ac0322b6ff75a47.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
c0b8b55ce1 staging: rtl8723bs: remove debug macros related to core/rtw_mlme_ext.c tracing
remove debug macro definitions related to core/rtw_mlme_ext.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1579e958f5aa4584f6477a5b7c9bc3bd8933a5f7.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
ffc49b55c9 staging: rtl8723bs: move static array definition from header to .c file
move static array definition from header to .c file.
This prepare removal of a conditional compile block
_RTW_MLME_EXT_C_.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/665c9d33a97954508ca9257850a5690afcf0a9a9.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
bc5c27b687 staging: rtl8723bs: remove debug macros related to os_dep/mlme_linux.c tracing
remove debug macro definitions related to os_dep/mlme_linux.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2528845d21764e95ab03d9245999b79acb2febd8.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
c2f04efd30 staging: rtl8723bs: remove debug macros related to core/rtw_mlme.c tracing
remove debug macro definitions related to core/rtw_mlme.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5ab63de74186fb9e8f90ffed9d7557b3e2d4caed.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
93026ce6a7 staging: rtl8723bs: remove debug macros related to os_dep/recv_linux.c tracing
remove debug macros definitions related to os_dep/recv_linux.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7461d3589ff726ad3c61bb8c6edb1f177fcb0532.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
a596ef1956 staging: rtl8723bs: remove debug macros related to core/rtw_recv.c tracing
remove debug macros definitions related to core/rtw_recv.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5af86d4dea96caf9c84f9ac302ec060edbc2fb65.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
54f8a6ab76 staging: rtl8723bs: remove debug macros related to os_dep/xmit_linux.c tracing
remove debug macros definitions related to os_dep/xmit_linux.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ab5984670fac9e534b08ae043ddb7cd63ce60450.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:30 +02:00
Fabio Aiuto
9ce42bc33f staging: rtl8723bs: remove debug macros related to core/rtw_xmit.c tracing
remove debug macros definitions related to core/rtw_xmit.c
obsolete tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fd7f02bee9b97bf4222931710092a54892825a3a.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
67f3a1c028 staging: rtl8723bs: remove unused debug macro definitions
remove unused debug macro definitions related to
private log level tracing.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/93b7f5af8f5220bd17530f7a907fa4fff4cb87d4.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
2ee42acab1 staging: rtl8723bs: remove unneeded header file include
remove unneeded header file include.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b58b5edf820026f08cb7289c1461561ecc95d41f.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
198ffd276f staging: rtl8723bs: remove unused debug variables declarations and initialization
remove unused debug variables extern declarations
and containing #ifndef block.

remove initialization as well.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/d566a6eb49949c1c80df286056b9df6114c8cc97.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
33a5f34c56 staging: rtl8723bs: remove all defs related to _dbgdump macro
remove obsolete _dbgdump macro definition, undef and
empty conditional code block.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/d9eaace0a9312dbc9bc5b6775489dbbb64554ed2.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
aeef75e7c4 staging: rtl8723bs: remove unused RTW_DBGDUMP macro definition
remove unused RTW_DBGDUMP macro definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5efe991636b899936f39a7efceaac9edce9da91e.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
eeec59e45c staging: rtl8723bs: remove unused rf_reg_dump() function argument
remove unused function argument void *sel from rf_reg_dump.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/32d99e0a094cc59a35788c468dd3e20b486c9e20.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
5d047570e0 staging: rtl8723bs: remove unused bb_reg_dump() function argument
remove unused function argument void *sel from bb_reg_dump.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/62bfb844bc77818ca0595b369e64eca3b8872470.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
a8ce8f9f96 staging: rtl8723bs: remove unused mac_reg_dump() function argument
remove unused function argument void *sel from mac_reg_dump.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2ae03ee765c861d1fd4237af7b8d11a918be0d76.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
10cf774763 staging: rtl8723bs: remove unused _DBG_871X_LEVEL macro
remove unused _DBG_871X_LEVEL macro,
after DBG_871X_SEL deletion.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/83ff6acd438ad2107a9a1c9446cabb22a6c77f0a.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:29 +02:00
Fabio Aiuto
c106cb190c staging: rtl8723bs: remove DBG_871X_SEL macro declaration
remove DBG_871X_SEL macro declaration.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1a0949adfc352d2560e9a68d340df386d94a79e8.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:28 +02:00
Fabio Aiuto
2867c27bf8 staging: rtl8723bs: add two functions to improve register dump in core/rtw_debug.c
Beautify register dump by adding two functions printing
four register values per line. This is necessary after
old macro replacement with netdev_dbg(), the former
wrapped a raw printk, the latter
prints lots of driver information overhead per line
for each call. So avoid this noisy behaviour by dumping
four values on each line.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0f3300e6b07f811c0d3fc9c6dd46e5270dfb7a54.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:28 +02:00
Fabio Aiuto
33fad5b4df staging: rtl8723bs: replace DBG_871X_SEL log macro with netdev_dbg()
replace DBG_871X_SEL log macro with the net device driver
recommended netdev_dbg().

This macro by default does a raw printk, and the alternative
behaviour, never triggered is a seq_print() call.

So replace with netdev_dbg().

The operation has been done with the following semantic patch
script:

@@
expression sel;
expression list args;
identifier padapter;
identifier func;
@@

func(..., struct adapter *padapter, ...) {
	<...
-	DBG_871X_SEL(sel, args);
+	netdev_dbg(padapter->pnetdev, args);
	...>

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9e6a1e4dc8962bfd58375be98619c76e8e28febe.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:28 +02:00
Fabio Aiuto
9d1d262124 staging: rtl8723bs: remove unused log function
remove unused sd_f0_reg_dump() function.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/397a4082fa2a49c67ac7d6869284334d3fa7bea6.1619254603.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:28 +02:00
Lee Jones
1873cb8755 staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
 drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
Cc: Stanley@BB.SD3
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-58-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:27 +02:00
Lee Jones
705655a2c4 staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer onto the heap
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘issue_probersp’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2543:1: warning: the frame size of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-54-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:27 +02:00
Lee Jones
e3a7f78dc0 staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable 'func_start'
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function ‘odm_InbandNoise_Monitor_NSeries’:
 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:18: warning: variable ‘func_start’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Marco Cesati <marcocesati@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-53-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:27 +02:00
Lee Jones
3821526719 staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug is enabled
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function ‘_cfg80211_rtw_mgmt_tx’:
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2754:7: warning: variable ‘ack’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-48-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:26 +02:00
Lee Jones
433cb9f05a staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused and remove another
'err' is only used if debug is enabled.

Also remove 4 year old TODO.

Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read32’:
 drivers/staging/rtl8723bs/hal/sdio_ops.c:170:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read_mem’:
 drivers/staging/rtl8723bs/hal/sdio_ops.c:381:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-47-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:26 +02:00
Lee Jones
904f184835 staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed functions
... and fix a misnamed param.

Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:53: warning: expecting prototype for PHY_QueryBBReg(). Prototype was for PHY_QueryBBReg_8723B() instead
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:87: warning: expecting prototype for PHY_SetBBReg(). Prototype was for PHY_SetBBReg_8723B() instead
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: Function parameter or member 'RegAddr' not described in 'PHY_QueryRFReg_8723B'
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: expecting prototype for PHY_QueryRFReg(). Prototype was for PHY_QueryRFReg_8723B() instead
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:285: warning: expecting prototype for PHY_SetRFReg(). Prototype was for PHY_SetRFReg_8723B() instead

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: karthik alapati <mail@karthek.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-45-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:26 +02:00
Lee Jones
ad7e84ef4c staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and dead code
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function ‘odm_InbandNoise_Monitor_NSeries’:
 drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:34: warning: variable ‘func_end’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Marco Cesati <marcocesati@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-41-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:26 +02:00
Lee Jones
50676c55f0 staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named function
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_ieee80211.c:889: warning: expecting prototype for ieee802_11_parse_elems(). Prototype was for rtw_ieee802_11_parse_elems() instead

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-40-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:26 +02:00
Lee Jones
1658384fc3 staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is set
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_joinbss_event_prehandle’:
 drivers/staging/rtl8723bs/core/rtw_mlme.c:1192:12: warning: variable ‘retry’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-32-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:25 +02:00
Lee Jones
80566ab542 staging: rtl8723bs: core: rtw_ieee80211: Remove seemingly pointless copy
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_ieee80211.c: In function ‘rtw_ies_remove_ie’:
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c:259:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-31-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:25 +02:00
Lee Jones
c337ee0014 staging: rtl8723bs: core: rtw_wlan_util: Remove unused variable 'start_seq'
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_wlan_util.c: In function ‘process_addba_req’:
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1774:11: warning: variable ‘start_seq’ set but not used [-Wunused-but-set-variable]
 from drivers/staging/rtl8188eu/core/rtw_wlan_util.c:12:

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-20-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:24 +02:00
Lee Jones
324960df12 staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘rtw_init_bcmc_stainfo’:
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:512:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ross Schmidt <ross.schm.dev@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-18-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:24 +02:00
Lee Jones
f02eafb7f1 staging: rtl8723bs: core: rtw_sta_mgt: Remove unused variable 'psta'
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘kfree_all_stainfo’:
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:128:19: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ross Schmidt <ross.schm.dev@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-17-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:24 +02:00
Lee Jones
e06ede38f3 staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header
Fixes the following W=1 kernel build warning(s):

 from drivers/staging/rtl8188eu/core/rtw_security.c:10:
 drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1'
 drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1'
 drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1'
 drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2'
 drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2'
 drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2'
 drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-16-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:24 +02:00
Lee Jones
daa2627c7f staging: rtl8723bs: core: rtw_recv: Mark debug variable as __maybe_unused
Fixes the following W=1 kernel build warning(s):

 from drivers/staging/rtl8188eu/core/rtw_recv.c:12:
 drivers/staging/rtl8723bs/core/rtw_recv.c: In function ‘rtw_signal_stat_timer_hdl’:
 drivers/staging/rtl8723bs/core/rtw_recv.c:2341:6: warning: variable ‘num_signal_qual’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-14-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:24 +02:00
Lee Jones
4c98e73f28 staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables
Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_build_wmm_ie_ht’:
 drivers/staging/rtl8723bs/core/rtw_mlme.c:2482:6: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_restructure_ht_ie’:
 drivers/staging/rtl8723bs/core/rtw_mlme.c:2498:21: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_update_ht_cap’:
 drivers/staging/rtl8723bs/core/rtw_mlme.c:2647:33: warning: variable ‘pht_addtinfo’ set but not used [-Wunused-but-set-variable]
 from drivers/staging/rtl8188eu/core/rtw_mlme.c:12:

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-11-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:23 +02:00
Amos Gross
bd36d5e2d5 Staging: rtl8723bs: rtw_xmit: fixed tabbing issue
Fixed warning from checkpatch for code block not being indented
correctly.

Signed-off-by: Amos Gross <email@amosgross.com>
Link: https://lore.kernel.org/r/YIAVfRxQ+XmKEf47@arch.localdomain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:43:22 +02:00
Fabio Aiuto
4ca91abbe4 staging: rtl8723bs: remove empty #ifdef block
remove #ifdef block left empty after DBG_871X_LEVEL
deletion.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c2600c9a71d4e222963cbc600b2e703fe2b1289f.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto
180b9f220a staging: rtl8723bs: remove unused DBG_871X_LEVEL macro declarations
remove unused DBG_871X_LEVEL macro declarations.

DBG_871X_LEVEL macro wraps a raw printk call which is not
recommended in a device driver context, prefer using
netdev_*() log functions.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ec371fd8a4e53b4730b45f0a1c9210106b2914f2.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto
98dc120895 staging: rtl8723bs: split too long line
fix the following post-commit hook checkpatch issue.

WARNING: line length of 103 exceeds 100 columns
30: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:711:
+
receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 0);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4e87fb741205b9f314aec739921405a7ebef908a.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto
5a94f5c842 staging: rtl8723bs: fix indentation in if block
fix following post-commit hook checkpatch issues:

WARNING: suspect code indent for conditional statements (32, 48)
323: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:708:
 				if (!ret) {
+
	netdev_dbg(padapter->pnetdev,

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7f548510ebe2427e85f3fe8b33ed937160c64e9f.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto
108b05a646 staging: rtl8723bs: fix code indent issue
fix following post-commit hook checkpatch issues:

ERROR: code indent should use tabs where possible
887: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1145:
+^I^I           "%s: ### ERROR #### driver in IPS
+		####ERROR###!!!\n",$

ERROR: code indent should use tabs where possible
888: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1146:
+^I^I           __func__);$

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2e0ba5214df41de7e46b8df4e62d2f38acea92ec.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto
79df841b43 staging: rtl8723bs: replace DBG_871X_LEVEL logs with netdev_*()
Replace DBG_871X_LEVEL logs with netdev_*() functions
where possible (i.e. where a pointer to netdev is easily
available).

This is not possible in correspondance of redundant
log in module initialization.

So remove those ones.

DBG_871X_LEVEL macro wraps a raw printk call which is not
recommended in a device driver context, prefer using
netdev_*() log functions.

The remove/replace operation has been done with the
following semantic patch script:

@@
expression list args;
identifier padapter;
identifier func;
symbol _drv_always_, _drv_info_, _drv_warning_;
symbol _drv_err_, _drv_emerg_;
@@

func(..., struct adapter *padapter, ...) {
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(padapter->pnetdev, args);
)
	...>
}

@rule@
identifier func, context, padapter;
@@

func(void *context)
{
	...
struct adapter *padapter = context;
	...
}

@@
expression list args;
identifier rule.padapter;
identifier rule.func, rule.context;
@@

func(void *context)
{
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(padapter->pnetdev, args);
)
	...>
}

@@
expression list args;
expression get_dev;
identifier func, dev;
@@

func(...)
{
	...
	struct net_device *dev = get_dev;
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(dev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(dev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(dev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(dev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(dev, args);
)
	...>
}

@@
expression list args;
identifier func, dev;
@@

func(struct net_device *dev)
{
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(dev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(dev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(dev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(dev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(dev, args);
)
	...>
}

@@
expression list args;
identifier func, dvobj;
@@

func(struct dvobj_priv *dvobj)
{
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(dvobj->if1->pnetdev, args);
)
	...>
}

@@
@@

-	DBG_871X_LEVEL(...);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4a02f9f5665fa4b78c0b321ce0cc62254255c9dd.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio M. De Francesco
71d3edc61e staging: rtl8723bs: Remove led_blink_hdl() and everything related
Removed useless led_blink_hdl() prototype and definition.
Removed struct LedBlink_param. Removed LedBlink entries in
rtw_cmd_callback[] and in wlancmds[]. Everything related to LedBlink is
not anymore needed. Index of slots changed in arrays comments to reflect
current positions.

Reported-by: Julia Lawall <julia.lawall@inria.fr>
Reported-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210415071731.25725-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-15 09:27:38 +02:00
Bryan Brattlof
027ffa10b8 staging: rtl8723bs: remove sdio_drv_priv structure
The sdio_drv_priv structure is a small wrapper around sdio_driver in
linux/mmc/sdio_func.h with an added drv_registered integer.

drv_registered is never used anywhere in the driver and only assigned to
during the sdio registering and unregistering process. We can safely
remove sdio_drv_priv and use the sdio_driver structure directly.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210414173751.317762-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-15 09:26:00 +02:00
Fabio Aiuto
467d984209 staging: rtl8723bs: remove unused argument in function
removed unused 'void *sel' argument in rtw_odm_dbg_comp_msg()
function, after DBG_871X_SEL_NL replacement.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1bd83b936584432fdb09406f26ed8a8b66cd4c8d.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 20:54:40 +02:00
Fabio Aiuto
ccbdd3fdf3 staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration
remove DBG_871X_SEL_NL obsolete macro declaration.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8839231b53881c8bf1f8a4d70953ec8acaa2fe95.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 20:54:40 +02:00
Fabio Aiuto
07d488b0c1 staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()
replace DGB_871X_SEL_NL macro with netdev_dbg().

DBG_871X_SEL_NL macro expands to a raw prink call or a
seq_printf if selected stream _is not_ a local
debug symbol set to null.
This second scenario never occurs so replace
all macro usages with netdev_dbg().

This is done with the following coccinelle script:

@@
expression sel;
expression list args;
identifier padapter;
identifier func;
@@

func(..., struct adapter *padapter, ...) {
	<...
-	DBG_871X_SEL_NL(sel, args);
+	netdev_dbg(padapter->pnetdev, args);
	...>
}

fix by hand one coccinelle output newline issue

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9d4597097d75a1900c65e4a15077eb0c8bce1c9b.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 20:54:40 +02:00
Fabio Aiuto
d5c09ff069 staging: rtl8723bs: fix indentation issue introduced by long line split
fix indentation of last line in if condition.

Fixes: af6afdb63f (staging: rtl8723bs: split long lines)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210414081739.2990-1-fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:41:33 +02:00
Fabio M. De Francesco
f013209cbf staging: rtl8723bs: hal: Remove four set but not used variables
Removed four variables that were set but not used.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210414061346.11423-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:28:14 +02:00
Fabio Aiuto
77e14dfe53 staging: rtl8723bs: remove two unused functions
remove dump_drv_version() and dump_log_level() function
definitions and prototypes. Those functions are unused,
and add unnecessary wrap level to log calls.

They wrap DBG_871X_SEL_NL which will be replaced by
netdev_dbg() with coccinelle script application.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2e8dd88c053735daed95701140b2f03b4cfe2a2e.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:26:26 +02:00
Fabio Aiuto
ee31d57e40 staging: rtl8723bs: remove unnecessary dump_drv_version() usage
remove unnecessary dump_drv_version() usage.

This prepares dump_drv_version() for removal, before
coccinelle script application.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9ce6559cac69eaebfdb07206921d14e99d2b1967.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:26:19 +02:00
Fabio Aiuto
69c3331aa0 staging: rtl8723bs: replace dump_drv_version() usage with netdev_dbg()
replace dump_drv_version() usage with netdev_dbg().

There's no need to further wrap a netdev_dbg() call
for such a low number of occurrences.

The string printed is the same contained in DBG_871X_SEL_NL macro
called inside dump_drv_version().

This is just preparation before bulk DBG_871X_SEL_NL macro
replacement by coccinelle, as the semantic patch that will be
used just replaces, doesn't remove.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a4df375dba6c004a22cf197ff8d498d0e4f3b52e.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:26:09 +02:00
Fabio M. De Francesco
3d7ac04029 staging: rtl8723bs: core: Remove unused but set variable
Removed "ledBlink_param" because it was set to the value of "pbuf" but was
never reused. This set was made by direct assignment (no helper had been
called), therefore it had no side effect to the location pointed by "pbuf".

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210413150517.12533-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:23:10 +02:00
Bryan Brattlof
59bc0e634b staging: rtl8723bs: remove unnecessary adapter
The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv
structure but never used anywhere in the driver. This will remove all
definitions of if2

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210412172147.43509-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:48 +02:00
Beatriz Martins de Carvalho
1ec0ee058d staging: rtl8723bs: hal: Correct indentation
Correct random indentation to improve readability. This problem
was observed when working on other checkpatch reports in the
file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/68e91c54a3be0b57607101fa8b284c00bb7dff1a.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:33 +02:00
Beatriz Martins de Carvalho
8b7d276ea8 staging: rtl8723bs: hal: Remove extra blank line
Remove multiple blank lines to conform Linux kernel coding style.
Reported by checkpatch in file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/7f48b48d92b54c1f5db29f0d23c8c1c666236c43.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:33 +02:00
Beatriz Martins de Carvalho
ac23a3cbcd staging: rtl8723bs: hal: remove space before tabs
Remove unnecessary space before tabs to conform with Linux kernel
coding style.
Reported by checkpatch in file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/9694aafb614bdcbb15fdea614502c1b31a534871.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:33 +02:00
Fabio Aiuto
5a04ad1d1d staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c
fix following W=1 compiler issue:

drivers/staging/rtl8723bs/hal/sdio_halinit.c:
	In function '_ReadAdapterInfo8723BS':
drivers/staging/rtl8723bs/hal/sdio_halinit.c:1156:16:
warning: variable 'start' set but not used [-Wunused-but-set-variable]
1156 |  unsigned long start;
     |                ^~~~~

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ce1faa15052b519738656e11658dee93f9e91c29.1618145345.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:39:20 +02:00
Bryan Brattlof
a2e2a05d5d staging: rtl8723bs: remove unnecessary goto jumps
The next instruction for both 'goto exit' jump statements is to
execute the exit jump instructions regardless. We can safely
remove all jump statements from __init rtw_drv_entry()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210411133625.38195-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:38:00 +02:00
Fabio M. De Francesco
16ae2044e9 staging: rtl8723bs: Change controlling expressions
Change controlling expressions within 'if' statements: don't compare
with 'true'.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-5-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:37:15 +02:00
Fabio M. De Francesco
13c57439fe staging: rtl8723bs: include: Change the type of a variable
Change the type of fw_current_in_ps_mode from u8 to bool, because
it is used everywhere as a bool and, accordingly, it should be
declared as a bool.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-4-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:37:15 +02:00
Fabio M. De Francesco
97f136ec59 staging: rtl8723bs: include: Fix misspelled words in comments
Correct misspelled words in comments of several files. Issue (largely)
detected by checkpatch.pl.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:37:15 +02:00
Fabio M. De Francesco
90b69822a5 staging: rtl8723bs: Remove camelcase in several files
Remove camelcase in bFwCurrentInPSMode, a variable used by code
of several subdirectories/files of the driver. Issue detected by
checkpatch.pl. Delete the unnecessary "b" (that stands for "byte") from
the beginning of the name.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:37:15 +02:00
Fabio Aiuto
1b9e18de8d staging: rtl8723bs: remove more empty if blocks after DBG_8192C deletion
remove more empty if-blocks after DBG_8192C deletion.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/99b111d2bac822b9dc7ff6e1cfd3d3efc62ef836.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
d6b08255f8 staging: rtl8723bs: remove more unnecessary parentheses
remove more unnecessary parentheses after
DBG_8192C deletion.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c730d2719cb2ed385dd55811d6e205c6c31f2355.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
1e95e1e49a staging: rtl8723bs: fix comparison to true issue
fix following post-commit hook checkpatch issue:

CHECK: Using comparison to true is error prone
136: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:
2497:
+			if (psta->dot8021xalg != 1 ||
	psta->bpairwise_key_installed == true) {

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/680d86950d760003a694f8880c0a912a9d815a5e.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
05c19e212a staging: rtl8723bs: remove empty else block in os_dep/ioctl_cfg80211.c
remove empty else-block

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1bee993834410c2c11a6799e1868589efc1334f6.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
279fa77760 staging: rtl8723bs: remove unnecessary parentheses in os_dep/ioctl_cfg80211.c
fix following post-commit hook checkpatch issue:

WARNING: braces {} are not necessary for single statement blocks
94: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1225:
+		if (pwdev_priv->scan_request->wiphy == pwdev_priv->rtw_wdev->wiphy)
 		{
 			cfg80211_scan_done(pwdev_priv->scan_request, &info);
 		}

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fabc590b9f74f687cc0f7ea978577f0357df2974.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
5bb62a191b staging: rtl8723bs: put constant on the right side of a test in os_dep/ioctl_cfg80211.c
fix following post-commit hook checkpatch issue:

CHECK: Comparison to NULL could be written "psta"
72: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854:
+			if (psta != NULL) {

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5ac547f3a4bd228f372da7057bbfb3cac1535857.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
da742b02a1 staging: rtl8723bs: remove empty if and else blocks
remove if and else blocks after DBG_8192C removal

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2d2e09d5033bda1ceb77576e582ecf1dcfccf428.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
d290bb31a7 staging: rtl8723bs: put constant on the right side of the test
fix following post-commit hook checpatch issues:

WARNING: Comparisons should place the constant on the right side of the test
287: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:738:
+	if (_SUCCESS != ret)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e19cff736413714dea4265c17b512882d051a311.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
4ca39cd745 staging: rtl8723bs: split long line
fix following post-commit hook checkpatch issue:

WARNING: line length of 103 exceeds 100 columns
168: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1086:
+			if (efuse_OneByteRead(padapter, efuse_addr, &efuse_data, bPseudoTest) == false)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/28c078c685059c9b883b563f2c08cfb1d49cb82c.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
9d5ed87234 staging: rtl8723bs: put spaces around operators
fix following post-commit hook checkpatch issues:

CHECK: spaces preferred around that '+' (ctx:VxV)
87: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:746:
+	if ((_offset+_size_byte) > EFUSE_MAX_MAP_LEN)
--
CHECK: spaces preferred around that '+' (ctx:VxV)
105: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:847:
+	if ((_offset+_size_byte) > EFUSE_BT_MAP_LEN)
--
CHECK: spaces preferred around that '-' (ctx:VxV)
133: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:906:
+		if ((eFuse_Addr-1) < total)
--
CHECK: spaces preferred around that '|' (ctx:VxV)
392: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2485:
+	if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != true)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/65b7cf4b1ae3cea25a316f3c9f56c697ee7be8af.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
71839eac6b staging: rtl8723bs: fix comparison to null
fix following post-commit hook checkpatch issues:

CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_req_ie"
348: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1319:
+			if (pmlmepriv->wps_probe_req_ie == NULL)

CHECK: Comparison to NULL could be written "!dvobj"
459: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:184:
+	if (dvobj == NULL)

CHECK: Comparison to NULL could be written "!padapter"
470: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:231:
+	if (padapter == NULL)

CHECK: Comparison to NULL could be written "!padapter"
481: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:240:
+	if (padapter == NULL)

CHECK: Comparison to NULL could be written "!padapter"
492: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:256:
+	if (padapter == NULL)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2c7557a465aeda7fb6989df30c6250f9ec56ebe1.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:03 +02:00
Fabio Aiuto
04c35396c5 staging: rtl8723bs: remove unnecessary bracks
remove unnecessary bracks in if-else blocks

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/812e5e0dcb78e49568276237b68dc6f9632c198d.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
8f32a6c89c staging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol definition
remove commented out DEBUG_CFG80211 symbol definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b884ecb5c83c222f0b48839f89e53c45f4489e06.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
5ffbfcf38b staging: rtl8723bs: remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition
remove empty ifdef blocks conditioned to DEBUG_CFG80211
definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7c4485a9d02e8c553c1d81f8b98c8479f481e54c.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
8a095d44d8 staging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol definition
remove commented out SDIO_DEBUG_IO symbol definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7a45b1419bcf4eb2abc25d661acae77018432e46.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
add69c59eb staging: rtl8723bs: remove code block guarded by undefined SDIO_DEBUG_IO
remove code block guarded by SDIO_DEBUG_IO symbol.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ee77c4b4e6fbba8e0182e9558f793c88cf398cb5.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
96efb46098 staging: rtl8723bs: remove empty code block guarded by DBG_CCX
remove code block guarded by DBG_CCX symbol, left empty
after DBG_8192C removal.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b9ff4d7f14decf33064c30b307c3b20494aecbb2.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
0268c26750 staging: rtl8723bs: remove code blocks guarded by DEBUG symbol
remove code blocks guarded by DEBUG symbol
remove undefinition of DEBUG

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/381da3f0c1ddf825b2aa7cbfd074ee2bf42aac4f.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
aaf2a07724 staging: rtl8723bs: remove commented out DEBUG_RTL871X definition
remove commented out DEBUG_RTL871X definition

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9d04ab2b645e242e35d31abbb1a301e2ad8c4401.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
0a62cc7a5a staging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871X
remove unused code blocks guarded by never set DEBUG_RTL871X

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c7b590b7ae7fad08cd913462ab385db9230ede4d.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
fa50dda745 staging: rtl8723bs: put spaces around operators
fix following post-commit hook checkpatch issue:

CHECK: spaces preferred around that '+' (ctx:VxV)
89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431:
+	rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, ;
 	                   ^
len-_FIXED_IE_LENGTH_, NULL, &wps_ielen)

CHECK: spaces preferred around that '-' (ctx:VxV)
89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431:
+	rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_,
	                                          ^
NULL, &wps_ielen);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/35c6c5efa2661c6fd9d40c3a681eb8470c5015e6.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
edf3967a8d staging: rtl8723bs: remove all if-blocks left empty by DBG_8192C-remove coccinelle script
remove all empty if blocks left empty by coccinelle
script for DBG_8192C macro removal.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1676083964fe176e996c2c05dfdcb723b49febb6.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
7519f4f896 staging: rtl8723bs: remove DBG_8192C macro definitions
remove all DBG_8192C macro definitions.

Macro DBG_8192C belongs to a family of verbose
private tracing macros.

The default behaviour is _do nothing_, to activate
it one should define DEBUG symbol by hand.

So just remove it

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e7259eeb5927d48a2920548b92dc507befa5e6af.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:02 +02:00
Fabio Aiuto
334ef6ab8f staging: rtl8723bs: remove all commented out DBG_8192C logs
remove all commented out DBG_8192C logs.

Macro DBG_8192C belongs to a family of verbose
private tracing macros.

The default behaviour is _do nothing_, to activate
it one should define DEBUG symbol by hand.

So just remove it

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/d954fbde0ae689cd053a57f57f954f14b5d013cb.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:01 +02:00
Fabio Aiuto
dcc48e0837 staging: rtl8723bs: remove all DBG_8192C logs
remove all DBG_8192C logs.

Macro DBG_8192C belongs to a family of verbose
private tracing macros.

The default behaviour is _do nothing_, to activate
it one should define DEBUG symbol by hand.

So just remove it with the following semantic patch:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(
-	DBG_8192C(a);
|
-	DBG_8192C(a, b);
|
-	DBG_8192C(a, B);
|
-	DBG_8192C(a, b, c);
|
-	DBG_8192C(a, B, c);
|
-	DBG_8192C(a, b, C);
|
-	DBG_8192C(a, B, C);
|
-	DBG_8192C(a, b, c, d);
|
-	DBG_8192C(a, B, c, d);
|
-	DBG_8192C(a, b, C, d);
|
-	DBG_8192C(a, b, c, D);
|
-	DBG_8192C(a, B, C, d);
|
-	DBG_8192C(a, B, c, D);
|
-	DBG_8192C(a, b, C, D);
|
-	DBG_8192C(a, B, C, D);
|
-	DBG_8192C(a, b, c, d, e);
|
-	DBG_8192C(a, B, c, d, e);
|
-	DBG_8192C(a, b, C, d, e);
|
-	DBG_8192C(a, b, c, D, e);
|
-	DBG_8192C(a, b, c, d, E);
|
-	DBG_8192C(a, B, C, d, e);
|
-	DBG_8192C(a, B, c, D, e);
|
-	DBG_8192C(a, B, c, d, E);
|
-	DBG_8192C(a, b, C, D, e);
|
-	DBG_8192C(a, b, C, d, E);
|
-	DBG_8192C(a, b, c, D, E);
|
-	DBG_8192C(a, B, C, D, e);
|
-	DBG_8192C(a, B, C, d, E);
|
-	DBG_8192C(a, B, c, D, E);
|
-	DBG_8192C(a, b, C, D, E);
|
-	DBG_8192C(a, B, C, D, E);
|
-	DBG_8192C(a, b, c, d, e, f);
|
-	DBG_8192C(a, b, c, d, e, f, g);
|
-	DBG_8192C(a, b, c, d, e, f, g, h);
|
-	DBG_8192C(a, b, c, d, e, f, g, h, i);
|
-	DBG_8192C(a, b, c, d, e, f, g, h, i, j);
|
-	DBG_8192C(a, b, c, d, e, f, g, h, i, j, k);
)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9b338b3781e40c04104f26832add075e7f72d890.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:45:01 +02:00
Fabio M. De Francesco
4e63e9b774 staging: rtl8723bs: core: Remove an unused variable
Delete local variable "u8 sec_idx" because is declared and set, but never
used.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210410150008.5460-4-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11 08:41:20 +02:00
Bryan Brattlof
98a847ae5d staging: rtl8723bs: remove redundant initialization
The variable ret is being initialized as 0 and is never used until
it's updated by sdio_register_driver()

This removes the redundant initialization of ret

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210409201235.407671-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10 10:28:24 +02:00
Fabio Aiuto
d55c46f360 staging: rtl8723bs: remove MSG_8192C macro definitions
remove obsolete MSG_8192C macro definitions.

MSG_8192C is a private trace mechanism macro and is deactivated.
(i.e. the default behaviour is _do nothing_)
The only way to activate it is to manually define a debug
symbol.

So just remove it.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/97f38f269e8dabb3dd7464d49022a62cd9773657.1617971593.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:51 +02:00
Fabio Aiuto
e727b58207 staging: rtl8723bs: remove commented out MSG_8192C log
remove commented out MSG_8192C log.

MSG_8192C is a private trace mechanism macro and is deactivated.
(i.e. the default behaviour is _do nothing_)
The only way to activate it is to manually define a debug
symbol.

So just remove it.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/845969563d7c90d1b7aa3215ae29dd91afc5100c.1617971592.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:50 +02:00
Fabio Aiuto
c841b8e274 staging: rtl8723bs: remove all MSG_8192C logs
remove all MSG_8192C logs.

MSG_8192C is a private trace mechanism macro and is deactivated.
(i.e. the default behaviour is _do nothing_)
The only way to activate it is to manually define a debug
symbol.

So just remove it.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fa7f52aa90928dc86b3249ca9c5b27f92c2b071b.1617971592.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:50 +02:00
Fabio Aiuto
345c4e9a7e staging: rtl8723bs: remove decl of unused static const variable in os_dep/ioctl_linux.c
fix following kernel test robot warning:

   At top level:
   drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27:
warning: 'iw_operation_mode' defined but not used
		[-Wunused-const-variable=]
      36 | static const char * const iw_operation_mode[] = {
         |                           ^~~~~~~~~~~~~~~~~

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/05cc97a114269ee55ac9a91c61493c885fcc0193.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:07 +02:00
Fabio Aiuto
1fdc17a793 staging: rtl8723bs: remove unused variable in os_dep/ioctl_linux.c
fix following kernel test robot warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function ‘rtw_wx_set_mlme’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6:
warning: variable ‘reason’ set but
	not used [-Wunused-but-set-variable]
  u16 reason;
      ^~~~~~

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/6211c4177a9ef1e677987c9ebac445df08605f40.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:07 +02:00
Fabio Aiuto
fc122027a5 staging: rtl8723bs: remove unused variable declaration in include/rtw_security.h
fix following kernel test robot warning:

   At top level:
   drivers/staging/rtl8723bs/include/rtw_security.h:336:28:
warning: 'K' defined but not used [-Wunused-const-variable=]
     336 | static const unsigned long K[64] = {
         |                            ^

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/819680ab87bbe543aba966f1fe47b209d3d8a69f.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:07 +02:00
Fabio Aiuto
dc06fdd79f staging: rtl8723bs: remove unused pmlmepriv variable in rtw_dbg_port() in os_dep/ioctl_linux.c
remove unused variable. Fix W=1 compiler warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function ‘rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2444:20:
warning: unused variable ‘pmlmepriv’ [-Wunused-variable]
  struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e8a31937b0075162104347e1c8ecc5e6d079f6d2.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:07 +02:00
Fabio Aiuto
9af90936f0 staging: rtl8723bs: remove unused cur_network variable in rtw_dbg_port() in os_dep/ioctl_linux.c
remove unused variable. Fix W=1 compiler warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function ‘rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2447:23:
warning: unused variable ‘cur_network’ [-Wunused-variable]
  struct wlan_network *cur_network = &(pmlmepriv->cur_network);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/6aed13408f912b6c36a19a5e91e17b1126fc6247.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:07 +02:00
Fabio Aiuto
96f85950ca staging: rtl8723bs: remove unused variable pstapriv in rtw_dbg_port() in os_dep/ioctl_linux.c
remove unused variable. W=1 compiler issue:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function ‘rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2448:19:
warning: unused variable ‘pstapriv’ [-Wunused-variable]
  struct sta_priv *pstapriv = &padapter->stapriv;

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/d433ffa5b52d6510811c882a80c1146c7d7be536.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:06 +02:00
Fabio Aiuto
8db11e79ac staging: rtl8723bs: remove set but unused psta variable in rtw_dbg_port() in os_dep/ioctl_linux.c
remove set but unused variable. Fix W=1 compiler warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function ‘rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2443:19:
warning: variable ‘psta’ set but not used [-Wunused-but-set-variable]
  struct sta_info *psta;
                   ^~~~

Remove also the function call that sets this variable.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/62b6c48b887decdde4b5343472089665518d205b.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:06 +02:00
Fabio Aiuto
4f4cbe7e85 staging: rtl8723bs: remove unused variables and code block left unused in os_dep/ioctl_linux.c
fix following kernel test robot warnings:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function ‘rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33:
warning: variable ‘preorder_ctrl’ set but
	not used [-Wunused-but-set-variable]
       struct recv_reorder_ctrl *preorder_ctrl;
                                 ^~~~~~~~~~~~~

remove also unnecessary conditional code block.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0e950e74565b573a98b851092cc2078045d5ac3d.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:06 +02:00
Fabio Aiuto
2f0b03160d staging: rtl8723bs: remove unused code block in os_dep/ioctl_linux.c
remove unused code block which does nothing.

A list is parsed but no value is written outside
the scope of the function rtw_dbg_port.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b1d8f99f949fd79b27295e8a508d1b0c5861622f.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:06 +02:00
Fabio Aiuto
ffdbed83c4 staging: rtl8723bs: remove unused variable and empty for cycles left unused in os_dep/ioctl_linux.c
fix following kernel test robot warnings:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33:
warning: variable ‘preorder_ctrl’ set but
	not used [-Wunused-but-set-variable]
       struct recv_reorder_ctrl *preorder_ctrl;
                                 ^~~~~~~~~~~~~
remove also empty for cycle left unused and counter variable.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fb1e8ea3cfeda1af27ab1a9393140e144b5cb4b5.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:06 +02:00
Fabio Aiuto
2fd8a02012 staging: rtl8723bs: remove unused variable in core/rtw_cmd.c
fix following kernel test robot warning:

   drivers/staging/rtl8723bs/core/rtw_cmd.c:
	In function 'rtw_cmd_thread':
>> drivers/staging/rtl8723bs/core/rtw_cmd.c:390:16:
warning: variable 'cmd_start_time' set
	but not used [-Wunused-but-set-variable]
     390 |  unsigned long cmd_start_time;
         |                ^~~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/509eeb1c4a7fcfc37b69cb8578ea146b95b50864.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:19:06 +02:00
Pu Lehui
b3dffce0e0 staging: rtl8723bs: remove unused variable pwrctl
GCC reports the following warning with W=1:

drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:532:23: warning:
 variable 'pwrctl' set but not used [-Wunused-but-set-variable]
   532 |  struct pwrctrl_priv *pwrctl;
       |                       ^~~~~~

This variable is not used so remove it to fix the warning.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20210409045728.125852-1-pulehui@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:15:11 +02:00
Muhammad Usama Anjum
8ff753bc16 staging: rtl8723bs: Remove unnecessary code
The same code is executed when the condition "!show_errors" is true or
false. Remove the if condition from here. The original intension of this
condition was to not to report any error logs if condition was true. But
this driver doesn't has those logs added. So this if condition can be
removed.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Addresses-Coverity: ("Same code execution")
Link: https://lore.kernel.org/r/20210408204457.GA3079308@LEGION
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:15:00 +02:00
Tian Tao
7569c1bc3f staging: rtl8723bs: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
Link: https://lore.kernel.org/r/1617869845-43046-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:14:13 +02:00
Bryan Brattlof
4e35b91390 staging: rtl8723bs: remove extra indent
There is an extra tab in the conditional statement. This removes it.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210407201842.80074-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:27:59 +02:00
Fabio M. De Francesco
5f0bf36ed6 staging: rtl8723bs: hal: Remove camelcase in sdio_ops.c
Remove camelcase. Issue detected by checkpatch.pl. For now, change only
names of static functions in order to not break the driver's code.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210408070553.30363-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:27:58 +02:00
Fabio Aiuto
a45759d2a4 staging: rtl8723bs: remove unnecessary parentheses
fix following post-commit checkpatch issue:

CHECK: Unnecessary parentheses around
'padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X'
84: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335:
+	if ((padapter->securitypriv.dot11AuthAlgrthm
			== dot11AuthAlgrthm_8021X) &&
+	    !(padapter->securitypriv.binstallGrpkey))

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a45ec5059ea315db6509989f320340c1816068c5.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:04 +02:00
Fabio Aiuto
af6afdb63f staging: rtl8723bs: split long lines
fix following post-commit checkpatch hooks:

WARNING: line length of 110 exceeds 100 columns
266: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:623:
+			pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
--
WARNING: line length of 102 exceeds 100 columns
468: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5234:
+				if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == link_count_limit)
--
WARNING: line length of 124 exceeds 100 columns
543: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335:
+	if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && !(padapter->securitypriv.binstallGrpkey))
--
WARNING: line length of 112 exceeds 100 columns
828: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1061:
+		if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_TX_STBC(pIE->data))
--
WARNING: line length of 113 exceeds 100 columns
836: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1067:
+		if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_LDPC_CAP(pIE->data))
--
WARNING: line length of 112 exceeds 100 columns
844: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1073:
+		if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_RX_STBC(pIE->data))
--
WARNING: line length of 125 exceeds 100 columns
883: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1282:
+		rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_);
--
WARNING: line length of 101 exceeds 100 columns
904: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1305:
+		if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) /* not hidden ssid */
--
WARNING: line length of 129 exceeds 100 columns
953: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1345:
+		if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher)
--
WARNING: line length of 113 exceeds 100 columns
1712: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2651:

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/814139162ef516bb07bb50876578b032573271ac.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:04 +02:00
Fabio Aiuto
e338f5f0a0 staging: rtl8723bs: fix comparison in if condition
fix following post-commit checkpatch issue:

WARNING: Comparisons should place the constant on the right side of the test
1833: FILE: drivers/staging/rtl8723bs/os_dep/mlme_linux.c:151:
+		if (NULL == buff)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b32610045cad3c385b236266d7a10665ed202150.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:04 +02:00
Fabio Aiuto
dd782523e8 staging: rtl8723bs: remove unnecessary parentheses
fix following post-commit checkpatch issue:

CHECK: Unnecessary parentheses around 'prxattrib->bdecrypted'
125: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:365:
+				if ((prxattrib->bdecrypted) && (brpt_micerror))

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1453eec49833fc940e134fc14bc65d218ace0663.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:04 +02:00
Fabio Aiuto
e427bdd8e1 staging: rtl8723bs: rewrite comparison to null
fi following post-commit checkpatch issues:

CHECK: Comparison to NULL could be written "!p"
290: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:978:
+			if (p == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
328: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2016:
+	if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
361: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2378:
+	if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
391: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3478:
+	if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!p"
427: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4071:
+	if (p == NULL)
--
CHECK: Comparison to NULL could be written "!BIP_AAD"
781: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1690:
+	if (BIP_AAD == NULL)
--
CHECK: Comparison to NULL could be written "!pwep"
1773: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3062:
+			if (pwep == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_beacon_ie"
1784: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3510:
+		if (pmlmepriv->wps_beacon_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_resp_ie"
1795: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3544:
+		if (pmlmepriv->wps_probe_resp_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_assoc_resp_ie"
1807: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3574:
+		if (pmlmepriv->wps_assoc_resp_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pbuf"
1818: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3928:
+	if (pbuf == NULL)
--
CHECK: Comparison to NULL could be written "!if1"
1944: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:392:
+	if (if1 == NULL)

CHECK: Using comparison to false is error prone
402: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3890:
+	if (false == bxmitok)
--
CHECK: Using comparison to true is error prone
671: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:365:
+				if ((prxattrib->bdecrypted == true) && (brpt_micerror == true))
--
CHECK: Using comparison to true is error prone
1051: FILE: drivers/staging/rtl8723bs/core/rtw_xmit.c:1174:
+	if (padapter->securitypriv.binstallBIPkey != true)
--
CHECK: Using comparison to false is error prone
1632: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2194:
+	if (false == bMatched)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/572f96dcb6217fd3e6ea23c37b55b0ebb3231f14.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
e6e7ad69d3 staging: rtl8723bs: add spaces around operators
fix the following post-commit checkpatch issues:

CHECK: spaces preferred around that '|' (ctx:VxV)
187: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1659:
+			if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
--
CHECK: spaces preferred around that '|' (ctx:VxV)
373: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3023:
+					== (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK))
--
CHECK: spaces preferred around that '-' (ctx:VxV)
456: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4098:
+		if (len > (NDIS_802_11_LENGTH_RATES_EX-i))
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '+' (ctx:VxV)
770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590:
+		if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
--
CHECK: spaces preferred around that '-' (ctx:VxV)
1001: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1849:
+	if (i > (NUM_STA-1))
--
CHECK: spaces preferred around that '&' (ctx:VxV)
1647: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:211:
+		if (mcs_rate&0x8000) /* MCS15 */

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/28885311d4351d4df4508a50765a9b92a2b8da77.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
6206fdb4f3 staging: rtl8723bs: remove unnecessary parentheses in if condition
fix following post-commit hook checkpatch issue:

CHECK: Unnecessary parentheses around pcmdpriv->cmd_queue.queue
85: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:422:
+		if (list_empty(&(pcmdpriv->cmd_queue.queue)))

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/3f5cf6b7b9aa5a0fa09b71278fdc361e9f113c41.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
709c8e49b5 staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites
remove unnecessary bracks on DBG_871X removal sites

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/35f5edf0f39b717b3de3ad7861cbaa5f4ba60576.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
b4f27a06f6 staging: rtl8723bs: remove empty #ifdef blocks after DBG_871X removal
remove #ifdef and blocks #if defined() blocks left empty
after DBG_871X removal.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4e19eb1c71bc1d43d30c1b0a04851ab7ce528f36.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
ae31f4ed7e staging: rtl8723bs: remove empty tracing function dump_rx_packet
remove tracing function dump_rx_packet after DBG_871X removal.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/281afbaecdb9614c91e648b3a6fc2738a176e57a.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
3f85c670a2 staging: rtl8723bs: remove empty for cycles left by DBG_871X removal
remove empty for cycles and unused counter variables to suppress
compiler warnings.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fe758f88ef6d6eaad9762d16d78dcfa876fcf654.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
3dc682aed3 staging: rtl8723bs: put constant on the right side in if condition
fix the following post-commit hook checkpatch warning:

WARNING: Comparisons should place the constant on the right side of the test
683: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2204:
+	if (_SUCCESS != rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1))

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/41c98d13d5c74b1329ae125f097b780745cf8246.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
394ceaa2b3 drivers: rtl8723bs: rewrite comparison to null
fix following post-commit hook checkpatch warnings:

CHECK: Comparison to NULL could be written "!psta"
97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115:
+		if (psta == NULL)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0c6d53c851d1b07eb0183108e0bad7b4f273f04b.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
21e161c3ce staging: rtl8723bs: remove all if-else empty blocks left by DBG_871X removal
remove all if-else empty {} blocks left by spatch application.

removed unused variables and an unused static function definition
after if-else blocks removal, to suppress compiler warnings.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/56055b20bc064d7ac1e8f14bd1ed42aba6b02c36.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
5789f77492 staging: rtl8723bs: remove DBG_871X macro definitions
remove DBG_781X macro definitions.

Remove all of the DBG_871X logs as they
currently do nothing as they require the code to be modified by
hand in order to be turned on. This obviously has not happened
since the code was merged, so just remove them as they are unused.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/53632cddb1da639c84fa52c2818904b0e1298a6e.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
68e79909e1 staging: rtl8723bs: remove commented out DBG_871X logs
remove all commented out DBG_871X logs unmatched by
semantic patch.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/125e216e3bb5bc938e06b15dadfbbf51d9517dde.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:03 +02:00
Fabio Aiuto
4646da162d staging: rtl8723bs: remove DBG_871CX log unmatched by cocci
Remove a DBG_871X log untouched by cocci, maybe due
to the presence of a trailing \, for it is inside a
macro definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/740bf0eeef550de36e772bdf7d051499627773e5.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:02 +02:00
Fabio Aiuto
968b15adb0 staging: rtl8723bs: remove all DBG_871X logs
Remove all of the DBG_871X logs as they
currently do nothing as they require the code to be modified by
hand in order to be turned on. This obviously has not happened
since the code was merged, so just remove them as they are unused.

applied the following semantic patch script:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(
-	DBG_871X(a);
|
-	DBG_871X(a, b);
|
-	DBG_871X(a, B);
|
-	DBG_871X(a, b, c);
|
-	DBG_871X(a, B, c);
|
-	DBG_871X(a, b, C);
|
-	DBG_871X(a, B, C);
|
-	DBG_871X(a, b, c, d);
|
-	DBG_871X(a, B, c, d);
|
-	DBG_871X(a, b, C, d);
|
-	DBG_871X(a, b, c, D);
|
-	DBG_871X(a, B, C, d);
|
-	DBG_871X(a, B, c, D);
|
-	DBG_871X(a, b, C, D);
|
-	DBG_871X(a, B, C, D);
|
-	DBG_871X(a, b, c, d, e);
|
-	DBG_871X(a, B, c, d, e);
|
-	DBG_871X(a, b, C, d, e);
|
-	DBG_871X(a, b, c, D, e);
|
-	DBG_871X(a, b, c, d, E);
|
-	DBG_871X(a, B, C, d, e);
|
-	DBG_871X(a, B, c, D, e);
|
-	DBG_871X(a, B, c, d, E);
|
-	DBG_871X(a, b, C, D, e);
|
-	DBG_871X(a, b, C, d, E);
|
-	DBG_871X(a, b, c, D, E);
|
-	DBG_871X(a, B, C, D, e);
|
-	DBG_871X(a, B, C, d, E);
|
-	DBG_871X(a, B, c, D, E);
|
-	DBG_871X(a, b, C, D, E);
|
-	DBG_871X(a, B, C, D, E);
|
-	DBG_871X(a, b, c, d, e, f);
|
-	DBG_871X(a, b, c, d, e, f, g);
|
-	DBG_871X(a, b, c, d, e, f, g, h);
|
-	DBG_871X(a, b, c, d, e, f, g, h, i);
|
-	DBG_871X(a, b, c, d, e, f, g, h, i, j);
|
-	DBG_871X(a, b, c, d, e, f, g, h, i, j, k);
)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/89a39f551107ba73b44dd2422765cf8ce371501a.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:02 +02:00
Fabio Aiuto
42c3243ff2 staging: rtl8723bs: remove DBG_871X log argument
This patch prepares the application of the semantic
patch aimed to remove all DBG_871X logs.

One occurrence of the DBG_871X macro has one
repeated argument, that's not even comma separated
value with the previous one nor a format string
parameter associated.

In normal conditions this worked, for the macro
is usually not expanded (the do nothing behaviour),
but if I try to apply the sempantic patch to remove
all macro occurrences, all macros call after that
abnormal declaration are left untouched (not removed).

Remove all of the DBG_871X logs as they currently
do nothing as they require the code to be modified by
hand in order to be turned on. This obviously has not happened
since the code was merged, so just remove them as they are unused.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/3473925ae9ee5a3bcd0ab86613dbce80b6d3f33f.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:13:02 +02:00
Fabio M. De Francesco
bfe1e63490 staging: rtl8723bs: hal: Remove camelcase
Remove camelcase. Issue detected by checkpatch.pl. The symbols aren't
used in other files, so this change doesn't break the driver's code.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210407100410.8058-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 17:09:16 +02:00
Zhansaya Bagdauletkyzy
bc21df678b staging: rtl8723bs: core: Move constants to the right of comparison
Move constant variables to the right side of comparisons to increase
consistency with Linux kernel code base.
Reported by checkpatch.

Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Link: https://lore.kernel.org/r/20210406161131.GA103324@zhans
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:19:07 +02:00
Fabio M. De Francesco
cd2c304266 staging: rtl8723bs: hal: Add spaces around operator in HalBtc8723b1Ant.h
Added spaces around operators in file HalBtc8723b1Ant.h. Issue detected
by checkpatch.pl. Spaces are preferred to improve readibility.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210406164001.13646-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:18:28 +02:00