diff options
author | Wei Fang <wei.fang@nxp.com> | 2023-05-19 03:48:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-05-22 12:09:53 +0200 |
commit | e4ac7cc6e5a45306049ac2337dea0e636adf36be (patch) | |
tree | a432a441b7ef7173f9433e03eb38d5e11552b7e8 /drivers/net/ethernet/freescale | |
parent | Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/ne... (diff) | |
download | linux-e4ac7cc6e5a45306049ac2337dea0e636adf36be.tar.xz linux-e4ac7cc6e5a45306049ac2337dea0e636adf36be.zip |
net: fec: turn on XDP features
The XDP features are supported since the commit 66c0e13ad236
("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>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 6d0b46c76924..87a431222af6 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -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) |