[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230626102752.1583-1-youkangren@vivo.com>
Date: Mon, 26 Jun 2023 18:27:50 +0800
From: You Kangren <youkangren@...o.com>
To: Kalle Valo <kvalo@...nel.org>, Dongliang Mu <dzm91@...t.edu.cn>,
You Kangren <youkangren@...o.com>,
Simon Horman <simon.horman@...igine.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-wireless@...r.kernel.org (open list:RAYLINK/WEBGEAR 802.11
WIRELESS LAN DRIVER), linux-kernel@...r.kernel.org (open list)
Cc: opensource.kernel@...o.com
Subject: [PATCH] wifi: ray_cs: Remove invalid conditional statements
Remove invalid conditional statements to make the code clean
Signed-off-by: You Kangren <youkangren@...o.com>
---
drivers/net/wireless/legacy/ray_cs.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/net/wireless/legacy/ray_cs.c b/drivers/net/wireless/legacy/ray_cs.c
index 96f34d90f601..0022038b0758 100644
--- a/drivers/net/wireless/legacy/ray_cs.c
+++ b/drivers/net/wireless/legacy/ray_cs.c
@@ -2116,7 +2116,6 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
#endif
if (!sniffer) {
- if (translate) {
/* TBD length needs fixing for translated header */
if (rx_len < (ETH_HLEN + RX_MAC_HEADER_LENGTH) ||
rx_len >
@@ -2126,18 +2125,6 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
"ray_cs invalid packet length %d received\n",
rx_len);
return;
- }
- } else { /* encapsulated ethernet */
-
- if (rx_len < (ETH_HLEN + RX_MAC_HEADER_LENGTH) ||
- rx_len >
- (dev->mtu + RX_MAC_HEADER_LENGTH + ETH_HLEN +
- FCS_LEN)) {
- pr_debug(
- "ray_cs invalid packet length %d received\n",
- rx_len);
- return;
- }
}
}
pr_debug("ray_cs rx_data packet\n");
--
2.39.0
Powered by blists - more mailing lists