summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorSathya Perla2011-08-02 21:57:43 +0200
committerDavid S. Miller2011-08-03 12:23:29 +0200
commitc0e64ef4899df4cedc872871e54e2c069d29e519 (patch)
tree1a236161f0f331e8372bd165bec6e3bb845f7e1a /drivers/net/benet/be_main.c
parentbe2net: no need to query link status (diff)
downloadkernel-qcow2-linux-c0e64ef4899df4cedc872871e54e2c069d29e519.tar.gz
kernel-qcow2-linux-c0e64ef4899df4cedc872871e54e2c069d29e519.tar.xz
kernel-qcow2-linux-c0e64ef4899df4cedc872871e54e2c069d29e519.zip
be2net: non-member vlan pkts not received in promiscous mode
While configuring promiscous mode, explicitly set the VLAN_PROMISCOUS bit to make this happen. When switching off promiscous mode, re-program the vids. Signed-off-by: Xavier Selvin <xavier.selvin@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r--drivers/net/benet/be_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 3b2c5e6cb866..32a5b1100114 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -728,6 +728,10 @@ static int be_vid_config(struct be_adapter *adapter, bool vf, u32 vf_num)
status = be_cmd_vlan_config(adapter, if_handle, vtag, 1, 1, 0);
}
+ /* No need to further configure vids if in promiscuous mode */
+ if (adapter->promiscuous)
+ return 0;
+
if (adapter->vlans_added <= adapter->max_vlans) {
/* Construct VLAN Table to give to HW */
for (i = 0; i < VLAN_N_VID; i++) {
@@ -787,6 +791,9 @@ static void be_set_multicast_list(struct net_device *netdev)
if (adapter->promiscuous) {
adapter->promiscuous = false;
be_cmd_promiscuous_config(adapter, false);
+
+ if (adapter->vlans_added)
+ be_vid_config(adapter, false, 0);
}
/* Enable multicast promisc if num configured exceeds what we support */