Commit 5a64c4d6 authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

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: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/585a76cf4d2c805eada805c18c18ef207b9a4ea4.1673812849.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c34e856b
...@@ -150,7 +150,7 @@ void rtl92e_set_cck_tx_power(struct net_device *dev, u8 powerlevel) ...@@ -150,7 +150,7 @@ void rtl92e_set_cck_tx_power(struct net_device *dev, u8 powerlevel)
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
TxAGC = powerlevel; TxAGC = powerlevel;
if (priv->bDynamicTxLowPower) { if (priv->dynamic_tx_low_pwr) {
if (priv->CustomerID == RT_CID_819x_Netcore) if (priv->CustomerID == RT_CID_819x_Netcore)
TxAGC = 0x22; TxAGC = 0x22;
else else
...@@ -198,7 +198,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel) ...@@ -198,7 +198,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
priv->pwr_track = writeVal_tmp; priv->pwr_track = writeVal_tmp;
} }
if (priv->bDynamicTxHighPower) if (priv->dynamic_tx_high_pwr)
writeVal = 0x03030303; writeVal = 0x03030303;
else else
writeVal = (byte3 << 24) | (byte2 << 16) | writeVal = (byte3 << 24) | (byte2 << 16) |
......
...@@ -480,9 +480,9 @@ struct r8192_priv { ...@@ -480,9 +480,9 @@ struct r8192_priv {
s8 RF_C_TxPwDiff; s8 RF_C_TxPwDiff;
u8 antenna_tx_pwr_diff[3]; u8 antenna_tx_pwr_diff[3];
bool bDynamicTxHighPower; bool dynamic_tx_high_pwr;
bool bDynamicTxLowPower; bool dynamic_tx_low_pwr;
bool bLastDTPFlag_High; bool last_dtp_flag_high;
bool bLastDTPFlag_Low; bool bLastDTPFlag_Low;
u8 rfa_txpowertrackingindex; u8 rfa_txpowertrackingindex;
......
...@@ -2271,10 +2271,10 @@ static void _rtl92e_dm_init_dynamic_tx_power(struct net_device *dev) ...@@ -2271,10 +2271,10 @@ static void _rtl92e_dm_init_dynamic_tx_power(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
priv->rtllib->bdynamic_txpower_enable = true; priv->rtllib->bdynamic_txpower_enable = true;
priv->bLastDTPFlag_High = false; priv->last_dtp_flag_high = false;
priv->bLastDTPFlag_Low = false; priv->bLastDTPFlag_Low = false;
priv->bDynamicTxHighPower = false; priv->dynamic_tx_high_pwr = false;
priv->bDynamicTxLowPower = false; priv->dynamic_tx_low_pwr = false;
} }
static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev) 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) ...@@ -2284,8 +2284,8 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
unsigned int txlowpower_threshold = 0; unsigned int txlowpower_threshold = 0;
if (!priv->rtllib->bdynamic_txpower_enable) { if (!priv->rtllib->bdynamic_txpower_enable) {
priv->bDynamicTxHighPower = false; priv->dynamic_tx_high_pwr = false;
priv->bDynamicTxLowPower = false; priv->dynamic_tx_low_pwr = false;
return; return;
} }
if ((priv->rtllib->ht_info->IOTPeer == HT_IOT_PEER_ATHEROS) && 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) ...@@ -2299,28 +2299,28 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
if (priv->rtllib->state == RTLLIB_LINKED) { if (priv->rtllib->state == RTLLIB_LINKED) {
if (priv->undecorated_smoothed_pwdb >= txhipower_threshold) { if (priv->undecorated_smoothed_pwdb >= txhipower_threshold) {
priv->bDynamicTxHighPower = true; priv->dynamic_tx_high_pwr = true;
priv->bDynamicTxLowPower = false; priv->dynamic_tx_low_pwr = false;
} else { } else {
if (priv->undecorated_smoothed_pwdb < if (priv->undecorated_smoothed_pwdb <
txlowpower_threshold && priv->bDynamicTxHighPower) txlowpower_threshold && priv->dynamic_tx_high_pwr)
priv->bDynamicTxHighPower = false; priv->dynamic_tx_high_pwr = false;
if (priv->undecorated_smoothed_pwdb < 35) if (priv->undecorated_smoothed_pwdb < 35)
priv->bDynamicTxLowPower = true; priv->dynamic_tx_low_pwr = true;
else if (priv->undecorated_smoothed_pwdb >= 40) else if (priv->undecorated_smoothed_pwdb >= 40)
priv->bDynamicTxLowPower = false; priv->dynamic_tx_low_pwr = false;
} }
} else { } else {
priv->bDynamicTxHighPower = false; priv->dynamic_tx_high_pwr = false;
priv->bDynamicTxLowPower = false; priv->dynamic_tx_low_pwr = false;
} }
if ((priv->bDynamicTxHighPower != priv->bLastDTPFlag_High) || if ((priv->dynamic_tx_high_pwr != priv->last_dtp_flag_high) ||
(priv->bDynamicTxLowPower != priv->bLastDTPFlag_Low)) { (priv->dynamic_tx_low_pwr != priv->bLastDTPFlag_Low)) {
rtl92e_set_tx_power(dev, priv->rtllib->current_network.channel); rtl92e_set_tx_power(dev, priv->rtllib->current_network.channel);
} }
priv->bLastDTPFlag_High = priv->bDynamicTxHighPower; priv->last_dtp_flag_high = priv->dynamic_tx_high_pwr;
priv->bLastDTPFlag_Low = priv->bDynamicTxLowPower; priv->bLastDTPFlag_Low = priv->dynamic_tx_low_pwr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment