Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/rockchip fix multicast hash calculation
details: https://anonhg.NetBSD.org/src/rev/9f489dd41232
branches: trunk
changeset: 335422:9f489dd41232
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Jan 06 11:19:16 2015 +0000
description:
fix multicast hash calculation
diffstat:
sys/arch/arm/rockchip/rockchip_emac.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d64612507cc8 -r 9f489dd41232 sys/arch/arm/rockchip/rockchip_emac.c
--- a/sys/arch/arm/rockchip/rockchip_emac.c Tue Jan 06 11:04:00 2015 +0000
+++ b/sys/arch/arm/rockchip/rockchip_emac.c Tue Jan 06 11:19:16 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_emac.c,v 1.5 2015/01/05 23:00:52 jmcneill Exp $ */
+/* $NetBSD: rockchip_emac.c,v 1.6 2015/01/06 11:19:16 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_rkemac.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.5 2015/01/05 23:00:52 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rockchip_emac.c,v 1.6 2015/01/06 11:19:16 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -908,7 +908,7 @@
hashes[0] = hashes[1] = 0xffffffff;
goto done;
}
- h = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN);
+ h = ~ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN) >> 26;
hashes[h >> 5] |= (1 << (h & 0x1f));
ETHER_NEXT_MULTI(step, enm);
}
Home |
Main Index |
Thread Index |
Old Index