Commit 8dc394af authored by Sucheta Chakraborty's avatar Sucheta Chakraborty Committed by David S. Miller

qlcnic: Fix multicast packet handling for PF and VF.

o Multicast MAC was not getting programmed due to which multicast
  packets were being dropped by FW.

This patch fixes commit 168e4fb54c11865668ad50eff81b5f2729e0e0f4
("qlcnic: Secondary unicast MAC address support.") which introduced
bug in handling multicast packets.
Signed-off-by: default avatarSucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9a355a9
...@@ -516,19 +516,17 @@ void __qlcnic_set_multi(struct net_device *netdev, u16 vlan) ...@@ -516,19 +516,17 @@ void __qlcnic_set_multi(struct net_device *netdev, u16 vlan)
if (netdev->flags & IFF_PROMISC) { if (netdev->flags & IFF_PROMISC) {
if (!(adapter->flags & QLCNIC_PROMISC_DISABLED)) if (!(adapter->flags & QLCNIC_PROMISC_DISABLED))
mode = VPORT_MISS_MODE_ACCEPT_ALL; mode = VPORT_MISS_MODE_ACCEPT_ALL;
} else if (netdev->flags & IFF_ALLMULTI) { } else if ((netdev->flags & IFF_ALLMULTI) ||
if (netdev_mc_count(netdev) > ahw->max_mc_count) { (netdev_mc_count(netdev) > ahw->max_mc_count)) {
mode = VPORT_MISS_MODE_ACCEPT_MULTI; mode = VPORT_MISS_MODE_ACCEPT_MULTI;
} else if (!netdev_mc_empty(netdev) && } else if (!netdev_mc_empty(netdev) &&
!qlcnic_sriov_vf_check(adapter)) { !qlcnic_sriov_vf_check(adapter)) {
netdev_for_each_mc_addr(ha, netdev) netdev_for_each_mc_addr(ha, netdev)
qlcnic_nic_add_mac(adapter, ha->addr, qlcnic_nic_add_mac(adapter, ha->addr, vlan);
vlan);
} }
if (mode != VPORT_MISS_MODE_ACCEPT_MULTI &&
qlcnic_sriov_vf_check(adapter)) if (qlcnic_sriov_vf_check(adapter))
qlcnic_vf_add_mc_list(netdev, vlan); qlcnic_vf_add_mc_list(netdev, vlan);
}
/* configure unicast MAC address, if there is not sufficient space /* configure unicast MAC address, if there is not sufficient space
* to store all the unicast addresses then enable promiscuous mode * to store all the unicast addresses then enable promiscuous mode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment