forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/net/wireless/marvell/libertas/rx.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * This file contains the handling of RX in wlan driver.
34 */
....@@ -61,9 +62,6 @@
6162 struct rxpd *p_rx_pd;
6263 int hdrchop;
6364 struct ethhdr *p_ethhdr;
64
- static const u8 rfc1042_eth_hdr[] = {
65
- 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
66
- };
6765
6866 BUG_ON(!skb);
6967
....@@ -101,7 +99,7 @@
10199 sizeof(p_rx_pkt->eth803_hdr.src_addr));
102100
103101 if (memcmp(&p_rx_pkt->rfc1042_hdr,
104
- rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr)) == 0) {
102
+ rfc1042_header, sizeof(rfc1042_header)) == 0) {
105103 /*
106104 * Replace the 803 header and rfc1042 header (llc/snap) with an
107105 * EthernetII header, keep the src/dst and snap_type (ethertype)
....@@ -149,10 +147,7 @@
149147 dev->stats.rx_packets++;
150148
151149 skb->protocol = eth_type_trans(skb, dev);
152
- if (in_interrupt())
153
- netif_rx(skb);
154
- else
155
- netif_rx_ni(skb);
150
+ netif_rx_any_context(skb);
156151
157152 ret = 0;
158153 done:
....@@ -267,11 +262,7 @@
267262 dev->stats.rx_packets++;
268263
269264 skb->protocol = eth_type_trans(skb, priv->dev);
270
-
271
- if (in_interrupt())
272
- netif_rx(skb);
273
- else
274
- netif_rx_ni(skb);
265
+ netif_rx_any_context(skb);
275266
276267 ret = 0;
277268