Commit 33b9f318 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Jakub Kicinski
Browse files

net: fec: fec_enet_rx_queue(): reduce scope of data



In order to clean up of the VLAN handling, reduce the scope of data.

Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Reviewed-by: default avatarWei Fang <wei.fang@nxp.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/20250618-fec-cleanups-v4-9-c16f9a1af124@pengutronix.de


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e4a3659a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1720,7 +1720,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
	unsigned short status;
	struct  sk_buff *skb;
	ushort	pkt_len;
	__u8 *data;
	int	pkt_received = 0;
	struct	bufdesc_ex *ebdp = NULL;
	bool	vlan_packet_rcvd = false;
@@ -1843,10 +1842,11 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
		skb_mark_for_recycle(skb);

		if (unlikely(need_swap)) {
			u8 *data;

			data = page_address(page) + FEC_ENET_XDP_HEADROOM;
			swap_buffer(data, pkt_len);
		}
		data = skb->data;

		/* Extract the enhanced buffer descriptor */
		ebdp = NULL;
@@ -1864,7 +1864,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)

			vlan_packet_rcvd = true;

			memmove(skb->data + VLAN_HLEN, data, ETH_ALEN * 2);
			memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2);
			skb_pull(skb, VLAN_HLEN);
		}