lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260128004009.51095-3-ethantidmore06@gmail.com>
Date: Tue, 27 Jan 2026 18:40:06 -0600
From: Ethan Tidmore <ethantidmore06@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Michael Straube <straube.linux@...il.com>,
	Dan Carpenter <dan.carpenter@...aro.org>,
	linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Ethan Tidmore <ethantidmore06@...il.com>
Subject: [PATCH v2 2/4] staging: rtl8723bs: remove dead RX FIFO  overflow logic

The function rtw_hal_check_rxfifo_full() populates debug variables in
struct debug_priv that are never read. These variables (dbg_rx_fifo_*)
are write-only and the function itself is a skeletal implementation.

Additionally, remove a redundant hw_init_completed check in the caller
rtl8723b_HalDmWatchDog(), as it is already covered by a guard clause.

Removing this dead code saves unnecessary I/O cycles and cleans up
the driver's internal debug structures.

Signed-off-by: Ethan Tidmore <ethantidmore06@...il.com>
---
 drivers/staging/rtl8723bs/hal/hal_com.c     | 19 -------------------
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c |  7 -------
 drivers/staging/rtl8723bs/include/hal_com.h |  1 -
 3 files changed, 27 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 70b5b289f9cb..fae251c332d3 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -780,25 +780,6 @@ bool GetU1ByteIntegerFromStringInDecimal(char *Str, u8 *pInt)
 	return true;
 }
 
-void rtw_hal_check_rxfifo_full(struct adapter *adapter)
-{
-	struct dvobj_priv *psdpriv = adapter->dvobj;
-	struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
-	int save_cnt = false;
-
-	/* switch counter to RX fifo */
-	rtw_write8(adapter, REG_RXERR_RPT+3, rtw_read8(adapter, REG_RXERR_RPT+3)|0xf0);
-	save_cnt = true;
-	/* todo: other chips */
-
-	if (save_cnt) {
-		/* rtw_write8(adapter, REG_RXERR_RPT+3, rtw_read8(adapter, REG_RXERR_RPT+3)|0xa0); */
-		pdbgpriv->dbg_rx_fifo_last_overflow = pdbgpriv->dbg_rx_fifo_curr_overflow;
-		pdbgpriv->dbg_rx_fifo_curr_overflow = rtw_read16(adapter, REG_RXERR_RPT);
-		pdbgpriv->dbg_rx_fifo_diff_overflow = pdbgpriv->dbg_rx_fifo_curr_overflow-pdbgpriv->dbg_rx_fifo_last_overflow;
-	}
-}
-
 static u32 Array_kfreemap[] = {
 	0xf8, 0xe,
 	0xf6, 0xc,
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
index 928226679ab4..3e1ec33fe829 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
@@ -137,13 +137,6 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
 	fw_current_in_ps_mode = adapter_to_pwrctl(Adapter)->fw_current_in_ps_mode;
 	rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
 
-	if (
-		(hw_init_completed == true) &&
-		((!fw_current_in_ps_mode) && bFwPSAwake)
-	) {
-		rtw_hal_check_rxfifo_full(Adapter);
-	}
-
 	/* ODM */
 	if (hw_init_completed == true) {
 		u8 bLinked = false;
diff --git a/drivers/staging/rtl8723bs/include/hal_com.h b/drivers/staging/rtl8723bs/include/hal_com.h
index 74d6c892c401..24e7fd8ee4dc 100644
--- a/drivers/staging/rtl8723bs/include/hal_com.h
+++ b/drivers/staging/rtl8723bs/include/hal_com.h
@@ -136,7 +136,6 @@ void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *pst
 
 void SetHwReg(struct adapter *padapter, u8 variable, u8 *val);
 void GetHwReg(struct adapter *padapter, u8 variable, u8 *val);
-void rtw_hal_check_rxfifo_full(struct adapter *adapter);
 
 u8 GetHalDefVar(struct adapter *adapter, enum hal_def_variable variable,
 		void *value);
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ