diff options
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 02ba1e965a5b..ca9608f08c94 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6502,10 +6502,8 @@ static int stmmac_set_features(struct net_device *netdev, features & NETIF_F_RXHASH, priv->plat->rx_queues_to_use); - if (features & NETIF_F_HW_VLAN_CTAG_RX) - priv->hw->hw_vlan_en = true; - else - priv->hw->hw_vlan_en = false; + if (netdev->hw_features & NETIF_F_HW_VLAN_CTAG_RX) + priv->hw->hw_vlan_en = !!(features & NETIF_F_HW_VLAN_CTAG_RX); phylink_rx_clk_stop_block(priv->phylink); stmmac_set_hw_vlan_mode(priv, priv->hw); |
