* [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan
@ 2023-01-09 19:08 Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 1/7] staging: rtl8192e: Rename ChannelPlan, eeprom_ChannelPlan and CckPwEnl Philipp Hortmann
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variables to avoid CamelCase which is not accepted by checkpatch.
Tested with rtl8192e
Transferred this patch over wlan connection of rtl8192e
---
V1 -> V2: In patch "Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath"
Changed TSSI_13dBm to tssi_13dBm instead of tssi_13dbm
Philipp Hortmann (7):
staging: rtl8192e: Rename ChannelPlan, eeprom_ChannelPlan and CckPwEnl
staging: rtl8192e: Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath
staging: rtl8192e: Rename CCKPresentAtt...
staging: rtl8192e: Rename TxPowerLevelCCK...
staging: rtl8192e: Rename TxPowerLevelOFDM24G...
staging: rtl8192e: Rename MCSTxPowerL.., LegacyHTTxPowe.. and
AntennaTx..
staging: rtl8192e: Rename SetRFPowerSta.., RfReg0Value and
bTXPowerDa..
.../rtl8192e/rtl8192e/r8190P_rtl8256.c | 14 +--
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 78 +++++++-------
.../staging/rtl8192e/rtl8192e/r8192E_phy.c | 100 +++++++++---------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 42 ++++----
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 30 +++---
6 files changed, 137 insertions(+), 137 deletions(-)
--
2.39.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/7] staging: rtl8192e: Rename ChannelPlan, eeprom_ChannelPlan and CckPwEnl
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
@ 2023-01-09 19:08 ` Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 2/7] staging: rtl8192e: Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath Philipp Hortmann
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable ChannelPlan to chnl_plan, eeprom_ChannelPlan to
eeprom_chnl_plan and CckPwEnl to cck_pwr_enl to avoid CamelCase which is
not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
.../rtl8192e/rtl8192e/r8190P_rtl8256.c | 2 +-
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 20 +++++++++----------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 8 ++++----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +++---
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index ab2e9b729883..93928f3585c1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -154,7 +154,7 @@ void rtl92e_set_cck_tx_power(struct net_device *dev, u8 powerlevel)
if (priv->CustomerID == RT_CID_819x_Netcore)
TxAGC = 0x22;
else
- TxAGC += priv->CckPwEnl;
+ TxAGC += priv->cck_pwr_enl;
}
if (TxAGC > 0x24)
TxAGC = 0x24;
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index f02e67f68e23..25fa7714df4e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -306,7 +306,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
priv->eeprom_CustomerID = usValue & 0xff;
usValue = rtl92e_eeprom_read(dev,
EEPROM_ICVersion_ChannelPlan>>1);
- priv->eeprom_ChannelPlan = usValue&0xff;
+ priv->eeprom_chnl_plan = usValue&0xff;
IC_Version = (usValue & 0xff00)>>8;
ICVer8192 = IC_Version & 0xf;
@@ -328,7 +328,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
priv->eeprom_vid = 0;
priv->eeprom_did = 0;
priv->eeprom_CustomerID = 0;
- priv->eeprom_ChannelPlan = 0;
+ priv->eeprom_chnl_plan = 0;
}
if (!priv->AutoloadFailFlag) {
@@ -473,9 +473,9 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
priv->rf_chip = RF_8256;
if (priv->reg_chnl_plan == 0xf)
- priv->ChannelPlan = priv->eeprom_ChannelPlan;
+ priv->chnl_plan = priv->eeprom_chnl_plan;
else
- priv->ChannelPlan = priv->reg_chnl_plan;
+ priv->chnl_plan = priv->reg_chnl_plan;
if (priv->eeprom_vid == 0x1186 && priv->eeprom_did == 0x3304)
priv->CustomerID = RT_CID_DLINK;
@@ -495,10 +495,10 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
break;
case EEPROM_CID_TOSHIBA:
priv->CustomerID = RT_CID_TOSHIBA;
- if (priv->eeprom_ChannelPlan&0x80)
- priv->ChannelPlan = priv->eeprom_ChannelPlan&0x7f;
+ if (priv->eeprom_chnl_plan & 0x80)
+ priv->chnl_plan = priv->eeprom_chnl_plan & 0x7f;
else
- priv->ChannelPlan = 0x0;
+ priv->chnl_plan = 0x0;
break;
case EEPROM_CID_Nettronix:
priv->CustomerID = RT_CID_Nettronix;
@@ -516,9 +516,9 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
break;
}
- if (priv->ChannelPlan > CHANNEL_PLAN_LEN - 1)
- priv->ChannelPlan = 0;
- priv->ChannelPlan = COUNTRY_CODE_WORLD_WIDE_13;
+ if (priv->chnl_plan > CHANNEL_PLAN_LEN - 1)
+ priv->chnl_plan = 0;
+ priv->chnl_plan = COUNTRY_CODE_WORLD_WIDE_13;
if (priv->eeprom_vid == 0x1186 && priv->eeprom_did == 0x3304)
priv->rtllib->bSupportRemoteWakeUp = true;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index f8fbe78ccad9..92260d098eaa 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -862,7 +862,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->cck_present_attn = 0;
priv->rfa_txpowertrackingindex = 0;
priv->rfc_txpowertrackingindex = 0;
- priv->CckPwEnl = 6;
+ priv->cck_pwr_enl = 6;
priv->rst_progress = RESET_TYPE_NORESET;
priv->force_reset = false;
memset(priv->rtllib->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
@@ -952,13 +952,13 @@ static short _rtl92e_get_channel_map(struct net_device *dev)
return -1;
}
- if (priv->ChannelPlan >= COUNTRY_CODE_MAX) {
+ if (priv->chnl_plan >= COUNTRY_CODE_MAX) {
netdev_info(dev,
"rtl819x_init:Error channel plan! Set to default.\n");
- priv->ChannelPlan = COUNTRY_CODE_FCC;
+ priv->chnl_plan = COUNTRY_CODE_FCC;
}
dot11d_init(priv->rtllib);
- dot11d_channel_map(priv->ChannelPlan, priv->rtllib);
+ dot11d_channel_map(priv->chnl_plan, priv->rtllib);
for (i = 1; i <= 11; i++)
(priv->rtllib->active_channel_map)[i] = 1;
(priv->rtllib->active_channel_map)[12] = 2;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index cceb77492363..93b3b75a063f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -420,7 +420,7 @@ struct r8192_priv {
u16 eeprom_vid;
u16 eeprom_did;
u8 eeprom_CustomerID;
- u16 eeprom_ChannelPlan;
+ u16 eeprom_chnl_plan;
u8 EEPROMTxPowerLevelCCK[14];
u8 EEPROMTxPowerLevelOFDM24G[14];
@@ -451,7 +451,7 @@ struct r8192_priv {
bool bTXPowerDataReadFromEEPORM;
u16 reg_chnl_plan;
- u16 ChannelPlan;
+ u16 chnl_plan;
u8 hw_rf_off_action;
bool rf_change_in_progress;
@@ -460,7 +460,7 @@ struct r8192_priv {
u8 DM_Type;
- u8 CckPwEnl;
+ u8 cck_pwr_enl;
u16 TSSI_13dBm;
u32 Pwr_Track;
u8 CCKPresentAttentuation_20Mdefault;
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/7] staging: rtl8192e: Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 1/7] staging: rtl8192e: Rename ChannelPlan, eeprom_ChannelPlan and CckPwEnl Philipp Hortmann
@ 2023-01-09 19:08 ` Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 3/7] staging: rtl8192e: Rename CCKPresentAtt Philipp Hortmann
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable TSSI_13dBm to tssi_13dBm, Pwr_Track to pwr_track and
NumTotalRFPath to num_total_rf_path to avoid CamelCase which is not
accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
V1 -> V2: Changed TSSI_13dBm to tssi_13dBm instead of tssi_13dbm
---
drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c | 8 ++++----
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +++---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 14 +++++++-------
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index 93928f3585c1..7517ec001421 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -21,7 +21,7 @@ void rtl92e_set_bandwidth(struct net_device *dev,
return;
}
- for (eRFPath = 0; eRFPath < priv->NumTotalRFPath; eRFPath++) {
+ for (eRFPath = 0; eRFPath < priv->num_total_rf_path; eRFPath++) {
if (!rtl92e_is_legal_rf_path(dev, eRFPath))
continue;
@@ -63,10 +63,10 @@ bool rtl92e_config_rf(struct net_device *dev)
u8 ConstRetryTimes = 5, RetryTimes = 5;
u8 ret = 0;
- priv->NumTotalRFPath = RTL819X_TOTAL_RF_PATH;
+ priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH;
for (eRFPath = (enum rf90_radio_path)RF90_PATH_A;
- eRFPath < priv->NumTotalRFPath; eRFPath++) {
+ eRFPath < priv->num_total_rf_path; eRFPath++) {
if (!rtl92e_is_legal_rf_path(dev, eRFPath))
continue;
@@ -195,7 +195,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
if (index == 3) {
writeVal_tmp = (byte3 << 24) | (byte2 << 16) |
(byte1 << 8) | byte0;
- priv->Pwr_Track = writeVal_tmp;
+ priv->pwr_track = writeVal_tmp;
}
if (priv->bDynamicTxHighPower)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 25fa7714df4e..8b61c7581fe0 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -371,7 +371,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
0xff00) >> 8;
else
priv->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
- priv->TSSI_13dBm = priv->EEPROMThermalMeter * 100;
+ priv->tssi_13dBm = priv->EEPROMThermalMeter * 100;
if (priv->epromtype == EEPROM_93C46) {
if (!priv->AutoloadFailFlag) {
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index a813eded4cb3..ccbce3e177b6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -904,7 +904,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
break;
case CmdID_RF_WriteReg:
for (eRFPath = 0; eRFPath <
- priv->NumTotalRFPath; eRFPath++)
+ priv->num_total_rf_path; eRFPath++)
rtl92e_set_rf_reg(dev,
(enum rf90_radio_path)eRFPath,
CurrentCmd->Para1, bMask12Bits,
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 93b3b75a063f..825cb8ce06c0 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -445,7 +445,7 @@ struct r8192_priv {
u8 nCur40MhzPrimeSC;
u32 RfReg0Value[4];
- u8 NumTotalRFPath;
+ u8 num_total_rf_path;
bool brfpath_rxenable[4];
bool bTXPowerDataReadFromEEPORM;
@@ -461,8 +461,8 @@ struct r8192_priv {
u8 DM_Type;
u8 cck_pwr_enl;
- u16 TSSI_13dBm;
- u32 Pwr_Track;
+ u16 tssi_13dBm;
+ u32 pwr_track;
u8 CCKPresentAttentuation_20Mdefault;
u8 CCKPresentAttentuation_40Mdefault;
s8 CCKPresentAttentuation_difference;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index a18393c8a833..6cd49b3f6408 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -615,14 +615,14 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
u8 RF_Type, tmp_report[5] = {0, 0, 0, 0, 0};
u32 Value;
u8 Pwr_Flag;
- u16 Avg_TSSI_Meas, TSSI_13dBm, Avg_TSSI_Meas_from_driver = 0;
+ u16 Avg_TSSI_Meas, tssi_13dBm, Avg_TSSI_Meas_from_driver = 0;
u32 delta = 0;
rtl92e_writeb(dev, Pw_Track_Flag, 0);
rtl92e_writeb(dev, FW_Busy_Flag, 0);
priv->rtllib->bdynamic_txpower_enable = false;
- powerlevelOFDM24G = priv->Pwr_Track >> 24;
+ powerlevelOFDM24G = priv->pwr_track >> 24;
RF_Type = priv->rf_type;
Value = (RF_Type<<8) | powerlevelOFDM24G;
@@ -688,12 +688,12 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
Avg_TSSI_Meas_from_driver += tmp_report[k];
Avg_TSSI_Meas_from_driver *= 100 / 5;
- TSSI_13dBm = priv->TSSI_13dBm;
+ tssi_13dBm = priv->tssi_13dBm;
- if (Avg_TSSI_Meas_from_driver > TSSI_13dBm)
- delta = Avg_TSSI_Meas_from_driver - TSSI_13dBm;
+ if (Avg_TSSI_Meas_from_driver > tssi_13dBm)
+ delta = Avg_TSSI_Meas_from_driver - tssi_13dBm;
else
- delta = TSSI_13dBm - Avg_TSSI_Meas_from_driver;
+ delta = tssi_13dBm - Avg_TSSI_Meas_from_driver;
if (delta <= E_FOR_TX_POWER_TRACK) {
priv->rtllib->bdynamic_txpower_enable = true;
@@ -701,7 +701,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
rtl92e_writeb(dev, FW_Busy_Flag, 0);
return;
}
- if (Avg_TSSI_Meas_from_driver < TSSI_13dBm - E_FOR_TX_POWER_TRACK)
+ if (Avg_TSSI_Meas_from_driver < tssi_13dBm - E_FOR_TX_POWER_TRACK)
_rtl92e_dm_tx_update_tssi_weak_signal(dev,
RF_Type);
else
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/7] staging: rtl8192e: Rename CCKPresentAtt...
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 1/7] staging: rtl8192e: Rename ChannelPlan, eeprom_ChannelPlan and CckPwEnl Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 2/7] staging: rtl8192e: Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath Philipp Hortmann
@ 2023-01-09 19:08 ` Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 4/7] staging: rtl8192e: Rename TxPowerLevelCCK Philipp Hortmann
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable CCKPresentAttentuation_20Mdefault to
cck_present_attn_20m_def, CCKPresentAttentuation_40Mdefault to
cck_present_attn_40m_def and CCKPresentAttentuation_difference to
cck_present_attn_diff to avoid CamelCase which is not accepted by
checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 ++++----
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 8 ++++----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +++---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 16 ++++++++--------
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 8b61c7581fe0..5c5326491e90 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -787,14 +787,14 @@ bool rtl92e_start_adapter(struct net_device *dev)
for (i = 0; i < CCKTxBBGainTableLength; i++) {
if (TempCCk == dm_cck_tx_bb_gain[i][0]) {
- priv->CCKPresentAttentuation_20Mdefault = i;
+ priv->cck_present_attn_20m_def = i;
break;
}
}
- priv->CCKPresentAttentuation_40Mdefault = 0;
- priv->CCKPresentAttentuation_difference = 0;
+ priv->cck_present_attn_40m_def = 0;
+ priv->cck_present_attn_diff = 0;
priv->cck_present_attn =
- priv->CCKPresentAttentuation_20Mdefault;
+ priv->cck_present_attn_20m_def;
priv->btxpower_tracking = false;
}
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index ccbce3e177b6..33b39b1dc655 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -1009,8 +1009,8 @@ static void _rtl92e_cck_tx_power_track_bw_switch_tssi(struct net_device *dev)
switch (priv->CurrentChannelBW) {
case HT_CHANNEL_WIDTH_20:
priv->cck_present_attn =
- priv->CCKPresentAttentuation_20Mdefault +
- priv->CCKPresentAttentuation_difference;
+ priv->cck_present_attn_20m_def +
+ priv->cck_present_attn_diff;
if (priv->cck_present_attn >
(CCKTxBBGainTableLength-1))
@@ -1034,8 +1034,8 @@ static void _rtl92e_cck_tx_power_track_bw_switch_tssi(struct net_device *dev)
case HT_CHANNEL_WIDTH_20_40:
priv->cck_present_attn =
- priv->CCKPresentAttentuation_40Mdefault +
- priv->CCKPresentAttentuation_difference;
+ priv->cck_present_attn_40m_def +
+ priv->cck_present_attn_diff;
if (priv->cck_present_attn >
(CCKTxBBGainTableLength - 1))
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 825cb8ce06c0..344b2c92843a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -463,9 +463,9 @@ struct r8192_priv {
u8 cck_pwr_enl;
u16 tssi_13dBm;
u32 pwr_track;
- u8 CCKPresentAttentuation_20Mdefault;
- u8 CCKPresentAttentuation_40Mdefault;
- s8 CCKPresentAttentuation_difference;
+ u8 cck_present_attn_20m_def;
+ u8 cck_present_attn_40m_def;
+ s8 cck_present_attn_diff;
s8 cck_present_attn;
long undecorated_smoothed_pwdb;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 6cd49b3f6408..6d3c9491d070 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -708,21 +708,21 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
_rtl92e_dm_tx_update_tssi_strong_signal(dev, RF_Type);
if (RF_Type == RF_2T4R) {
- priv->CCKPresentAttentuation_difference
+ priv->cck_present_attn_diff
= priv->rfa_txpowertrackingindex - priv->rfa_txpowertracking_default;
} else {
- priv->CCKPresentAttentuation_difference
+ priv->cck_present_attn_diff
= priv->rfa_txpowertrackingindex_real - priv->rfa_txpowertracking_default;
}
if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20)
priv->cck_present_attn =
- priv->CCKPresentAttentuation_20Mdefault +
- priv->CCKPresentAttentuation_difference;
+ priv->cck_present_attn_20m_def +
+ priv->cck_present_attn_diff;
else
priv->cck_present_attn =
- priv->CCKPresentAttentuation_40Mdefault +
- priv->CCKPresentAttentuation_difference;
+ priv->cck_present_attn_40m_def +
+ priv->cck_present_attn_diff;
if (priv->cck_present_attn > (CCKTxBBGainTableLength-1))
priv->cck_present_attn = CCKTxBBGainTableLength-1;
@@ -742,8 +742,8 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
rtl92e_dm_cck_txpower_adjust(dev, priv->bcck_in_ch14);
}
- if (priv->CCKPresentAttentuation_difference <= -12 ||
- priv->CCKPresentAttentuation_difference >= 24) {
+ if (priv->cck_present_attn_diff <= -12 ||
+ priv->cck_present_attn_diff >= 24) {
priv->rtllib->bdynamic_txpower_enable = true;
rtl92e_writeb(dev, Pw_Track_Flag, 0);
rtl92e_writeb(dev, FW_Busy_Flag, 0);
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 4/7] staging: rtl8192e: Rename TxPowerLevelCCK...
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
` (2 preceding siblings ...)
2023-01-09 19:08 ` [PATCH v2 3/7] staging: rtl8192e: Rename CCKPresentAtt Philipp Hortmann
@ 2023-01-09 19:08 ` Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 5/7] staging: rtl8192e: Rename TxPowerLevelOFDM24G Philipp Hortmann
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable TxPowerLevelCCK to tx_pwr_level_cck, TxPowerLevelCCK_A to
tx_pwr_level_cck_a and TxPowerLevelCCK_C to tx_pwr_level_cck_c to avoid
CamelCase which is not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 14 +++++++-------
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 8 ++++----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 5c5326491e90..ec817de1ca59 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -408,7 +408,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
}
if (priv->epromtype == EEPROM_93C46) {
for (i = 0; i < 14; i++) {
- priv->TxPowerLevelCCK[i] =
+ priv->tx_pwr_level_cck[i] =
priv->EEPROMTxPowerLevelCCK[i];
priv->TxPowerLevelOFDM24G[i] =
priv->EEPROMTxPowerLevelOFDM24G[i];
@@ -427,31 +427,31 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
} else if (priv->epromtype == EEPROM_93C56) {
for (i = 0; i < 3; i++) {
- priv->TxPowerLevelCCK_A[i] =
+ priv->tx_pwr_level_cck_a[i] =
priv->EEPROMRfACCKChnl1TxPwLevel[0];
priv->TxPowerLevelOFDM24G_A[i] =
priv->EEPROMRfAOfdmChnlTxPwLevel[0];
- priv->TxPowerLevelCCK_C[i] =
+ priv->tx_pwr_level_cck_c[i] =
priv->EEPROMRfCCCKChnl1TxPwLevel[0];
priv->TxPowerLevelOFDM24G_C[i] =
priv->EEPROMRfCOfdmChnlTxPwLevel[0];
}
for (i = 3; i < 9; i++) {
- priv->TxPowerLevelCCK_A[i] =
+ priv->tx_pwr_level_cck_a[i] =
priv->EEPROMRfACCKChnl1TxPwLevel[1];
priv->TxPowerLevelOFDM24G_A[i] =
priv->EEPROMRfAOfdmChnlTxPwLevel[1];
- priv->TxPowerLevelCCK_C[i] =
+ priv->tx_pwr_level_cck_c[i] =
priv->EEPROMRfCCCKChnl1TxPwLevel[1];
priv->TxPowerLevelOFDM24G_C[i] =
priv->EEPROMRfCOfdmChnlTxPwLevel[1];
}
for (i = 9; i < 14; i++) {
- priv->TxPowerLevelCCK_A[i] =
+ priv->tx_pwr_level_cck_a[i] =
priv->EEPROMRfACCKChnl1TxPwLevel[2];
priv->TxPowerLevelOFDM24G_A[i] =
priv->EEPROMRfAOfdmChnlTxPwLevel[2];
- priv->TxPowerLevelCCK_C[i] =
+ priv->tx_pwr_level_cck_c[i] =
priv->EEPROMRfCCCKChnl1TxPwLevel[2];
priv->TxPowerLevelOFDM24G_C[i] =
priv->EEPROMRfCOfdmChnlTxPwLevel[2];
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 33b39b1dc655..ee6138699e10 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -592,14 +592,14 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
u32 u4RegValue;
if (priv->epromtype == EEPROM_93C46) {
- powerlevel = priv->TxPowerLevelCCK[channel-1];
+ powerlevel = priv->tx_pwr_level_cck[channel - 1];
powerlevelOFDM24G = priv->TxPowerLevelOFDM24G[channel-1];
} else if (priv->epromtype == EEPROM_93C56) {
if (priv->rf_type == RF_1T2R) {
- powerlevel = priv->TxPowerLevelCCK_C[channel-1];
+ powerlevel = priv->tx_pwr_level_cck_c[channel - 1];
powerlevelOFDM24G = priv->TxPowerLevelOFDM24G_C[channel-1];
} else if (priv->rf_type == RF_2T4R) {
- powerlevel = priv->TxPowerLevelCCK_A[channel-1];
+ powerlevel = priv->tx_pwr_level_cck_a[channel - 1];
powerlevelOFDM24G = priv->TxPowerLevelOFDM24G_A[channel-1];
ant_pwr_diff = priv->TxPowerLevelOFDM24G_C[channel-1]
@@ -726,7 +726,7 @@ u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath)
static void _rtl92e_set_tx_power_level(struct net_device *dev, u8 channel)
{
struct r8192_priv *priv = rtllib_priv(dev);
- u8 powerlevel = priv->TxPowerLevelCCK[channel-1];
+ u8 powerlevel = priv->tx_pwr_level_cck[channel - 1];
u8 powerlevelOFDM24G = priv->TxPowerLevelOFDM24G[channel-1];
switch (priv->rf_chip) {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 344b2c92843a..1efaea925b3a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -470,9 +470,9 @@ struct r8192_priv {
long undecorated_smoothed_pwdb;
u32 MCSTxPowerLevelOriginalOffset[6];
- u8 TxPowerLevelCCK[14];
- u8 TxPowerLevelCCK_A[14];
- u8 TxPowerLevelCCK_C[14];
+ u8 tx_pwr_level_cck[14];
+ u8 tx_pwr_level_cck_a[14];
+ u8 tx_pwr_level_cck_c[14];
u8 TxPowerLevelOFDM24G[14];
u8 TxPowerLevelOFDM24G_A[14];
u8 TxPowerLevelOFDM24G_C[14];
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 5/7] staging: rtl8192e: Rename TxPowerLevelOFDM24G...
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
` (3 preceding siblings ...)
2023-01-09 19:08 ` [PATCH v2 4/7] staging: rtl8192e: Rename TxPowerLevelCCK Philipp Hortmann
@ 2023-01-09 19:08 ` Philipp Hortmann
2023-01-09 19:09 ` [PATCH v2 6/7] staging: rtl8192e: Rename MCSTxPowerL.., LegacyHTTxPowe.. and AntennaTx Philipp Hortmann
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable TxPowerLevelOFDM24G to tx_pwr_level_ofdm_24g,
TxPowerLevelOFDM24G_A to tx_pwr_level_ofdm_24g_a and TxPowerLevelOFDM24G_C
to tx_pwr_level_ofdm_24g_c to avoid CamelCase which is not accepted by
checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 14 +++++++-------
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 12 ++++++------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +++---
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index ec817de1ca59..ab9e2265df6f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -410,7 +410,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
for (i = 0; i < 14; i++) {
priv->tx_pwr_level_cck[i] =
priv->EEPROMTxPowerLevelCCK[i];
- priv->TxPowerLevelOFDM24G[i] =
+ priv->tx_pwr_level_ofdm_24g[i] =
priv->EEPROMTxPowerLevelOFDM24G[i];
}
priv->LegacyHTTxPowerDiff =
@@ -429,31 +429,31 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
for (i = 0; i < 3; i++) {
priv->tx_pwr_level_cck_a[i] =
priv->EEPROMRfACCKChnl1TxPwLevel[0];
- priv->TxPowerLevelOFDM24G_A[i] =
+ priv->tx_pwr_level_ofdm_24g_a[i] =
priv->EEPROMRfAOfdmChnlTxPwLevel[0];
priv->tx_pwr_level_cck_c[i] =
priv->EEPROMRfCCCKChnl1TxPwLevel[0];
- priv->TxPowerLevelOFDM24G_C[i] =
+ priv->tx_pwr_level_ofdm_24g_c[i] =
priv->EEPROMRfCOfdmChnlTxPwLevel[0];
}
for (i = 3; i < 9; i++) {
priv->tx_pwr_level_cck_a[i] =
priv->EEPROMRfACCKChnl1TxPwLevel[1];
- priv->TxPowerLevelOFDM24G_A[i] =
+ priv->tx_pwr_level_ofdm_24g_a[i] =
priv->EEPROMRfAOfdmChnlTxPwLevel[1];
priv->tx_pwr_level_cck_c[i] =
priv->EEPROMRfCCCKChnl1TxPwLevel[1];
- priv->TxPowerLevelOFDM24G_C[i] =
+ priv->tx_pwr_level_ofdm_24g_c[i] =
priv->EEPROMRfCOfdmChnlTxPwLevel[1];
}
for (i = 9; i < 14; i++) {
priv->tx_pwr_level_cck_a[i] =
priv->EEPROMRfACCKChnl1TxPwLevel[2];
- priv->TxPowerLevelOFDM24G_A[i] =
+ priv->tx_pwr_level_ofdm_24g_a[i] =
priv->EEPROMRfAOfdmChnlTxPwLevel[2];
priv->tx_pwr_level_cck_c[i] =
priv->EEPROMRfCCCKChnl1TxPwLevel[2];
- priv->TxPowerLevelOFDM24G_C[i] =
+ priv->tx_pwr_level_ofdm_24g_c[i] =
priv->EEPROMRfCOfdmChnlTxPwLevel[2];
}
priv->LegacyHTTxPowerDiff =
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index ee6138699e10..19c65aaef3f6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -593,17 +593,17 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
if (priv->epromtype == EEPROM_93C46) {
powerlevel = priv->tx_pwr_level_cck[channel - 1];
- powerlevelOFDM24G = priv->TxPowerLevelOFDM24G[channel-1];
+ powerlevelOFDM24G = priv->tx_pwr_level_ofdm_24g[channel - 1];
} else if (priv->epromtype == EEPROM_93C56) {
if (priv->rf_type == RF_1T2R) {
powerlevel = priv->tx_pwr_level_cck_c[channel - 1];
- powerlevelOFDM24G = priv->TxPowerLevelOFDM24G_C[channel-1];
+ powerlevelOFDM24G = priv->tx_pwr_level_ofdm_24g_c[channel - 1];
} else if (priv->rf_type == RF_2T4R) {
powerlevel = priv->tx_pwr_level_cck_a[channel - 1];
- powerlevelOFDM24G = priv->TxPowerLevelOFDM24G_A[channel-1];
+ powerlevelOFDM24G = priv->tx_pwr_level_ofdm_24g_a[channel - 1];
- ant_pwr_diff = priv->TxPowerLevelOFDM24G_C[channel-1]
- - priv->TxPowerLevelOFDM24G_A[channel-1];
+ ant_pwr_diff = priv->tx_pwr_level_ofdm_24g_c[channel - 1]
+ - priv->tx_pwr_level_ofdm_24g_a[channel - 1];
priv->RF_C_TxPwDiff = ant_pwr_diff;
@@ -727,7 +727,7 @@ static void _rtl92e_set_tx_power_level(struct net_device *dev, u8 channel)
{
struct r8192_priv *priv = rtllib_priv(dev);
u8 powerlevel = priv->tx_pwr_level_cck[channel - 1];
- u8 powerlevelOFDM24G = priv->TxPowerLevelOFDM24G[channel-1];
+ u8 powerlevelOFDM24G = priv->tx_pwr_level_ofdm_24g[channel - 1];
switch (priv->rf_chip) {
case RF_8225:
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 1efaea925b3a..ca61fc60db6e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -473,9 +473,9 @@ struct r8192_priv {
u8 tx_pwr_level_cck[14];
u8 tx_pwr_level_cck_a[14];
u8 tx_pwr_level_cck_c[14];
- u8 TxPowerLevelOFDM24G[14];
- u8 TxPowerLevelOFDM24G_A[14];
- u8 TxPowerLevelOFDM24G_C[14];
+ u8 tx_pwr_level_ofdm_24g[14];
+ u8 tx_pwr_level_ofdm_24g_a[14];
+ u8 tx_pwr_level_ofdm_24g_c[14];
u8 LegacyHTTxPowerDiff;
s8 RF_C_TxPwDiff;
u8 AntennaTxPwDiff[3];
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 6/7] staging: rtl8192e: Rename MCSTxPowerL.., LegacyHTTxPowe.. and AntennaTx..
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
` (4 preceding siblings ...)
2023-01-09 19:08 ` [PATCH v2 5/7] staging: rtl8192e: Rename TxPowerLevelOFDM24G Philipp Hortmann
@ 2023-01-09 19:09 ` Philipp Hortmann
2023-01-09 19:09 ` [PATCH v2 7/7] staging: rtl8192e: Rename SetRFPowerSta.., RfReg0Value and bTXPowerDa Philipp Hortmann
2023-01-10 5:20 ` [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Dan Carpenter
7 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable MCSTxPowerLevelOriginalOffset to
mcs_tx_pwr_level_org_offset, LegacyHTTxPowerDiff to legacy_ht_tx_pwr_diff
and AntennaTxPwDiff to antenna_tx_pwr_diff to avoid CamelCase which is not
accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
.../rtl8192e/rtl8192e/r8190P_rtl8256.c | 4 +--
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 16 +++++-----
.../staging/rtl8192e/rtl8192e/r8192E_phy.c | 30 +++++++++----------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 ++--
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index 7517ec001421..1672a3fea13c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -169,7 +169,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
u16 RegOffset[6] = {0xe00, 0xe04, 0xe10, 0xe14, 0xe18, 0xe1c};
u8 byte0, byte1, byte2, byte3;
- powerBase0 = powerlevel + priv->LegacyHTTxPowerDiff;
+ powerBase0 = powerlevel + priv->legacy_ht_tx_pwr_diff;
powerBase0 = (powerBase0 << 24) | (powerBase0 << 16) |
(powerBase0 << 8) | powerBase0;
powerBase1 = powerlevel;
@@ -177,7 +177,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
(powerBase1 << 8) | powerBase1;
for (index = 0; index < 6; index++) {
- writeVal = (u32)(priv->MCSTxPowerLevelOriginalOffset[index] +
+ writeVal = (u32)(priv->mcs_tx_pwr_level_org_offset[index] +
((index < 2) ? powerBase0 : powerBase1));
byte0 = writeVal & 0x7f;
byte1 = (writeVal & 0x7f00) >> 8;
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index ab9e2265df6f..06ab02230125 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -413,12 +413,12 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
priv->tx_pwr_level_ofdm_24g[i] =
priv->EEPROMTxPowerLevelOFDM24G[i];
}
- priv->LegacyHTTxPowerDiff =
+ priv->legacy_ht_tx_pwr_diff =
priv->EEPROMLegacyHTTxPowerDiff;
- priv->AntennaTxPwDiff[0] = priv->EEPROMAntPwDiff & 0xf;
- priv->AntennaTxPwDiff[1] = (priv->EEPROMAntPwDiff &
+ priv->antenna_tx_pwr_diff[0] = priv->EEPROMAntPwDiff & 0xf;
+ priv->antenna_tx_pwr_diff[1] = (priv->EEPROMAntPwDiff &
0xf0) >> 4;
- priv->AntennaTxPwDiff[2] = (priv->EEPROMAntPwDiff &
+ priv->antenna_tx_pwr_diff[2] = (priv->EEPROMAntPwDiff &
0xf00) >> 8;
priv->CrystalCap = priv->EEPROMCrystalCap;
priv->ThermalMeter[0] = priv->EEPROMThermalMeter & 0xf;
@@ -456,11 +456,11 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
priv->tx_pwr_level_ofdm_24g_c[i] =
priv->EEPROMRfCOfdmChnlTxPwLevel[2];
}
- priv->LegacyHTTxPowerDiff =
+ priv->legacy_ht_tx_pwr_diff =
priv->EEPROMLegacyHTTxPowerDiff;
- priv->AntennaTxPwDiff[0] = 0;
- priv->AntennaTxPwDiff[1] = 0;
- priv->AntennaTxPwDiff[2] = 0;
+ priv->antenna_tx_pwr_diff[0] = 0;
+ priv->antenna_tx_pwr_diff[1] = 0;
+ priv->antenna_tx_pwr_diff[2] = 0;
priv->CrystalCap = priv->EEPROMCrystalCap;
priv->ThermalMeter[0] = priv->EEPROMThermalMeter & 0xf;
priv->ThermalMeter[1] = (priv->EEPROMThermalMeter &
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 19c65aaef3f6..cc7e72f2a52c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -535,9 +535,9 @@ static bool _rtl92e_bb_config_para_file(struct net_device *dev)
if (priv->IC_Cut > VERSION_8190_BD) {
if (priv->rf_type == RF_2T4R)
- dwRegValue = priv->AntennaTxPwDiff[2]<<8 |
- priv->AntennaTxPwDiff[1]<<4 |
- priv->AntennaTxPwDiff[0];
+ dwRegValue = priv->antenna_tx_pwr_diff[2] << 8 |
+ priv->antenna_tx_pwr_diff[1] << 4 |
+ priv->antenna_tx_pwr_diff[0];
else
dwRegValue = 0x0;
rtl92e_set_bb_reg(dev, rFPGA0_TxGainStage,
@@ -561,17 +561,17 @@ void rtl92e_get_tx_power(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
- priv->MCSTxPowerLevelOriginalOffset[0] =
+ priv->mcs_tx_pwr_level_org_offset[0] =
rtl92e_readl(dev, rTxAGC_Rate18_06);
- priv->MCSTxPowerLevelOriginalOffset[1] =
+ priv->mcs_tx_pwr_level_org_offset[1] =
rtl92e_readl(dev, rTxAGC_Rate54_24);
- priv->MCSTxPowerLevelOriginalOffset[2] =
+ priv->mcs_tx_pwr_level_org_offset[2] =
rtl92e_readl(dev, rTxAGC_Mcs03_Mcs00);
- priv->MCSTxPowerLevelOriginalOffset[3] =
+ priv->mcs_tx_pwr_level_org_offset[3] =
rtl92e_readl(dev, rTxAGC_Mcs07_Mcs04);
- priv->MCSTxPowerLevelOriginalOffset[4] =
+ priv->mcs_tx_pwr_level_org_offset[4] =
rtl92e_readl(dev, rTxAGC_Mcs11_Mcs08);
- priv->MCSTxPowerLevelOriginalOffset[5] =
+ priv->mcs_tx_pwr_level_org_offset[5] =
rtl92e_readl(dev, rTxAGC_Mcs15_Mcs12);
priv->DefaultInitialGain[0] = rtl92e_readb(dev, rOFDM0_XAAGCCore1);
@@ -609,13 +609,13 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
ant_pwr_diff &= 0xf;
- priv->AntennaTxPwDiff[2] = 0;
- priv->AntennaTxPwDiff[1] = (u8)(ant_pwr_diff);
- priv->AntennaTxPwDiff[0] = 0;
+ priv->antenna_tx_pwr_diff[2] = 0;
+ priv->antenna_tx_pwr_diff[1] = (u8)(ant_pwr_diff);
+ priv->antenna_tx_pwr_diff[0] = 0;
- u4RegValue = priv->AntennaTxPwDiff[2]<<8 |
- priv->AntennaTxPwDiff[1]<<4 |
- priv->AntennaTxPwDiff[0];
+ u4RegValue = priv->antenna_tx_pwr_diff[2] << 8 |
+ priv->antenna_tx_pwr_diff[1] << 4 |
+ priv->antenna_tx_pwr_diff[0];
rtl92e_set_bb_reg(dev, rFPGA0_TxGainStage,
(bXBTxAGC|bXCTxAGC|bXDTxAGC),
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index ca61fc60db6e..cc3e2816e657 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -469,16 +469,16 @@ struct r8192_priv {
s8 cck_present_attn;
long undecorated_smoothed_pwdb;
- u32 MCSTxPowerLevelOriginalOffset[6];
+ u32 mcs_tx_pwr_level_org_offset[6];
u8 tx_pwr_level_cck[14];
u8 tx_pwr_level_cck_a[14];
u8 tx_pwr_level_cck_c[14];
u8 tx_pwr_level_ofdm_24g[14];
u8 tx_pwr_level_ofdm_24g_a[14];
u8 tx_pwr_level_ofdm_24g_c[14];
- u8 LegacyHTTxPowerDiff;
+ u8 legacy_ht_tx_pwr_diff;
s8 RF_C_TxPwDiff;
- u8 AntennaTxPwDiff[3];
+ u8 antenna_tx_pwr_diff[3];
bool bDynamicTxHighPower;
bool bDynamicTxLowPower;
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 7/7] staging: rtl8192e: Rename SetRFPowerSta.., RfReg0Value and bTXPowerDa..
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
` (5 preceding siblings ...)
2023-01-09 19:09 ` [PATCH v2 6/7] staging: rtl8192e: Rename MCSTxPowerL.., LegacyHTTxPowe.. and AntennaTx Philipp Hortmann
@ 2023-01-09 19:09 ` Philipp Hortmann
2023-01-10 5:20 ` [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Dan Carpenter
7 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-01-09 19:09 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable SetRFPowerStateInProgress to set_rf_pwr_state_in_progress,
RfReg0Value to rf_reg_0value and bTXPowerDataReadFromEEPORM to
tx_pwr_data_read_from_eeprom to avoid CamelCase which is not accepted by
checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 +-
.../staging/rtl8192e/rtl8192e/r8192E_phy.c | 40 +++++++++----------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +--
4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 06ab02230125..ebf1fa5ec295 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -345,9 +345,9 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
}
if (priv->card_8192_version > VERSION_8190_BD)
- priv->bTXPowerDataReadFromEEPORM = true;
+ priv->tx_pwr_data_read_from_eeprom = true;
else
- priv->bTXPowerDataReadFromEEPORM = false;
+ priv->tx_pwr_data_read_from_eeprom = false;
priv->rf_type = RTL819X_DEFAULT_RF_TYPE;
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index cc7e72f2a52c..2e9932a26382 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -101,17 +101,17 @@ static u32 _rtl92e_phy_rf_read(struct net_device *dev,
if (priv->rf_chip == RF_8256) {
rtl92e_set_bb_reg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0);
if (Offset >= 31) {
- priv->RfReg0Value[eRFPath] |= 0x140;
+ priv->rf_reg_0value[eRFPath] |= 0x140;
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset,
bMaskDWord,
- (priv->RfReg0Value[eRFPath]<<16));
+ (priv->rf_reg_0value[eRFPath] << 16));
NewOffset = Offset - 30;
} else if (Offset >= 16) {
- priv->RfReg0Value[eRFPath] |= 0x100;
- priv->RfReg0Value[eRFPath] &= (~0x40);
+ priv->rf_reg_0value[eRFPath] |= 0x100;
+ priv->rf_reg_0value[eRFPath] &= (~0x40);
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset,
bMaskDWord,
- (priv->RfReg0Value[eRFPath]<<16));
+ (priv->rf_reg_0value[eRFPath] << 16));
NewOffset = Offset - 15;
} else
@@ -130,10 +130,10 @@ static u32 _rtl92e_phy_rf_read(struct net_device *dev,
bLSSIReadBackData);
if (priv->rf_chip == RF_8256) {
- priv->RfReg0Value[eRFPath] &= 0xebf;
+ priv->rf_reg_0value[eRFPath] &= 0xebf;
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset, bMaskDWord,
- (priv->RfReg0Value[eRFPath] << 16));
+ (priv->rf_reg_0value[eRFPath] << 16));
rtl92e_set_bb_reg(dev, rFPGA0_AnalogParameter4, 0x300, 0x3);
}
@@ -156,17 +156,17 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
rtl92e_set_bb_reg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0);
if (Offset >= 31) {
- priv->RfReg0Value[eRFPath] |= 0x140;
+ priv->rf_reg_0value[eRFPath] |= 0x140;
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset,
bMaskDWord,
- (priv->RfReg0Value[eRFPath] << 16));
+ (priv->rf_reg_0value[eRFPath] << 16));
NewOffset = Offset - 30;
} else if (Offset >= 16) {
- priv->RfReg0Value[eRFPath] |= 0x100;
- priv->RfReg0Value[eRFPath] &= (~0x40);
+ priv->rf_reg_0value[eRFPath] |= 0x100;
+ priv->rf_reg_0value[eRFPath] &= (~0x40);
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset,
bMaskDWord,
- (priv->RfReg0Value[eRFPath] << 16));
+ (priv->rf_reg_0value[eRFPath] << 16));
NewOffset = Offset - 15;
} else
NewOffset = Offset;
@@ -179,14 +179,14 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset, bMaskDWord, DataAndAddr);
if (Offset == 0x0)
- priv->RfReg0Value[eRFPath] = Data;
+ priv->rf_reg_0value[eRFPath] = Data;
if (priv->rf_chip == RF_8256) {
if (Offset != 0) {
- priv->RfReg0Value[eRFPath] &= 0xebf;
+ priv->rf_reg_0value[eRFPath] &= 0xebf;
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset,
bMaskDWord,
- (priv->RfReg0Value[eRFPath] << 16));
+ (priv->rf_reg_0value[eRFPath] << 16));
}
rtl92e_set_bb_reg(dev, rFPGA0_AnalogParameter4, 0x300, 0x3);
}
@@ -306,7 +306,7 @@ void rtl92e_config_mac(struct net_device *dev)
u32 *pdwArray = NULL;
struct r8192_priv *priv = rtllib_priv(dev);
- if (priv->bTXPowerDataReadFromEEPORM) {
+ if (priv->tx_pwr_data_read_from_eeprom) {
dwArrayLen = MACPHY_Array_PGLength;
pdwArray = Rtl819XMACPHY_Array_PG;
@@ -1309,9 +1309,9 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
u8 i = 0, QueueID = 0;
struct rtl8192_tx_ring *ring = NULL;
- if (priv->SetRFPowerStateInProgress)
+ if (priv->set_rf_pwr_state_in_progress)
return false;
- priv->SetRFPowerStateInProgress = true;
+ priv->set_rf_pwr_state_in_progress = true;
switch (priv->rf_chip) {
case RF_8256:
@@ -1331,7 +1331,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
netdev_err(dev,
"%s(): Failed to initialize Adapter.\n",
__func__);
- priv->SetRFPowerStateInProgress = false;
+ priv->set_rf_pwr_state_in_progress = false;
return false;
}
@@ -1438,7 +1438,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
}
}
- priv->SetRFPowerStateInProgress = false;
+ priv->set_rf_pwr_state_in_progress = false;
return bResult;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 92260d098eaa..050f0435ab6d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -872,7 +872,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->rtllib->rf_off_reason = 0;
priv->rf_change_in_progress = false;
priv->hw_rf_off_action = 0;
- priv->SetRFPowerStateInProgress = false;
+ priv->set_rf_pwr_state_in_progress = false;
priv->rtllib->pwr_save_ctrl.bLeisurePs = true;
priv->rtllib->LPSDelayCnt = 0;
priv->rtllib->sta_sleep = LPS_IS_WAKE;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index cc3e2816e657..ad34bef5660c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -444,18 +444,18 @@ struct r8192_priv {
u8 nCur40MhzPrimeSC;
- u32 RfReg0Value[4];
+ u32 rf_reg_0value[4];
u8 num_total_rf_path;
bool brfpath_rxenable[4];
- bool bTXPowerDataReadFromEEPORM;
+ bool tx_pwr_data_read_from_eeprom;
u16 reg_chnl_plan;
u16 chnl_plan;
u8 hw_rf_off_action;
bool rf_change_in_progress;
- bool SetRFPowerStateInProgress;
+ bool set_rf_pwr_state_in_progress;
bool bdisable_nic;
u8 DM_Type;
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
` (6 preceding siblings ...)
2023-01-09 19:09 ` [PATCH v2 7/7] staging: rtl8192e: Rename SetRFPowerSta.., RfReg0Value and bTXPowerDa Philipp Hortmann
@ 2023-01-10 5:20 ` Dan Carpenter
7 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2023-01-10 5:20 UTC (permalink / raw)
To: Philipp Hortmann; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Mon, Jan 09, 2023 at 08:08:15PM +0100, Philipp Hortmann wrote:
> Rename variables to avoid CamelCase which is not accepted by checkpatch.
>
> Tested with rtl8192e
> Transferred this patch over wlan connection of rtl8192e
> ---
> V1 -> V2: In patch "Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath"
> Changed TSSI_13dBm to tssi_13dBm instead of tssi_13dbm
Thanks!
regards,
dan carpenter
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-01-10 5:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-09 19:08 [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 1/7] staging: rtl8192e: Rename ChannelPlan, eeprom_ChannelPlan and CckPwEnl Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 2/7] staging: rtl8192e: Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 3/7] staging: rtl8192e: Rename CCKPresentAtt Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 4/7] staging: rtl8192e: Rename TxPowerLevelCCK Philipp Hortmann
2023-01-09 19:08 ` [PATCH v2 5/7] staging: rtl8192e: Rename TxPowerLevelOFDM24G Philipp Hortmann
2023-01-09 19:09 ` [PATCH v2 6/7] staging: rtl8192e: Rename MCSTxPowerL.., LegacyHTTxPowe.. and AntennaTx Philipp Hortmann
2023-01-09 19:09 ` [PATCH v2 7/7] staging: rtl8192e: Rename SetRFPowerSta.., RfReg0Value and bTXPowerDa Philipp Hortmann
2023-01-10 5:20 ` [PATCH v2 0/7] staging: rtl8192e: Rename variables from r8192_priv start with ChannelPlan Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.