summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2023-02-08 19:58:40 +0300
committerMartin KaFai Lau <martin.lau@kernel.org>2023-02-08 21:18:46 +0300
commit9b0651e429a04b58c29f2133da4ccc70f81263b8 (patch)
treeb0098a30a804bc9a382ecc38e3dec58836b1518a /drivers/net/ethernet/sfc/efx.c
parentd00d5b82f0734205c718aa1acf7cc9b183fd6751 (diff)
downloadlinux-9b0651e429a04b58c29f2133da4ccc70f81263b8.tar.xz
sfc: move xdp_features configuration in efx_pci_probe_post_io()
Move xdp_features configuration from efx_pci_probe() to efx_pci_probe_post_io() since it is where all the other basic netdev features are initialised. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/9bd31c9a29bcf406ab90a249a28fc328e5578fd1.1675875404.git.lorenzo@kernel.org Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 18ff8d8cff42..9569c3356b4a 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -1025,6 +1025,10 @@ static int efx_pci_probe_post_io(struct efx_nic *efx)
net_dev->features &= ~NETIF_F_HW_VLAN_CTAG_FILTER;
net_dev->features |= efx->fixed_features;
+ net_dev->xdp_features = NETDEV_XDP_ACT_BASIC |
+ NETDEV_XDP_ACT_REDIRECT |
+ NETDEV_XDP_ACT_NDO_XMIT;
+
rc = efx_register_netdev(efx);
if (!rc)
return 0;
@@ -1078,10 +1082,6 @@ static int efx_pci_probe(struct pci_dev *pci_dev,
pci_info(pci_dev, "Solarflare NIC detected\n");
- efx->net_dev->xdp_features = NETDEV_XDP_ACT_BASIC |
- NETDEV_XDP_ACT_REDIRECT |
- NETDEV_XDP_ACT_NDO_XMIT;
-
if (!efx->type->is_vf)
efx_probe_vpd_strings(efx);