|
|
4b0fbfc |
From c0e64ef4899df4cedc872871e54e2c069d29e519 Mon Sep 17 00:00:00 2001
|
|
|
4b0fbfc |
From: Sathya Perla <sathya.perla@emulex.com>
|
|
|
4b0fbfc |
Date: Tue, 2 Aug 2011 19:57:43 +0000
|
|
|
4b0fbfc |
Subject: [PATCH] be2net: non-member vlan pkts not received in promiscous mode
|
|
|
4b0fbfc |
|
|
|
4b0fbfc |
While configuring promiscous mode, explicitly set the
|
|
|
4b0fbfc |
VLAN_PROMISCOUS bit to make this happen. When switching off
|
|
|
4b0fbfc |
promiscous mode, re-program the vids.
|
|
|
4b0fbfc |
|
|
|
4b0fbfc |
Signed-off-by: Xavier Selvin <xavier.selvin@emulex.com>
|
|
|
4b0fbfc |
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
|
|
|
4b0fbfc |
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
4b0fbfc |
---
|
|
|
4b0fbfc |
drivers/net/benet/be_cmds.c | 6 ++++--
|
|
|
4b0fbfc |
drivers/net/benet/be_main.c | 7 +++++++
|
|
|
4b0fbfc |
2 files changed, 11 insertions(+), 2 deletions(-)
|
|
|
4b0fbfc |
|
|
|
4b0fbfc |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
|
|
|
4b0fbfc |
index 1c25dbd..73fd949 100644
|
|
|
4b0fbfc |
--- a/drivers/net/benet/be_cmds.c
|
|
|
4b0fbfc |
+++ b/drivers/net/benet/be_cmds.c
|
|
|
4b0fbfc |
@@ -1586,9 +1586,11 @@ int be_cmd_promiscuous_config(struct be_adapter *adapter, bool en)
|
|
|
4b0fbfc |
OPCODE_COMMON_NTWK_RX_FILTER, sizeof(*req));
|
|
|
4b0fbfc |
|
|
|
4b0fbfc |
req->if_id = cpu_to_le32(adapter->if_handle);
|
|
|
4b0fbfc |
- req->if_flags_mask = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS);
|
|
|
4b0fbfc |
+ req->if_flags_mask = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS
|
|
|
4b0fbfc |
+ | BE_IF_FLAGS_VLAN_PROMISCUOUS);
|
|
|
4b0fbfc |
if (en)
|
|
|
4b0fbfc |
- req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS);
|
|
|
4b0fbfc |
+ req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS
|
|
|
4b0fbfc |
+ | BE_IF_FLAGS_VLAN_PROMISCUOUS);
|
|
|
4b0fbfc |
|
|
|
4b0fbfc |
sge->pa_hi = cpu_to_le32(upper_32_bits(promiscous_cmd.dma));
|
|
|
4b0fbfc |
sge->pa_lo = cpu_to_le32(promiscous_cmd.dma & 0xFFFFFFFF);
|
|
|
4b0fbfc |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
|
|
|
4b0fbfc |
index 3b2c5e6..32a5b11 100644
|
|
|
4b0fbfc |
--- a/drivers/net/benet/be_main.c
|
|
|
4b0fbfc |
+++ b/drivers/net/benet/be_main.c
|
|
|
4b0fbfc |
@@ -728,6 +728,10 @@ static int be_vid_config(struct be_adapter *adapter, bool vf, u32 vf_num)
|
|
|
4b0fbfc |
status = be_cmd_vlan_config(adapter, if_handle, vtag, 1, 1, 0);
|
|
|
4b0fbfc |
}
|
|
|
4b0fbfc |
|
|
|
4b0fbfc |
+ /* No need to further configure vids if in promiscuous mode */
|
|
|
4b0fbfc |
+ if (adapter->promiscuous)
|
|
|
4b0fbfc |
+ return 0;
|
|
|
4b0fbfc |
+
|
|
|
4b0fbfc |
if (adapter->vlans_added <= adapter->max_vlans) {
|
|
|
4b0fbfc |
/* Construct VLAN Table to give to HW */
|
|
|
4b0fbfc |
for (i = 0; i < VLAN_N_VID; i++) {
|
|
|
4b0fbfc |
@@ -787,6 +791,9 @@ static void be_set_multicast_list(struct net_device *netdev)
|
|
|
4b0fbfc |
if (adapter->promiscuous) {
|
|
|
4b0fbfc |
adapter->promiscuous = false;
|
|
|
4b0fbfc |
be_cmd_promiscuous_config(adapter, false);
|
|
|
4b0fbfc |
+
|
|
|
4b0fbfc |
+ if (adapter->vlans_added)
|
|
|
4b0fbfc |
+ be_vid_config(adapter, false, 0);
|
|
|
4b0fbfc |
}
|
|
|
4b0fbfc |
|
|
|
4b0fbfc |
/* Enable multicast promisc if num configured exceeds what we support */
|
|
|
4b0fbfc |
--
|
|
|
4b0fbfc |
1.7.6.4
|
|
|
4b0fbfc |
|