diff options
Diffstat (limited to 'drivers/net/tulip/dmfe.c')
-rw-r--r-- | drivers/net/tulip/dmfe.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 5fc61c1012e5..534afbdb9c91 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -658,9 +658,9 @@ static void dmfe_init_dm910x(struct DEVICE *dev) | |||
658 | 658 | ||
659 | /* Send setup frame */ | 659 | /* Send setup frame */ |
660 | if (db->chip_id == PCI_DM9132_ID) | 660 | if (db->chip_id == PCI_DM9132_ID) |
661 | dm9132_id_table(dev, dev->mc_count); /* DM9132 */ | 661 | dm9132_id_table(dev, netdev_mc_count(dev)); /* DM9132 */ |
662 | else | 662 | else |
663 | send_filter_frame(dev, dev->mc_count); /* DM9102/DM9102A */ | 663 | send_filter_frame(dev, netdev_mc_count(dev)); /* DM9102/DM9102A */ |
664 | 664 | ||
665 | /* Init CR7, interrupt active bit */ | 665 | /* Init CR7, interrupt active bit */ |
666 | db->cr7_data = CR7_DEFAULT; | 666 | db->cr7_data = CR7_DEFAULT; |
@@ -1052,6 +1052,7 @@ static void dmfe_set_filter_mode(struct DEVICE * dev) | |||
1052 | { | 1052 | { |
1053 | struct dmfe_board_info *db = netdev_priv(dev); | 1053 | struct dmfe_board_info *db = netdev_priv(dev); |
1054 | unsigned long flags; | 1054 | unsigned long flags; |
1055 | int mc_count = netdev_mc_count(dev); | ||
1055 | 1056 | ||
1056 | DMFE_DBUG(0, "dmfe_set_filter_mode()", 0); | 1057 | DMFE_DBUG(0, "dmfe_set_filter_mode()", 0); |
1057 | spin_lock_irqsave(&db->lock, flags); | 1058 | spin_lock_irqsave(&db->lock, flags); |
@@ -1064,19 +1065,19 @@ static void dmfe_set_filter_mode(struct DEVICE * dev) | |||
1064 | return; | 1065 | return; |
1065 | } | 1066 | } |
1066 | 1067 | ||
1067 | if (dev->flags & IFF_ALLMULTI || dev->mc_count > DMFE_MAX_MULTICAST) { | 1068 | if (dev->flags & IFF_ALLMULTI || mc_count > DMFE_MAX_MULTICAST) { |
1068 | DMFE_DBUG(0, "Pass all multicast address", dev->mc_count); | 1069 | DMFE_DBUG(0, "Pass all multicast address", mc_count); |
1069 | db->cr6_data &= ~(CR6_PM | CR6_PBF); | 1070 | db->cr6_data &= ~(CR6_PM | CR6_PBF); |
1070 | db->cr6_data |= CR6_PAM; | 1071 | db->cr6_data |= CR6_PAM; |
1071 | spin_unlock_irqrestore(&db->lock, flags); | 1072 | spin_unlock_irqrestore(&db->lock, flags); |
1072 | return; | 1073 | return; |
1073 | } | 1074 | } |
1074 | 1075 | ||
1075 | DMFE_DBUG(0, "Set multicast address", dev->mc_count); | 1076 | DMFE_DBUG(0, "Set multicast address", mc_count); |
1076 | if (db->chip_id == PCI_DM9132_ID) | 1077 | if (db->chip_id == PCI_DM9132_ID) |
1077 | dm9132_id_table(dev, dev->mc_count); /* DM9132 */ | 1078 | dm9132_id_table(dev, mc_count); /* DM9132 */ |
1078 | else | 1079 | else |
1079 | send_filter_frame(dev, dev->mc_count); /* DM9102/DM9102A */ | 1080 | send_filter_frame(dev, mc_count); /* DM9102/DM9102A */ |
1080 | spin_unlock_irqrestore(&db->lock, flags); | 1081 | spin_unlock_irqrestore(&db->lock, flags); |
1081 | } | 1082 | } |
1082 | 1083 | ||