diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-07 23:30:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-12 14:38:58 -0500 |
commit | 4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 (patch) | |
tree | 99f57f6374a58022e1e5ed1cbc12699288c7eae1 /drivers/net/bmac.c | |
parent | 8e5574211d96c0552f84c757718475fdb4021be7 (diff) |
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>
Diffstat (limited to 'drivers/net/bmac.c')
-rw-r--r-- | drivers/net/bmac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 9b587c344194..189fa69c2094 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -973,7 +973,7 @@ static void bmac_set_multicast(struct net_device *dev) | |||
973 | { | 973 | { |
974 | struct dev_mc_list *dmi; | 974 | struct dev_mc_list *dmi; |
975 | struct bmac_data *bp = netdev_priv(dev); | 975 | struct bmac_data *bp = netdev_priv(dev); |
976 | int num_addrs = dev->mc_count; | 976 | int num_addrs = netdev_mc_count(dev); |
977 | unsigned short rx_cfg; | 977 | unsigned short rx_cfg; |
978 | int i; | 978 | int i; |
979 | 979 | ||
@@ -982,7 +982,7 @@ static void bmac_set_multicast(struct net_device *dev) | |||
982 | 982 | ||
983 | XXDEBUG(("bmac: enter bmac_set_multicast, n_addrs=%d\n", num_addrs)); | 983 | XXDEBUG(("bmac: enter bmac_set_multicast, n_addrs=%d\n", num_addrs)); |
984 | 984 | ||
985 | if((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 64)) { | 985 | if((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 64)) { |
986 | for (i=0; i<4; i++) bp->hash_table_mask[i] = 0xffff; | 986 | for (i=0; i<4; i++) bp->hash_table_mask[i] = 0xffff; |
987 | bmac_update_hash_table_mask(dev, bp); | 987 | bmac_update_hash_table_mask(dev, bp); |
988 | rx_cfg = bmac_rx_on(dev, 1, 0); | 988 | rx_cfg = bmac_rx_on(dev, 1, 0); |
@@ -1021,7 +1021,7 @@ static void bmac_set_multicast(struct net_device *dev) | |||
1021 | unsigned short rx_cfg; | 1021 | unsigned short rx_cfg; |
1022 | u32 crc; | 1022 | u32 crc; |
1023 | 1023 | ||
1024 | if((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 64)) { | 1024 | if((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 64)) { |
1025 | bmwrite(dev, BHASH0, 0xffff); | 1025 | bmwrite(dev, BHASH0, 0xffff); |
1026 | bmwrite(dev, BHASH1, 0xffff); | 1026 | bmwrite(dev, BHASH1, 0xffff); |
1027 | bmwrite(dev, BHASH2, 0xffff); | 1027 | bmwrite(dev, BHASH2, 0xffff); |
@@ -1039,7 +1039,7 @@ static void bmac_set_multicast(struct net_device *dev) | |||
1039 | 1039 | ||
1040 | for(i = 0; i < 4; i++) hash_table[i] = 0; | 1040 | for(i = 0; i < 4; i++) hash_table[i] = 0; |
1041 | 1041 | ||
1042 | for(i = 0; i < dev->mc_count; i++) { | 1042 | for(i = 0; i < netdev_mc_count(dev); i++) { |
1043 | addrs = dmi->dmi_addr; | 1043 | addrs = dmi->dmi_addr; |
1044 | dmi = dmi->next; | 1044 | dmi = dmi->next; |
1045 | 1045 | ||