* [PATCH 1/5] staging: rtl8192e: Remove unchanged variable AcmMethod
2022-11-22 22:45 [PATCH 0/5] staging: rtl8192e: Remove unused variables in rtl_core.h Philipp Hortmann
@ 2022-11-22 22:45 ` Philipp Hortmann
2022-11-22 22:46 ` [PATCH 2/5] staging: rtl8192e: Remove unused variable skb_aggQ Philipp Hortmann
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2022-11-22 22:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
AcmMethod is initialized and never changed. The evaluation will always
have the same result. 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.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
drivers/staging/rtl8192e/rtl819x_Qos.h | 7 -------
4 files changed, 12 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index b9c846015d28..80eba5d5ab37 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -224,8 +224,6 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
u8 acm = pAciAifsn->f.acm;
u8 AcmCtrl = rtl92e_readb(dev, AcmHwCtrl);
- AcmCtrl = AcmCtrl | ((priv->AcmMethod == 2) ? 0x0 : 0x1);
-
if (acm) {
switch (eACI) {
case AC0_BE:
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 399ee9783f99..a8cbeb9545da 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -830,7 +830,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
u8 i;
- priv->AcmMethod = eAcmWay2_SW;
priv->dot11_current_preamble_mode = PREAMBLE_AUTO;
priv->rtllib->status = 0;
priv->polling_timer_on = 0;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index b1656d4ecbad..54c7a2128053 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -340,8 +340,6 @@ struct r8192_priv {
struct bb_reg_definition PHYRegDef[4];
struct rate_adaptive rate_adaptive;
- enum acm_method AcmMethod;
-
struct rt_firmware *pFirmware;
enum rtl819x_loopback LoopbackMode;
diff --git a/drivers/staging/rtl8192e/rtl819x_Qos.h b/drivers/staging/rtl8192e/rtl819x_Qos.h
index 5073f9f40fdc..c010eb0d6036 100644
--- a/drivers/staging/rtl8192e/rtl819x_Qos.h
+++ b/drivers/staging/rtl8192e/rtl819x_Qos.h
@@ -97,13 +97,6 @@ enum direction_value {
DIR_BI_DIR = 3,
};
-enum acm_method {
- eAcmWay0_SwAndHw = 0,
- eAcmWay1_HW = 1,
- eAcmWay2_SW = 2,
-};
-
-
struct acm {
u64 UsedTime;
u64 MediumTime;
--
2.37.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/5] staging: rtl8192e: Remove unused variable skb_aggQ
2022-11-22 22:45 [PATCH 0/5] staging: rtl8192e: Remove unused variables in rtl_core.h Philipp Hortmann
2022-11-22 22:45 ` [PATCH 1/5] staging: rtl8192e: Remove unchanged variable AcmMethod Philipp Hortmann
@ 2022-11-22 22:46 ` Philipp Hortmann
2022-11-22 22:46 ` [PATCH 3/5] staging: rtl8192e: Remove unused variable initialized_at_probe Philipp Hortmann
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2022-11-22 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
skb_aggQ is initialized, never used and purged. 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.c | 2 --
drivers/staging/rtl8192e/rtllib.h | 1 -
3 files changed, 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 80eba5d5ab37..f02e67f68e23 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1946,8 +1946,6 @@ void rtl92e_stop_adapter(struct net_device *dev, bool reset)
for (i = 0; i < MAX_QUEUE_SIZE; i++)
skb_queue_purge(&priv->rtllib->skb_waitQ[i]);
- for (i = 0; i < MAX_QUEUE_SIZE; i++)
- skb_queue_purge(&priv->rtllib->skb_aggQ[i]);
skb_queue_purge(&priv->skb_queue);
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index a8cbeb9545da..369a59a753fe 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -903,8 +903,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
for (i = 0; i < MAX_QUEUE_SIZE; i++)
skb_queue_head_init(&priv->rtllib->skb_waitQ[i]);
- for (i = 0; i < MAX_QUEUE_SIZE; i++)
- skb_queue_head_init(&priv->rtllib->skb_aggQ[i]);
}
static void _rtl92e_init_priv_lock(struct r8192_priv *priv)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 7119c9c5e1fe..1152fbf43383 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1624,7 +1624,6 @@ struct rtllib_device {
int mgmt_queue_tail;
u8 AsocRetryCount;
struct sk_buff_head skb_waitQ[MAX_QUEUE_SIZE];
- struct sk_buff_head skb_aggQ[MAX_QUEUE_SIZE];
bool bdynamic_txpower_enable;
--
2.37.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/5] staging: rtl8192e: Remove unused variable initialized_at_probe
2022-11-22 22:45 [PATCH 0/5] staging: rtl8192e: Remove unused variables in rtl_core.h Philipp Hortmann
2022-11-22 22:45 ` [PATCH 1/5] staging: rtl8192e: Remove unchanged variable AcmMethod Philipp Hortmann
2022-11-22 22:46 ` [PATCH 2/5] staging: rtl8192e: Remove unused variable skb_aggQ Philipp Hortmann
@ 2022-11-22 22:46 ` Philipp Hortmann
2022-11-22 22:46 ` [PATCH 4/5] staging: rtl8192e: Remove unused variable ChannelAccessSetting Philipp Hortmann
2022-11-22 22:46 ` [PATCH 5/5] staging: rtl8192e: Remove unused variable int_log Philipp Hortmann
4 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2022-11-22 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
initialized_at_probe is initialized and never used. Remove resulting dead
code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 369a59a753fe..7b78bdfadc8d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -836,7 +836,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->up_first_time = 1;
priv->blinked_ingpio = false;
priv->being_init_adapter = false;
- priv->initialized_at_probe = false;
priv->bdisable_nic = false;
priv->bfirst_init = false;
priv->txringcount = 64;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 54c7a2128053..1c00ad709a3c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -309,7 +309,6 @@ struct r8192_priv {
bool bfirst_init;
bool bfirst_after_down;
- bool initialized_at_probe;
bool being_init_adapter;
int irq;
--
2.37.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 4/5] staging: rtl8192e: Remove unused variable ChannelAccessSetting
2022-11-22 22:45 [PATCH 0/5] staging: rtl8192e: Remove unused variables in rtl_core.h Philipp Hortmann
` (2 preceding siblings ...)
2022-11-22 22:46 ` [PATCH 3/5] staging: rtl8192e: Remove unused variable initialized_at_probe Philipp Hortmann
@ 2022-11-22 22:46 ` Philipp Hortmann
2022-11-22 22:46 ` [PATCH 5/5] staging: rtl8192e: Remove unused variable int_log Philipp Hortmann
4 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2022-11-22 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
ChannelAccessSetting is never used. Remove resulting dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 1c00ad709a3c..ca2e685148d4 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -234,15 +234,6 @@ struct rt_stats {
u32 CurrentShowTxate;
};
-struct channel_access_setting {
- u16 SIFS_Timer;
- u16 DIFS_Timer;
- u16 SlotTimeTimer;
- u16 EIFS_Timer;
- u16 CWminIndex;
- u16 CWmaxIndex;
-};
-
struct init_gain {
u8 xaagccore1;
u8 xbagccore1;
@@ -321,9 +312,6 @@ struct r8192_priv {
struct delayed_work txpower_tracking_wq;
struct delayed_work rfpath_check_wq;
struct delayed_work gpio_change_rf_wq;
-
- struct channel_access_setting ChannelAccessSetting;
-
struct rtl819x_ops *ops;
struct rtllib_device *rtllib;
--
2.37.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 5/5] staging: rtl8192e: Remove unused variable int_log
2022-11-22 22:45 [PATCH 0/5] staging: rtl8192e: Remove unused variables in rtl_core.h Philipp Hortmann
` (3 preceding siblings ...)
2022-11-22 22:46 ` [PATCH 4/5] staging: rtl8192e: Remove unused variable ChannelAccessSetting Philipp Hortmann
@ 2022-11-22 22:46 ` Philipp Hortmann
4 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2022-11-22 22:46 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
int_log is initialized and incremented but never evaluated. Remove
resulting dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 15 ---------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 ---
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
3 files changed, 20 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
index 53fd79a28189..ac192254a4bb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
@@ -154,21 +154,6 @@ struct tx_fwinfo_8190pci {
};
-struct log_int_8190 {
- u32 nIMR_COMDOK;
- u32 nIMR_MGNTDOK;
- u32 nIMR_HIGH;
- u32 nIMR_VODOK;
- u32 nIMR_VIDOK;
- u32 nIMR_BEDOK;
- u32 nIMR_BKDOK;
- u32 nIMR_ROK;
- u32 nIMR_RCOK;
- u32 nIMR_TBDOK;
- u32 nIMR_BDOK;
- u32 nIMR_RXFOVW;
-};
-
struct phy_ofdm_rx_status_rxsc_sgien_exintfflag {
u8 reserved:4;
u8 rxsc:2;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 7b78bdfadc8d..f8fbe78ccad9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -866,8 +866,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->rst_progress = RESET_TYPE_NORESET;
priv->force_reset = false;
memset(priv->rtllib->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
-
- memset(&priv->int_log, 0, sizeof(struct log_int_8190));
priv->rx_ctr = 0;
priv->rtllib->wx_set_enc = 0;
priv->hw_radio_off = false;
@@ -2185,7 +2183,6 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
if (inta & IMR_ROK) {
priv->stats.rxint++;
- priv->int_log.nIMR_ROK++;
tasklet_schedule(&priv->irq_rx_tasklet);
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index ca2e685148d4..cceb77492363 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -317,8 +317,6 @@ struct r8192_priv {
struct work_struct reset_wq;
- struct log_int_8190 int_log;
-
enum rt_customer_id CustomerID;
--
2.37.3
^ permalink raw reply related [flat|nested] 6+ messages in thread