[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220801022854.1594714-1-ye.xingchen@zte.com.cn>
Date: Mon, 1 Aug 2022 02:28:54 +0000
From: cgel.zte@...il.com
To: linux-kernel@...r.kernel.org
Cc: netdev@...r.kernel.org, ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] ray_cs: Remove the no effect conditional statements
From: ye xingchen <ye.xingchen@....com.cn>
Conditional statements have no effect to next process.So remove it.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
drivers/net/wireless/ray_cs.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 1f57a0055bbd..e7c88ef06bfe 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2112,8 +2112,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 >
(dev->mtu + RX_MAC_HEADER_LENGTH + ETH_HLEN +
@@ -2123,18 +2121,6 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
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");
/* If fragmented packet, verify sizes of fragments add up */
--
2.25.1
Powered by blists - more mailing lists