aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/uli526x.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/tulip/uli526x.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/tulip/uli526x.c')
-rw-r--r--drivers/net/tulip/uli526x.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index dc3335d906f..216ceb322ed 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -557,7 +557,7 @@ static void uli526x_init(struct net_device *dev)
557 update_cr6(db->cr6_data, ioaddr); 557 update_cr6(db->cr6_data, ioaddr);
558 558
559 /* Send setup frame */ 559 /* Send setup frame */
560 send_filter_frame(dev, dev->mc_count); /* M5261/M5263 */ 560 send_filter_frame(dev, netdev_mc_count(dev)); /* M5261/M5263 */
561 561
562 /* Init CR7, interrupt active bit */ 562 /* Init CR7, interrupt active bit */
563 db->cr7_data = CR7_DEFAULT; 563 db->cr7_data = CR7_DEFAULT;
@@ -906,16 +906,18 @@ static void uli526x_set_filter_mode(struct net_device * dev)
906 return; 906 return;
907 } 907 }
908 908
909 if (dev->flags & IFF_ALLMULTI || dev->mc_count > ULI5261_MAX_MULTICAST) { 909 if (dev->flags & IFF_ALLMULTI ||
910 ULI526X_DBUG(0, "Pass all multicast address", dev->mc_count); 910 netdev_mc_count(dev) > ULI5261_MAX_MULTICAST) {
911 ULI526X_DBUG(0, "Pass all multicast address",
912 netdev_mc_count(dev));
911 db->cr6_data &= ~(CR6_PM | CR6_PBF); 913 db->cr6_data &= ~(CR6_PM | CR6_PBF);
912 db->cr6_data |= CR6_PAM; 914 db->cr6_data |= CR6_PAM;
913 spin_unlock_irqrestore(&db->lock, flags); 915 spin_unlock_irqrestore(&db->lock, flags);
914 return; 916 return;
915 } 917 }
916 918
917 ULI526X_DBUG(0, "Set multicast address", dev->mc_count); 919 ULI526X_DBUG(0, "Set multicast address", netdev_mc_count(dev));
918 send_filter_frame(dev, dev->mc_count); /* M5261/M5263 */ 920 send_filter_frame(dev, netdev_mc_count(dev)); /* M5261/M5263 */
919 spin_unlock_irqrestore(&db->lock, flags); 921 spin_unlock_irqrestore(&db->lock, flags);
920} 922}
921 923