Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [patch] linux: declance multicast filter fixes
@ 2002-03-21 18:04 Maciej W. Rozycki
  2002-03-22 11:08 ` Dave Airlie
  0 siblings, 1 reply; 10+ messages in thread
From: Maciej W. Rozycki @ 2002-03-21 18:04 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, linux-mips

Hello,

 Following are a few trivial fixes for the DECstation's LANCE driver
needed for the chip's multicast filter to be set up correctly.  The patch
is needed for multicast reception to work, in particular for the IPv6's
neighbor discovery.  The CRC generation was verified using the AMD's
reference code and it was checked at the run time for selected multicast
addresses as well.  Please apply. 

 Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

patch-mips-2.4.17-20020129-declance-mcast-11
diff -up --recursive --new-file linux-mips-2.4.17-20020129.macro/drivers/net/declance.c linux-mips-2.4.17-20020129/drivers/net/declance.c
--- linux-mips-2.4.17-20020129.macro/drivers/net/declance.c	Wed Aug 22 04:27:03 2001
+++ linux-mips-2.4.17-20020129/drivers/net/declance.c	Tue Mar 19 19:42:20 2002
@@ -793,6 +793,8 @@ static int lance_open(struct net_device 
 	ib->mode = 0;
 	ib->filter [0] = 0;
 	ib->filter [2] = 0;
+	ib->filter [4] = 0;
+	ib->filter [6] = 0;
 
 	lance_init_ring(dev);
 	load_csrs(lp);
@@ -920,7 +922,7 @@ static void lance_load_multicast(struct 
 	struct dev_mc_list *dmi = dev->mc_list;
 	char *addrs;
 	int i, j, bit, byte;
-	u32 crc, poly = CRC_POLYNOMIAL_BE;
+	u32 crc, poly = CRC_POLYNOMIAL_LE;
 
 	/* set all multicast bits */
 	if (dev->flags & IFF_ALLMULTI) {
@@ -959,7 +961,7 @@ static void lance_load_multicast(struct 
 			}
 
 		crc = crc >> 26;
-		mcast_table[crc >> 3] |= 1 << (crc & 0xf);
+		mcast_table[2 * (crc >> 4)] |= 1 << (crc & 0xf);
 	}
 	return;
 }

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-03-29  7:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-21 18:04 [patch] linux: declance multicast filter fixes Maciej W. Rozycki
2002-03-22 11:08 ` Dave Airlie
2002-03-22 11:08   ` Dave Airlie
2002-03-23 14:01   ` Maciej W. Rozycki
2002-03-24 13:51     ` Dave Airlie
2002-03-24 13:51       ` Dave Airlie
2002-03-25 11:40       ` Maciej W. Rozycki
2002-03-27 21:20         ` Harald Koerfgen
2002-03-28 13:01           ` Maciej W. Rozycki
2002-03-29  7:57             ` Harald Koerfgen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox