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/vxge | |
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/vxge')
-rw-r--r-- | drivers/net/vxge/vxge-main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index a6606b8948e9..c248b01218a1 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
@@ -1178,11 +1178,11 @@ static void vxge_set_multicast(struct net_device *dev) | |||
1178 | 1178 | ||
1179 | memset(&mac_info, 0, sizeof(struct macInfo)); | 1179 | memset(&mac_info, 0, sizeof(struct macInfo)); |
1180 | /* Update individual M_CAST address list */ | 1180 | /* Update individual M_CAST address list */ |
1181 | if ((!vdev->all_multi_flg) && dev->mc_count) { | 1181 | if ((!vdev->all_multi_flg) && netdev_mc_count(dev)) { |
1182 | 1182 | ||
1183 | mcast_cnt = vdev->vpaths[0].mcast_addr_cnt; | 1183 | mcast_cnt = vdev->vpaths[0].mcast_addr_cnt; |
1184 | list_head = &vdev->vpaths[0].mac_addr_list; | 1184 | list_head = &vdev->vpaths[0].mac_addr_list; |
1185 | if ((dev->mc_count + | 1185 | if ((netdev_mc_count(dev) + |
1186 | (vdev->vpaths[0].mac_addr_cnt - mcast_cnt)) > | 1186 | (vdev->vpaths[0].mac_addr_cnt - mcast_cnt)) > |
1187 | vdev->vpaths[0].max_mac_addr_cnt) | 1187 | vdev->vpaths[0].max_mac_addr_cnt) |
1188 | goto _set_all_mcast; | 1188 | goto _set_all_mcast; |
@@ -1217,7 +1217,7 @@ static void vxge_set_multicast(struct net_device *dev) | |||
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | /* Add new ones */ | 1219 | /* Add new ones */ |
1220 | for (i = 0, mclist = dev->mc_list; i < dev->mc_count; | 1220 | for (i = 0, mclist = dev->mc_list; i < netdev_mc_count(dev); |
1221 | i++, mclist = mclist->next) { | 1221 | i++, mclist = mclist->next) { |
1222 | 1222 | ||
1223 | memcpy(mac_info.macaddr, mclist->dmi_addr, ETH_ALEN); | 1223 | memcpy(mac_info.macaddr, mclist->dmi_addr, ETH_ALEN); |