[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210816160617.11949-4-fmdefrancesco@gmail.com>
Date: Mon, 16 Aug 2021 18:06:17 +0200
From: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Martin Kaiser <martin@...ser.cx>,
Michael Straube <straube.linux@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Subject: [PATCH 3/3] staging: r8188eu: Remove no more used variable and function
Remove the 'sender' pointer to integer. Remove
__nat25_db_network_lookup_and_replace(). Following the deletion of the
code related to the NAT25_LOOKUP method, they are no more needed.
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
---
drivers/staging/r8188eu/core/rtw_br_ext.c | 52 +----------------------
1 file changed, 1 insertion(+), 51 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
index 5b032406e9d3..62864fbbdef3 100644
--- a/drivers/staging/r8188eu/core/rtw_br_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
@@ -326,56 +326,6 @@ static inline void __network_hash_unlink(struct nat25_network_db_entry *ent)
ent->pprev_hash = NULL;
}
-static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
- struct sk_buff *skb, unsigned char *networkAddr)
-{
- struct nat25_network_db_entry *db;
-
- spin_lock_bh(&priv->br_ext_lock);
-
- db = priv->nethash[__nat25_network_hash(networkAddr)];
- while (db) {
- if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) {
- if (!__nat25_has_expired(priv, db)) {
- /* replace the destination mac address */
- memcpy(skb->data, db->macAddr, ETH_ALEN);
- atomic_inc(&db->use_count);
-
- DEBUG_INFO("NAT25: Lookup M:%02x%02x%02x%02x%02x%02x N:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x\n",
- db->macAddr[0],
- db->macAddr[1],
- db->macAddr[2],
- db->macAddr[3],
- db->macAddr[4],
- db->macAddr[5],
- db->networkAddr[0],
- db->networkAddr[1],
- db->networkAddr[2],
- db->networkAddr[3],
- db->networkAddr[4],
- db->networkAddr[5],
- db->networkAddr[6],
- db->networkAddr[7],
- db->networkAddr[8],
- db->networkAddr[9],
- db->networkAddr[10],
- db->networkAddr[11],
- db->networkAddr[12],
- db->networkAddr[13],
- db->networkAddr[14],
- db->networkAddr[15],
- db->networkAddr[16]);
- }
- spin_unlock_bh(&priv->br_ext_lock);
- return 1;
- }
- db = db->next_hash;
- }
- spin_unlock_bh(&priv->br_ext_lock);
- return 0;
-}
-
static void __nat25_db_network_insert(struct adapter *priv,
unsigned char *macAddr, unsigned char *networkAddr)
{
@@ -524,7 +474,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
/*---------------------------------------------------*/
struct arphdr *arp = (struct arphdr *)(skb->data + ETH_HLEN);
unsigned char *arp_ptr = (unsigned char *)(arp + 1);
- unsigned int *sender, *target;
+ unsigned int *sender;
if (arp->ar_pro != __constant_htons(ETH_P_IP)) {
DEBUG_WARN("NAT25: arp protocol unknown (%4x)!\n", be16_to_cpu(arp->ar_pro));
--
2.32.0
Powered by blists - more mailing lists