Commit c4711786 authored by Breno Leitao's avatar Breno Leitao Committed by David S. Miller

ehea: Avoid changing vlan flags

This patch avoids disabling the vlan flags using ethtool.
Signed-off-by: default avatarBreno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 12f188f2
...@@ -263,6 +263,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev, ...@@ -263,6 +263,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
static int ehea_set_flags(struct net_device *dev, u32 data) static int ehea_set_flags(struct net_device *dev, u32 data)
{ {
/* Avoid changing the VLAN flags */
if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) !=
(ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN |
ETH_FLAG_TXVLAN))){
return -EINVAL;
}
return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO
| ETH_FLAG_TXVLAN | ETH_FLAG_TXVLAN
| ETH_FLAG_RXVLAN); | ETH_FLAG_RXVLAN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment