cxgb4/cxgb4vf: Synchronize all MAC addresses
authorHariprasad Shenai <hariprasad@chelsio.com>
Tue, 14 Jun 2016 09:09:32 +0000 (14:39 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jun 2016 21:46:05 +0000 (14:46 -0700)
Even if interface is in Promiscuous mode/Allmulti mode synchronize
MAC addresses.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c

index 6ce4344ea6fb73b2ba2510d6dfd4f2f06dfdd8a8..c45de49dc9630d3c211cad693f888e6d50d9079d 100644 (file)
@@ -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,
index 04fc6f6d1e254adc5c2681546fd748800a2280de..8d9b2cb74aa28eb056c929b7fd5d0b74b88a4694 100644 (file)
@@ -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,