From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org,
Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>,
Breno Leitao <leitao@linux.vnet.ibm.com>
Subject: [PATCH 2/3] ehea: fix promiscuous mode
Date: Tue, 17 Apr 2012 11:41:54 -0300 [thread overview]
Message-ID: <1334673715-16338-3-git-send-email-cascardo@linux.vnet.ibm.com> (raw)
In-Reply-To: <1334673715-16338-1-git-send-email-cascardo@linux.vnet.ibm.com>
commit a4910b744486254cfa61995954c118fb2283c4fd has broken promiscuous
mode, which is never set. port->promisc just reflects the last setting
of PROMISCUOUS mode to avoid doing an extra hypercall when it's already
set.
However, since it may fail because of hypervisor permissions, we should
still respect the multicast settings and not simply exit after setting
promiscuous mode.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 25d1258..35caeb5 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -1946,11 +1946,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
struct netdev_hw_addr *ha;
int ret;
- if (port->promisc) {
- ehea_promiscuous(dev, 1);
- return;
- }
- ehea_promiscuous(dev, 0);
+ ehea_promiscuous(dev, !!(dev->flags & IFF_PROMISC));
if (dev->flags & IFF_ALLMULTI) {
ehea_allmulti(dev, 1);
--
1.7.4.4
next prev parent reply other threads:[~2012-04-17 14:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 14:41 [PATCH 0/3] ehea fixes for 3.4 Thadeu Lima de Souza Cascardo
2012-04-17 14:41 ` [PATCH 1/3] ehea: fix allmulticast support Thadeu Lima de Souza Cascardo
2012-04-17 14:41 ` Thadeu Lima de Souza Cascardo [this message]
2012-04-17 14:41 ` [PATCH 3/3] ehea: do not dereference possible NULL port Thadeu Lima de Souza Cascardo
2012-04-18 2:29 ` David Miller
2012-04-18 12:42 ` Thadeu Lima de Souza Cascardo
2012-04-18 17:28 ` 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=1334673715-16338-3-git-send-email-cascardo@linux.vnet.ibm.com \
--to=cascardo@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=leitao@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
/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).