netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@emulex.com>
To: <netdev@vger.kernel.org>
Subject: [PATCH net 2/2] be2net: Reset multicast promiscuous mode when its enabled
Date: Fri, 2 May 2014 14:43:36 -0500	[thread overview]
Message-ID: <20140502194336.GA20113@emulex.com> (raw)

Currently we are resetting the multicast promiscuous mode everytime
we send a multicast list to the FW. It is unnecessary.
With this fix we disable multicast promiscuous mode only when enabled.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_cmds.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index d1ec15a..78888ab 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -1858,9 +1858,11 @@ int be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value)
 		/* Reset mcast promisc mode if already set by setting mask
 		 * and not setting flags field
 		 */
-		req->if_flags_mask |=
-			cpu_to_le32(BE_IF_FLAGS_MCAST_PROMISCUOUS &
-				    be_if_cap_flags(adapter));
+		if (adapter->flags & BE_FLAGS_MCAST_PROMISC)
+			req->if_flags_mask |=
+				cpu_to_le32(BE_IF_FLAGS_MCAST_PROMISCUOUS &
+					    be_if_cap_flags(adapter));
+
 		req->mcast_num = cpu_to_le32(netdev_mc_count(adapter->netdev));
 		netdev_for_each_mc_addr(ha, adapter->netdev)
 			memcpy(req->mcast_mac[i++].byte, ha->addr, ETH_ALEN);
-- 
1.8.3.2

             reply	other threads:[~2014-05-02 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 19:43 Ajit Khaparde [this message]
2014-05-05 19:19 ` [PATCH net 2/2] be2net: Reset multicast promiscuous mode when its enabled 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=20140502194336.GA20113@emulex.com \
    --to=ajit.khaparde@emulex.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).