From: Ido Shamay Date: Tue, 3 Feb 2015 15:57:21 +0000 (+0200) Subject: net/mlx4_en: Notify TX Vlan offload change X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cfb53f36a5b5eb60213fdb6ba191eb9d8b5e1163;p=linux-beck.git net/mlx4_en: Notify TX Vlan offload change Notify users when TX vlan offload feature changed with ethtool. Relevant command - ethtool -K txvlan on/off. Signed-off-by: Ido Shamay Signed-off-by: Amir Vadai Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 028937b2a199..2a210c4efb89 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -2202,6 +2202,10 @@ static int mlx4_en_set_features(struct net_device *netdev, return ret; } + if (DEV_FEATURE_CHANGED(netdev, features, NETIF_F_HW_VLAN_CTAG_TX)) + en_info(priv, "Turn %s TX vlan strip offload\n", + (features & NETIF_F_HW_VLAN_CTAG_TX) ? "ON" : "OFF"); + if (features & NETIF_F_LOOPBACK) priv->ctrl_flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK); else