[PATCH 3/4] staging: rtl8723bs: rename CamelCase identifiers to snake_case

Khushal Chitturi
2026-01-15T10:30:04Z

Rename several CamelCase identifiers across the driver
to follow kernel naming conventions.

The following identifiers were renamed:
1) UserPriority to user_priority
2) NumTxOkInPeriod to tx_ok_in_period
3) HTOpMode to ht_op_mode

Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 17 ++++++++++-------
drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_xmit.c | 17 +++++++++--------
drivers/staging/rtl8723bs/hal/hal_btcoex.c | 2 +-
drivers/staging/rtl8723bs/include/rtw_mlme.h | 6 +++---
5 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index ef2d92b5588a..005e6737e1af 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1148,10 +1148,11 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
BusyThreshold = BusyThresholdLow;

if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold ||
- pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
+ pmlmepriv->LinkDetectInfo.tx_ok_in_period > BusyThreshold) {
bBusyTraffic = true;

- if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
+ if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod >
+ pmlmepriv->LinkDetectInfo.tx_ok_in_period)
bRxBusyTraffic = true;
else
bTxBusyTraffic = true;
@@ -1159,18 +1160,20 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)

/* Higher Tx/Rx data. */
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
- pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {
+ pmlmepriv->LinkDetectInfo.tx_ok_in_period > 4000) {
bHigherBusyTraffic = true;

- if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
+ if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod >
+ pmlmepriv->LinkDetectInfo.tx_ok_in_period)
bHigherBusyRxTraffic = true;
else
bHigherBusyTxTraffic = true;
}

/* check traffic for powersaving. */
- if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod + pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
- (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) {
+ if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
+ pmlmepriv->LinkDetectInfo.tx_ok_in_period) > 8) ||
+ (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) {
bEnterPS = false;

if (bBusyTraffic) {
@@ -1214,7 +1217,7 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
}

pmlmepriv->LinkDetectInfo.NumRxOkInPeriod = 0;
- pmlmepriv->LinkDetectInfo.NumTxOkInPeriod = 0;
+ pmlmepriv->LinkDetectInfo.tx_ok_in_period = 0;
pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod = 0;
pmlmepriv->LinkDetectInfo.bBusyTraffic = bBusyTraffic;
pmlmepriv->LinkDetectInfo.bTxBusyTraffic = bTxBusyTraffic;
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 98704179ad35..6b8923109c47 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2518,7 +2518,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
s32 bmcst = is_multicast_ether_addr(pattrib->ra);

/* if (bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic == false)) */
- if (bmcst || (padapter->mlmepriv.LinkDetectInfo.NumTxOkInPeriod < 100))
+ if (bmcst || (padapter->mlmepriv.LinkDetectInfo.tx_ok_in_period < 100))
return;

priority = pattrib->priority;
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 97e38ef62ac4..39477b7c443d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -403,10 +403,11 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *

/* check HT op mode */
if (pattrib->ht_en) {
- u8 HTOpMode = pmlmeinfo->HT_protection;
+ u8 ht_op_mode = pmlmeinfo->HT_protection;

- if ((pmlmeext->cur_bwmode && (HTOpMode == 2 || HTOpMode == 3)) ||
- (!pmlmeext->cur_bwmode && HTOpMode == 3)) {
+ if ((pmlmeext->cur_bwmode &&
+ (ht_op_mode == 2 || ht_op_mode == 3)) ||
+ (!pmlmeext->cur_bwmode && ht_op_mode == 3)) {
pattrib->vcs_mode = RTS_CTS;
break;
}
@@ -605,17 +606,17 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
{
struct ethhdr etherhdr;
struct iphdr ip_hdr;
- s32 UserPriority = 0;
+ s32 user_priority = 0;

_rtw_open_pktfile(ppktfile->pkt, ppktfile);
_rtw_pktfile_read(ppktfile, (unsigned char *)&etherhdr, ETH_HLEN);

- /* get UserPriority from IP hdr */
+ /* get user_priority from IP hdr */
if (pattrib->ether_type == 0x0800) {
_rtw_pktfile_read(ppktfile, (u8 *)&ip_hdr, sizeof(ip_hdr));
- UserPriority = ip_hdr.tos >> 5;
+ user_priority = ip_hdr.tos >> 5;
}
- pattrib->priority = UserPriority;
+ pattrib->priority = user_priority;
pattrib->hdrlen = WLAN_HDR_A3_QOS_LEN;
pattrib->subtype = WIFI_QOS_DATA_TYPE;
}
@@ -1391,7 +1392,7 @@ void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe,
if ((pxmitframe->frame_tag & 0x0f) == DATA_FRAMETAG) {
pkt_num = pxmitframe->agg_num;

- pmlmepriv->LinkDetectInfo.NumTxOkInPeriod += pkt_num;
+ pmlmepriv->LinkDetectInfo.tx_ok_in_period += pkt_num;

pxmitpriv->tx_pkts += pkt_num;

diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index 9105594d2dde..ad2b79cb6f0a 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -366,7 +366,7 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
struct rt_link_detect_t *plinkinfo;
plinkinfo = &padapter->mlmepriv.LinkDetectInfo;

- if (plinkinfo->NumTxOkInPeriod > plinkinfo->NumRxOkInPeriod)
+ if (plinkinfo->tx_ok_in_period > plinkinfo->NumRxOkInPeriod)
*pU4Tmp = BTC_WIFI_TRAFFIC_TX;
else
*pU4Tmp = BTC_WIFI_TRAFFIC_RX;
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h b/drivers/staging/rtl8723bs/include/rtw_mlme.h
index 2a128568c6df..b40b10a854a9 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h
@@ -93,9 +93,9 @@ struct sitesurvey_ctrl {
};

struct rt_link_detect_t {
- u32 NumTxOkInPeriod;
- u32 NumRxOkInPeriod;
- u32 NumRxUnicastOkInPeriod;
+ u32 tx_ok_in_period;
+ u32 NumRxOkInPeriod;
+ u32 NumRxUnicastOkInPeriod;
bool bBusyTraffic;
bool bTxBusyTraffic;
bool bRxBusyTraffic;
--
2.52.0