2023-07-29 09:12:37

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 00/10] staging: rtl8192e: Remove unused variables starting with p_intb

Remove unused or constant variables and empty functions.

Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s)
Transferred this patch over wlan connection of rtl8192e.

Philipp Hortmann (10):
staging: rtl8192e: Remove unused variable p_intb
staging: rtl8192e: Remove unused variable intb in _rtl92e_irq()
staging: rtl8192e: Remove empty function rtllib_rx_Master()
staging: rtl8192e: Remove empty function rtllib_rx_Mesh()
staging: rtl8192e: Remove unused variable is_mesh from
rtllib_send_probe
staging: rtl8192e: Remove is_mesh from rtllib_send_probe_requests
staging: rtl8192e: Remove is_mesh from rtllib_start_scan_syncro
staging: rtl8192e: Remove is_mesh from rtllib_softmac_scan_syncro
staging: rtl8192e: Remove is_mesh from rtl92e_set_swcam
staging: rtl8192e: Remove DefaultKey from rtl92e_set_swcam

.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
.../staging/rtl8192e/rtl8192e/r8192E_dev.h | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 17 +++++++---------
drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 3 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +----
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 12 +++++------
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 14 -------------
drivers/staging/rtl8192e/rtllib_softmac.c | 20 +++++++++----------
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 4 ++--
10 files changed, 29 insertions(+), 52 deletions(-)

--
2.41.0



2023-07-29 09:44:02

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 02/10] staging: rtl8192e: Remove unused variable intb in _rtl92e_irq()

Remove unused variable intb in _rtl92e_irq().

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index cfad170008c6..50eb8f3494ec 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1973,9 +1973,6 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
struct r8192_priv *priv = rtllib_priv(dev);
unsigned long flags;
u32 inta;
- u32 intb;
-
- intb = 0;

if (priv->irq_enabled == 0)
goto done;
--
2.41.0


2023-07-29 09:58:22

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 08/10] staging: rtl8192e: Remove is_mesh from rtllib_softmac_scan_syncro

Function rtllib_softmac_scan_syncro() has unused parameter is_mesh.
Remove dead code.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtllib_softmac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 7b866b3a46ef..0e52b207942d 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -478,7 +478,7 @@ static void rtllib_update_active_chan_map(struct rtllib_device *ieee)
/* this performs syncro scan blocking the caller until all channels
* in the allowed channel map has been checked.
*/
-static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh)
+static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee)
{
union iwreq_data wrqu;
short ch = 0;
@@ -715,7 +715,7 @@ void rtllib_start_scan_syncro(struct rtllib_device *ieee)
}
ieee->sync_scan_hurryup = 0;
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
- rtllib_softmac_scan_syncro(ieee, 0);
+ rtllib_softmac_scan_syncro(ieee);
}
EXPORT_SYMBOL(rtllib_start_scan_syncro);

--
2.41.0


2023-07-29 09:58:43

by Philipp Hortmann

[permalink] [raw]
Subject: [PATCH 10/10] staging: rtl8192e: Remove DefaultKey from rtl92e_set_swcam

Function rtl92e_set_swcam() has parameter DefaultKey which is in all calls
0. Remove dead code.

Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 5 ++---
drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 3 +--
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 8 ++++----
3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
index f9ddb8384752..944cc73fb2b6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
@@ -49,8 +49,7 @@ void rtl92e_enable_hw_security_config(struct net_device *dev)
}

void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
- u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
- u32 *KeyContent)
+ u16 KeyType, const u8 *MacAddr, u32 *KeyContent)
{
struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device *ieee = priv->rtllib;
@@ -62,7 +61,7 @@ void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
ieee->swcamtable[EntryNo].key_index = KeyIndex;
ieee->swcamtable[EntryNo].key_type = KeyType;
memcpy(ieee->swcamtable[EntryNo].macaddr, MacAddr, 6);
- ieee->swcamtable[EntryNo].useDK = DefaultKey;
+ ieee->swcamtable[EntryNo].useDK = 0;
memcpy(ieee->swcamtable[EntryNo].key_buf, (u8 *)KeyContent, 16);
}

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
index fcfde5f6cf2f..bd33ef105107 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
@@ -19,8 +19,7 @@ void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
u32 *KeyContent);
void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
- u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
- u32 *KeyContent);
+ u16 KeyType, const u8 *MacAddr, u32 *KeyContent);
void rtl92e_cam_restore(struct net_device *dev);

#endif
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 644762f925b7..189798852568 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -712,7 +712,7 @@ static int _rtl92e_wx_set_enc(struct net_device *dev,
rtl92e_set_key(dev, key_idx, key_idx, KEY_TYPE_WEP104,
zero_addr[key_idx], 0, hwkey);
rtl92e_set_swcam(dev, key_idx, key_idx, KEY_TYPE_WEP104,
- zero_addr[key_idx], 0, hwkey);
+ zero_addr[key_idx], hwkey);
} else {
netdev_info(dev,
"wrong type in WEP, not WEP40 and WEP104\n");
@@ -857,19 +857,19 @@ static int _rtl92e_wx_set_encode_ext(struct net_device *dev,
if (ext->key_len == 13)
ieee->pairwise_key_type = alg = KEY_TYPE_WEP104;
rtl92e_set_key(dev, idx, idx, alg, zero, 0, key);
- rtl92e_set_swcam(dev, idx, idx, alg, zero, 0, key);
+ rtl92e_set_swcam(dev, idx, idx, alg, zero, key);
} else if (group) {
ieee->group_key_type = alg;
rtl92e_set_key(dev, idx, idx, alg, broadcast_addr, 0,
key);
- rtl92e_set_swcam(dev, idx, idx, alg, broadcast_addr, 0, key);
+ rtl92e_set_swcam(dev, idx, idx, alg, broadcast_addr, key);
} else {
if ((ieee->pairwise_key_type == KEY_TYPE_CCMP) &&
ieee->ht_info->bCurrentHTSupport)
rtl92e_writeb(dev, 0x173, 1);
rtl92e_set_key(dev, 4, idx, alg,
(u8 *)ieee->ap_mac_addr, 0, key);
- rtl92e_set_swcam(dev, 4, idx, alg, (u8 *)ieee->ap_mac_addr, 0, key);
+ rtl92e_set_swcam(dev, 4, idx, alg, (u8 *)ieee->ap_mac_addr, key);
}
}

--
2.41.0