Commit ef01749f authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Jakub Kicinski

net: lan966x: set xdp_features flag

Set xdp_features netdevice flag if lan966x nic supports xdp mode.
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/01f4412f28899d97b0054c9c1a63694201301b42.1676055718.git.lorenzo@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9b0bf4f7
...@@ -823,6 +823,11 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p, ...@@ -823,6 +823,11 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
port->phylink = phylink; port->phylink = phylink;
if (lan966x->fdma)
dev->xdp_features = NETDEV_XDP_ACT_BASIC |
NETDEV_XDP_ACT_REDIRECT |
NETDEV_XDP_ACT_NDO_XMIT;
err = register_netdev(dev); err = register_netdev(dev);
if (err) { if (err) {
dev_err(lan966x->dev, "register_netdev failed\n"); dev_err(lan966x->dev, "register_netdev failed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment