net: fec: turn on XDP features

The XDP features are supported since the commit 66c0e13ad2
("drivers: net: turn on XDP features"). Currently, the fec
driver supports NETDEV_XDP_ACT_BASIC, NETDEV_XDP_ACT_REDIRECT
and NETDEV_XDP_ACT_NDO_XMIT. So turn on these XDP features
for fec driver.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Wei Fang 2023-05-19 09:48:25 +08:00 committed by David S. Miller
parent dcbe4ea198
commit e4ac7cc6e5

View File

@ -4030,6 +4030,11 @@ static int fec_enet_init(struct net_device *ndev)
ndev->hw_features = ndev->features;
if (!(fep->quirks & FEC_QUIRK_SWAP_FRAME))
ndev->xdp_features = NETDEV_XDP_ACT_BASIC |
NETDEV_XDP_ACT_REDIRECT |
NETDEV_XDP_ACT_NDO_XMIT;
fec_restart(ndev);
if (fep->quirks & FEC_QUIRK_MIB_CLEAR)