aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibmveth.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-07 23:30:35 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 14:38:58 -0500
commit4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 (patch)
tree99f57f6374a58022e1e5ed1cbc12699288c7eae1 /drivers/net/ibmveth.c
parent8e5574211d96c0552f84c757718475fdb4021be7 (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/ibmveth.c')
-rw-r--r--drivers/net/ibmveth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index a86693906ac8..41b9c0efcbdd 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1062,7 +1062,8 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
1062 struct ibmveth_adapter *adapter = netdev_priv(netdev); 1062 struct ibmveth_adapter *adapter = netdev_priv(netdev);
1063 unsigned long lpar_rc; 1063 unsigned long lpar_rc;
1064 1064
1065 if((netdev->flags & IFF_PROMISC) || (netdev->mc_count > adapter->mcastFilterSize)) { 1065 if ((netdev->flags & IFF_PROMISC) ||
1066 (netdev_mc_count(netdev) > adapter->mcastFilterSize)) {
1066 lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, 1067 lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
1067 IbmVethMcastEnableRecv | 1068 IbmVethMcastEnableRecv |
1068 IbmVethMcastDisableFiltering, 1069 IbmVethMcastDisableFiltering,
@@ -1083,7 +1084,7 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
1083 ibmveth_error_printk("h_multicast_ctrl rc=%ld when attempting to clear filter table\n", lpar_rc); 1084 ibmveth_error_printk("h_multicast_ctrl rc=%ld when attempting to clear filter table\n", lpar_rc);
1084 } 1085 }
1085 /* add the addresses to the filter table */ 1086 /* add the addresses to the filter table */
1086 for(i = 0; i < netdev->mc_count; ++i, mclist = mclist->next) { 1087 for(i = 0; i < netdev_mc_count(netdev); ++i, mclist = mclist->next) {
1087 // add the multicast address to the filter table 1088 // add the multicast address to the filter table
1088 unsigned long mcast_addr = 0; 1089 unsigned long mcast_addr = 0;
1089 memcpy(((char *)&mcast_addr)+2, mclist->dmi_addr, 6); 1090 memcpy(((char *)&mcast_addr)+2, mclist->dmi_addr, 6);