* [PATCH 1/8] staging: rtl8192e: Remove unused function rtl92e_dm_backup_state()
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-02 17:53 ` [PATCH 2/8] staging: rtl8192e: Remove unused function rtl92e_dm_restore_state() Philipp Hortmann
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rtl92e_dm_backup_state() is unused. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 19 -------------------
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 1 -
2 files changed, 20 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index c29bc85f9577..5217ace3f140 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -973,25 +973,6 @@ static void _rtl92e_dm_bb_initialgain_restore(struct net_device *dev)
rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x1);
}
-void rtl92e_dm_backup_state(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
- u32 bit_mask = bMaskByte0;
-
- priv->bswitch_fsync = false;
-
- if (dm_digtable.dig_algorithm == DIG_ALGO_BY_RSSI)
- return;
-
- rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8);
- priv->initgain_backup.xaagccore1 = rtl92e_get_bb_reg(dev, rOFDM0_XAAGCCore1, bit_mask);
- priv->initgain_backup.xbagccore1 = rtl92e_get_bb_reg(dev, rOFDM0_XBAGCCore1, bit_mask);
- priv->initgain_backup.xcagccore1 = rtl92e_get_bb_reg(dev, rOFDM0_XCAGCCore1, bit_mask);
- priv->initgain_backup.xdagccore1 = rtl92e_get_bb_reg(dev, rOFDM0_XDAGCCore1, bit_mask);
- bit_mask = bMaskByte2;
- priv->initgain_backup.cca = (u8)rtl92e_get_bb_reg(dev, rCCK0_CCA, bit_mask);
-}
-
static void _rtl92e_dm_dig_init(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 01587e2fec65..9085a6454cbc 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -179,7 +179,6 @@ void rtl92e_dm_txpower_tracking_wq(void *data);
void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14);
void rtl92e_dm_restore_state(struct net_device *dev);
-void rtl92e_dm_backup_state(struct net_device *dev);
void rtl92e_dm_init_edca_turbo(struct net_device *dev);
void rtl92e_dm_rf_pathcheck_wq(void *data);
void rtl92e_dm_init_txpower_tracking(struct net_device *dev);
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/8] staging: rtl8192e: Remove unused function rtl92e_dm_restore_state()
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
2023-10-02 17:53 ` [PATCH 1/8] staging: rtl8192e: Remove unused function rtl92e_dm_backup_state() Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-02 17:53 ` [PATCH 3/8] staging: rtl8192e: Remove unused function rtl92e_cam_restore() Philipp Hortmann
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove rtl92e_dm_restore_state() as it is unused. Remove called functions
_rtl92e_dm_tx_power_reset_recovery() and
_rtl92e_dm_bb_initialgain_restore() as well.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 59 ----------------------
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 1 -
2 files changed, 60 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 5217ace3f140..8f5e4b932350 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -161,7 +161,6 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev);
static void _rtl92e_dm_check_tx_power_tracking(struct net_device *dev);
-static void _rtl92e_dm_bb_initialgain_restore(struct net_device *dev);
static void _rtl92e_dm_dig_init(struct net_device *dev);
static void _rtl92e_dm_ctrl_initgain_byrssi(struct net_device *dev);
static void _rtl92e_dm_ctrl_initgain_byrssi_highpwr(struct net_device *dev);
@@ -915,64 +914,6 @@ void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14)
_rtl92e_dm_cck_tx_power_adjust_thermal_meter(dev, binch14);
}
-static void _rtl92e_dm_tx_power_reset_recovery(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
-
- rtl92e_set_bb_reg(dev, rOFDM0_XATxIQImbalance, bMaskDWord,
- dm_tx_bb_gain[priv->rfa_txpowertrackingindex]);
- rtl92e_dm_cck_txpower_adjust(dev, priv->bcck_in_ch14);
-
- rtl92e_set_bb_reg(dev, rOFDM0_XCTxIQImbalance, bMaskDWord,
- dm_tx_bb_gain[priv->rfc_txpowertrackingindex]);
-}
-
-void rtl92e_dm_restore_state(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
- u32 reg_ratr = priv->rate_adaptive.last_ratr;
- u32 ratr_value;
-
- if (!priv->up)
- return;
-
- if (priv->rate_adaptive.rate_adaptive_disabled)
- return;
- if (priv->rtllib->mode != WIRELESS_MODE_N_24G)
- return;
- ratr_value = reg_ratr;
- ratr_value &= ~(RATE_ALL_OFDM_2SS);
- rtl92e_writel(dev, RATR0, ratr_value);
- rtl92e_writeb(dev, UFWP, 1);
- if (priv->tx_pwr_tracking_init && priv->btxpower_tracking)
- _rtl92e_dm_tx_power_reset_recovery(dev);
-
- _rtl92e_dm_bb_initialgain_restore(dev);
-}
-
-static void _rtl92e_dm_bb_initialgain_restore(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
- u32 bit_mask = 0x7f;
-
- if (dm_digtable.dig_algorithm == DIG_ALGO_BY_RSSI)
- return;
-
- rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8);
- rtl92e_set_bb_reg(dev, rOFDM0_XAAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xaagccore1);
- rtl92e_set_bb_reg(dev, rOFDM0_XBAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xbagccore1);
- rtl92e_set_bb_reg(dev, rOFDM0_XCAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xcagccore1);
- rtl92e_set_bb_reg(dev, rOFDM0_XDAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xdagccore1);
- bit_mask = bMaskByte2;
- rtl92e_set_bb_reg(dev, rCCK0_CCA, bit_mask,
- (u32)priv->initgain_backup.cca);
- rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x1);
-}
-
static void _rtl92e_dm_dig_init(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 9085a6454cbc..5ae2bf467158 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -178,7 +178,6 @@ void rtl92e_dm_txpower_tracking_wq(void *data);
void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14);
-void rtl92e_dm_restore_state(struct net_device *dev);
void rtl92e_dm_init_edca_turbo(struct net_device *dev);
void rtl92e_dm_rf_pathcheck_wq(void *data);
void rtl92e_dm_init_txpower_tracking(struct net_device *dev);
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/8] staging: rtl8192e: Remove unused function rtl92e_cam_restore()
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
2023-10-02 17:53 ` [PATCH 1/8] staging: rtl8192e: Remove unused function rtl92e_dm_backup_state() Philipp Hortmann
2023-10-02 17:53 ` [PATCH 2/8] staging: rtl8192e: Remove unused function rtl92e_dm_restore_state() Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-02 17:53 ` [PATCH 4/8] staging: rtl8192e: Remove unused variable last_ratr Philipp Hortmann
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rtl92e_cam_restore() is unused. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 63 ---------------------
drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 1 -
2 files changed, 64 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
index 14b48cacfbbd..9b280cee0ac1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
@@ -121,66 +121,3 @@ void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
}
}
}
-
-void rtl92e_cam_restore(struct net_device *dev)
-{
- u8 EntryId = 0;
- struct r8192_priv *priv = rtllib_priv(dev);
- u8 *MacAddr = priv->rtllib->current_network.bssid;
-
- static u8 CAM_CONST_ADDR[4][6] = {
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x02},
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x03}
- };
- static u8 CAM_CONST_BROAD[] = {
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
- };
-
- if ((priv->rtllib->pairwise_key_type == KEY_TYPE_WEP40) ||
- (priv->rtllib->pairwise_key_type == KEY_TYPE_WEP104)) {
- for (EntryId = 0; EntryId < 4; EntryId++) {
- MacAddr = CAM_CONST_ADDR[EntryId];
- if (priv->rtllib->swcamtable[EntryId].bused) {
- rtl92e_set_key(dev, EntryId, EntryId,
- priv->rtllib->pairwise_key_type,
- MacAddr, 0,
- (u32 *)(&priv->rtllib->swcamtable
- [EntryId].key_buf[0]));
- }
- }
-
- } else if (priv->rtllib->pairwise_key_type == KEY_TYPE_TKIP) {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type,
- MacAddr, 0,
- (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- } else if (priv->rtllib->pairwise_key_type == KEY_TYPE_CCMP) {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type, MacAddr,
- 0, (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- }
-
- if (priv->rtllib->group_key_type == KEY_TYPE_TKIP) {
- MacAddr = CAM_CONST_BROAD;
- for (EntryId = 1; EntryId < 4; EntryId++) {
- if (priv->rtllib->swcamtable[EntryId].bused) {
- rtl92e_set_key(dev, EntryId, EntryId,
- priv->rtllib->group_key_type,
- MacAddr, 0,
- (u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0]));
- }
- }
- } else if (priv->rtllib->group_key_type == KEY_TYPE_CCMP) {
- MacAddr = CAM_CONST_BROAD;
- for (EntryId = 1; EntryId < 4; EntryId++) {
- if (priv->rtllib->swcamtable[EntryId].bused) {
- rtl92e_set_key(dev, EntryId, EntryId,
- priv->rtllib->group_key_type,
- MacAddr, 0,
- (u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0]));
- }
- }
- }
-}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
index bd33ef105107..615b84bca9b8 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
@@ -20,6 +20,5 @@ void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u32 *KeyContent);
void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u32 *KeyContent);
-void rtl92e_cam_restore(struct net_device *dev);
#endif
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/8] staging: rtl8192e: Remove unused variable last_ratr
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
` (2 preceding siblings ...)
2023-10-02 17:53 ` [PATCH 3/8] staging: rtl8192e: Remove unused function rtl92e_cam_restore() Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-02 17:53 ` [PATCH 5/8] staging: rtl8192e: Remove unused variable rate_adaptive_disabled Philipp Hortmann
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
last_ratr is written but never evaluated. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 --
drivers/staging/rtl8192e/rtllib.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 8f5e4b932350..52b9393b55e7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -370,8 +370,6 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
ratr_value &= ~(RATE_ALL_OFDM_2SS);
rtl92e_writel(dev, RATR0, ratr_value);
rtl92e_writeb(dev, UFWP, 1);
-
- pra->last_ratr = target_ratr;
}
} else {
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 004818520ea8..1e474691aa88 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1164,7 +1164,6 @@ struct rate_adaptive {
u8 ping_rssi_enable;
u32 ping_rssi_ratr;
u32 ping_rssi_thresh_for_ra;
- u32 last_ratr;
u8 PreRATRState;
};
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/8] staging: rtl8192e: Remove unused variable rate_adaptive_disabled
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
` (3 preceding siblings ...)
2023-10-02 17:53 ` [PATCH 4/8] staging: rtl8192e: Remove unused variable last_ratr Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-02 17:53 ` [PATCH 6/8] staging: rtl8192e: Remove unused variable rfc_txpowertrackingindex Philipp Hortmann
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rate_adaptive_disabled is initialized to 0 and unchanged. The equation
results accordingly. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 3 ---
drivers/staging/rtl8192e/rtllib.h | 1 -
2 files changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 52b9393b55e7..01abe1e48468 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -284,9 +284,6 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
if (!priv->up)
return;
- if (pra->rate_adaptive_disabled)
- return;
-
if (priv->rtllib->mode != WIRELESS_MODE_N_24G)
return;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 1e474691aa88..bf4ec38efa35 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1146,7 +1146,6 @@ struct sw_cam_table {
#define TOTAL_CAM_ENTRY 32
struct rate_adaptive {
- u8 rate_adaptive_disabled;
u8 ratr_state;
u16 reserve;
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 6/8] staging: rtl8192e: Remove unused variable rfc_txpowertrackingindex
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
` (4 preceding siblings ...)
2023-10-02 17:53 ` [PATCH 5/8] staging: rtl8192e: Remove unused variable rate_adaptive_disabled Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-02 17:53 ` [PATCH 7/8] staging: rtl8192e: Remove unused/constant parameter mesh_flag and shutdown Philipp Hortmann
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
rfc_txpowertrackingindex is initialized to 0 and unchanged. Remove 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 c4688c273f4b..1f3a2bee247f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -752,7 +752,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->bcck_in_ch14 = false;
priv->cck_present_attn = 0;
priv->rfa_txpowertrackingindex = 0;
- priv->rfc_txpowertrackingindex = 0;
priv->cck_pwr_enl = 6;
memset(priv->rtllib->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
priv->rx_ctr = 0;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index deb707dfa443..922231274f4b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -344,7 +344,6 @@ struct r8192_priv {
u8 rfa_txpowertrackingindex;
u8 rfa_txpowertrackingindex_real;
u8 rfa_txpowertracking_default;
- u8 rfc_txpowertrackingindex;
bool btxpower_tracking;
bool bcck_in_ch14;
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 7/8] staging: rtl8192e: Remove unused/constant parameter mesh_flag and shutdown
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
` (5 preceding siblings ...)
2023-10-02 17:53 ` [PATCH 6/8] staging: rtl8192e: Remove unused variable rfc_txpowertrackingindex Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-02 17:53 ` [PATCH 8/8] staging: rtl8192e: Remove constant parameter from rtllib_stop_protocol() Philipp Hortmann
2023-10-04 8:19 ` [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Dan Carpenter
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove parameters mesh_flag and shutdown of function
rtllib_softmac_stop_protocol(). mesh_flag is unused. shutdown is always
true.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++--
drivers/staging/rtl8192e/rtllib.h | 3 +--
drivers/staging/rtl8192e/rtllib_softmac.c | 5 ++---
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 1f3a2bee247f..4e9a0138ce55 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -655,7 +655,7 @@ static int _rtl92e_sta_down(struct net_device *dev, bool shutdownrf)
_rtl92e_cancel_deferred_work(priv);
cancel_delayed_work(&priv->rtllib->hw_wakeup_wq);
- rtllib_softmac_stop_protocol(priv->rtllib, 0, true);
+ rtllib_softmac_stop_protocol(priv->rtllib);
spin_lock_irqsave(&priv->rf_ps_lock, flags);
while (priv->rf_change_in_progress) {
spin_unlock_irqrestore(&priv->rf_ps_lock, flags);
@@ -1763,7 +1763,7 @@ void rtl92e_commit(struct net_device *dev)
if (priv->up == 0)
return;
- rtllib_softmac_stop_protocol(priv->rtllib, 0, true);
+ rtllib_softmac_stop_protocol(priv->rtllib);
rtl92e_irq_disable(dev);
rtl92e_stop_adapter(dev, true);
_rtl92e_up(dev);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index bf4ec38efa35..65f29afa81be 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1705,8 +1705,7 @@ void rtllib_DisableNetMonitorMode(struct net_device *dev, bool bInitState);
void rtllib_EnableIntelPromiscuousMode(struct net_device *dev, bool bInitState);
void rtllib_DisableIntelPromiscuousMode(struct net_device *dev,
bool bInitState);
-void rtllib_softmac_stop_protocol(struct rtllib_device *ieee,
- u8 mesh_flag, u8 shutdown);
+void rtllib_softmac_stop_protocol(struct rtllib_device *ieee);
void rtllib_softmac_start_protocol(struct rtllib_device *ieee, u8 mesh_flag);
void rtllib_reset_queue(struct rtllib_device *ieee);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 777338fd2664..1a086f0ff10d 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2279,12 +2279,11 @@ struct sk_buff *rtllib_get_beacon(struct rtllib_device *ieee)
}
EXPORT_SYMBOL(rtllib_get_beacon);
-void rtllib_softmac_stop_protocol(struct rtllib_device *ieee, u8 mesh_flag,
- u8 shutdown)
+void rtllib_softmac_stop_protocol(struct rtllib_device *ieee)
{
rtllib_stop_scan_syncro(ieee);
mutex_lock(&ieee->wx_mutex);
- rtllib_stop_protocol(ieee, shutdown);
+ rtllib_stop_protocol(ieee, true);
mutex_unlock(&ieee->wx_mutex);
}
EXPORT_SYMBOL(rtllib_softmac_stop_protocol);
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 8/8] staging: rtl8192e: Remove constant parameter from rtllib_stop_protocol()
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
` (6 preceding siblings ...)
2023-10-02 17:53 ` [PATCH 7/8] staging: rtl8192e: Remove unused/constant parameter mesh_flag and shutdown Philipp Hortmann
@ 2023-10-02 17:53 ` Philipp Hortmann
2023-10-04 8:19 ` [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Dan Carpenter
8 siblings, 0 replies; 10+ messages in thread
From: Philipp Hortmann @ 2023-10-02 17:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove constant parameter shutdown of function rtllib_stop_protocol().
shutdown is always true. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 19 ++++++++-----------
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 6 +++---
3 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 65f29afa81be..ff1728d1824d 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1698,7 +1698,7 @@ void rtllib_start_scan_syncro(struct rtllib_device *ieee);
void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr);
void rtllib_sta_ps_send_pspoll_frame(struct rtllib_device *ieee);
void rtllib_start_protocol(struct rtllib_device *ieee);
-void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown);
+void rtllib_stop_protocol(struct rtllib_device *ieee);
void rtllib_EnableNetMonitorMode(struct net_device *dev, bool bInitState);
void rtllib_DisableNetMonitorMode(struct net_device *dev, bool bInitState);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 1a086f0ff10d..79a62bd9a297 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2283,21 +2283,19 @@ void rtllib_softmac_stop_protocol(struct rtllib_device *ieee)
{
rtllib_stop_scan_syncro(ieee);
mutex_lock(&ieee->wx_mutex);
- rtllib_stop_protocol(ieee, true);
+ rtllib_stop_protocol(ieee);
mutex_unlock(&ieee->wx_mutex);
}
EXPORT_SYMBOL(rtllib_softmac_stop_protocol);
-void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown)
+void rtllib_stop_protocol(struct rtllib_device *ieee)
{
if (!ieee->proto_started)
return;
- if (shutdown) {
- ieee->proto_started = 0;
- ieee->proto_stoppping = 1;
- ieee->rtllib_ips_leave(ieee->dev);
- }
+ ieee->proto_started = 0;
+ ieee->proto_stoppping = 1;
+ ieee->rtllib_ips_leave(ieee->dev);
del_timer_sync(&ieee->associate_timer);
mutex_unlock(&ieee->wx_mutex);
@@ -2315,10 +2313,9 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown)
rtllib_disassociate(ieee);
}
- if (shutdown) {
- RemoveAllTS(ieee);
- ieee->proto_stoppping = 0;
- }
+ RemoveAllTS(ieee);
+ ieee->proto_stoppping = 0;
+
kfree(ieee->assocreq_ies);
ieee->assocreq_ies = NULL;
ieee->assocreq_ies_len = 0;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index 3c7c0f07ab0b..e9da566646c5 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -134,7 +134,7 @@ int rtllib_wx_set_wap(struct rtllib_device *ieee,
}
if (ifup)
- rtllib_stop_protocol(ieee, true);
+ rtllib_stop_protocol(ieee);
/* just to avoid to give inconsistent infos in the
* get wx method. not really needed otherwise
@@ -277,7 +277,7 @@ int rtllib_wx_set_mode(struct rtllib_device *ieee, struct iw_request_info *a,
if (!ieee->proto_started) {
ieee->iw_mode = wrqu->mode;
} else {
- rtllib_stop_protocol(ieee, true);
+ rtllib_stop_protocol(ieee);
ieee->iw_mode = wrqu->mode;
rtllib_start_protocol(ieee);
}
@@ -401,7 +401,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
}
if (proto_started)
- rtllib_stop_protocol(ieee, true);
+ rtllib_stop_protocol(ieee);
/* this is just to be sure that the GET wx callback
* has consistent infos. not needed otherwise
--
2.42.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
` (7 preceding siblings ...)
2023-10-02 17:53 ` [PATCH 8/8] staging: rtl8192e: Remove constant parameter from rtllib_stop_protocol() Philipp Hortmann
@ 2023-10-04 8:19 ` Dan Carpenter
8 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2023-10-04 8:19 UTC (permalink / raw)
To: Philipp Hortmann; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Mon, Oct 02, 2023 at 07:53:01PM +0200, Philipp Hortmann wrote:
> Remove unused functions rtl92e_dm_backup_state(),
> rtl92e_dm_restore_state() and rtl92e_cam_restore(). Remove unused
> variables. Most parts are leftover from the previous patch series.
>
> Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s)
> Transferred this patch over wlan connection of rtl8192e.
>
> Philipp Hortmann (8):
> staging: rtl8192e: Remove unused function rtl92e_dm_backup_state()
> staging: rtl8192e: Remove unused function rtl92e_dm_restore_state()
> staging: rtl8192e: Remove unused function rtl92e_cam_restore()
> staging: rtl8192e: Remove unused variable last_ratr
> staging: rtl8192e: Remove unused variable rate_adaptive_disabled
> staging: rtl8192e: Remove unused variable rfc_txpowertrackingindex
> staging: rtl8192e: Remove unused/constant parameter mesh_flag and
> shutdown
> staging: rtl8192e: Remove constant parameter from
> rtllib_stop_protocol()
>
These all look good.
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread