net: lan966x: Split function lan966x_fdma_rx_get_frame
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Wed, 9 Nov 2022 20:46:11 +0000 (21:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Nov 2022 10:49:34 +0000 (10:49 +0000)
commit4a00b0c712e3248e28bcc3026b5b957fe7514607
tree52b6fc38858213b798be89cdcc53420d55477f36
parente83163b66a37501cc11ba1c53e018f8236e87a2c
net: lan966x: Split function lan966x_fdma_rx_get_frame

The function lan966x_fdma_rx_get_frame was unmapping the frame from
device and check also if the frame was received on a valid port. And
only after that it tried to generate the skb.
Move this check in a different function, in preparation for xdp
support. Such that xdp to be added here and the
lan966x_fdma_rx_get_frame to be used only when giving the skb to upper
layers.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
drivers/net/ethernet/microchip/lan966x/lan966x_main.h