summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBreno Leitao <leitao@linux.vnet.ibm.com>2010-12-20 09:02:37 +0000
committerDavid S. Miller <davem@davemloft.net>2010-12-28 13:51:22 -0800
commitc4711786986af0cce654f493426ee0a1055e4b17 (patch)
tree279b17f8c8966bda2aef7d17f3b266caec514c0e
parent12f188f2e59394ec1f1c8c0a4439f48ec16bc336 (diff)
downloadblackbird-op-linux-c4711786986af0cce654f493426ee0a1055e4b17.tar.gz
blackbird-op-linux-c4711786986af0cce654f493426ee0a1055e4b17.zip
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>
-rw-r--r--drivers/net/ehea/ehea_ethtool.c7
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,
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);
OpenPOWER on IntegriCloud