From: Khushal Chitturi <khushalchitturi@gmail.com>
To: gregkh@linuxfoundation.org
Cc: dan.carpenter@linaro.org, straube.linux@gmail.com,
hansg@kernel.org, ethantidmore06@gmail.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Khushal Chitturi <khushalchitturi@gmail.com>
Subject: [PATCH v7 5/7] staging: rtl8723bs: use bool for traffic_status_watchdog()
Date: Thu, 12 Feb 2026 19:51:29 +0530 [thread overview]
Message-ID: <20260212142131.28131-6-khushalchitturi@gmail.com> (raw)
In-Reply-To: <20260212142131.28131-1-khushalchitturi@gmail.com>
This patch changes the return type of traffic_status_watchdog(),
its parameter, and its local variables from u8 to bool as they
represent boolean state.
Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>
---
Changelog:
v6 -> v7: Convert from_timer parameter to bool.
v5 -> v6: Add new patch to convert traffic_status_watchdog variables
from u8 to bool
drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 +++++-----
drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++--
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 5cc11e6c7af6..c50a3a2997e2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1125,14 +1125,14 @@ static void collect_traffic_statistics(struct adapter *padapter)
pdvobjpriv->traffic_stat.cur_rx_tp = (u32)(pdvobjpriv->traffic_stat.cur_rx_bytes * 8 / 2 / 1024 / 1024);
}
-u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
+bool traffic_status_watchdog(struct adapter *padapter, bool from_timer)
{
- u8 should_enter_ps = false;
+ bool should_enter_ps = false;
u16 busy_threshold_high = 25;
u16 busy_threshold_low = 10;
u16 busy_threshold = busy_threshold_high;
- u8 busy_traffic = false, tx_busy_traffic = false, rx_busy_traffic = false;
- u8 higher_busy_traffic = false, higher_busy_rx_traffic = false, higher_busy_tx_traffic = false;
+ bool busy_traffic = false, tx_busy_traffic = false, rx_busy_traffic = false;
+ bool higher_busy_traffic = false, higher_busy_rx_traffic = false, higher_busy_tx_traffic = false;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
collect_traffic_statistics(padapter);
@@ -1239,7 +1239,7 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter)
/* if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING|_FW_UNDER_SURVEY) ==false) */
{
linked_status_chk(padapter);
- traffic_status_watchdog(padapter, 0);
+ traffic_status_watchdog(padapter, false);
}
rtw_hal_dm_watchdog(padapter);
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 3c6278f9ae13..56d52fedc2ab 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1643,11 +1643,11 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
if ((adapter_to_pwrctl(adapter)->fw_current_in_ps_mode)
&& !(hal_btcoex_IsBtControlLps(adapter))
) {
- u8 should_enter_ps;
+ bool should_enter_ps;
linked_status_chk(adapter);
- should_enter_ps = traffic_status_watchdog(adapter, 1);
+ should_enter_ps = traffic_status_watchdog(adapter, true);
if (should_enter_ps) {
/* rtw_lps_ctrl_wk_cmd(adapter, LPS_CTRL_ENTER, 1); */
rtw_hal_dm_watchdog_in_lps(adapter);
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index afa5631a441a..31bb09bc3534 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -615,7 +615,7 @@ extern void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr
extern void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
extern void correct_TSF(struct adapter *padapter, struct mlme_ext_priv *pmlmeext);
extern void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
-extern u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer);
+extern bool traffic_status_watchdog(struct adapter *padapter, bool from_timer);
int rtw_chk_start_clnt_join(struct adapter *padapter, u8 *ch, u8 *bw, u8 *offset);
--
2.52.0
next prev parent reply other threads:[~2026-02-12 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 14:21 [PATCH v7 0/7] staging: rtl8723bs: coding style and refactoring cleanups Khushal Chitturi
2026-02-12 14:21 ` [PATCH v7 1/7] staging: rtl8723bs: rename LinkDetectInfo to link_detect_info Khushal Chitturi
2026-02-12 14:21 ` [PATCH v7 2/7] staging: rtl8723bs: rename rt_link_detect_t fields to snake_case Khushal Chitturi
2026-02-12 14:21 ` [PATCH v7 3/7] staging: rtl8723bs: convert traffic_status_watchdog() local variables " Khushal Chitturi
2026-02-12 14:21 ` [PATCH v7 4/7] staging: rtl8723bs: remove stale commented code Khushal Chitturi
2026-02-12 14:21 ` Khushal Chitturi [this message]
2026-02-12 14:21 ` [PATCH v7 6/7] staging: rtl8723bs: simplify boolean expressions Khushal Chitturi
2026-02-12 14:21 ` [PATCH v7 7/7] staging: rtl8723bs: align and split variable declarations Khushal Chitturi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260212142131.28131-6-khushalchitturi@gmail.com \
--to=khushalchitturi@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox