diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ehea/ehea_ethtool.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c index 1f37ee6b2a26..d6cf502906cf 100644 --- a/drivers/net/ehea/ehea_ethtool.c +++ b/drivers/net/ehea/ehea_ethtool.c | |||
@@ -263,6 +263,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev, | |||
263 | 263 | ||
264 | static int ehea_set_flags(struct net_device *dev, u32 data) | 264 | static int ehea_set_flags(struct net_device *dev, u32 data) |
265 | { | 265 | { |
266 | /* Avoid changing the VLAN flags */ | ||
267 | if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) != | ||
268 | (ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN | | ||
269 | ETH_FLAG_TXVLAN))){ | ||
270 | return -EINVAL; | ||
271 | } | ||
272 | |||
266 | return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO | 273 | return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO |
267 | | ETH_FLAG_TXVLAN | 274 | | ETH_FLAG_TXVLAN |
268 | | ETH_FLAG_RXVLAN); | 275 | | ETH_FLAG_RXVLAN); |