aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/de4x5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tulip/de4x5.c')
-rw-r--r--drivers/net/tulip/de4x5.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index 0b6a9731091c..c4ecb9a95409 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -1951,9 +1951,9 @@ static void
1951SetMulticastFilter(struct net_device *dev) 1951SetMulticastFilter(struct net_device *dev)
1952{ 1952{
1953 struct de4x5_private *lp = netdev_priv(dev); 1953 struct de4x5_private *lp = netdev_priv(dev);
1954 struct dev_mc_list *dmi=dev->mc_list; 1954 struct dev_mc_list *dmi;
1955 u_long iobase = dev->base_addr; 1955 u_long iobase = dev->base_addr;
1956 int i, j, bit, byte; 1956 int i, bit, byte;
1957 u16 hashcode; 1957 u16 hashcode;
1958 u32 omr, crc; 1958 u32 omr, crc;
1959 char *pa; 1959 char *pa;
@@ -1966,9 +1966,8 @@ SetMulticastFilter(struct net_device *dev)
1966 if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 14)) { 1966 if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 14)) {
1967 omr |= OMR_PM; /* Pass all multicasts */ 1967 omr |= OMR_PM; /* Pass all multicasts */
1968 } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ 1968 } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */
1969 for (i = 0; i < netdev_mc_count(dev) ;i++) { 1969 netdev_for_each_mc_addr(dmi, dev) {
1970 addrs=dmi->dmi_addr; 1970 addrs = dmi->dmi_addr;
1971 dmi=dmi->next;
1972 if ((*addrs & 0x01) == 1) { /* multicast address? */ 1971 if ((*addrs & 0x01) == 1) { /* multicast address? */
1973 crc = ether_crc_le(ETH_ALEN, addrs); 1972 crc = ether_crc_le(ETH_ALEN, addrs);
1974 hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */ 1973 hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */
@@ -1984,9 +1983,8 @@ SetMulticastFilter(struct net_device *dev)
1984 } 1983 }
1985 } 1984 }
1986 } else { /* Perfect filtering */ 1985 } else { /* Perfect filtering */
1987 for (j=0; j<netdev_mc_count(dev); j++) { 1986 netdev_for_each_mc_addr(dmi, dev) {
1988 addrs=dmi->dmi_addr; 1987 addrs = dmi->dmi_addr;
1989 dmi=dmi->next;
1990 for (i=0; i<ETH_ALEN; i++) { 1988 for (i=0; i<ETH_ALEN; i++) {
1991 *(pa + (i&1)) = *addrs++; 1989 *(pa + (i&1)) = *addrs++;
1992 if (i & 0x01) pa += 4; 1990 if (i & 0x01) pa += 4;