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 3/7] staging: rtl8723bs: convert traffic_status_watchdog() local variables to snake_case
Date: Thu, 12 Feb 2026 19:51:27 +0530 [thread overview]
Message-ID: <20260212142131.28131-4-khushalchitturi@gmail.com> (raw)
In-Reply-To: <20260212142131.28131-1-khushalchitturi@gmail.com>
Convert the local variable names in traffic_status_watchdog()
to snake_case to follow naming conventions.
Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>
---
Changelog:
v6 -> v7: Split from earlier patch.
drivers/staging/rtl8723bs/core/rtw_cmd.c | 56 +++++++++++------------
drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 +--
2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index b3fa54f7f7a9..d6b486fb57ab 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1127,12 +1127,12 @@ static void collect_traffic_statistics(struct adapter *padapter)
u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
{
- u8 bEnterPS = false;
- u16 BusyThresholdHigh = 25;
- u16 BusyThresholdLow = 10;
- u16 BusyThreshold = BusyThresholdHigh;
- u8 bBusyTraffic = false, bTxBusyTraffic = false, bRxBusyTraffic = false;
- u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false, bHigherBusyTxTraffic = false;
+ u8 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;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
collect_traffic_statistics(padapter);
@@ -1142,37 +1142,37 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
/* */
if ((check_fwstate(pmlmepriv, _FW_LINKED))
/*&& !MgntInitAdapterInProgress(pMgntInfo)*/) {
- /* if we raise bBusyTraffic in last watchdog, using lower threshold. */
+ /* if we raise busy_traffic in last watchdog, using lower threshold. */
if (pmlmepriv->link_detect_info.busy_traffic)
- BusyThreshold = BusyThresholdLow;
+ busy_threshold = busy_threshold_low;
- if (pmlmepriv->link_detect_info.num_rx_ok_in_period > BusyThreshold ||
- pmlmepriv->link_detect_info.num_tx_ok_in_period > BusyThreshold) {
- bBusyTraffic = true;
+ if (pmlmepriv->link_detect_info.num_rx_ok_in_period > busy_threshold ||
+ pmlmepriv->link_detect_info.num_tx_ok_in_period > busy_threshold) {
+ busy_traffic = true;
if (pmlmepriv->link_detect_info.num_rx_ok_in_period > pmlmepriv->link_detect_info.num_tx_ok_in_period)
- bRxBusyTraffic = true;
+ rx_busy_traffic = true;
else
- bTxBusyTraffic = true;
+ tx_busy_traffic = true;
}
/* Higher Tx/Rx data. */
if (pmlmepriv->link_detect_info.num_rx_ok_in_period > 4000 ||
pmlmepriv->link_detect_info.num_tx_ok_in_period > 4000) {
- bHigherBusyTraffic = true;
+ higher_busy_traffic = true;
if (pmlmepriv->link_detect_info.num_rx_ok_in_period > pmlmepriv->link_detect_info.num_tx_ok_in_period)
- bHigherBusyRxTraffic = true;
+ higher_busy_rx_traffic = true;
else
- bHigherBusyTxTraffic = true;
+ higher_busy_tx_traffic = true;
}
/* check traffic for powersaving. */
if (((pmlmepriv->link_detect_info.num_rx_unicast_ok_in_period + pmlmepriv->link_detect_info.num_tx_ok_in_period) > 8) ||
(pmlmepriv->link_detect_info.num_rx_unicast_ok_in_period > 2)) {
- bEnterPS = false;
+ should_enter_ps = false;
- if (bBusyTraffic) {
+ if (busy_traffic) {
if (pmlmepriv->link_detect_info.traffic_transition_count <= 4)
pmlmepriv->link_detect_info.traffic_transition_count = 4;
@@ -1188,11 +1188,11 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
pmlmepriv->link_detect_info.traffic_transition_count = 0;
if (pmlmepriv->link_detect_info.traffic_transition_count == 0)
- bEnterPS = true;
+ should_enter_ps = true;
}
/* LeisurePS only work in infra mode. */
- if (bEnterPS) {
+ if (should_enter_ps) {
if (!from_timer)
LPS_Enter(padapter, "TRAFFIC_IDLE");
} else {
@@ -1215,14 +1215,14 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
pmlmepriv->link_detect_info.num_rx_ok_in_period = 0;
pmlmepriv->link_detect_info.num_tx_ok_in_period = 0;
pmlmepriv->link_detect_info.num_rx_unicast_ok_in_period = 0;
- pmlmepriv->link_detect_info.busy_traffic = bBusyTraffic;
- pmlmepriv->link_detect_info.tx_busy_traffic = bTxBusyTraffic;
- pmlmepriv->link_detect_info.rx_busy_traffic = bRxBusyTraffic;
- pmlmepriv->link_detect_info.higher_busy_traffic = bHigherBusyTraffic;
- pmlmepriv->link_detect_info.higher_busy_rx_traffic = bHigherBusyRxTraffic;
- pmlmepriv->link_detect_info.higher_busy_tx_traffic = bHigherBusyTxTraffic;
-
- return bEnterPS;
+ pmlmepriv->link_detect_info.busy_traffic = busy_traffic;
+ pmlmepriv->link_detect_info.tx_busy_traffic = tx_busy_traffic;
+ pmlmepriv->link_detect_info.rx_busy_traffic = rx_busy_traffic;
+ pmlmepriv->link_detect_info.higher_busy_traffic = higher_busy_traffic;
+ pmlmepriv->link_detect_info.higher_busy_rx_traffic = higher_busy_rx_traffic;
+ pmlmepriv->link_detect_info.higher_busy_tx_traffic = higher_busy_tx_traffic;
+
+ return should_enter_ps;
}
static void dynamic_chk_wk_hdl(struct adapter *padapter)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 944f56b7acf5..45943f832e23 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1643,12 +1643,12 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
if ((adapter_to_pwrctl(adapter)->fw_current_in_ps_mode)
&& !(hal_btcoex_IsBtControlLps(adapter))
) {
- u8 bEnterPS;
+ u8 should_enter_ps;
linked_status_chk(adapter);
- bEnterPS = traffic_status_watchdog(adapter, 1);
- if (bEnterPS) {
+ should_enter_ps = traffic_status_watchdog(adapter, 1);
+ if (should_enter_ps) {
/* rtw_lps_ctrl_wk_cmd(adapter, LPS_CTRL_ENTER, 1); */
rtw_hal_dm_watchdog_in_lps(adapter);
} else {
--
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 ` Khushal Chitturi [this message]
2026-02-12 14:21 ` [PATCH v7 4/7] staging: rtl8723bs: remove stale commented code Khushal Chitturi
2026-02-12 14:21 ` [PATCH v7 5/7] staging: rtl8723bs: use bool for traffic_status_watchdog() Khushal Chitturi
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-4-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