| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * This file contains the handling of RX in wlan driver. |
|---|
| 3 | 4 | */ |
|---|
| .. | .. |
|---|
| 61 | 62 | struct rxpd *p_rx_pd; |
|---|
| 62 | 63 | int hdrchop; |
|---|
| 63 | 64 | struct ethhdr *p_ethhdr; |
|---|
| 64 | | - static const u8 rfc1042_eth_hdr[] = { |
|---|
| 65 | | - 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 |
|---|
| 66 | | - }; |
|---|
| 67 | 65 | |
|---|
| 68 | 66 | BUG_ON(!skb); |
|---|
| 69 | 67 | |
|---|
| .. | .. |
|---|
| 101 | 99 | sizeof(p_rx_pkt->eth803_hdr.src_addr)); |
|---|
| 102 | 100 | |
|---|
| 103 | 101 | if (memcmp(&p_rx_pkt->rfc1042_hdr, |
|---|
| 104 | | - rfc1042_eth_hdr, sizeof(rfc1042_eth_hdr)) == 0) { |
|---|
| 102 | + rfc1042_header, sizeof(rfc1042_header)) == 0) { |
|---|
| 105 | 103 | /* |
|---|
| 106 | 104 | * Replace the 803 header and rfc1042 header (llc/snap) with an |
|---|
| 107 | 105 | * EthernetII header, keep the src/dst and snap_type (ethertype) |
|---|
| .. | .. |
|---|
| 149 | 147 | dev->stats.rx_packets++; |
|---|
| 150 | 148 | |
|---|
| 151 | 149 | 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); |
|---|
| 156 | 151 | |
|---|
| 157 | 152 | ret = 0; |
|---|
| 158 | 153 | done: |
|---|
| .. | .. |
|---|
| 267 | 262 | dev->stats.rx_packets++; |
|---|
| 268 | 263 | |
|---|
| 269 | 264 | 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); |
|---|
| 275 | 266 | |
|---|
| 276 | 267 | ret = 0; |
|---|
| 277 | 268 | |
|---|