Commit 48ca41d3 authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: rtl8192e: Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath

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: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d3bb45535b7babd1cb8df437ca238eb0ce93c9fe.1673290428.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6492c4b9
...@@ -21,7 +21,7 @@ void rtl92e_set_bandwidth(struct net_device *dev, ...@@ -21,7 +21,7 @@ void rtl92e_set_bandwidth(struct net_device *dev,
return; 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)) if (!rtl92e_is_legal_rf_path(dev, eRFPath))
continue; continue;
...@@ -63,10 +63,10 @@ bool rtl92e_config_rf(struct net_device *dev) ...@@ -63,10 +63,10 @@ bool rtl92e_config_rf(struct net_device *dev)
u8 ConstRetryTimes = 5, RetryTimes = 5; u8 ConstRetryTimes = 5, RetryTimes = 5;
u8 ret = 0; 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; 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)) if (!rtl92e_is_legal_rf_path(dev, eRFPath))
continue; continue;
...@@ -195,7 +195,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel) ...@@ -195,7 +195,7 @@ void rtl92e_set_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
if (index == 3) { if (index == 3) {
writeVal_tmp = (byte3 << 24) | (byte2 << 16) | writeVal_tmp = (byte3 << 24) | (byte2 << 16) |
(byte1 << 8) | byte0; (byte1 << 8) | byte0;
priv->Pwr_Track = writeVal_tmp; priv->pwr_track = writeVal_tmp;
} }
if (priv->bDynamicTxHighPower) if (priv->bDynamicTxHighPower)
......
...@@ -371,7 +371,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) ...@@ -371,7 +371,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
0xff00) >> 8; 0xff00) >> 8;
else else
priv->EEPROMThermalMeter = EEPROM_Default_ThermalMeter; priv->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
priv->TSSI_13dBm = priv->EEPROMThermalMeter * 100; priv->tssi_13dBm = priv->EEPROMThermalMeter * 100;
if (priv->epromtype == EEPROM_93C46) { if (priv->epromtype == EEPROM_93C46) {
if (!priv->AutoloadFailFlag) { if (!priv->AutoloadFailFlag) {
......
...@@ -904,7 +904,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel, ...@@ -904,7 +904,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
break; break;
case CmdID_RF_WriteReg: case CmdID_RF_WriteReg:
for (eRFPath = 0; eRFPath < for (eRFPath = 0; eRFPath <
priv->NumTotalRFPath; eRFPath++) priv->num_total_rf_path; eRFPath++)
rtl92e_set_rf_reg(dev, rtl92e_set_rf_reg(dev,
(enum rf90_radio_path)eRFPath, (enum rf90_radio_path)eRFPath,
CurrentCmd->Para1, bMask12Bits, CurrentCmd->Para1, bMask12Bits,
......
...@@ -445,7 +445,7 @@ struct r8192_priv { ...@@ -445,7 +445,7 @@ struct r8192_priv {
u8 nCur40MhzPrimeSC; u8 nCur40MhzPrimeSC;
u32 RfReg0Value[4]; u32 RfReg0Value[4];
u8 NumTotalRFPath; u8 num_total_rf_path;
bool brfpath_rxenable[4]; bool brfpath_rxenable[4];
bool bTXPowerDataReadFromEEPORM; bool bTXPowerDataReadFromEEPORM;
...@@ -461,8 +461,8 @@ struct r8192_priv { ...@@ -461,8 +461,8 @@ struct r8192_priv {
u8 DM_Type; u8 DM_Type;
u8 cck_pwr_enl; u8 cck_pwr_enl;
u16 TSSI_13dBm; u16 tssi_13dBm;
u32 Pwr_Track; u32 pwr_track;
u8 CCKPresentAttentuation_20Mdefault; u8 CCKPresentAttentuation_20Mdefault;
u8 CCKPresentAttentuation_40Mdefault; u8 CCKPresentAttentuation_40Mdefault;
s8 CCKPresentAttentuation_difference; s8 CCKPresentAttentuation_difference;
......
...@@ -615,14 +615,14 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) ...@@ -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}; u8 RF_Type, tmp_report[5] = {0, 0, 0, 0, 0};
u32 Value; u32 Value;
u8 Pwr_Flag; 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; u32 delta = 0;
rtl92e_writeb(dev, Pw_Track_Flag, 0); rtl92e_writeb(dev, Pw_Track_Flag, 0);
rtl92e_writeb(dev, FW_Busy_Flag, 0); rtl92e_writeb(dev, FW_Busy_Flag, 0);
priv->rtllib->bdynamic_txpower_enable = false; priv->rtllib->bdynamic_txpower_enable = false;
powerlevelOFDM24G = priv->Pwr_Track >> 24; powerlevelOFDM24G = priv->pwr_track >> 24;
RF_Type = priv->rf_type; RF_Type = priv->rf_type;
Value = (RF_Type<<8) | powerlevelOFDM24G; Value = (RF_Type<<8) | powerlevelOFDM24G;
...@@ -688,12 +688,12 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) ...@@ -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 += tmp_report[k];
Avg_TSSI_Meas_from_driver *= 100 / 5; 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) if (Avg_TSSI_Meas_from_driver > tssi_13dBm)
delta = Avg_TSSI_Meas_from_driver - TSSI_13dBm; delta = Avg_TSSI_Meas_from_driver - tssi_13dBm;
else else
delta = TSSI_13dBm - Avg_TSSI_Meas_from_driver; delta = tssi_13dBm - Avg_TSSI_Meas_from_driver;
if (delta <= E_FOR_TX_POWER_TRACK) { if (delta <= E_FOR_TX_POWER_TRACK) {
priv->rtllib->bdynamic_txpower_enable = true; priv->rtllib->bdynamic_txpower_enable = true;
...@@ -701,7 +701,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) ...@@ -701,7 +701,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
rtl92e_writeb(dev, FW_Busy_Flag, 0); rtl92e_writeb(dev, FW_Busy_Flag, 0);
return; 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, _rtl92e_dm_tx_update_tssi_weak_signal(dev,
RF_Type); RF_Type);
else else
......
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