From: Sathya Perla <sathya.perla@emulex.com>
To: <netdev@vger.kernel.org>
Subject: [PATCH net-next v2 4/4] be2net: re-enable vlan filtering mode asap
Date: Mon, 30 Jun 2014 13:01:33 +0530 [thread overview]
Message-ID: <1404113493-14851-5-git-send-email-sathya.perla@emulex.com> (raw)
In-Reply-To: <1404113493-14851-1-git-send-email-sathya.perla@emulex.com>
From: Kalesh AP <kalesh.purayil@emulex.com>
While adding vlans, when the HW limit of vlan filters is reached, the
driver enables vlan promiscuous mode.
Similarily, while removing vlans, the driver must re-enable HW filtering
as soon as the number of vlan filters is within the HW limit.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 5ac9d13..64a0b6c 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1172,20 +1172,15 @@ static int be_vlan_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid)
{
struct be_adapter *adapter = netdev_priv(netdev);
- int status = 0;
/* Packets with VID 0 are always received by Lancer by default */
if (lancer_chip(adapter) && vid == 0)
- goto ret;
+ return 0;
clear_bit(vid, adapter->vids);
- status = be_vid_config(adapter);
- if (!status)
- adapter->vlans_added--;
- else
- set_bit(vid, adapter->vids);
-ret:
- return status;
+ adapter->vlans_added--;
+
+ return be_vid_config(adapter);
}
static void be_clear_promisc(struct be_adapter *adapter)
--
1.7.1
next prev parent reply other threads:[~2014-06-30 7:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 7:31 [PATCH net-next v2 0/4] be2net: patch set Sathya Perla
2014-06-30 7:31 ` [PATCH net-next v2 1/4] be2net: remove be_cmd_get_profile_config_mbox/mccq() variants Sathya Perla
2014-06-30 7:31 ` [PATCH net-next v2 2/4] be2net: read VF's capabilities from GET_PROFILE_CONFIG cmd Sathya Perla
2014-06-30 7:31 ` [PATCH net-next v2 3/4] be2net: create optimal number of queues on SR-IOV config Sathya Perla
2014-06-30 7:31 ` Sathya Perla [this message]
2014-07-03 1:41 ` [PATCH net-next v2 0/4] be2net: patch set David Miller
2014-07-07 9:38 ` Sathya Perla
2014-07-08 0:01 ` 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=1404113493-14851-5-git-send-email-sathya.perla@emulex.com \
--to=sathya.perla@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).