* [PATCH] staging: rtl8723bs: coding style cleanups
@ 2026-03-18 17:44 Malavya Raval
2026-03-18 19:27 ` Nikolay Kulikov
0 siblings, 1 reply; 2+ messages in thread
From: Malavya Raval @ 2026-03-18 17:44 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Malavya Raval
Renaming CamelCase variables and macros to snake_case and fixing
formatting issues in the rtl8723bs staging driver to align
with kernel coding style standards.
Signed-off-by: Malavya Raval <malavyaraval@gmail.com>
---
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 864cd8b6d..284c49bf4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -720,10 +720,10 @@ void start_bss_network(struct adapter *padapter)
/* disable dynamic functions, such as high power, DIG */
/* Save_DM_Func_Flag(padapter); */
- /* Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false); */
+ /* switch_dm_func(padapter, DYNAMIC_FUNC_DISABLE, false); */
/* turn on all dynamic functions */
- Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
+ switch_dm_func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
/* rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); */
}
@@ -2001,7 +2001,7 @@ void rtw_ap_restore_network(struct adapter *padapter)
if (psta->state & _FW_LINKED) {
rtw_sta_media_status_rpt(padapter, psta, 1);
- Update_RA_Entry(padapter, psta);
+ update_ra_entry(padapter, psta);
/* pairwise key */
/* per sta pairwise key and settings */
if ((psecuritypriv->dot11PrivacyAlgrthm == _TKIP_) ||
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index abb84f8ae..0bc78ee50 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -10,78 +10,78 @@
#include <linux/align.h>
static struct _cmd_callback rtw_cmd_callback[] = {
- {GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
- {GEN_CMD_CODE(_Write_MACREG), NULL},
- {GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
- {GEN_CMD_CODE(_Write_BBREG), NULL},
- {GEN_CMD_CODE(_Read_RFREG), &rtw_getbbrfreg_cmdrsp_callback},
- {GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
- {GEN_CMD_CODE(_Read_EEPROM), NULL},
- {GEN_CMD_CODE(_Write_EEPROM), NULL},
- {GEN_CMD_CODE(_Read_EFUSE), NULL},
- {GEN_CMD_CODE(_Write_EFUSE), NULL},
-
- {GEN_CMD_CODE(_Read_CAM), NULL}, /*10*/
- {GEN_CMD_CODE(_Write_CAM), NULL},
- {GEN_CMD_CODE(_setBCNITV), NULL},
- {GEN_CMD_CODE(_setMBIDCFG), NULL},
- {GEN_CMD_CODE(_JoinBss), &rtw_joinbss_cmd_callback}, /*14*/
- {GEN_CMD_CODE(_DisConnect), &rtw_disassoc_cmd_callback}, /*15*/
- {GEN_CMD_CODE(_CreateBss), &rtw_createbss_cmd_callback},
- {GEN_CMD_CODE(_SetOpMode), NULL},
- {GEN_CMD_CODE(_SiteSurvey), &rtw_survey_cmd_callback}, /*18*/
- {GEN_CMD_CODE(_SetAuth), NULL},
-
- {GEN_CMD_CODE(_SetKey), NULL}, /*20*/
- {GEN_CMD_CODE(_SetStaKey), &rtw_setstaKey_cmdrsp_callback},
- {GEN_CMD_CODE(_SetAssocSta), &rtw_setassocsta_cmdrsp_callback},
- {GEN_CMD_CODE(_DelAssocSta), NULL},
- {GEN_CMD_CODE(_SetStaPwrState), NULL},
- {GEN_CMD_CODE(_SetBasicRate), NULL}, /*25*/
- {GEN_CMD_CODE(_GetBasicRate), NULL},
- {GEN_CMD_CODE(_SetDataRate), NULL},
- {GEN_CMD_CODE(_GetDataRate), NULL},
- {GEN_CMD_CODE(_SetPhyInfo), NULL},
-
- {GEN_CMD_CODE(_GetPhyInfo), NULL}, /*30*/
- {GEN_CMD_CODE(_SetPhy), NULL},
- {GEN_CMD_CODE(_GetPhy), NULL},
- {GEN_CMD_CODE(_readRssi), NULL},
- {GEN_CMD_CODE(_readGain), NULL},
- {GEN_CMD_CODE(_SetAtim), NULL}, /*35*/
- {GEN_CMD_CODE(_SetPwrMode), NULL},
- {GEN_CMD_CODE(_JoinbssRpt), NULL},
- {GEN_CMD_CODE(_SetRaTable), NULL},
- {GEN_CMD_CODE(_GetRaTable), NULL},
-
- {GEN_CMD_CODE(_GetCCXReport), NULL}, /*40*/
- {GEN_CMD_CODE(_GetDTMReport), NULL},
- {GEN_CMD_CODE(_GetTXRateStatistics), NULL},
- {GEN_CMD_CODE(_SetUsbSuspend), NULL},
- {GEN_CMD_CODE(_SetH2cLbk), NULL},
- {GEN_CMD_CODE(_AddBAReq), NULL}, /*45*/
- {GEN_CMD_CODE(_SetChannel), NULL}, /*46*/
- {GEN_CMD_CODE(_SetTxPower), NULL},
- {GEN_CMD_CODE(_SwitchAntenna), NULL},
- {GEN_CMD_CODE(_SetCrystalCap), NULL},
- {GEN_CMD_CODE(_SetSingleCarrierTx), NULL}, /*50*/
-
- {GEN_CMD_CODE(_SetSingleToneTx), NULL}, /*51*/
- {GEN_CMD_CODE(_SetCarrierSuppressionTx), NULL},
- {GEN_CMD_CODE(_SetContinuousTx), NULL},
- {GEN_CMD_CODE(_SwitchBandwidth), NULL}, /*54*/
- {GEN_CMD_CODE(_TX_Beacon), NULL},/*55*/
-
- {GEN_CMD_CODE(_Set_MLME_EVT), NULL},/*56*/
- {GEN_CMD_CODE(_Set_Drv_Extra), NULL},/*57*/
- {GEN_CMD_CODE(_Set_H2C_MSG), NULL},/*58*/
- {GEN_CMD_CODE(_SetChannelPlan), NULL},/*59*/
-
- {GEN_CMD_CODE(_SetChannelSwitch), NULL},/*60*/
- {GEN_CMD_CODE(_TDLS), NULL},/*61*/
- {GEN_CMD_CODE(_ChkBMCSleepq), NULL}, /*62*/
-
- {GEN_CMD_CODE(_RunInThreadCMD), NULL},/*63*/
+ {GEN_CMD_CODE(_read_macreg), NULL}, /*0*/
+ {GEN_CMD_CODE(_write_macreg), NULL},
+ {GEN_CMD_CODE(_read_bbreg), &rtw_getbbrfreg_cmdrsp_callback},
+ {GEN_CMD_CODE(_write_bbreg), NULL},
+ {GEN_CMD_CODE(_read_rfreg), &rtw_getbbrfreg_cmdrsp_callback},
+ {GEN_CMD_CODE(_write_rfreg), NULL}, /*5*/
+ {GEN_CMD_CODE(_read_eeprom), NULL},
+ {GEN_CMD_CODE(_write_eeprom), NULL},
+ {GEN_CMD_CODE(_read_efuse), NULL},
+ {GEN_CMD_CODE(_write_efuse), NULL},
+
+ {GEN_CMD_CODE(_read_cam), NULL}, /*10*/
+ {GEN_CMD_CODE(_write_cam), NULL},
+ {GEN_CMD_CODE(_set_bcn_itv), NULL},
+ {GEN_CMD_CODE(_set_mbid_cfg), NULL},
+ {GEN_CMD_CODE(_join_bss), &rtw_joinbss_cmd_callback}, /*14*/
+ {GEN_CMD_CODE(_disconnect), &rtw_disassoc_cmd_callback}, /*15*/
+ {GEN_CMD_CODE(_create_bss), &rtw_createbss_cmd_callback},
+ {GEN_CMD_CODE(_set_op_mode), NULL},
+ {GEN_CMD_CODE(_site_survey), &rtw_survey_cmd_callback}, /*18*/
+ {GEN_CMD_CODE(_set_auth), NULL},
+
+ {GEN_CMD_CODE(_set_key), NULL}, /*20*/
+ {GEN_CMD_CODE(_set_sta_key), &rtw_set_sta_key_cmdrsp_callback},
+ {GEN_CMD_CODE(_set_assoc_sta), &rtw_setassocsta_cmdrsp_callback},
+ {GEN_CMD_CODE(_del_assoc_sta), NULL},
+ {GEN_CMD_CODE(_set_sta_pwr_state), NULL},
+ {GEN_CMD_CODE(_set_basic_rate), NULL}, /*25*/
+ {GEN_CMD_CODE(_get_basic_rate), NULL},
+ {GEN_CMD_CODE(_set_data_rate), NULL},
+ {GEN_CMD_CODE(_get_data_rate), NULL},
+ {GEN_CMD_CODE(_set_phy_info), NULL},
+
+ {GEN_CMD_CODE(_get_phy_info), NULL}, /*30*/
+ {GEN_CMD_CODE(_set_phy), NULL},
+ {GEN_CMD_CODE(_get_phy), NULL},
+ {GEN_CMD_CODE(_read_rssi), NULL},
+ {GEN_CMD_CODE(_read_gain), NULL},
+ {GEN_CMD_CODE(_set_atim), NULL}, /*35*/
+ {GEN_CMD_CODE(_set_pwr_mode), NULL},
+ {GEN_CMD_CODE(_join_bss_rpt), NULL},
+ {GEN_CMD_CODE(_set_ra_table), NULL},
+ {GEN_CMD_CODE(_get_ra_table), NULL},
+
+ {GEN_CMD_CODE(_get_ccx_report), NULL}, /*40*/
+ {GEN_CMD_CODE(_get_dtm_report), NULL},
+ {GEN_CMD_CODE(_get_tx_rate_statistics), NULL},
+ {GEN_CMD_CODE(_set_usb_suspend), NULL},
+ {GEN_CMD_CODE(_set_h2c_lbk), NULL},
+ {GEN_CMD_CODE(_add_ba_req), NULL}, /*45*/
+ {GEN_CMD_CODE(_set_channel), NULL}, /*46*/
+ {GEN_CMD_CODE(_set_tx_power), NULL},
+ {GEN_CMD_CODE(_switch_antenna), NULL},
+ {GEN_CMD_CODE(_set_crystal_cap), NULL},
+ {GEN_CMD_CODE(_set_single_carrier_tx), NULL}, /*50*/
+
+ {GEN_CMD_CODE(_set_single_tone_tx), NULL},/*51*/
+ {GEN_CMD_CODE(_set_carrier_suppression_tx), NULL},
+ {GEN_CMD_CODE(_set_continuous_tx), NULL},
+ {GEN_CMD_CODE(_switch_bandwidth), NULL}, /*54*/
+ {GEN_CMD_CODE(_tx_beacon), NULL},/*55*/
+
+ {GEN_CMD_CODE(_set_mlme_evt), NULL},/*56*/
+ {GEN_CMD_CODE(_set_drv_extra), NULL},/*57*/
+ {GEN_CMD_CODE(_set_h2c_msg), NULL},/*58*/
+ {GEN_CMD_CODE(_set_channel_plan), NULL},/*59*/
+
+ {GEN_CMD_CODE(_set_channel_switch), NULL},/*60*/
+ {GEN_CMD_CODE(_tdls), NULL},/*61*/
+ {GEN_CMD_CODE(_chk_bmc_sleepq), NULL}, /*62*/
+
+ {GEN_CMD_CODE(_run_in_thread_cmd), NULL},/*63*/
};
static struct cmd_hdl wlancmds[] = {
@@ -300,7 +300,7 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{
u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
- if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
+ if (cmd_obj->cmdcode == GEN_CMD_CODE(_set_channel_plan))
bAllow = true;
if ((!pcmdpriv->padapter->hw_init_completed && !bAllow) ||
@@ -342,8 +342,8 @@ struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)
void rtw_free_cmd_obj(struct cmd_obj *pcmd)
{
- if ((pcmd->cmdcode != _JoinBss_CMD_) &&
- (pcmd->cmdcode != _CreateBss_CMD_)) {
+ if ((pcmd->cmdcode != _join_bss_CMD_) &&
+ (pcmd->cmdcode != _create_bss_CMD_)) {
/* free parmbuf in cmd_obj */
kfree(pcmd->parmbuf);
}
@@ -500,7 +500,7 @@ int rtw_cmd_thread(void *context)
break;
}
- if (pcmd->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra)) {
+ if (pcmd->cmdcode == GEN_CMD_CODE(_set_drv_extra)) {
extra_parm = (struct drvextra_cmd_parm *)pcmd->parmbuf;
if (extra_parm->pbuf && extra_parm->size > 0)
kfree(extra_parm->pbuf);
@@ -545,7 +545,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
rtw_free_network_queue(padapter, false);
- init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_site_survey));
/* psurveyPara->bsslimit = 48; */
psurveyPara->scan_mode = pmlmepriv->scan_mode;
@@ -608,7 +608,7 @@ u8 rtw_createbss_cmd(struct adapter *padapter)
}
INIT_LIST_HEAD(&pcmd->list);
- pcmd->cmdcode = _CreateBss_CMD_;
+ pcmd->cmdcode = _create_bss_CMD_;
pcmd->parmbuf = (unsigned char *)pdev_network;
pcmd->cmdsz = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pdev_network);
pcmd->rsp = NULL;
@@ -641,7 +641,7 @@ int rtw_startbss_cmd(struct adapter *padapter, int flags)
}
INIT_LIST_HEAD(&pcmd->list);
- pcmd->cmdcode = GEN_CMD_CODE(_CreateBss);
+ pcmd->cmdcode = GEN_CMD_CODE(_create_bss);
pcmd->parmbuf = NULL;
pcmd->cmdsz = 0;
pcmd->rsp = NULL;
@@ -776,7 +776,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
pcmd->cmdsz = get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before endian conversion */
INIT_LIST_HEAD(&pcmd->list);
- pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */
+ pcmd->cmdcode = _join_bss_CMD_;/* GEN_CMD_CODE(_join_bss) */
pcmd->parmbuf = (unsigned char *)psecnetwork;
pcmd->rsp = NULL;
pcmd->rspsz = 0;
@@ -810,7 +810,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
kfree(param);
goto exit;
}
- init_h2fwcmd_w_parm_no_rsp(cmdobj, param, _DisConnect_CMD_);
+ init_h2fwcmd_w_parm_no_rsp(cmdobj, param, _disconnect_CMD_);
res = rtw_enqueue_cmd(cmdpriv, cmdobj);
} else {
/* no need to enqueue, do the cmd hdl directly and free cmd parameter */
@@ -846,7 +846,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infrast
goto exit;
}
- init_h2fwcmd_w_parm_no_rsp(ph2c, psetop, _SetOpMode_CMD_);
+ init_h2fwcmd_w_parm_no_rsp(ph2c, psetop, _set_op_mode_CMD_);
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
} else {
setopmode_hdl(padapter, (u8 *)psetop);
@@ -903,7 +903,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_
goto exit;
}
- init_h2fwcmd_w_parm_no_rsp(ph2c, psetstakey_para, _SetStaKey_CMD_);
+ init_h2fwcmd_w_parm_no_rsp(ph2c, psetstakey_para, _set_sta_key_CMD_);
ph2c->rsp = (u8 *)psetstakey_rsp;
ph2c->rspsz = sizeof(struct set_stakey_rsp);
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -954,7 +954,7 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 enqueu
goto exit;
}
- init_h2fwcmd_w_parm_no_rsp(ph2c, psetstakey_para, _SetStaKey_CMD_);
+ init_h2fwcmd_w_parm_no_rsp(ph2c, psetstakey_para, _set_sta_key_CMD_);
ph2c->rsp = (u8 *)psetstakey_rsp;
ph2c->rspsz = sizeof(struct set_stakey_rsp);
@@ -992,7 +992,7 @@ u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)
paddbareq_parm->tid = tid;
memcpy(paddbareq_parm->addr, addr, ETH_ALEN);
- init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_add_ba_req));
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1027,7 +1027,7 @@ u8 rtw_reset_securitypriv_cmd(struct adapter *padapter)
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = NULL;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1060,7 +1060,7 @@ u8 rtw_free_assoc_resources_cmd(struct adapter *padapter)
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = NULL;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1093,7 +1093,7 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter *padapter)
pdrvextra_cmd_parm->type = 0;
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = NULL;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1173,21 +1173,21 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
bEnterPS = false;
if (bBusyTraffic) {
- if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount <= 4)
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 4;
+ if (pmlmepriv->LinkDetectInfo.traffic_transition_count <= 4)
+ pmlmepriv->LinkDetectInfo.traffic_transition_count = 4;
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount++;
+ pmlmepriv->LinkDetectInfo.traffic_transition_count++;
- if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount > 30/*TrafficTransitionLevel*/)
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 30;
+ if (pmlmepriv->LinkDetectInfo.traffic_transition_count > 30/*TrafficTransitionLevel*/)
+ pmlmepriv->LinkDetectInfo.traffic_transition_count = 30;
}
} else {
- if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount >= 2)
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount -= 2;
+ if (pmlmepriv->LinkDetectInfo.traffic_transition_count >= 2)
+ pmlmepriv->LinkDetectInfo.traffic_transition_count -= 2;
else
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
+ pmlmepriv->LinkDetectInfo.traffic_transition_count = 0;
- if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount == 0)
+ if (pmlmepriv->LinkDetectInfo.traffic_transition_count == 0)
bEnterPS = true;
}
@@ -1335,7 +1335,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = NULL;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
} else {
@@ -1376,7 +1376,7 @@ u8 rtw_dm_in_lps_wk_cmd(struct adapter *padapter)
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = NULL;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1438,7 +1438,7 @@ u8 rtw_dm_ra_mask_wk_cmd(struct adapter *padapter, u8 *psta)
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = psta;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1471,7 +1471,7 @@ u8 rtw_ps_cmd(struct adapter *padapter)
pdrvextra_cmd_parm->type = 0;
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = NULL;
- init_h2fwcmd_w_parm_no_rsp(ppscmd, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ppscmd, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
res = rtw_enqueue_cmd(pcmdpriv, ppscmd);
@@ -1542,7 +1542,7 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
pdrvextra_cmd_parm->size = 0;
pdrvextra_cmd_parm->pbuf = NULL;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1554,14 +1554,14 @@ struct btinfo {
u8 cid;
u8 len;
- u8 bConnection:1;
- u8 bSCOeSCO:1;
- u8 bInQPage:1;
- u8 bACLBusy:1;
- u8 bSCOBusy:1;
- u8 bHID:1;
- u8 bA2DP:1;
- u8 bFTP:1;
+ u8 is_connection:1;
+ u8 is_sco_esco:1;
+ u8 is_in_q_page:1;
+ u8 is_acl_busy:1;
+ u8 is_sco_busy:1;
+ u8 is_hid:1;
+ u8 is_a2dp:1;
+ u8 is_ftp:1;
u8 retry_cnt:4;
u8 rsvd_34:1;
@@ -1634,7 +1634,7 @@ u8 rtw_c2h_packet_wk_cmd(struct adapter *padapter, u8 *pbuf, u16 length)
pdrvextra_cmd_parm->size = length;
pdrvextra_cmd_parm->pbuf = pbuf;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1669,7 +1669,7 @@ u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt)
pdrvextra_cmd_parm->size = c2h_evt ? 16 : 0;
pdrvextra_cmd_parm->pbuf = c2h_evt;
- init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
+ init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_set_drv_extra));
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
@@ -1882,7 +1882,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
rtw_free_cmd_obj(pcmd);
}
-void rtw_setstaKey_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd)
+void rtw_set_sta_key_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd)
{
struct sta_priv *pstapriv = &padapter->stapriv;
struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *)(pcmd->rsp);
diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c
index 965c3cfea..75fa48ab8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -75,6 +75,7 @@ int rtw_write8(struct adapter *adapter, u32 addr, u8 val)
return RTW_STATUS_CODE(ret);
}
+
int rtw_write16(struct adapter *adapter, u32 addr, u16 val)
{
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
@@ -88,6 +89,7 @@ int rtw_write16(struct adapter *adapter, u32 addr, u16 val)
ret = _write16(pintfhdl, addr, val);
return RTW_STATUS_CODE(ret);
}
+
int rtw_write32(struct adapter *adapter, u32 addr, u32 val)
{
/* struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue; */
@@ -114,7 +116,9 @@ u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
return _write_port(pintfhdl, addr, cnt, pmem);
}
-int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapter *padapter, struct _io_ops *pops))
+int rtw_init_io_priv(struct adapter *padapter,
+ void (*set_intf_ops)(struct adapter *padapter,
+ struct _io_ops *pops))
{
struct io_priv *piopriv = &padapter->iopriv;
struct intf_hdl *pintf = &piopriv->intf;
@@ -132,7 +136,8 @@ int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapt
}
/*
- * Increase and check if the continual_io_error of this @param dvobjprive is larger than MAX_CONTINUAL_IO_ERR
+ * Increase and check if the continual_io_error of this @param dvobjprive is
+ * larger than MAX_CONTINUAL_IO_ERR
* @return true:
* @return false:
*/
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 1ef48bf65..b27a726d8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1174,7 +1174,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
spin_lock_bh(&pmlmepriv->lock);
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
+ pmlmepriv->LinkDetectInfo.traffic_transition_count = 0;
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0;
if (pnetwork->join_res > 0) {
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index b1f20aa81..69c056243 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -11,16 +11,16 @@
#include <linux/unaligned.h>
static struct mlme_handler mlme_sta_tbl[] = {
- {WIFI_ASSOCREQ, "OnAssocReq", &OnAssocReq},
- {WIFI_ASSOCRSP, "OnAssocRsp", &OnAssocRsp},
- {WIFI_REASSOCREQ, "OnReAssocReq", &OnAssocReq},
- {WIFI_REASSOCRSP, "OnReAssocRsp", &OnAssocRsp},
- {WIFI_PROBEREQ, "OnProbeReq", &OnProbeReq},
- {WIFI_PROBERSP, "OnProbeRsp", &OnProbeRsp},
+ {WIFI_ASSOCREQ, "on_assoc_req", &on_assoc_req},
+ {WIFI_ASSOCRSP, "on_assoc_rsp", &on_assoc_rsp},
+ {WIFI_REASSOCREQ, "OnReAssocReq", &on_assoc_req},
+ {WIFI_REASSOCRSP, "OnReAssocRsp", &on_assoc_rsp},
+ {WIFI_PROBEREQ, "on_probe_req", &on_probe_req},
+ {WIFI_PROBERSP, "on_probe_rsp", &on_probe_rsp},
/* below 2 are reserved */
- {0, "DoReserved", &DoReserved},
- {0, "DoReserved", &DoReserved},
+ {0, "do_reserved", &do_reserved},
+ {0, "do_reserved", &do_reserved},
{WIFI_BEACON, "OnBeacon", &OnBeacon},
{WIFI_ATIM, "OnATIM", &OnAtim},
{WIFI_DISASSOC, "OnDisassoc", &OnDisassoc},
@@ -32,18 +32,18 @@ static struct mlme_handler mlme_sta_tbl[] = {
static struct action_handler OnAction_tbl[] = {
{RTW_WLAN_CATEGORY_SPECTRUM_MGMT, "ACTION_SPECTRUM_MGMT", on_action_spct},
- {RTW_WLAN_CATEGORY_QOS, "ACTION_QOS", &DoReserved},
- {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &DoReserved},
+ {RTW_WLAN_CATEGORY_QOS, "ACTION_QOS", &do_reserved},
+ {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &do_reserved},
{RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back},
{RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public},
- {RTW_WLAN_CATEGORY_RADIO_MEASUREMENT, "ACTION_RADIO_MEASUREMENT", &DoReserved},
- {RTW_WLAN_CATEGORY_FT, "ACTION_FT", &DoReserved},
+ {RTW_WLAN_CATEGORY_RADIO_MEASUREMENT, "ACTION_RADIO_MEASUREMENT", &do_reserved},
+ {RTW_WLAN_CATEGORY_FT, "ACTION_FT", &do_reserved},
{RTW_WLAN_CATEGORY_HT, "ACTION_HT", &OnAction_ht},
{RTW_WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &OnAction_sa_query},
- {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved},
- {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved},
- {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved},
- {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved},
+ {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &do_reserved},
+ {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &do_reserved},
+ {RTW_WLAN_CATEGORY_wmm, "ACTION_wmm", &do_reserved},
+ {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &do_reserved},
};
static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
@@ -496,7 +496,7 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame)
/* Following are the callback functions for each subtype of the management frames */
-unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
+unsigned int on_probe_req(struct adapter *padapter, union recv_frame *precv_frame)
{
unsigned int ielen;
unsigned char *p;
@@ -541,7 +541,7 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
}
-unsigned int OnProbeRsp(struct adapter *padapter, union recv_frame *precv_frame)
+unsigned int on_probe_rsp(struct adapter *padapter, union recv_frame *precv_frame)
{
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -926,7 +926,7 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram
}
-unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
+unsigned int on_assoc_req(struct adapter *padapter, union recv_frame *precv_frame)
{
u16 capab_info;
struct rtw_ieee802_11_elems elems;
@@ -1352,7 +1352,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
return _FAIL;
}
-unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
+unsigned int on_assoc_rsp(struct adapter *padapter, union recv_frame *precv_frame)
{
uint i;
int res;
@@ -1643,20 +1643,20 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra
action = frame_body[1];
switch (action) {
- case WLAN_ACTION_ADDBA_REQ: /* ADDBA request */
+ case WLAN_ACTION_ADD_BA_REQ: /* ADDBA request */
memcpy(&(pmlmeinfo->ADDBA_req), &(frame_body[2]), sizeof(struct ADDBA_request));
/* process_addba_req(padapter, (u8 *)&(pmlmeinfo->ADDBA_req), GetAddr3Ptr(pframe)); */
process_addba_req(padapter, (u8 *)&(pmlmeinfo->ADDBA_req), addr);
if (pmlmeinfo->accept_addba_req)
- issue_action_BA(padapter, addr, WLAN_ACTION_ADDBA_RESP, 0);
+ issue_action_BA(padapter, addr, WLAN_ACTION_ADD_BA_RESP, 0);
else
- issue_action_BA(padapter, addr, WLAN_ACTION_ADDBA_RESP, 37);/* reject ADDBA Req */
+ issue_action_BA(padapter, addr, WLAN_ACTION_ADD_BA_RESP, 37);/* reject ADDBA Req */
break;
- case WLAN_ACTION_ADDBA_RESP: /* ADDBA response */
+ case WLAN_ACTION_ADD_BA_RESP: /* ADDBA response */
status = get_unaligned_le16(&frame_body[3]);
tid = ((frame_body[5] >> 2) & 0x7);
@@ -1880,7 +1880,7 @@ unsigned int OnAction(struct adapter *padapter, union recv_frame *precv_frame)
}
-unsigned int DoReserved(struct adapter *padapter, union recv_frame *precv_frame)
+unsigned int do_reserved(struct adapter *padapter, union recv_frame *precv_frame)
{
return _SUCCESS;
}
@@ -3023,12 +3023,12 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da,
*(fctrl) = 0;
if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
else if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
- SetToDs(fctrl);
+ set_to_ds(fctrl);
if (power_mode)
- SetPwrMgt(fctrl);
+ set_pwr_mgt(fctrl);
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN);
@@ -3167,17 +3167,17 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da,
*(fctrl) = 0;
if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)
- SetFrDs(fctrl);
+ set_fr_ds(fctrl);
else if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
- SetToDs(fctrl);
+ set_to_ds(fctrl);
qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
- SetPriority(qc, tid);
+ set_priority(qc, tid);
- SetEOSP(qc, pattrib->eosp);
+ set_eosp(qc, pattrib->eosp);
- SetAckpolicy(qc, pattrib->ack_policy);
+ set_ack_policy(qc, pattrib->ack_policy);
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN);
@@ -3466,11 +3466,11 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
/* A-MSDU NOT Supported */
BA_para_set = 0;
/* immediate Block Ack */
- BA_para_set |= BIT(1) & IEEE80211_ADDBA_PARAM_POLICY_MASK;
+ BA_para_set |= BIT(1) & IEEE80211_add_ba_PARAM_POLICY_MASK;
/* TID */
- BA_para_set |= (status << 2) & IEEE80211_ADDBA_PARAM_TID_MASK;
+ BA_para_set |= (status << 2) & IEEE80211_add_ba_PARAM_TID_MASK;
/* max buffer size is 8 MSDU */
- BA_para_set |= (8 << 6) & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK;
+ BA_para_set |= (8 << 6) & IEEE80211_add_ba_PARAM_BUF_SIZE_MASK;
} else {
BA_para_set = (0x1002 | ((status & 0xf) << 2)); /* immediate ack & 64 buffer size */
}
@@ -3519,8 +3519,8 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
if (hal_btcoex_IsBTCoexCtrlAMPDUSize(padapter) &&
padapter->driver_rx_ampdu_factor == 0xFF) {
/* max buffer size is 8 MSDU */
- BA_para_set &= ~IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK;
- BA_para_set |= (8 << 6) & IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK;
+ BA_para_set &= ~IEEE80211_add_ba_PARAM_BUF_SIZE_MASK;
+ BA_para_set |= (8 << 6) & IEEE80211_add_ba_PARAM_BUF_SIZE_MASK;
}
if (pregpriv->ampdu_amsdu == 0)/* disabled */
@@ -3567,7 +3567,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct __queue *queue = &(pmlmepriv->scanned_queue);
- u8 InfoContent[16] = {0};
+ u8 info_content[16] = {0};
u8 ICS[8][15];
if ((pmlmepriv->num_FortyMHzIntolerant == 0) || (pmlmepriv->num_sta_no_ht == 0))
@@ -3668,8 +3668,8 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
if (ICS[i][0] != 1)
continue;
- InfoContent[k] = i;
- /* SET_BSS_INTOLERANT_ELE_REG_CLASS(InfoContent, i); */
+ info_content[k] = i;
+ /* SET_BSS_INTOLERANT_ELE_REG_CLASS(info_content, i); */
k++;
for (j = 1; j <= 14; j++) {
@@ -3677,13 +3677,13 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
continue;
if (k < 16) {
- InfoContent[k] = j; /* channel number */
- /* SET_BSS_INTOLERANT_ELE_CHANNEL(InfoContent+k, j); */
+ info_content[k] = j; /* channel number */
+ /* SET_BSS_INTOLERANT_ELE_CHANNEL(info_content+k, j); */
k++;
}
}
- pframe = rtw_set_ie(pframe, WLAN_EID_BSS_INTOLERANT_CHL_REPORT, k, InfoContent, &(pattrib->pktlen));
+ pframe = rtw_set_ie(pframe, WLAN_EID_BSS_INTOLERANT_CHL_REPORT, k, info_content, &(pattrib->pktlen));
}
@@ -3858,8 +3858,8 @@ void site_survey(struct adapter *padapter)
initialgain = 0xff; /* restore RX GAIN */
rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
/* turn on dynamic functions */
- Restore_DM_Func_Flag(padapter);
- /* Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */
+ restore_dm_func_flag(padapter);
+ /* switch_dm_func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */
if (is_client_associated_to_ap(padapter))
issue_nulldata(padapter, NULL, 0, 3, 500);
@@ -3930,9 +3930,9 @@ u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, str
memcpy(bssid->ies, (pframe + sizeof(struct ieee80211_hdr_3addr)), bssid->ie_length);
/* get the signal strength */
- bssid->rssi = precv_frame->u.hdr.attrib.phy_info.RecvSignalPower; /* in dBM.raw data */
- bssid->phy_info.signal_quality = precv_frame->u.hdr.attrib.phy_info.SignalQuality;/* in percentage */
- bssid->phy_info.signal_strength = precv_frame->u.hdr.attrib.phy_info.SignalStrength;/* in percentage */
+ bssid->rssi = precv_frame->u.hdr.attrib.phy_info.recv_signal_power; /* in dBM.raw data */
+ bssid->phy_info.signal_quality = precv_frame->u.hdr.attrib.phy_info.signal_quality;/* in percentage */
+ bssid->phy_info.signal_strength = precv_frame->u.hdr.attrib.phy_info.signal_strength;/* in percentage */
/* checking SSID */
p = rtw_get_ie(bssid->ies + ie_offset, WLAN_EID_SSID, &len, bssid->ie_length - ie_offset);
@@ -4398,7 +4398,7 @@ void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct survey_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_Survey);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_survey);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
psurvey_evt = (struct survey_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -4451,7 +4451,7 @@ void report_surveydone_event(struct adapter *padapter)
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct surveydone_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_SurveyDone);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_surveyDone);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
psurveydone_evt = (struct surveydone_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -4545,7 +4545,7 @@ void report_wmm_edca_update(struct adapter *padapter)
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct wmm_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_WMM);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_wmm);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
pwmm_event = (struct wmm_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -4591,7 +4591,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct stadel_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_DelSTA);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_del_sta);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
pdel_sta_evt = (struct stadel_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -4642,7 +4642,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct stassoc_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_AddSTA);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_add_sta);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
padd_sta_evt = (struct stassoc_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -4757,7 +4757,7 @@ static void rtw_mlmeext_disconnect(struct adapter *padapter)
timer_delete_sync(&pmlmeext->link_timer);
/* pmlmepriv->LinkDetectInfo.TrafficBusyState = false; */
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
+ pmlmepriv->LinkDetectInfo.traffic_transition_count = 0;
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0;
}
@@ -4785,7 +4785,7 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
/* turn on dynamic functions */
- Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
+ switch_dm_func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
/* update IOT-related issue */
update_IOT_info(padapter);
@@ -4876,8 +4876,8 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter, struct sta_info *p
pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
- psta->bssratelen = rtw_get_rateset_len(pmlmeinfo->FW_sta_info[psta->mac_id].SupportedRates);
- memcpy(psta->bssrateset, pmlmeinfo->FW_sta_info[psta->mac_id].SupportedRates, psta->bssratelen);
+ psta->bssratelen = rtw_get_rateset_len(pmlmeinfo->FW_sta_info[psta->mac_id].supported_rates);
+ memcpy(psta->bssrateset, pmlmeinfo->FW_sta_info[psta->mac_id].supported_rates, psta->bssratelen);
/* update adhoc sta_info */
update_sta_info(padapter, psta);
@@ -4889,7 +4889,7 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter, struct sta_info *p
psta->raid = networktype_to_raid_ex(padapter, psta);
/* rate radaptive */
- Update_RA_Entry(padapter, psta);
+ update_ra_entry(padapter, psta);
}
void mlmeext_sta_del_event_callback(struct adapter *padapter)
@@ -4905,15 +4905,15 @@ void _linked_info_dump(struct adapter *padapter)
int i;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
- int UndecoratedSmoothedPWDB;
+ int undecorated_smoothed_pwdb;
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
- if (padapter->bLinkInfoDump) {
+ if (padapter->is_link_info_dump) {
if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
rtw_hal_get_def_var(padapter,
HAL_DEF_UNDERCORATEDSMOOTHEDPWDB,
- &UndecoratedSmoothedPWDB);
+ &undecorated_smoothed_pwdb);
for (i = 0; i < NUM_STA; i++) {
if (pdvobj->macid[i]) {
@@ -5225,7 +5225,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
- Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
+ switch_dm_func(padapter, DYNAMIC_FUNC_DISABLE, false);
/* config the initial gain under linking, need to write the BB registers */
/* initialgain = 0x1E; */
@@ -5375,7 +5375,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
}
/* disable dynamic functions, such as high power, DIG */
- /* Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false); */
+ /* switch_dm_func(padapter, DYNAMIC_FUNC_DISABLE, false); */
/* config the initial gain under linking, need to write the BB registers */
/* initialgain = 0x1E; */
@@ -5533,7 +5533,7 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
(pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) {
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
- Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
+ switch_dm_func(padapter, DYNAMIC_FUNC_DISABLE, false);
/* config the initial gain under scanning, need to write the BB
* registers
@@ -5674,7 +5674,7 @@ u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf)
/* pmlmeinfo->ADDBA_retry_count = 0; */
/* pmlmeinfo->candidate_tid_bitmap |= (0x1 << pparm->tid); */
/* psta->htpriv.candidate_tid_bitmap |= BIT(pparm->tid); */
- issue_action_BA(padapter, pparm->addr, WLAN_ACTION_ADDBA_REQ, (u16)pparm->tid);
+ issue_action_BA(padapter, pparm->addr, WLAN_ACTION_ADD_BA_REQ, (u16)pparm->tid);
/* _set_timer(&pmlmeext->ADDBA_timer, ADDBA_TO); */
_set_timer(&psta->addba_retry_timer, ADDBA_TO);
} else {
@@ -5785,7 +5785,7 @@ void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame)
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct survey_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_Survey);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_survey);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
psurvey_evt = (struct survey_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -5839,7 +5839,7 @@ void report_surveydone_event(struct adapter *padapter)
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct surveydone_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_SurveyDone);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_surveyDone);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
psurveydone_evt = (struct surveydone_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -5933,7 +5933,7 @@ void report_wmm_edca_update(struct adapter *padapter)
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct wmm_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_WMM);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_wmm);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
pwmm_event = (struct wmm_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -5979,7 +5979,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct stadel_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_DelSTA);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_del_sta);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
pdel_sta_evt = (struct stadel_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -6030,7 +6030,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct stassoc_event);
- pc2h_evt_hdr->ID = GEN_EVT_CODE(_AddSTA);
+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_add_sta);
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
padd_sta_evt = (struct stassoc_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
@@ -6145,7 +6145,7 @@ static void rtw_mlmeext_disconnect(struct adapter *padapter)
timer_delete_sync(&pmlmeext->link_timer);
/* pmlmepriv->LinkDetectInfo.TrafficBusyState = false; */
- pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
+ pmlmepriv->LinkDetectInfo.traffic_transition_count = 0;
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0;
}
@@ -6173,7 +6173,7 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
/* turn on dynamic functions */
- Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
+ switch_dm_func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
/* update IOT-related issue */
update_IOT_info(padapter);
@@ -6264,8 +6264,8 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter, struct sta_info *p
pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
- psta->bssratelen = rtw_get_rateset_len(pmlmeinfo->FW_sta_info[psta->mac_id].SupportedRates);
- memcpy(psta->bssrateset, pmlmeinfo->FW_sta_info[psta->mac_id].SupportedRates, psta->bssratelen);
+ psta->bssratelen = rtw_get_rateset_len(pmlmeinfo->FW_sta_info[psta->mac_id].supported_rates);
+ memcpy(psta->bssrateset, pmlmeinfo->FW_sta_info[psta->mac_id].supported_rates, psta->bssratelen);
/* update adhoc sta_info */
update_sta_info(padapter, psta);
@@ -6277,7 +6277,7 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter, struct sta_info *p
psta->raid = networktype_to_raid_ex(padapter, psta);
/* rate radaptive */
- Update_RA_Entry(padapter, psta);
+ update_ra_entry(padapter, psta);
}
void mlmeext_sta_del_event_callback(struct adapter *padapter)
@@ -6293,15 +6293,15 @@ void _linked_info_dump(struct adapter *padapter)
int i;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
- int UndecoratedSmoothedPWDB;
+ int undecorated_smoothed_pwdb;
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
- if (padapter->bLinkInfoDump) {
+ if (padapter->is_link_info_dump) {
if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
rtw_hal_get_def_var(padapter,
HAL_DEF_UNDERCORATEDSMOOTHEDPWDB,
- &UndecoratedSmoothedPWDB);
+ &undecorated_smoothed_pwdb);
for (i = 0; i < NUM_STA; i++) {
if (pdvobj->macid[i]) {
@@ -6613,7 +6613,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
- Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
+ switch_dm_func(padapter, DYNAMIC_FUNC_DISABLE, false);
/* config the initial gain under linking, need to write the BB registers */
/* initialgain = 0x1E; */
@@ -6763,7 +6763,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
}
/* disable dynamic functions, such as high power, DIG */
- /* Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false); */
+ /* switch_dm_func(padapter, DYNAMIC_FUNC_DISABLE, false); */
/* config the initial gain under linking, need to write the BB registers */
/* initialgain = 0x1E; */
@@ -6921,7 +6921,7 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
(pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) {
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
- Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
+ switch_dm_func(padapter, DYNAMIC_FUNC_DISABLE, false);
/* config the initial gain under scanning, need to write the BB
* registers
@@ -7062,7 +7062,7 @@ u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf)
/* pmlmeinfo->ADDBA_retry_count = 0; */
/* pmlmeinfo->candidate_tid_bitmap |= (0x1 << pparm->tid); */
/* psta->htpriv.candidate_tid_bitmap |= BIT(pparm->tid); */
- issue_action_BA(padapter, pparm->addr, WLAN_ACTION_ADDBA_REQ, (u16)pparm->tid);
+ issue_action_BA(padapter, pparm->addr, WLAN_ACTION_ADD_BA_REQ, (u16)pparm->tid);
/* _set_timer(&pmlmeext->ADDBA_timer, ADDBA_TO); */
_set_timer(&psta->addba_retry_timer, ADDBA_TO);
} else {
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: rtl8723bs: coding style cleanups
2026-03-18 17:44 [PATCH] staging: rtl8723bs: coding style cleanups Malavya Raval
@ 2026-03-18 19:27 ` Nikolay Kulikov
0 siblings, 0 replies; 2+ messages in thread
From: Nikolay Kulikov @ 2026-03-18 19:27 UTC (permalink / raw)
To: Malavya Raval; +Cc: gregkh, linux-staging, linux-kernel
On Wed, Mar 18, 2026 at 10:44:46AM -0700, Malavya Raval wrote:
> Renaming CamelCase variables and macros to snake_case and fixing
> formatting issues in the rtl8723bs staging driver to align
> with kernel coding style standards.
>
> Signed-off-by: Malavya Raval <malavyaraval@gmail.com>
>
> ---
Please submit one patch with one change. In this case, each variable
requires a separate patch.
Also, always check your patch before submitting:
./scripts/checkpatch.pl --strict path/to/patch
Thanks,
Nikolay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-18 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 17:44 [PATCH] staging: rtl8723bs: coding style cleanups Malavya Raval
2026-03-18 19:27 ` Nikolay Kulikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox