* [PATCH 1/9] staging: rtl8192e: Rename LongRetryL.., ShortRetryL.. and ReceiveConfig
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
@ 2023-01-18 19:58 ` Philipp Hortmann
2023-01-18 19:58 ` [PATCH 2/9] staging: rtl8192e: Rename LastRxDescTSF, LoopbackMode and pFirmware Philipp Hortmann
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 19:58 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable LongRetryLimit to long_retry_limit, ShortRetryLimit to
short_retry_limit and ReceiveConfig to receive_config 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 | 26 +++++++++----------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 ++---
2 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 9cffe09e429c..b0f33fbffa42 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -127,7 +127,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
Type = val[0];
RegRCR = rtl92e_readl(dev, RCR);
- priv->ReceiveConfig = RegRCR;
+ priv->receive_config = RegRCR;
if (Type)
RegRCR |= (RCR_CBSSID);
@@ -135,7 +135,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
RegRCR &= (~RCR_CBSSID);
rtl92e_writel(dev, RCR, RegRCR);
- priv->ReceiveConfig = RegRCR;
+ priv->receive_config = RegRCR;
}
break;
@@ -594,8 +594,8 @@ static void _rtl92e_hwconfig(struct net_device *dev)
rtl92e_writel(dev, RRSR, regRRSR);
rtl92e_writew(dev, RETRY_LIMIT,
- priv->ShortRetryLimit << RETRY_LIMIT_SHORT_SHIFT |
- priv->LongRetryLimit << RETRY_LIMIT_LONG_SHIFT);
+ priv->short_retry_limit << RETRY_LIMIT_SHORT_SHIFT |
+ priv->long_retry_limit << RETRY_LIMIT_LONG_SHIFT);
}
bool rtl92e_start_adapter(struct net_device *dev)
@@ -670,7 +670,7 @@ bool rtl92e_start_adapter(struct net_device *dev)
(MXDMA2_NoLimit<<MXDMA2_TX_SHIFT)));
rtl92e_writel(dev, MAC0, ((u32 *)dev->dev_addr)[0]);
rtl92e_writew(dev, MAC4, ((u16 *)(dev->dev_addr + 4))[0]);
- rtl92e_writel(dev, RCR, priv->ReceiveConfig);
+ rtl92e_writel(dev, RCR, priv->receive_config);
rtl92e_writel(dev, RQPN1, NUM_OF_PAGE_IN_FW_QUEUE_BK <<
RSVD_FW_QUEUE_PAGE_BK_SHIFT |
@@ -860,9 +860,9 @@ void rtl92e_link_change(struct net_device *dev)
if (ieee->intel_promiscuous_md_info.promiscuous_on)
;
else
- priv->ReceiveConfig = reg |= RCR_CBSSID;
+ priv->receive_config = reg |= RCR_CBSSID;
} else
- priv->ReceiveConfig = reg &= ~RCR_CBSSID;
+ priv->receive_config = reg &= ~RCR_CBSSID;
rtl92e_writel(dev, RCR, reg);
}
@@ -874,12 +874,12 @@ void rtl92e_set_monitor_mode(struct net_device *dev, bool bAllowAllDA,
struct r8192_priv *priv = rtllib_priv(dev);
if (bAllowAllDA)
- priv->ReceiveConfig |= RCR_AAP;
+ priv->receive_config |= RCR_AAP;
else
- priv->ReceiveConfig &= ~RCR_AAP;
+ priv->receive_config &= ~RCR_AAP;
if (WriteIntoReg)
- rtl92e_writel(dev, RCR, priv->ReceiveConfig);
+ rtl92e_writel(dev, RCR, priv->receive_config);
}
static u8 _rtl92e_rate_mgn_to_hw(u8 rate)
@@ -2010,10 +2010,10 @@ rtl92e_init_variables(struct net_device *dev)
priv->rtllib->tx_headroom = sizeof(struct tx_fwinfo_8190pci);
- priv->ShortRetryLimit = 0x30;
- priv->LongRetryLimit = 0x30;
+ priv->short_retry_limit = 0x30;
+ priv->long_retry_limit = 0x30;
- priv->ReceiveConfig = RCR_ADD3 |
+ priv->receive_config = RCR_ADD3 |
RCR_AMF | RCR_ADF |
RCR_AICV |
RCR_AB | RCR_AM | RCR_APM |
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index d86577277844..8de726de57f4 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -362,7 +362,7 @@ struct r8192_priv {
u64 LastRxDescTSF;
- u32 ReceiveConfig;
+ u32 receive_config;
u8 retry_data;
u8 retry_rts;
u16 rts;
@@ -371,8 +371,8 @@ struct r8192_priv {
int txringcount;
atomic_t tx_pending[0x10];
- u16 ShortRetryLimit;
- u16 LongRetryLimit;
+ u16 short_retry_limit;
+ u16 long_retry_limit;
bool hw_radio_off;
bool blinked_ingpio;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/9] staging: rtl8192e: Rename LastRxDescTSF, LoopbackMode and pFirmware
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
2023-01-18 19:58 ` [PATCH 1/9] staging: rtl8192e: Rename LongRetryL.., ShortRetryL.. and ReceiveConfig Philipp Hortmann
@ 2023-01-18 19:58 ` Philipp Hortmann
2023-01-18 19:59 ` [PATCH 3/9] staging: rtl8192e: Rename PHYRegDef, CurrentChannelBW and CustomerID Philipp Hortmann
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 19:58 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable LastRxDescTSF to last_rx_desc_tsf, LoopbackMode to
loopback_mode and pFirmware to fw_info 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 +++++++-------
.../staging/rtl8192e/rtl8192e/r8192E_firmware.c | 4 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 12 ++++++------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +++---
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index b0f33fbffa42..a0678c6bac72 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -619,16 +619,16 @@ bool rtl92e_start_adapter(struct net_device *dev)
rtl92e_writeb(dev, ANAPAR, 0x37);
mdelay(500);
}
- priv->pFirmware->status = FW_STATUS_0_INIT;
+ priv->fw_info->status = FW_STATUS_0_INIT;
ulRegRead = rtl92e_readl(dev, CPU_GEN);
- if (priv->pFirmware->status == FW_STATUS_0_INIT)
+ if (priv->fw_info->status == FW_STATUS_0_INIT)
ulRegRead |= CPU_GEN_SYSTEM_RESET;
- else if (priv->pFirmware->status == FW_STATUS_5_READY)
+ else if (priv->fw_info->status == FW_STATUS_5_READY)
ulRegRead |= CPU_GEN_FIRMWARE_RESET;
else
netdev_err(dev, "%s(): undefined firmware state: %d.\n",
- __func__, priv->pFirmware->status);
+ __func__, priv->fw_info->status);
rtl92e_writel(dev, CPU_GEN, ulRegRead);
@@ -647,13 +647,13 @@ bool rtl92e_start_adapter(struct net_device *dev)
return rtStatus;
}
- priv->LoopbackMode = RTL819X_NO_LOOPBACK;
+ priv->loopback_mode = RTL819X_NO_LOOPBACK;
if (priv->rst_progress == RESET_TYPE_NORESET) {
ulRegRead = rtl92e_readl(dev, CPU_GEN);
- if (priv->LoopbackMode == RTL819X_NO_LOOPBACK)
+ if (priv->loopback_mode == RTL819X_NO_LOOPBACK)
ulRegRead = (ulRegRead & CPU_GEN_NO_LOOPBACK_MSK) |
CPU_GEN_NO_LOOPBACK_SET;
- else if (priv->LoopbackMode == RTL819X_MAC_LOOPBACK)
+ else if (priv->loopback_mode == RTL819X_MAC_LOOPBACK)
ulRegRead |= CPU_CCK_LOOPBACK;
else
netdev_err(dev, "%s: Invalid loopback mode setting.\n",
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
index 789d288d7503..b011ec8c8a41 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
@@ -51,7 +51,7 @@ static bool _rtl92e_fw_check_ready(struct net_device *dev,
u8 load_fw_status)
{
struct r8192_priv *priv = rtllib_priv(dev);
- struct rt_firmware *pfirmware = priv->pFirmware;
+ struct rt_firmware *pfirmware = priv->fw_info;
bool rt_status = true;
switch (load_fw_status) {
@@ -134,7 +134,7 @@ bool rtl92e_init_fw(struct net_device *dev)
enum opt_rst_type rst_opt = OPT_SYSTEM_RESET;
enum firmware_init_step starting_state = FW_INIT_STEP0_BOOT;
- struct rt_firmware *pfirmware = priv->pFirmware;
+ struct rt_firmware *pfirmware = priv->fw_info;
netdev_dbg(dev, " PlatformInitFirmware()==>\n");
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 8e1180b75d38..7a89381bae50 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -891,8 +891,8 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->card_type = PCI;
- priv->pFirmware = vzalloc(sizeof(struct rt_firmware));
- if (!priv->pFirmware)
+ priv->fw_info = vzalloc(sizeof(struct rt_firmware));
+ if (!priv->fw_info)
netdev_err(dev,
"rtl8192e: Unable to allocate space for firmware\n");
@@ -1807,9 +1807,9 @@ void rtl92e_update_rx_pkt_timestamp(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev);
if (stats->bIsAMPDU && !stats->bFirstMPDU)
- stats->mac_time = priv->LastRxDescTSF;
+ stats->mac_time = priv->last_rx_desc_tsf;
else
- priv->LastRxDescTSF = stats->mac_time;
+ priv->last_rx_desc_tsf = stats->mac_time;
}
long rtl92e_translate_to_dbm(struct r8192_priv *priv, u8 signal_strength_index)
@@ -2386,8 +2386,8 @@ static void _rtl92e_pci_disconnect(struct pci_dev *pdev)
priv->polling_timer_on = 0;
_rtl92e_down(dev, true);
rtl92e_dm_deinit(dev);
- vfree(priv->pFirmware);
- priv->pFirmware = NULL;
+ vfree(priv->fw_info);
+ priv->fw_info = NULL;
_rtl92e_free_rx_ring(dev);
for (i = 0; i < MAX_TX_QUEUE_COUNT; i++)
_rtl92e_free_tx_ring(dev, i);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 8de726de57f4..da10835a987e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -325,8 +325,8 @@ struct r8192_priv {
struct bb_reg_definition PHYRegDef[4];
struct rate_adaptive rate_adaptive;
- struct rt_firmware *pFirmware;
- enum rtl819x_loopback LoopbackMode;
+ struct rt_firmware *fw_info;
+ enum rtl819x_loopback loopback_mode;
struct timer_list watch_dog_timer;
struct timer_list fsync_timer;
@@ -360,7 +360,7 @@ struct r8192_priv {
int rxringcount;
u16 rxbuffersize;
- u64 LastRxDescTSF;
+ u64 last_rx_desc_tsf;
u32 receive_config;
u8 retry_data;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/9] staging: rtl8192e: Rename PHYRegDef, CurrentChannelBW and CustomerID
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
2023-01-18 19:58 ` [PATCH 1/9] staging: rtl8192e: Rename LongRetryL.., ShortRetryL.. and ReceiveConfig Philipp Hortmann
2023-01-18 19:58 ` [PATCH 2/9] staging: rtl8192e: Rename LastRxDescTSF, LoopbackMode and pFirmware Philipp Hortmann
@ 2023-01-18 19:59 ` Philipp Hortmann
2023-01-18 19:59 ` [PATCH 4/9] staging: rtl8192e: Remove unused variable SifsTime Philipp Hortmann
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 19:59 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Rename variable PHYRegDef to phy_reg_def, CurrentChannelBW to
current_chnl_bw and CustomerID to customer_id 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 | 28 +--
.../staging/rtl8192e/rtl8192e/r8192E_phy.c | 188 +++++++++---------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 6 +-
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 36 ++--
5 files changed, 131 insertions(+), 131 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index 2c1a4392aeff..9ea281808128 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -70,7 +70,7 @@ bool rtl92e_config_rf(struct net_device *dev)
if (!rtl92e_is_legal_rf_path(dev, eRFPath))
continue;
- pPhyReg = &priv->PHYRegDef[eRFPath];
+ pPhyReg = &priv->phy_reg_def[eRFPath];
switch (eRFPath) {
case RF90_PATH_A:
@@ -151,7 +151,7 @@ void rtl92e_set_cck_tx_power(struct net_device *dev, u8 powerlevel)
TxAGC = powerlevel;
if (priv->dynamic_tx_low_pwr) {
- if (priv->CustomerID == RT_CID_819x_Netcore)
+ if (priv->customer_id == RT_CID_819x_Netcore)
TxAGC = 0x22;
else
TxAGC += priv->cck_pwr_enl;
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index a0678c6bac72..fe985f4b8dbb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -478,36 +478,36 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
priv->chnl_plan = priv->reg_chnl_plan;
if (priv->eeprom_vid == 0x1186 && priv->eeprom_did == 0x3304)
- priv->CustomerID = RT_CID_DLINK;
+ priv->customer_id = RT_CID_DLINK;
switch (priv->eeprom_CustomerID) {
case EEPROM_CID_DEFAULT:
- priv->CustomerID = RT_CID_DEFAULT;
+ priv->customer_id = RT_CID_DEFAULT;
break;
case EEPROM_CID_CAMEO:
- priv->CustomerID = RT_CID_819x_CAMEO;
+ priv->customer_id = RT_CID_819x_CAMEO;
break;
case EEPROM_CID_RUNTOP:
- priv->CustomerID = RT_CID_819x_RUNTOP;
+ priv->customer_id = RT_CID_819x_RUNTOP;
break;
case EEPROM_CID_NetCore:
- priv->CustomerID = RT_CID_819x_Netcore;
+ priv->customer_id = RT_CID_819x_Netcore;
break;
case EEPROM_CID_TOSHIBA:
- priv->CustomerID = RT_CID_TOSHIBA;
+ priv->customer_id = RT_CID_TOSHIBA;
if (priv->eeprom_chnl_plan & 0x80)
priv->chnl_plan = priv->eeprom_chnl_plan & 0x7f;
else
priv->chnl_plan = 0x0;
break;
case EEPROM_CID_Nettronix:
- priv->CustomerID = RT_CID_Nettronix;
+ priv->customer_id = RT_CID_Nettronix;
break;
case EEPROM_CID_Pronet:
- priv->CustomerID = RT_CID_PRONET;
+ priv->customer_id = RT_CID_PRONET;
break;
case EEPROM_CID_DLINK:
- priv->CustomerID = RT_CID_DLINK;
+ priv->customer_id = RT_CID_DLINK;
break;
case EEPROM_CID_WHQL:
@@ -1068,7 +1068,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
pTxFwInfo->RtsShort = (pTxFwInfo->RtsHT == 0) ?
(cb_desc->bRTSUseShortPreamble ? 1 : 0) :
(cb_desc->bRTSUseShortGI ? 1 : 0);
- if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20_40) {
+ if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20_40) {
if (cb_desc->bPacketBW) {
pTxFwInfo->TxBandwidth = 1;
pTxFwInfo->TxSubCarrier = 0;
@@ -2101,16 +2101,16 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
if (priv->undecorated_smoothed_pwdb >= (RateAdaptiveTH_High+5)) {
rx_chk_cnt = 0;
} else if ((priv->undecorated_smoothed_pwdb < (RateAdaptiveTH_High + 5))
- && (((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) &&
+ && (((priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) &&
(priv->undecorated_smoothed_pwdb >= RateAdaptiveTH_Low_40M))
- || ((priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20) &&
+ || ((priv->current_chnl_bw == HT_CHANNEL_WIDTH_20) &&
(priv->undecorated_smoothed_pwdb >= RateAdaptiveTH_Low_20M)))) {
if (rx_chk_cnt < 2)
return bStuck;
rx_chk_cnt = 0;
- } else if ((((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) &&
+ } else if ((((priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) &&
(priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_40M)) ||
- ((priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20) &&
+ ((priv->current_chnl_bw == HT_CHANNEL_WIDTH_20) &&
(priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_20M))) &&
priv->undecorated_smoothed_pwdb >= VeryLowRSSI) {
if (rx_chk_cnt < 4)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 97e859425784..f7865d0c787a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -94,7 +94,7 @@ static u32 _rtl92e_phy_rf_read(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev);
u32 ret = 0;
u32 NewOffset = 0;
- struct bb_reg_definition *pPhyReg = &priv->PHYRegDef[eRFPath];
+ struct bb_reg_definition *pPhyReg = &priv->phy_reg_def[eRFPath];
Offset &= 0x3f;
@@ -149,7 +149,7 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
{
struct r8192_priv *priv = rtllib_priv(dev);
u32 DataAndAddr = 0, NewOffset = 0;
- struct bb_reg_definition *pPhyReg = &priv->PHYRegDef[eRFPath];
+ struct bb_reg_definition *pPhyReg = &priv->phy_reg_def[eRFPath];
Offset &= 0x3f;
if (priv->rf_chip == RF_8256) {
@@ -361,90 +361,90 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
- priv->PHYRegDef[RF90_PATH_A].rfintfs = rFPGA0_XAB_RFInterfaceSW;
- priv->PHYRegDef[RF90_PATH_B].rfintfs = rFPGA0_XAB_RFInterfaceSW;
- priv->PHYRegDef[RF90_PATH_C].rfintfs = rFPGA0_XCD_RFInterfaceSW;
- priv->PHYRegDef[RF90_PATH_D].rfintfs = rFPGA0_XCD_RFInterfaceSW;
-
- priv->PHYRegDef[RF90_PATH_A].rfintfi = rFPGA0_XAB_RFInterfaceRB;
- priv->PHYRegDef[RF90_PATH_B].rfintfi = rFPGA0_XAB_RFInterfaceRB;
- priv->PHYRegDef[RF90_PATH_C].rfintfi = rFPGA0_XCD_RFInterfaceRB;
- priv->PHYRegDef[RF90_PATH_D].rfintfi = rFPGA0_XCD_RFInterfaceRB;
-
- priv->PHYRegDef[RF90_PATH_A].rfintfo = rFPGA0_XA_RFInterfaceOE;
- priv->PHYRegDef[RF90_PATH_B].rfintfo = rFPGA0_XB_RFInterfaceOE;
- priv->PHYRegDef[RF90_PATH_C].rfintfo = rFPGA0_XC_RFInterfaceOE;
- priv->PHYRegDef[RF90_PATH_D].rfintfo = rFPGA0_XD_RFInterfaceOE;
-
- priv->PHYRegDef[RF90_PATH_A].rfintfe = rFPGA0_XA_RFInterfaceOE;
- priv->PHYRegDef[RF90_PATH_B].rfintfe = rFPGA0_XB_RFInterfaceOE;
- priv->PHYRegDef[RF90_PATH_C].rfintfe = rFPGA0_XC_RFInterfaceOE;
- priv->PHYRegDef[RF90_PATH_D].rfintfe = rFPGA0_XD_RFInterfaceOE;
-
- priv->PHYRegDef[RF90_PATH_A].rf3wireOffset = rFPGA0_XA_LSSIParameter;
- priv->PHYRegDef[RF90_PATH_B].rf3wireOffset = rFPGA0_XB_LSSIParameter;
- priv->PHYRegDef[RF90_PATH_C].rf3wireOffset = rFPGA0_XC_LSSIParameter;
- priv->PHYRegDef[RF90_PATH_D].rf3wireOffset = rFPGA0_XD_LSSIParameter;
-
- priv->PHYRegDef[RF90_PATH_A].rfLSSI_Select = rFPGA0_XAB_RFParameter;
- priv->PHYRegDef[RF90_PATH_B].rfLSSI_Select = rFPGA0_XAB_RFParameter;
- priv->PHYRegDef[RF90_PATH_C].rfLSSI_Select = rFPGA0_XCD_RFParameter;
- priv->PHYRegDef[RF90_PATH_D].rfLSSI_Select = rFPGA0_XCD_RFParameter;
-
- priv->PHYRegDef[RF90_PATH_A].rfTxGainStage = rFPGA0_TxGainStage;
- priv->PHYRegDef[RF90_PATH_B].rfTxGainStage = rFPGA0_TxGainStage;
- priv->PHYRegDef[RF90_PATH_C].rfTxGainStage = rFPGA0_TxGainStage;
- priv->PHYRegDef[RF90_PATH_D].rfTxGainStage = rFPGA0_TxGainStage;
-
- priv->PHYRegDef[RF90_PATH_A].rfHSSIPara1 = rFPGA0_XA_HSSIParameter1;
- priv->PHYRegDef[RF90_PATH_B].rfHSSIPara1 = rFPGA0_XB_HSSIParameter1;
- priv->PHYRegDef[RF90_PATH_C].rfHSSIPara1 = rFPGA0_XC_HSSIParameter1;
- priv->PHYRegDef[RF90_PATH_D].rfHSSIPara1 = rFPGA0_XD_HSSIParameter1;
-
- priv->PHYRegDef[RF90_PATH_A].rfHSSIPara2 = rFPGA0_XA_HSSIParameter2;
- priv->PHYRegDef[RF90_PATH_B].rfHSSIPara2 = rFPGA0_XB_HSSIParameter2;
- priv->PHYRegDef[RF90_PATH_C].rfHSSIPara2 = rFPGA0_XC_HSSIParameter2;
- priv->PHYRegDef[RF90_PATH_D].rfHSSIPara2 = rFPGA0_XD_HSSIParameter2;
-
- priv->PHYRegDef[RF90_PATH_A].rfSwitchControl = rFPGA0_XAB_SwitchControl;
- priv->PHYRegDef[RF90_PATH_B].rfSwitchControl = rFPGA0_XAB_SwitchControl;
- priv->PHYRegDef[RF90_PATH_C].rfSwitchControl = rFPGA0_XCD_SwitchControl;
- priv->PHYRegDef[RF90_PATH_D].rfSwitchControl = rFPGA0_XCD_SwitchControl;
-
- priv->PHYRegDef[RF90_PATH_A].rfAGCControl1 = rOFDM0_XAAGCCore1;
- priv->PHYRegDef[RF90_PATH_B].rfAGCControl1 = rOFDM0_XBAGCCore1;
- priv->PHYRegDef[RF90_PATH_C].rfAGCControl1 = rOFDM0_XCAGCCore1;
- priv->PHYRegDef[RF90_PATH_D].rfAGCControl1 = rOFDM0_XDAGCCore1;
-
- priv->PHYRegDef[RF90_PATH_A].rfAGCControl2 = rOFDM0_XAAGCCore2;
- priv->PHYRegDef[RF90_PATH_B].rfAGCControl2 = rOFDM0_XBAGCCore2;
- priv->PHYRegDef[RF90_PATH_C].rfAGCControl2 = rOFDM0_XCAGCCore2;
- priv->PHYRegDef[RF90_PATH_D].rfAGCControl2 = rOFDM0_XDAGCCore2;
-
- priv->PHYRegDef[RF90_PATH_A].rfRxIQImbalance = rOFDM0_XARxIQImbalance;
- priv->PHYRegDef[RF90_PATH_B].rfRxIQImbalance = rOFDM0_XBRxIQImbalance;
- priv->PHYRegDef[RF90_PATH_C].rfRxIQImbalance = rOFDM0_XCRxIQImbalance;
- priv->PHYRegDef[RF90_PATH_D].rfRxIQImbalance = rOFDM0_XDRxIQImbalance;
-
- priv->PHYRegDef[RF90_PATH_A].rfRxAFE = rOFDM0_XARxAFE;
- priv->PHYRegDef[RF90_PATH_B].rfRxAFE = rOFDM0_XBRxAFE;
- priv->PHYRegDef[RF90_PATH_C].rfRxAFE = rOFDM0_XCRxAFE;
- priv->PHYRegDef[RF90_PATH_D].rfRxAFE = rOFDM0_XDRxAFE;
-
- priv->PHYRegDef[RF90_PATH_A].rfTxIQImbalance = rOFDM0_XATxIQImbalance;
- priv->PHYRegDef[RF90_PATH_B].rfTxIQImbalance = rOFDM0_XBTxIQImbalance;
- priv->PHYRegDef[RF90_PATH_C].rfTxIQImbalance = rOFDM0_XCTxIQImbalance;
- priv->PHYRegDef[RF90_PATH_D].rfTxIQImbalance = rOFDM0_XDTxIQImbalance;
-
- priv->PHYRegDef[RF90_PATH_A].rfTxAFE = rOFDM0_XATxAFE;
- priv->PHYRegDef[RF90_PATH_B].rfTxAFE = rOFDM0_XBTxAFE;
- priv->PHYRegDef[RF90_PATH_C].rfTxAFE = rOFDM0_XCTxAFE;
- priv->PHYRegDef[RF90_PATH_D].rfTxAFE = rOFDM0_XDTxAFE;
-
- priv->PHYRegDef[RF90_PATH_A].rfLSSIReadBack = rFPGA0_XA_LSSIReadBack;
- priv->PHYRegDef[RF90_PATH_B].rfLSSIReadBack = rFPGA0_XB_LSSIReadBack;
- priv->PHYRegDef[RF90_PATH_C].rfLSSIReadBack = rFPGA0_XC_LSSIReadBack;
- priv->PHYRegDef[RF90_PATH_D].rfLSSIReadBack = rFPGA0_XD_LSSIReadBack;
+ priv->phy_reg_def[RF90_PATH_A].rfintfs = rFPGA0_XAB_RFInterfaceSW;
+ priv->phy_reg_def[RF90_PATH_B].rfintfs = rFPGA0_XAB_RFInterfaceSW;
+ priv->phy_reg_def[RF90_PATH_C].rfintfs = rFPGA0_XCD_RFInterfaceSW;
+ priv->phy_reg_def[RF90_PATH_D].rfintfs = rFPGA0_XCD_RFInterfaceSW;
+
+ priv->phy_reg_def[RF90_PATH_A].rfintfi = rFPGA0_XAB_RFInterfaceRB;
+ priv->phy_reg_def[RF90_PATH_B].rfintfi = rFPGA0_XAB_RFInterfaceRB;
+ priv->phy_reg_def[RF90_PATH_C].rfintfi = rFPGA0_XCD_RFInterfaceRB;
+ priv->phy_reg_def[RF90_PATH_D].rfintfi = rFPGA0_XCD_RFInterfaceRB;
+
+ priv->phy_reg_def[RF90_PATH_A].rfintfo = rFPGA0_XA_RFInterfaceOE;
+ priv->phy_reg_def[RF90_PATH_B].rfintfo = rFPGA0_XB_RFInterfaceOE;
+ priv->phy_reg_def[RF90_PATH_C].rfintfo = rFPGA0_XC_RFInterfaceOE;
+ priv->phy_reg_def[RF90_PATH_D].rfintfo = rFPGA0_XD_RFInterfaceOE;
+
+ priv->phy_reg_def[RF90_PATH_A].rfintfe = rFPGA0_XA_RFInterfaceOE;
+ priv->phy_reg_def[RF90_PATH_B].rfintfe = rFPGA0_XB_RFInterfaceOE;
+ priv->phy_reg_def[RF90_PATH_C].rfintfe = rFPGA0_XC_RFInterfaceOE;
+ priv->phy_reg_def[RF90_PATH_D].rfintfe = rFPGA0_XD_RFInterfaceOE;
+
+ priv->phy_reg_def[RF90_PATH_A].rf3wireOffset = rFPGA0_XA_LSSIParameter;
+ priv->phy_reg_def[RF90_PATH_B].rf3wireOffset = rFPGA0_XB_LSSIParameter;
+ priv->phy_reg_def[RF90_PATH_C].rf3wireOffset = rFPGA0_XC_LSSIParameter;
+ priv->phy_reg_def[RF90_PATH_D].rf3wireOffset = rFPGA0_XD_LSSIParameter;
+
+ priv->phy_reg_def[RF90_PATH_A].rfLSSI_Select = rFPGA0_XAB_RFParameter;
+ priv->phy_reg_def[RF90_PATH_B].rfLSSI_Select = rFPGA0_XAB_RFParameter;
+ priv->phy_reg_def[RF90_PATH_C].rfLSSI_Select = rFPGA0_XCD_RFParameter;
+ priv->phy_reg_def[RF90_PATH_D].rfLSSI_Select = rFPGA0_XCD_RFParameter;
+
+ priv->phy_reg_def[RF90_PATH_A].rfTxGainStage = rFPGA0_TxGainStage;
+ priv->phy_reg_def[RF90_PATH_B].rfTxGainStage = rFPGA0_TxGainStage;
+ priv->phy_reg_def[RF90_PATH_C].rfTxGainStage = rFPGA0_TxGainStage;
+ priv->phy_reg_def[RF90_PATH_D].rfTxGainStage = rFPGA0_TxGainStage;
+
+ priv->phy_reg_def[RF90_PATH_A].rfHSSIPara1 = rFPGA0_XA_HSSIParameter1;
+ priv->phy_reg_def[RF90_PATH_B].rfHSSIPara1 = rFPGA0_XB_HSSIParameter1;
+ priv->phy_reg_def[RF90_PATH_C].rfHSSIPara1 = rFPGA0_XC_HSSIParameter1;
+ priv->phy_reg_def[RF90_PATH_D].rfHSSIPara1 = rFPGA0_XD_HSSIParameter1;
+
+ priv->phy_reg_def[RF90_PATH_A].rfHSSIPara2 = rFPGA0_XA_HSSIParameter2;
+ priv->phy_reg_def[RF90_PATH_B].rfHSSIPara2 = rFPGA0_XB_HSSIParameter2;
+ priv->phy_reg_def[RF90_PATH_C].rfHSSIPara2 = rFPGA0_XC_HSSIParameter2;
+ priv->phy_reg_def[RF90_PATH_D].rfHSSIPara2 = rFPGA0_XD_HSSIParameter2;
+
+ priv->phy_reg_def[RF90_PATH_A].rfSwitchControl = rFPGA0_XAB_SwitchControl;
+ priv->phy_reg_def[RF90_PATH_B].rfSwitchControl = rFPGA0_XAB_SwitchControl;
+ priv->phy_reg_def[RF90_PATH_C].rfSwitchControl = rFPGA0_XCD_SwitchControl;
+ priv->phy_reg_def[RF90_PATH_D].rfSwitchControl = rFPGA0_XCD_SwitchControl;
+
+ priv->phy_reg_def[RF90_PATH_A].rfAGCControl1 = rOFDM0_XAAGCCore1;
+ priv->phy_reg_def[RF90_PATH_B].rfAGCControl1 = rOFDM0_XBAGCCore1;
+ priv->phy_reg_def[RF90_PATH_C].rfAGCControl1 = rOFDM0_XCAGCCore1;
+ priv->phy_reg_def[RF90_PATH_D].rfAGCControl1 = rOFDM0_XDAGCCore1;
+
+ priv->phy_reg_def[RF90_PATH_A].rfAGCControl2 = rOFDM0_XAAGCCore2;
+ priv->phy_reg_def[RF90_PATH_B].rfAGCControl2 = rOFDM0_XBAGCCore2;
+ priv->phy_reg_def[RF90_PATH_C].rfAGCControl2 = rOFDM0_XCAGCCore2;
+ priv->phy_reg_def[RF90_PATH_D].rfAGCControl2 = rOFDM0_XDAGCCore2;
+
+ priv->phy_reg_def[RF90_PATH_A].rfRxIQImbalance = rOFDM0_XARxIQImbalance;
+ priv->phy_reg_def[RF90_PATH_B].rfRxIQImbalance = rOFDM0_XBRxIQImbalance;
+ priv->phy_reg_def[RF90_PATH_C].rfRxIQImbalance = rOFDM0_XCRxIQImbalance;
+ priv->phy_reg_def[RF90_PATH_D].rfRxIQImbalance = rOFDM0_XDRxIQImbalance;
+
+ priv->phy_reg_def[RF90_PATH_A].rfRxAFE = rOFDM0_XARxAFE;
+ priv->phy_reg_def[RF90_PATH_B].rfRxAFE = rOFDM0_XBRxAFE;
+ priv->phy_reg_def[RF90_PATH_C].rfRxAFE = rOFDM0_XCRxAFE;
+ priv->phy_reg_def[RF90_PATH_D].rfRxAFE = rOFDM0_XDRxAFE;
+
+ priv->phy_reg_def[RF90_PATH_A].rfTxIQImbalance = rOFDM0_XATxIQImbalance;
+ priv->phy_reg_def[RF90_PATH_B].rfTxIQImbalance = rOFDM0_XBTxIQImbalance;
+ priv->phy_reg_def[RF90_PATH_C].rfTxIQImbalance = rOFDM0_XCTxIQImbalance;
+ priv->phy_reg_def[RF90_PATH_D].rfTxIQImbalance = rOFDM0_XDTxIQImbalance;
+
+ priv->phy_reg_def[RF90_PATH_A].rfTxAFE = rOFDM0_XATxAFE;
+ priv->phy_reg_def[RF90_PATH_B].rfTxAFE = rOFDM0_XBTxAFE;
+ priv->phy_reg_def[RF90_PATH_C].rfTxAFE = rOFDM0_XCTxAFE;
+ priv->phy_reg_def[RF90_PATH_D].rfTxAFE = rOFDM0_XDTxAFE;
+
+ priv->phy_reg_def[RF90_PATH_A].rfLSSIReadBack = rFPGA0_XA_LSSIReadBack;
+ priv->phy_reg_def[RF90_PATH_B].rfLSSIReadBack = rFPGA0_XB_LSSIReadBack;
+ priv->phy_reg_def[RF90_PATH_C].rfLSSIReadBack = rFPGA0_XC_LSSIReadBack;
+ priv->phy_reg_def[RF90_PATH_D].rfLSSIReadBack = rFPGA0_XD_LSSIReadBack;
}
@@ -1006,7 +1006,7 @@ static void _rtl92e_cck_tx_power_track_bw_switch_tssi(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
- switch (priv->CurrentChannelBW) {
+ switch (priv->current_chnl_bw) {
case HT_CHANNEL_WIDTH_20:
priv->cck_present_attn =
priv->cck_present_attn_20m_def +
@@ -1070,7 +1070,7 @@ static void _rtl92e_cck_tx_power_track_bw_switch_thermal(struct net_device *dev)
priv->bcck_in_ch14)
priv->bcck_in_ch14 = false;
- switch (priv->CurrentChannelBW) {
+ switch (priv->current_chnl_bw) {
case HT_CHANNEL_WIDTH_20:
if (priv->rec_cck_20m_idx == 0)
priv->rec_cck_20m_idx = 6;
@@ -1110,7 +1110,7 @@ static void _rtl92e_set_bw_mode_work_item(struct net_device *dev)
}
regBwOpMode = rtl92e_readb(dev, BW_OPMODE);
- switch (priv->CurrentChannelBW) {
+ switch (priv->current_chnl_bw) {
case HT_CHANNEL_WIDTH_20:
regBwOpMode |= BW_OPMODE_20MHZ;
rtl92e_writeb(dev, BW_OPMODE, regBwOpMode);
@@ -1123,11 +1123,11 @@ static void _rtl92e_set_bw_mode_work_item(struct net_device *dev)
default:
netdev_err(dev, "%s(): unknown Bandwidth: %#X\n", __func__,
- priv->CurrentChannelBW);
+ priv->current_chnl_bw);
break;
}
- switch (priv->CurrentChannelBW) {
+ switch (priv->current_chnl_bw) {
case HT_CHANNEL_WIDTH_20:
rtl92e_set_bb_reg(dev, rFPGA0_RFMOD, bRFMOD, 0x0);
rtl92e_set_bb_reg(dev, rFPGA1_RFMOD, bRFMOD, 0x0);
@@ -1164,7 +1164,7 @@ static void _rtl92e_set_bw_mode_work_item(struct net_device *dev)
break;
default:
netdev_err(dev, "%s(): unknown Bandwidth: %#X\n", __func__,
- priv->CurrentChannelBW);
+ priv->current_chnl_bw);
break;
}
@@ -1174,7 +1174,7 @@ static void _rtl92e_set_bw_mode_work_item(struct net_device *dev)
break;
case RF_8256:
- rtl92e_set_bandwidth(dev, priv->CurrentChannelBW);
+ rtl92e_set_bandwidth(dev, priv->current_chnl_bw);
break;
case RF_8258:
@@ -1205,7 +1205,7 @@ void rtl92e_set_bw_mode(struct net_device *dev, enum ht_channel_width bandwidth,
atomic_inc(&(priv->rtllib->atm_swbw));
priv->set_bw_mode_in_progress = true;
- priv->CurrentChannelBW = bandwidth;
+ priv->current_chnl_bw = bandwidth;
if (Offset == HT_EXTCHNL_OFFSET_LOWER)
priv->n_cur_40mhz_prime_sc = HAL_PRIME_CHNL_OFFSET_UPPER;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index da10835a987e..cbafbecb5ca5 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -317,12 +317,12 @@ struct r8192_priv {
struct work_struct reset_wq;
- enum rt_customer_id CustomerID;
+ enum rt_customer_id customer_id;
enum rt_rf_type_819xu rf_chip;
- enum ht_channel_width CurrentChannelBW;
- struct bb_reg_definition PHYRegDef[4];
+ enum ht_channel_width current_chnl_bw;
+ struct bb_reg_definition phy_reg_def[4];
struct rate_adaptive rate_adaptive;
struct rt_firmware *fw_info;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 63be5f2872c6..cb55b6645674 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -292,7 +292,7 @@ void rtl92e_init_adaptive_rate(struct net_device *dev)
pra->low_rssi_thresh_for_ra20M = RateAdaptiveTH_Low_20M;
pra->low_rssi_thresh_for_ra40M = RateAdaptiveTH_Low_40M;
- if (priv->CustomerID == RT_CID_819x_Netcore)
+ if (priv->customer_id == RT_CID_819x_Netcore)
pra->ping_rssi_enable = 1;
else
pra->ping_rssi_enable = 0;
@@ -353,7 +353,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
(pra->middle_rssi_threshold_ratr & (~BIT31)) |
((bshort_gi_enabled) ? BIT31 : 0);
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) {
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) {
pra->low_rssi_threshold_ratr =
(pra->low_rssi_threshold_ratr_40M & (~BIT31)) |
((bshort_gi_enabled) ? BIT31 : 0);
@@ -368,15 +368,15 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
if (pra->ratr_state == DM_RATR_STA_HIGH) {
HighRSSIThreshForRA = pra->high2low_rssi_thresh_for_ra;
- LowRSSIThreshForRA = (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) ?
+ LowRSSIThreshForRA = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
(pra->low_rssi_thresh_for_ra40M) : (pra->low_rssi_thresh_for_ra20M);
} else if (pra->ratr_state == DM_RATR_STA_LOW) {
HighRSSIThreshForRA = pra->high_rssi_thresh_for_ra;
- LowRSSIThreshForRA = (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) ?
+ LowRSSIThreshForRA = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
(pra->low2high_rssi_thresh_for_ra40M) : (pra->low2high_rssi_thresh_for_ra20M);
} else {
HighRSSIThreshForRA = pra->high_rssi_thresh_for_ra;
- LowRSSIThreshForRA = (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) ?
+ LowRSSIThreshForRA = (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) ?
(pra->low_rssi_thresh_for_ra40M) : (pra->low_rssi_thresh_for_ra20M);
}
@@ -443,8 +443,8 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
- if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 ||
- !priv->rtllib->bandwidth_auto_switch.bautoswitch_enable)
+ if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20 ||
+ !priv->rtllib->bandwidth_auto_switch.bautoswitch_enable)
return;
if (!priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz) {
if (priv->undecorated_smoothed_pwdb <=
@@ -715,7 +715,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
= priv->rfa_txpowertrackingindex_real - priv->rfa_txpowertracking_default;
}
- if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20)
priv->cck_present_attn =
priv->cck_present_attn_20m_def +
priv->cck_present_attn_diff;
@@ -818,7 +818,7 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
}
tmpCCK40Mindex = 0;
}
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
tmpCCKindex = tmpCCK40Mindex;
else
tmpCCKindex = tmpCCK20Mindex;
@@ -1150,7 +1150,7 @@ static void _rtl92e_dm_dig_init(struct net_device *dev)
dm_digtable.rssi_val = 50;
dm_digtable.backoff_val = DM_DIG_BACKOFF;
dm_digtable.rx_gain_range_max = DM_DIG_MAX;
- if (priv->CustomerID == RT_CID_819x_Netcore)
+ if (priv->customer_id == RT_CID_819x_Netcore)
dm_digtable.rx_gain_range_min = DM_DIG_MIN_Netcore;
else
dm_digtable.rx_gain_range_min = DM_DIG_MIN;
@@ -1260,7 +1260,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev)
rtl92e_writeb(dev, rOFDM0_XCAGCCore1, 0x17);
rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x17);
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
rtl92e_writeb(dev, (rOFDM0_XATxAFE+3), 0x00);
else
rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x42);
@@ -1297,7 +1297,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev)
rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x20);
}
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
rtl92e_writeb(dev, (rOFDM0_XATxAFE+3), 0x20);
else
rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x44);
@@ -1328,7 +1328,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_highpwr(struct net_device *dev)
return;
dm_digtable.dig_highpwr_state = DM_STA_DIG_ON;
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
rtl92e_writeb(dev, (rOFDM0_XATxAFE+3), 0x10);
else
rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x43);
@@ -1342,7 +1342,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_highpwr(struct net_device *dev)
dm_digtable.rssi_high_power_lowthresh) &&
(priv->undecorated_smoothed_pwdb >=
dm_digtable.rssi_high_thresh)) {
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
rtl92e_writeb(dev, (rOFDM0_XATxAFE+3), 0x20);
else
rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x44);
@@ -1453,18 +1453,18 @@ static void _rtl92e_dm_pd_th(struct net_device *dev)
if ((dm_digtable.prepd_thstate != dm_digtable.curpd_thstate) ||
(initialized <= 3) || force_write) {
if (dm_digtable.curpd_thstate == DIG_PD_AT_LOW_POWER) {
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
rtl92e_writeb(dev, (rOFDM0_XATxAFE+3), 0x00);
else
rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x42);
} else if (dm_digtable.curpd_thstate ==
DIG_PD_AT_NORMAL_POWER) {
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
rtl92e_writeb(dev, (rOFDM0_XATxAFE+3), 0x20);
else
rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x44);
} else if (dm_digtable.curpd_thstate == DIG_PD_AT_HIGH_POWER) {
- if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)
+ if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20)
rtl92e_writeb(dev, (rOFDM0_XATxAFE+3), 0x10);
else
rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x43);
@@ -1736,7 +1736,7 @@ static void _rtl92e_dm_init_rx_path_selection(struct net_device *dev)
DM_RxPathSelTable.Enable = 1;
DM_RxPathSelTable.SS_TH_low = RxPathSelection_SS_TH_low;
DM_RxPathSelTable.diff_TH = RxPathSelection_diff_TH;
- if (priv->CustomerID == RT_CID_819x_Netcore)
+ if (priv->customer_id == RT_CID_819x_Netcore)
DM_RxPathSelTable.cck_method = CCK_Rx_Version_2;
else
DM_RxPathSelTable.cck_method = CCK_Rx_Version_1;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/9] staging: rtl8192e: Remove unused variable SifsTime
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
` (2 preceding siblings ...)
2023-01-18 19:59 ` [PATCH 3/9] staging: rtl8192e: Rename PHYRegDef, CurrentChannelBW and CustomerID Philipp Hortmann
@ 2023-01-18 19:59 ` Philipp Hortmann
2023-01-18 19:59 ` [PATCH 5/9] staging: rtl8192e: Remove unused variable framesyncC34 Philipp Hortmann
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 19:59 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
SifsTime is written and then never evaluated. Remove resulting dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index f7865d0c787a..ed27bdbb8fb9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -581,7 +581,6 @@ void rtl92e_get_tx_power(struct net_device *dev)
priv->framesync = rtl92e_readb(dev, rOFDM0_RxDetector3);
priv->framesyncC34 = rtl92e_readl(dev, rOFDM0_RxDetector2);
- priv->SifsTime = rtl92e_readw(dev, SIFS);
}
void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index cbafbecb5ca5..feb48ee35110 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -412,7 +412,6 @@ struct r8192_priv {
u8 short_preamble;
u8 dot11_current_preamble_mode;
u8 slot_time;
- u16 SifsTime;
bool autoload_fail_flag;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/9] staging: rtl8192e: Remove unused variable framesyncC34
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
` (3 preceding siblings ...)
2023-01-18 19:59 ` [PATCH 4/9] staging: rtl8192e: Remove unused variable SifsTime Philipp Hortmann
@ 2023-01-18 19:59 ` Philipp Hortmann
2023-01-18 19:59 ` [PATCH 7/9] staging: rtl8192e: Remove unused variable H2CTxCmdSeq Philipp Hortmann
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 19:59 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
framesyncC34 is written and then never evaluated. Remove resulting dead
code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index ed27bdbb8fb9..aafe39e50bd9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -580,7 +580,6 @@ void rtl92e_get_tx_power(struct net_device *dev)
priv->def_initial_gain[3] = rtl92e_readb(dev, rOFDM0_XDAGCCore1);
priv->framesync = rtl92e_readb(dev, rOFDM0_RxDetector3);
- priv->framesyncC34 = rtl92e_readl(dev, rOFDM0_RxDetector2);
}
void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index feb48ee35110..626a2bc48969 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -513,7 +513,6 @@ struct r8192_priv {
u32 continue_diff_count;
bool bswitch_fsync;
u8 framesync;
- u32 framesyncC34;
u8 frame_sync_monitor;
u32 reset_count;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 7/9] staging: rtl8192e: Remove unused variable H2CTxCmdSeq
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
` (4 preceding siblings ...)
2023-01-18 19:59 ` [PATCH 5/9] staging: rtl8192e: Remove unused variable framesyncC34 Philipp Hortmann
@ 2023-01-18 19:59 ` Philipp Hortmann
2023-01-18 19:59 ` [PATCH 6/9] staging: rtl8192e: Remove unused variable PwrDomainProtect Philipp Hortmann
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 19:59 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
H2CTxCmdSeq is never used. Remove resulting dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index e90cc61b3817..12a869a556bb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -525,8 +525,6 @@ struct r8192_priv {
bool force_lps;
bool chan_forced;
-
- u8 H2CTxCmdSeq;
};
extern const struct ethtool_ops rtl819x_ethtool_ops;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 6/9] staging: rtl8192e: Remove unused variable PwrDomainProtect
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
` (5 preceding siblings ...)
2023-01-18 19:59 ` [PATCH 7/9] staging: rtl8192e: Remove unused variable H2CTxCmdSeq Philipp Hortmann
@ 2023-01-18 19:59 ` Philipp Hortmann
2023-01-18 20:00 ` [PATCH 8/9] staging: rtl8192e: Remove unused variable RF_C_TxPwDiff Philipp Hortmann
2023-01-18 20:00 ` [PATCH 9/9] staging: rtl8192e: Remove unused variable DM_Type Philipp Hortmann
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 19:59 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
PwrDomainProtect is initialized and then never evaluated. Remove resulting
dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index fe985f4b8dbb..227c13d552fc 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -2027,8 +2027,6 @@ rtl92e_init_variables(struct net_device *dev)
IMR_RDU | IMR_RXFOVW | IMR_TXFOVW |
IMR_BcnInt | IMR_TBDOK | IMR_TBDER);
- priv->PwrDomainProtect = false;
-
priv->bfirst_after_down = false;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 626a2bc48969..e90cc61b3817 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -526,7 +526,6 @@ struct r8192_priv {
bool chan_forced;
- u8 PwrDomainProtect;
u8 H2CTxCmdSeq;
};
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 8/9] staging: rtl8192e: Remove unused variable RF_C_TxPwDiff
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
` (6 preceding siblings ...)
2023-01-18 19:59 ` [PATCH 6/9] staging: rtl8192e: Remove unused variable PwrDomainProtect Philipp Hortmann
@ 2023-01-18 20:00 ` Philipp Hortmann
2023-01-18 20:00 ` [PATCH 9/9] staging: rtl8192e: Remove unused variable DM_Type Philipp Hortmann
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 20:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
RF_C_TxPwDiff is set to a value and then never evaluated. Remove resulting
dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index aafe39e50bd9..ff66a97b8763 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -603,8 +603,6 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
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;
-
ant_pwr_diff &= 0xf;
priv->antenna_tx_pwr_diff[2] = 0;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 12a869a556bb..6662558e56fa 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -476,7 +476,6 @@ struct r8192_priv {
u8 tx_pwr_level_ofdm_24g_a[14];
u8 tx_pwr_level_ofdm_24g_c[14];
u8 legacy_ht_tx_pwr_diff;
- s8 RF_C_TxPwDiff;
u8 antenna_tx_pwr_diff[3];
bool dynamic_tx_high_pwr;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 9/9] staging: rtl8192e: Remove unused variable DM_Type
2023-01-18 19:58 [PATCH 0/9] staging: rtl8192e: Rename or remove CamelCase variables from r8192_priv Philipp Hortmann
` (7 preceding siblings ...)
2023-01-18 20:00 ` [PATCH 8/9] staging: rtl8192e: Remove unused variable RF_C_TxPwDiff Philipp Hortmann
@ 2023-01-18 20:00 ` Philipp Hortmann
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-01-18 20:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
DM_Type is initialized and then never evaluated. Remove resulting dead
code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 2 --
3 files changed, 6 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 6662558e56fa..11f3f88491b2 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -457,8 +457,6 @@ struct r8192_priv {
bool set_rf_pwr_state_in_progress;
bool bdisable_nic;
- u8 DM_Type;
-
u8 cck_pwr_enl;
u16 tssi_13dBm;
u32 pwr_track;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index cb55b6645674..ba92dab682ec 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -203,8 +203,6 @@ void rtl92e_dm_init(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
- priv->DM_Type = DM_Type_ByDriver;
-
priv->undecorated_smoothed_pwdb = -1;
_rtl92e_dm_init_dynamic_tx_power(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 1d4d7d98a859..65d077dfee37 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -47,8 +47,6 @@
#define TX_RETRY_COUNT_REG 0x1ac
#define RegC38_TH 20
-#define DM_Type_ByDriver 1
-
/*--------------------------Define Parameters-------------------------------*/
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread