Skip to content

Commit

Permalink
ehea: Avoid changing vlan flags
Browse files Browse the repository at this point in the history
This patch avoids disabling the vlan flags using ethtool.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Breno Leitao authored and David S. Miller committed Dec 28, 2010
1 parent 12f188f commit c471178
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/ehea/ehea_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
/* 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
| ETH_FLAG_TXVLAN
| ETH_FLAG_RXVLAN);
Expand Down

0 comments on commit c471178

Please sign in to comment.