summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch b/extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch
new file mode 100644
index 00000000..24557a3e
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0014-ehea-Avoid-changing-vlan-flags.patch
@@ -0,0 +1,34 @@
1From a6b08e88ed5a716b2f27989c949cdfa0704c1dfd Mon Sep 17 00:00:00 2001
2From: Breno Leitao <leitao@linux.vnet.ibm.com>
3Date: Mon, 20 Dec 2010 09:02:37 +0000
4Subject: [PATCH 14/65] ehea: Avoid changing vlan flags
5
6This patch avoids disabling the vlan flags using ethtool.
7
8Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
9Signed-off-by: David S. Miller <davem@davemloft.net>
10---
11 drivers/net/ehea/ehea_ethtool.c | 7 +++++++
12 1 files changed, 7 insertions(+), 0 deletions(-)
13
14diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
15index 1f37ee6..d6cf502 100644
16--- a/drivers/net/ehea/ehea_ethtool.c
17+++ b/drivers/net/ehea/ehea_ethtool.c
18@@ -263,6 +263,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
19
20 static int ehea_set_flags(struct net_device *dev, u32 data)
21 {
22+ /* Avoid changing the VLAN flags */
23+ if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) !=
24+ (ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN |
25+ ETH_FLAG_TXVLAN))){
26+ return -EINVAL;
27+ }
28+
29 return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO
30 | ETH_FLAG_TXVLAN
31 | ETH_FLAG_RXVLAN);
32--
331.6.6.1
34