dect
/
linux-2.6
Archived
13
0
Fork 0

ehea: Avoid changing vlan flags

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>
This commit is contained in:
Breno Leitao 2010-12-20 09:02:37 +00:00 committed by David S. Miller
parent 12f188f2e5
commit c471178698
1 changed files with 7 additions and 0 deletions

View File

@ -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);