Skip to content

Commit

Permalink
net: stmmac: propagate feature flags to vlan
Browse files Browse the repository at this point in the history
stmmac_dev_probe doesn't propagate feature flags to VLANs.  So features
like offloading don't correspond with the general features and it's not
possible to manipulate features via ethtool -K to affect VLANs.

Propagate feature flags to vlan features.  Drop TSO feature because
it does not work on VLANs yet.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Link: https://lore.kernel.org/r/20230417192845.590034-1-vinschen@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Corinna Vinschen authored and Jakub Kicinski committed Apr 19, 2023
1 parent 980f079 commit 6b2c6e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7313,6 +7313,10 @@ int stmmac_dvr_probe(struct device *device,
if (priv->dma_cap.rssen && priv->plat->rss_en)
ndev->features |= NETIF_F_RXHASH;

ndev->vlan_features |= ndev->features;
/* TSO doesn't work on VLANs yet */
ndev->vlan_features &= ~NETIF_F_TSO;

/* MTU range: 46 - hw-specific max */
ndev->min_mtu = ETH_ZLEN - ETH_HLEN;
if (priv->plat->has_xgmac)
Expand Down

0 comments on commit 6b2c6e4

Please sign in to comment.