From: Marcos Andrade <marcosandrade95963@gmail.com>
To: dan.carpenter@linaro.org
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Marcos Andrade <marcosandrade95963@gmail.com>
Subject: [PATCH v2 2/3] staging: rtl8723bs: rename rt_channel_info members to snake_case
Date: Sat, 21 Mar 2026 16:02:17 +0000 [thread overview]
Message-ID: <20260321160217.36060-3-marcosandrade95963@gmail.com> (raw)
In-Reply-To: <20260321160217.36060-1-marcosandrade95963@gmail.com>
Replace all occurrences of the CamelCase member names ChannelNum and
ScanType in rtw_mlme_ext.c with their snake_case equivalents
channel_num and scan_type, as defined in struct rt_channel_info.
This change brings the code in line with the kernel coding style
as described in Documentation/process/coding-style.rst.
No functional changes intended.
Signed-off-by: Marcos Andrade <marcosandrade95963@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 82 +++++++++----------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index b1f20aa81efb..d8bf44eaa577 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -171,12 +171,12 @@ int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
{
int i;
- for (i = 0; ch_set[i].ChannelNum != 0; i++) {
- if (ch == ch_set[i].ChannelNum)
+ for (i = 0; ch_set[i].channel_num != 0; i++) {
+ if (ch == ch_set[i].channel_num)
break;
}
- if (i >= ch_set[i].ChannelNum)
+ if (i >= ch_set[i].channel_num)
return -1;
return i;
}
@@ -261,7 +261,7 @@ static int has_channel(struct rt_channel_info *channel_set,
int i;
for (i = 0; i < chanset_size; i++)
- if (channel_set[i].ChannelNum == chan)
+ if (channel_set[i].channel_num == chan)
return 1;
return 0;
@@ -340,22 +340,22 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
if (b2_4GBand) {
for (index = 0; index < RTW_ChannelPlan2G[Index2G].Len; index++) {
- channel_set[chanset_size].ChannelNum = RTW_ChannelPlan2G[Index2G].Channel[index];
+ channel_set[chanset_size].channel_num = RTW_ChannelPlan2G[Index2G].Channel[index];
if ((ChannelPlan == RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN) ||/* Channel 1~11 is active, and 12~14 is passive */
(ChannelPlan == RT_CHANNEL_DOMAIN_GLOBAL_NULL)) {
- if (channel_set[chanset_size].ChannelNum >= 1 && channel_set[chanset_size].ChannelNum <= 11)
- channel_set[chanset_size].ScanType = SCAN_ACTIVE;
- else if ((channel_set[chanset_size].ChannelNum >= 12 && channel_set[chanset_size].ChannelNum <= 14))
- channel_set[chanset_size].ScanType = SCAN_PASSIVE;
+ if (channel_set[chanset_size].channel_num >= 1 && channel_set[chanset_size].channel_num <= 11)
+ channel_set[chanset_size].scan_type = SCAN_ACTIVE;
+ else if ((channel_set[chanset_size].channel_num >= 12 && channel_set[chanset_size].channel_num <= 14))
+ channel_set[chanset_size].scan_type = SCAN_PASSIVE;
} else if (ChannelPlan == RT_CHANNEL_DOMAIN_WORLD_WIDE_13 ||
Index2G == RT_CHANNEL_DOMAIN_2G_WORLD) { /* channel 12~13, passive scan */
- if (channel_set[chanset_size].ChannelNum <= 11)
- channel_set[chanset_size].ScanType = SCAN_ACTIVE;
+ if (channel_set[chanset_size].channel_num <= 11)
+ channel_set[chanset_size].scan_type = SCAN_ACTIVE;
else
- channel_set[chanset_size].ScanType = SCAN_PASSIVE;
+ channel_set[chanset_size].scan_type = SCAN_PASSIVE;
} else
- channel_set[chanset_size].ScanType = SCAN_ACTIVE;
+ channel_set[chanset_size].scan_type = SCAN_ACTIVE;
chanset_size++;
}
@@ -4279,27 +4279,27 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
if (pregistrypriv->wireless_mode & WIRELESS_11G) {
do {
if ((i == MAX_CHANNEL_NUM) ||
- (chplan_sta[i].ChannelNum == 0) ||
- (chplan_sta[i].ChannelNum > 14))
+ (chplan_sta[i].channel_num == 0) ||
+ (chplan_sta[i].channel_num > 14))
break;
if ((j == chplan_ap.Len) || (chplan_ap.Channel[j] > 14))
break;
- if (chplan_sta[i].ChannelNum == chplan_ap.Channel[j]) {
- chplan_new[k].ChannelNum = chplan_ap.Channel[j];
- chplan_new[k].ScanType = SCAN_ACTIVE;
+ if (chplan_sta[i].channel_num == chplan_ap.Channel[j]) {
+ chplan_new[k].channel_num = chplan_ap.Channel[j];
+ chplan_new[k].scan_type = SCAN_ACTIVE;
i++;
j++;
k++;
- } else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) {
- chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
- chplan_new[k].ScanType = SCAN_PASSIVE;
+ } else if (chplan_sta[i].channel_num < chplan_ap.Channel[j]) {
+ chplan_new[k].channel_num = chplan_sta[i].channel_num;
+ chplan_new[k].scan_type = SCAN_PASSIVE;
i++;
k++;
- } else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) {
- chplan_new[k].ChannelNum = chplan_ap.Channel[j];
- chplan_new[k].ScanType = SCAN_ACTIVE;
+ } else if (chplan_sta[i].channel_num > chplan_ap.Channel[j]) {
+ chplan_new[k].channel_num = chplan_ap.Channel[j];
+ chplan_new[k].scan_type = SCAN_ACTIVE;
j++;
k++;
}
@@ -4307,29 +4307,29 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
/* change AP not support channel to Passive scan */
while ((i < MAX_CHANNEL_NUM) &&
- (chplan_sta[i].ChannelNum != 0) &&
- (chplan_sta[i].ChannelNum <= 14)) {
+ (chplan_sta[i].channel_num != 0) &&
+ (chplan_sta[i].channel_num <= 14)) {
- chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
- chplan_new[k].ScanType = SCAN_PASSIVE;
+ chplan_new[k].channel_num = chplan_sta[i].channel_num;
+ chplan_new[k].scan_type = SCAN_PASSIVE;
i++;
k++;
}
/* add channel AP supported */
while ((j < chplan_ap.Len) && (chplan_ap.Channel[j] <= 14)) {
- chplan_new[k].ChannelNum = chplan_ap.Channel[j];
- chplan_new[k].ScanType = SCAN_ACTIVE;
+ chplan_new[k].channel_num = chplan_ap.Channel[j];
+ chplan_new[k].scan_type = SCAN_ACTIVE;
j++;
k++;
}
} else {
/* keep original STA 2.4G channel plan */
while ((i < MAX_CHANNEL_NUM) &&
- (chplan_sta[i].ChannelNum != 0) &&
- (chplan_sta[i].ChannelNum <= 14)) {
- chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
- chplan_new[k].ScanType = chplan_sta[i].ScanType;
+ (chplan_sta[i].channel_num != 0) &&
+ (chplan_sta[i].channel_num <= 14)) {
+ chplan_new[k].channel_num = chplan_sta[i].channel_num;
+ chplan_new[k].scan_type = chplan_sta[i].scan_type;
i++;
k++;
}
@@ -4346,10 +4346,10 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
channel = bssid->configuration.ds_config;
chplan_new = pmlmeext->channel_set;
i = 0;
- while ((i < MAX_CHANNEL_NUM) && (chplan_new[i].ChannelNum != 0)) {
- if (chplan_new[i].ChannelNum == channel) {
- if (chplan_new[i].ScanType == SCAN_PASSIVE)
- chplan_new[i].ScanType = SCAN_ACTIVE;
+ while ((i < MAX_CHANNEL_NUM) && (chplan_new[i].channel_num != 0)) {
+ if (chplan_new[i].channel_num == channel) {
+ if (chplan_new[i].scan_type == SCAN_PASSIVE)
+ chplan_new[i].scan_type = SCAN_ACTIVE;
break;
}
i++;
@@ -5448,7 +5448,7 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
memcpy(&out[j], &in[i], sizeof(struct rtw_ieee80211_channel));
- if (pmlmeext->channel_set[set_idx].ScanType == SCAN_PASSIVE)
+ if (pmlmeext->channel_set[set_idx].scan_type == SCAN_PASSIVE)
out[j].flags |= RTW_IEEE80211_CHAN_PASSIVE_SCAN;
j++;
@@ -5469,9 +5469,9 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
break;
}
- out[j].hw_value = pmlmeext->channel_set[i].ChannelNum;
+ out[j].hw_value = pmlmeext->channel_set[i].channel_num;
- if (pmlmeext->channel_set[i].ScanType == SCAN_PASSIVE)
+ if (pmlmeext->channel_set[i].scan_type == SCAN_PASSIVE)
out[j].flags |= RTW_IEEE80211_CHAN_PASSIVE_SCAN;
j++;
--
2.53.0
next prev parent reply other threads:[~2026-03-21 16:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <message-id-do-email-do-dan>
2026-03-21 16:02 ` [PATCH v2 0/3] staging: rtl8723bs: rename rt_channel_info members to snake_case Marcos Andrade
2026-03-21 16:02 ` [PATCH v2 1/3] " Marcos Andrade
2026-03-21 16:02 ` Marcos Andrade [this message]
2026-03-31 6:50 ` [PATCH v2 0/3] " Greg KH
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=20260321160217.36060-3-marcosandrade95963@gmail.com \
--to=marcosandrade95963@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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