提交 d01f7abc 编写于 作者: H Hariprasad Shenai 提交者: David S. Miller

cxgb4/cxgb4vf: Synchronize all MAC addresses

Even if interface is in Promiscuous mode/Allmulti mode synchronize
MAC addresses.
Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b6244201
......@@ -461,11 +461,8 @@ static int set_rxmode(struct net_device *dev, int mtu, bool sleep_ok)
struct port_info *pi = netdev_priv(dev);
struct adapter *adapter = pi->adapter;
if (!(dev->flags & IFF_PROMISC)) {
__dev_uc_sync(dev, cxgb4_mac_sync, cxgb4_mac_unsync);
if (!(dev->flags & IFF_ALLMULTI))
__dev_mc_sync(dev, cxgb4_mac_sync, cxgb4_mac_unsync);
}
__dev_uc_sync(dev, cxgb4_mac_sync, cxgb4_mac_unsync);
__dev_mc_sync(dev, cxgb4_mac_sync, cxgb4_mac_unsync);
return t4_set_rxmode(adapter, adapter->mbox, pi->viid, mtu,
(dev->flags & IFF_PROMISC) ? 1 : 0,
......
......@@ -937,12 +937,8 @@ static int set_rxmode(struct net_device *dev, int mtu, bool sleep_ok)
{
struct port_info *pi = netdev_priv(dev);
if (!(dev->flags & IFF_PROMISC)) {
__dev_uc_sync(dev, cxgb4vf_mac_sync, cxgb4vf_mac_unsync);
if (!(dev->flags & IFF_ALLMULTI))
__dev_mc_sync(dev, cxgb4vf_mac_sync,
cxgb4vf_mac_unsync);
}
__dev_uc_sync(dev, cxgb4vf_mac_sync, cxgb4vf_mac_unsync);
__dev_mc_sync(dev, cxgb4vf_mac_sync, cxgb4vf_mac_unsync);
return t4vf_set_rxmode(pi->adapter, pi->viid, -1,
(dev->flags & IFF_PROMISC) != 0,
(dev->flags & IFF_ALLMULTI) != 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册