net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8e5574211d
commit
4cd24eaf0c
173 changed files with 440 additions and 401 deletions
|
@ -9430,7 +9430,7 @@ static void __tg3_set_rx_mode(struct net_device *dev)
|
|||
} else if (dev->flags & IFF_ALLMULTI) {
|
||||
/* Accept all multicast. */
|
||||
tg3_set_multi (tp, 1);
|
||||
} else if (dev->mc_count < 1) {
|
||||
} else if (netdev_mc_empty(dev)) {
|
||||
/* Reject all multicast. */
|
||||
tg3_set_multi (tp, 0);
|
||||
} else {
|
||||
|
@ -9442,7 +9442,7 @@ static void __tg3_set_rx_mode(struct net_device *dev)
|
|||
u32 bit;
|
||||
u32 crc;
|
||||
|
||||
for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
|
||||
for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev);
|
||||
i++, mclist = mclist->next) {
|
||||
|
||||
crc = calc_crc (mclist->dmi_addr, ETH_ALEN);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue