Skip to content

Commit b0ef580

Browse files
committed
HSD #15012366445: drivers: net: stmmac_main: fix vlan toggle option.
This patch is to fix toggling rx vlan offload from the ethool. Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
1 parent c2be7a5 commit b0ef580

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4556,10 +4556,8 @@ static void stmmac_rx_vlan(struct net_device *dev, struct sk_buff *skb)
45564556
veth = (struct vlan_ethhdr *)skb->data;
45574557
vlan_proto = veth->h_vlan_proto;
45584558

4559-
if ((vlan_proto == htons(ETH_P_8021Q) &&
4560-
dev->features & NETIF_F_HW_VLAN_CTAG_RX) ||
4561-
(vlan_proto == htons(ETH_P_8021AD) &&
4562-
dev->features & NETIF_F_HW_VLAN_STAG_RX)) {
4559+
if ((vlan_proto == htons(ETH_P_8021Q)) ||
4560+
(vlan_proto == htons(ETH_P_8021AD))) {
45634561
/* pop the vlan tag */
45644562
vlanid = ntohs(veth->h_vlan_TCI);
45654563
memmove(skb->data + VLAN_HLEN, veth, ETH_ALEN * 2);
@@ -5674,8 +5672,10 @@ static int stmmac_set_features(struct net_device *netdev,
56745672
stmmac_enable_sph(priv, priv->ioaddr, sph_en, chan);
56755673
}
56765674

5677-
if(changed & NETIF_F_HW_VLAN_CTAG_RX)
5675+
if(changed & NETIF_F_HW_VLAN_CTAG_RX) {
56785676
stmmac_set_hw_vlan_mode(priv, priv->ioaddr, features);
5677+
priv->plat->use_hw_vlan = features & NETIF_F_HW_VLAN_CTAG_RX;
5678+
}
56795679

56805680
return 0;
56815681
}

0 commit comments

Comments
 (0)