Skip to content

Commit 17d39e1

Browse files
committed
net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only
JIRA: https://issues.redhat.com/browse/RHEL-6297 commit 8eb301b Author: Furong Xu <0x1207@gmail.com> Date: Mon Jul 1 16:19:36 2024 +0800 net: stmmac: enable HW-accelerated VLAN stripping for gmac4 only Commit 750011e ("net: stmmac: Add support for HW-accelerated VLAN stripping") enables MAC level VLAN tag stripping for all MAC cores, but leaves set_hw_vlan_mode() and rx_hw_vlan() un-implemented for both gmac and xgmac. On gmac and xgmac, ethtool reports rx-vlan-offload is on, both MAC and driver do nothing about VLAN packets actually, although VLAN works well. Driver level stripping should be used on gmac and xgmac for now. Fixes: 750011e ("net: stmmac: Add support for HW-accelerated VLAN stripping") Signed-off-by: Furong Xu <0x1207@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
1 parent 3c86694 commit 17d39e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7658,9 +7658,10 @@ int stmmac_dvr_probe(struct device *device,
76587658
#ifdef STMMAC_VLAN_TAG_USED
76597659
/* Both mac100 and gmac support receive VLAN tag detection */
76607660
ndev->features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX;
7661-
ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
7662-
priv->hw->hw_vlan_en = true;
7663-
7661+
if (priv->plat->has_gmac4) {
7662+
ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
7663+
priv->hw->hw_vlan_en = true;
7664+
}
76647665
if (priv->dma_cap.vlhash) {
76657666
ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
76667667
ndev->features |= NETIF_F_HW_VLAN_STAG_FILTER;

0 commit comments

Comments
 (0)