net: fec: remove the xdp_return_frame when lack of tx BDs
authorShenwei Wang <shenwei.wang@nxp.com>
Fri, 12 May 2023 13:38:43 +0000 (08:38 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 May 2023 07:43:30 +0000 (08:43 +0100)
commit6ead9c98cafcbc6992cf35f0ca393df2c03e3316
tree54506443a7895a3de3c92714a8eed25a8995af6d
parentc83b49383b595be50647f0c764a48c78b5f3c4f8
net: fec: remove the xdp_return_frame when lack of tx BDs

In the implementation, the sent_frame count does not increment when
transmit errors occur. Therefore, bq_xmit_all() will take care of
returning the XDP frames.

Fixes: 26312c685ae0 ("net: fec: correct the counting of XDP sent frames")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c