diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2011-08-02 15:57:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-03 06:23:29 -0400 |
commit | c0e64ef4899df4cedc872871e54e2c069d29e519 (patch) | |
tree | 1a236161f0f331e8372bd165bec6e3bb845f7e1a /drivers/net/benet | |
parent | ea172a011d1435d9bd167265bf51cc64d026b4e7 (diff) |
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')
-rw-r--r-- | drivers/net/benet/be_cmds.c | 6 | ||||
-rw-r--r-- | drivers/net/benet/be_main.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 1c25dbdb1c9d..73fd949a6e7d 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -1586,9 +1586,11 @@ int be_cmd_promiscuous_config(struct be_adapter *adapter, bool en) | |||
1586 | OPCODE_COMMON_NTWK_RX_FILTER, sizeof(*req)); | 1586 | OPCODE_COMMON_NTWK_RX_FILTER, sizeof(*req)); |
1587 | 1587 | ||
1588 | req->if_id = cpu_to_le32(adapter->if_handle); | 1588 | req->if_id = cpu_to_le32(adapter->if_handle); |
1589 | req->if_flags_mask = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS); | 1589 | req->if_flags_mask = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS |
1590 | | BE_IF_FLAGS_VLAN_PROMISCUOUS); | ||
1590 | if (en) | 1591 | if (en) |
1591 | req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS); | 1592 | req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS |
1593 | | BE_IF_FLAGS_VLAN_PROMISCUOUS); | ||
1592 | 1594 | ||
1593 | sge->pa_hi = cpu_to_le32(upper_32_bits(promiscous_cmd.dma)); | 1595 | sge->pa_hi = cpu_to_le32(upper_32_bits(promiscous_cmd.dma)); |
1594 | sge->pa_lo = cpu_to_le32(promiscous_cmd.dma & 0xFFFFFFFF); | 1596 | sge->pa_lo = cpu_to_le32(promiscous_cmd.dma & 0xFFFFFFFF); |
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) | |||
728 | status = be_cmd_vlan_config(adapter, if_handle, vtag, 1, 1, 0); | 728 | status = be_cmd_vlan_config(adapter, if_handle, vtag, 1, 1, 0); |
729 | } | 729 | } |
730 | 730 | ||
731 | /* No need to further configure vids if in promiscuous mode */ | ||
732 | if (adapter->promiscuous) | ||
733 | return 0; | ||
734 | |||
731 | if (adapter->vlans_added <= adapter->max_vlans) { | 735 | if (adapter->vlans_added <= adapter->max_vlans) { |
732 | /* Construct VLAN Table to give to HW */ | 736 | /* Construct VLAN Table to give to HW */ |
733 | for (i = 0; i < VLAN_N_VID; i++) { | 737 | for (i = 0; i < VLAN_N_VID; i++) { |
@@ -787,6 +791,9 @@ static void be_set_multicast_list(struct net_device *netdev) | |||
787 | if (adapter->promiscuous) { | 791 | if (adapter->promiscuous) { |
788 | adapter->promiscuous = false; | 792 | adapter->promiscuous = false; |
789 | be_cmd_promiscuous_config(adapter, false); | 793 | be_cmd_promiscuous_config(adapter, false); |
794 | |||
795 | if (adapter->vlans_added) | ||
796 | be_vid_config(adapter, false, 0); | ||
790 | } | 797 | } |
791 | 798 | ||
792 | /* Enable multicast promisc if num configured exceeds what we support */ | 799 | /* Enable multicast promisc if num configured exceeds what we support */ |