From: leitao@linux.vnet.ibm.com
To: davem@davemloft.net
Cc: shemminger@vyatta.com, netdev@vger.kernel.org, jesse@nicira.com,
Breno Leitao <leitao@linux.vnet.ibm.com>
Subject: [PATCH] ehea: Avoid changing vlan flags
Date: Mon, 20 Dec 2010 17:02:37 -0200 [thread overview]
Message-ID: <1292871757-24918-1-git-send-email-leitao@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTimODzrAWS+05+FChtme_3um_9Ky7cwa3gWHFaXp@mail.gmail.com>
This patch avoids disabling the vlan flags using ethtool.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
---
drivers/net/ehea/ehea_ethtool.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
index afebf20..3e2e734 100644
--- a/drivers/net/ehea/ehea_ethtool.c
+++ b/drivers/net/ehea/ehea_ethtool.c
@@ -265,6 +265,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);
--
1.7.3.3
next prev parent reply other threads:[~2010-12-20 19:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 18:31 [PATCH] ehea: Fixing LRO configuration leitao
2010-12-08 18:44 ` Ben Hutchings
2010-12-08 18:51 ` leitao
2010-12-08 20:19 ` David Miller
2010-12-13 0:39 ` Jesse Gross
2010-12-14 13:01 ` Breno Leitao
2010-12-14 20:55 ` Jesse Gross
2010-12-20 19:02 ` leitao [this message]
2010-12-28 21:51 ` [PATCH] ehea: Avoid changing vlan flags David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1292871757-24918-1-git-send-email-leitao@linux.vnet.ibm.com \
--to=leitao@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=jesse@nicira.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).