提交 7ee0fddf 编写于 作者: J J. K. Cliburn 提交者: Jeff Garzik

atl1e: fix broken multicast by removing unnecessary crc inversion

Inverting the crc after calling ether_crc_le() is unnecessary and breaks
multicast. Remove it.
Tested-by: NDavid Madore <david.madore@ens.fr>
Signed-off-by: NJay Cliburn <jcliburn@gmail.com>
Cc: stable@kernel.org
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 81183059
...@@ -163,9 +163,6 @@ int atl1e_read_mac_addr(struct atl1e_hw *hw) ...@@ -163,9 +163,6 @@ int atl1e_read_mac_addr(struct atl1e_hw *hw)
* atl1e_hash_mc_addr * atl1e_hash_mc_addr
* purpose * purpose
* set hash value for a multicast address * set hash value for a multicast address
* hash calcu processing :
* 1. calcu 32bit CRC for multicast address
* 2. reverse crc with MSB to LSB
*/ */
u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr) u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
{ {
...@@ -174,7 +171,6 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr) ...@@ -174,7 +171,6 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
int i; int i;
crc32 = ether_crc_le(6, mc_addr); crc32 = ether_crc_le(6, mc_addr);
crc32 = ~crc32;
for (i = 0; i < 32; i++) for (i = 0; i < 32; i++)
value |= (((crc32 >> i) & 1) << (31 - i)); value |= (((crc32 >> i) & 1) << (31 - i));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册