net: use helpers to access uc list V2
This patch introduces three macros to work with uc list from net drivers. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9010bc3364
commit
32e7bfc411
@@ -3665,10 +3665,10 @@ void __dev_set_rx_mode(struct net_device *dev)
|
||||
/* Unicast addresses changes may only happen under the rtnl,
|
||||
* therefore calling __dev_set_promiscuity here is safe.
|
||||
*/
|
||||
if (dev->uc.count > 0 && !dev->uc_promisc) {
|
||||
if (!netdev_uc_empty(dev) && !dev->uc_promisc) {
|
||||
__dev_set_promiscuity(dev, 1);
|
||||
dev->uc_promisc = 1;
|
||||
} else if (dev->uc.count == 0 && dev->uc_promisc) {
|
||||
} else if (netdev_uc_empty(dev) && dev->uc_promisc) {
|
||||
__dev_set_promiscuity(dev, -1);
|
||||
dev->uc_promisc = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user