[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <585a76cf4d2c805eada805c18c18ef207b9a4ea4.1673812849.git.philipp.g.hortmann@gmail.com>
Date: Sun, 15 Jan 2023 21:19:31 +0100
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH 01/10] staging: rtl8192e: Rename bDynamicTxHig..,
bDynamicTxL.. and bLastDTPF..
Rename variable bDynamicTxHighPower to dynamic_tx_high_pwr,
bDynamicTxLowPower to dynamic_tx_low_pwr and bLastDTPFlag_High to
last_dtp_flag_high to avoid CamelCase which is not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@...il.com>
---
.../rtl8192e/rtl8192e/r8190P_rtl8256.c | 4 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 34 +++++++++----------
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index 1672a3fea13c..2c1a4392aeff 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -150,7 +150,7 @@ void rtl92e_set_cck_tx_power(struct net_device *dev, u8 powerlevel)
struct r8192_priv *priv = rtllib_priv(dev);
TxAGC = powerlevel;
- if (priv->bDynamicTxLowPower) {
+ if (priv->dynamic_tx_low_pwr) {
if (priv->CustomerID == RT_CID_819x_Netcore)
TxAGC = 0x22;
else
@@ -198,7 +198,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
priv->pwr_track = writeVal_tmp;
}
- if (priv->bDynamicTxHighPower)
+ if (priv->dynamic_tx_high_pwr)
writeVal = 0x03030303;
else
writeVal = (byte3 << 24) | (byte2 << 16) |
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index ad34bef5660c..1f8bfe83b8ef 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -480,9 +480,9 @@ struct r8192_priv {
s8 RF_C_TxPwDiff;
u8 antenna_tx_pwr_diff[3];
- bool bDynamicTxHighPower;
- bool bDynamicTxLowPower;
- bool bLastDTPFlag_High;
+ bool dynamic_tx_high_pwr;
+ bool dynamic_tx_low_pwr;
+ bool last_dtp_flag_high;
bool bLastDTPFlag_Low;
u8 rfa_txpowertrackingindex;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 6d3c9491d070..09ea3a6f373c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -2271,10 +2271,10 @@ static void _rtl92e_dm_init_dynamic_tx_power(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
priv->rtllib->bdynamic_txpower_enable = true;
- priv->bLastDTPFlag_High = false;
+ priv->last_dtp_flag_high = false;
priv->bLastDTPFlag_Low = false;
- priv->bDynamicTxHighPower = false;
- priv->bDynamicTxLowPower = false;
+ priv->dynamic_tx_high_pwr = false;
+ priv->dynamic_tx_low_pwr = false;
}
static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
@@ -2284,8 +2284,8 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
unsigned int txlowpower_threshold = 0;
if (!priv->rtllib->bdynamic_txpower_enable) {
- priv->bDynamicTxHighPower = false;
- priv->bDynamicTxLowPower = false;
+ priv->dynamic_tx_high_pwr = false;
+ priv->dynamic_tx_low_pwr = false;
return;
}
if ((priv->rtllib->ht_info->IOTPeer == HT_IOT_PEER_ATHEROS) &&
@@ -2299,28 +2299,28 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
if (priv->rtllib->state == RTLLIB_LINKED) {
if (priv->undecorated_smoothed_pwdb >= txhipower_threshold) {
- priv->bDynamicTxHighPower = true;
- priv->bDynamicTxLowPower = false;
+ priv->dynamic_tx_high_pwr = true;
+ priv->dynamic_tx_low_pwr = false;
} else {
if (priv->undecorated_smoothed_pwdb <
- txlowpower_threshold && priv->bDynamicTxHighPower)
- priv->bDynamicTxHighPower = false;
+ txlowpower_threshold && priv->dynamic_tx_high_pwr)
+ priv->dynamic_tx_high_pwr = false;
if (priv->undecorated_smoothed_pwdb < 35)
- priv->bDynamicTxLowPower = true;
+ priv->dynamic_tx_low_pwr = true;
else if (priv->undecorated_smoothed_pwdb >= 40)
- priv->bDynamicTxLowPower = false;
+ priv->dynamic_tx_low_pwr = false;
}
} else {
- priv->bDynamicTxHighPower = false;
- priv->bDynamicTxLowPower = false;
+ priv->dynamic_tx_high_pwr = false;
+ priv->dynamic_tx_low_pwr = false;
}
- if ((priv->bDynamicTxHighPower != priv->bLastDTPFlag_High) ||
- (priv->bDynamicTxLowPower != priv->bLastDTPFlag_Low)) {
+ if ((priv->dynamic_tx_high_pwr != priv->last_dtp_flag_high) ||
+ (priv->dynamic_tx_low_pwr != priv->bLastDTPFlag_Low)) {
rtl92e_set_tx_power(dev, priv->rtllib->current_network.channel);
}
- priv->bLastDTPFlag_High = priv->bDynamicTxHighPower;
- priv->bLastDTPFlag_Low = priv->bDynamicTxLowPower;
+ priv->last_dtp_flag_high = priv->dynamic_tx_high_pwr;
+ priv->bLastDTPFlag_Low = priv->dynamic_tx_low_pwr;
}
--
2.39.0
Powered by blists - more mailing lists