]> git.karo-electronics.de Git - karo-tx-linux.git/commit
r6040: fix r6040_multicast_list
authorFlorian Fainelli <florian@openwrt.org>
Wed, 7 Apr 2010 23:50:58 +0000 (16:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:04:16 +0000 (21:04 -0700)
commit1ad2b6fea2210ab7ddd3e9e48dfad01ce8e84a11
tree8cdcda7a60dc54b8cd012d28ed8b2abb86c1e86c
parent41ace54c2c2f787f1c44f43403606cb60d63cb14
r6040: fix r6040_multicast_list

commit 3bcf8229a8c49769e48d3e0bd1e20d8e003f8106 upstream.

As reported in <https://bugzilla.kernel.org/show_bug.cgi?id=15355>, r6040_
multicast_list currently crashes. This is due a wrong maximum of multicast
entries. This patch fixes the following issues with multicast:

- number of maximum entries if off-by-one (4 instead of 3)

- the writing of the hash table index is not necessary and leads to invalid
values being written into the MCR1 register, so the MAC is simply put in a non
coherent state

- when we exceed the maximum number of mutlticast address, writing the
broadcast address should be done in registers MID_1{L,M,H} instead of
MID_O{L,M,H}, otherwise we would loose the adapter's MAC address

[bwh: Adjust for 2.6.32; should also apply to 2.6.27]

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/r6040.c