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/82596.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/82596.c')
-rw-r--r-- | drivers/net/82596.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 1663bc9e45de..638ce3b29854 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -1505,7 +1505,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1505 | int config = 0, cnt; | 1505 | int config = 0, cnt; |
1506 | 1506 | ||
1507 | DEB(DEB_MULTI,printk(KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n", | 1507 | DEB(DEB_MULTI,printk(KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n", |
1508 | dev->name, dev->mc_count, | 1508 | dev->name, netdev_mc_count(dev), |
1509 | dev->flags & IFF_PROMISC ? "ON" : "OFF", | 1509 | dev->flags & IFF_PROMISC ? "ON" : "OFF", |
1510 | dev->flags & IFF_ALLMULTI ? "ON" : "OFF")); | 1510 | dev->flags & IFF_ALLMULTI ? "ON" : "OFF")); |
1511 | 1511 | ||
@@ -1533,7 +1533,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1533 | i596_add_cmd(dev, &lp->cf_cmd.cmd); | 1533 | i596_add_cmd(dev, &lp->cf_cmd.cmd); |
1534 | } | 1534 | } |
1535 | 1535 | ||
1536 | cnt = dev->mc_count; | 1536 | cnt = netdev_mc_count(dev); |
1537 | if (cnt > MAX_MC_CNT) | 1537 | if (cnt > MAX_MC_CNT) |
1538 | { | 1538 | { |
1539 | cnt = MAX_MC_CNT; | 1539 | cnt = MAX_MC_CNT; |
@@ -1541,7 +1541,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1541 | dev->name, cnt); | 1541 | dev->name, cnt); |
1542 | } | 1542 | } |
1543 | 1543 | ||
1544 | if (dev->mc_count > 0) { | 1544 | if (!netdev_mc_empty(dev)) { |
1545 | struct dev_mc_list *dmi; | 1545 | struct dev_mc_list *dmi; |
1546 | unsigned char *cp; | 1546 | unsigned char *cp; |
1547 | struct mc_cmd *cmd; | 1547 | struct mc_cmd *cmd; |
@@ -1550,7 +1550,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1550 | return; | 1550 | return; |
1551 | cmd = &lp->mc_cmd; | 1551 | cmd = &lp->mc_cmd; |
1552 | cmd->cmd.command = CmdMulticastList; | 1552 | cmd->cmd.command = CmdMulticastList; |
1553 | cmd->mc_cnt = dev->mc_count * 6; | 1553 | cmd->mc_cnt = netdev_mc_count(dev) * 6; |
1554 | cp = cmd->mc_addrs; | 1554 | cp = cmd->mc_addrs; |
1555 | for (dmi = dev->mc_list; cnt && dmi != NULL; dmi = dmi->next, cnt--, cp += 6) { | 1555 | for (dmi = dev->mc_list; cnt && dmi != NULL; dmi = dmi->next, cnt--, cp += 6) { |
1556 | memcpy(cp, dmi->dmi_addr, 6); | 1556 | memcpy(cp, dmi->dmi_addr, 6); |