|
@@ -907,15 +907,8 @@ static inline void make_mc_bits(u8 *bits, struct net_device *dev)
|
|
{
|
|
{
|
|
struct dev_mc_list *dmi;
|
|
struct dev_mc_list *dmi;
|
|
|
|
|
|
- for (dmi=dev->mc_list; dmi; dmi=dmi->next)
|
|
|
|
- {
|
|
|
|
- u32 crc;
|
|
|
|
- if (dmi->dmi_addrlen != ETH_ALEN)
|
|
|
|
- {
|
|
|
|
- printk(KERN_INFO "%s: invalid multicast address length given.\n", dev->name);
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- crc = ether_crc(ETH_ALEN, dmi->dmi_addr);
|
|
|
|
|
|
+ netdev_for_each_mc_addr(dmi, dev) {
|
|
|
|
+ u32 crc = ether_crc(ETH_ALEN, dmi->dmi_addr);
|
|
/*
|
|
/*
|
|
* The 8390 uses the 6 most significant bits of the
|
|
* The 8390 uses the 6 most significant bits of the
|
|
* CRC to index the multicast table.
|
|
* CRC to index the multicast table.
|
|
@@ -941,7 +934,7 @@ static void do_set_multicast_list(struct net_device *dev)
|
|
if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
|
|
if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
|
|
{
|
|
{
|
|
memset(ei_local->mcfilter, 0, 8);
|
|
memset(ei_local->mcfilter, 0, 8);
|
|
- if (dev->mc_list)
|
|
|
|
|
|
+ if (!netdev_mc_empty(dev))
|
|
make_mc_bits(ei_local->mcfilter, dev);
|
|
make_mc_bits(ei_local->mcfilter, dev);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -975,7 +968,7 @@ static void do_set_multicast_list(struct net_device *dev)
|
|
|
|
|
|
if(dev->flags&IFF_PROMISC)
|
|
if(dev->flags&IFF_PROMISC)
|
|
ei_outb_p(E8390_RXCONFIG | 0x18, e8390_base + EN0_RXCR);
|
|
ei_outb_p(E8390_RXCONFIG | 0x18, e8390_base + EN0_RXCR);
|
|
- else if(dev->flags&IFF_ALLMULTI || dev->mc_list)
|
|
|
|
|
|
+ else if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev))
|
|
ei_outb_p(E8390_RXCONFIG | 0x08, e8390_base + EN0_RXCR);
|
|
ei_outb_p(E8390_RXCONFIG | 0x08, e8390_base + EN0_RXCR);
|
|
else
|
|
else
|
|
ei_outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
|
|
ei_outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
|