summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>2023-04-02 11:51:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-05 16:38:23 +0200
commitb7119698bcca83d6d755b866bcf7328314d9cde0 (patch)
treed6bc8504b90fa0d4f874e57ec7d00c9929f8f600
parentd8571801a61c01841ac1813e0fb97048c2505a6a (diff)
downloadlinux-stable-b7119698bcca83d6d755b866bcf7328314d9cde0.tar.gz
linux-stable-b7119698bcca83d6d755b866bcf7328314d9cde0.tar.bz2
linux-stable-b7119698bcca83d6d755b866bcf7328314d9cde0.zip
staging: rtl8192e: Remove enum RF_1T2R and RF_Type
enum RF_1T2R is used to initialize a local variable RF_Type that is then shifted. The result of the shift is zero. Remove code that has always the same result to increase readability. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/6c29e709f5c328703870ca8e7d61ee6338886fa7.1680427945.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_dm.c5
-rw-r--r--drivers/staging/rtl8192e/rtllib.h4
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 258ea66ab2fd..a21b3798db48 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -518,7 +518,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
struct dcmd_txcmd tx_cmd;
u8 powerlevelOFDM24G;
int i = 0, j = 0, k = 0;
- u8 RF_Type, tmp_report[5] = {0, 0, 0, 0, 0};
+ u8 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;
@@ -529,8 +529,7 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
priv->rtllib->bdynamic_txpower_enable = false;
powerlevelOFDM24G = priv->pwr_track >> 24;
- RF_Type = RF_1T2R;
- Value = (RF_Type<<8) | powerlevelOFDM24G;
+ Value = powerlevelOFDM24G;
for (j = 0; j <= 30; j++) {
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 197c0a44ebd6..7d83a4c322cf 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -433,10 +433,6 @@ enum led_ctl_mode {
LED_CTL_START_TO_LINK = 8,
};
-enum rt_rf_type_def {
- RF_1T2R = 0,
-};
-
enum wireless_mode {
WIRELESS_MODE_UNKNOWN = 0x00,
WIRELESS_MODE_A = 0x01,