forked from luck/tmp_suning_uos_patched
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:
parent
12f188f2e5
commit
c471178698
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user