Commit d74cc526 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] declance.c

"Maciej W. Rozycki" <macro@ds2.pg.gda.pl>: [patch] 2.4.19-pre7: A few declance multicast updates:
  Hello,

   It seems all Ethernet device drivers were bulk-converted to use the new
  common CRC functions.  I discovered declance used incorrect endianness to
  calculate the sum for its multicast filter and had a few alignment
  problems there.  I fixed these bugs in the MIPS/Linux CVS tree which is at
  2.4.18 now.  Here is the respective update for the official kernel.

   The bugs make the filter non-functional.  Please apply.

    Maciej
parent 38163886
...@@ -791,6 +791,8 @@ static int lance_open(struct net_device *dev) ...@@ -791,6 +791,8 @@ static int lance_open(struct net_device *dev)
ib->mode = 0; ib->mode = 0;
ib->filter [0] = 0; ib->filter [0] = 0;
ib->filter [2] = 0; ib->filter [2] = 0;
ib->filter [4] = 0;
ib->filter [6] = 0;
lance_init_ring(dev); lance_init_ring(dev);
load_csrs(lp); load_csrs(lp);
...@@ -943,9 +945,9 @@ static void lance_load_multicast(struct net_device *dev) ...@@ -943,9 +945,9 @@ static void lance_load_multicast(struct net_device *dev)
if (!(*addrs & 1)) if (!(*addrs & 1))
continue; continue;
crc = ether_crc(6, addrs); crc = ether_crc_le(6, addrs);
crc = crc >> 26; crc = crc >> 26;
mcast_table[crc >> 3] |= 1 << (crc & 0xf); mcast_table[2 * (crc >> 4)] |= 1 << (crc & 0xf);
} }
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment