Skip to content

Commit

Permalink
mv643xx_eth: fix multicast filter programming
Browse files Browse the repository at this point in the history
Commit 66e63ff ("mv643xx_eth:
implement ->set_rx_mode()") cleaned up mv643xx_eth's multicast filter
programming, but broke it as well.

The non-special multicast filter table (for multicast addresses that
are not of the form 01:00:5e:00:00:xx) consists of 256 hash table
buckets organised as 64 32-bit words, where the 'accept' bits are
in the LSB of each byte, so in bits 24 16 8 0 of each 32-bit word.
The old code got this right, but the referenced commit broke this by
using bits 3 2 1 0 instead.  This commit fixes this up.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lennert Buytenhek authored and David S. Miller committed Jan 20, 2009
1 parent e0c6ef9 commit 2b44833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ static void mv643xx_eth_program_multicast_filter(struct net_device *dev)
entry = addr_crc(a);
}

table[entry >> 2] |= 1 << (entry & 3);
table[entry >> 2] |= 1 << (8 * (entry & 3));
}

for (i = 0; i < 0x100; i += 4) {
Expand Down

0 comments on commit 2b44833

Please sign in to comment.