summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_tl.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2003-11-13 20:55:53 +0000
committerobrien <obrien@FreeBSD.org>2003-11-13 20:55:53 +0000
commitae5ec4308110fc11464507f63b5d9a1908a426b8 (patch)
tree9f53fad8ba546c1e709992d118c397465dd5b01f /sys/pci/if_tl.c
parenta9128aec4ed6ce7c8d433530c6899775e94045d0 (diff)
downloadFreeBSD-src-ae5ec4308110fc11464507f63b5d9a1908a426b8.zip
FreeBSD-src-ae5ec4308110fc11464507f63b5d9a1908a426b8.tar.gz
Try to create some sort of consistency in how the routings to find the
multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument).
Diffstat (limited to 'sys/pci/if_tl.c')
-rw-r--r--sys/pci/if_tl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c
index 8063e77..438215c 100644
--- a/sys/pci/if_tl.c
+++ b/sys/pci/if_tl.c
@@ -300,7 +300,7 @@ static int tl_miibus_writereg (device_t, int, int, int);
static void tl_miibus_statchg (device_t);
static void tl_setmode (struct tl_softc *, int);
-static int tl_calchash (caddr_t);
+static u_int32_t tl_mchash (caddr_t);
static void tl_setmulti (struct tl_softc *);
static void tl_setfilt (struct tl_softc *, caddr_t, int);
static void tl_softreset (struct tl_softc *, int);
@@ -889,11 +889,11 @@ tl_setmode(sc, media)
* Bytes 0-2 and 3-5 are symmetrical, so are folded together. Then
* the folded 24-bit value is split into 6-bit portions and XOR'd.
*/
-static int
-tl_calchash(addr)
- caddr_t addr;
+static u_int32_t
+tl_mchash(addr)
+ caddr_t addr;
{
- int t;
+ int t;
t = (addr[0] ^ addr[3]) << 16 | (addr[1] ^ addr[4]) << 8 |
(addr[2] ^ addr[5]);
@@ -978,7 +978,7 @@ tl_setmulti(sc)
continue;
}
- h = tl_calchash(
+ h = tl_mchash(
LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
if (h < 32)
hashes[0] |= (1 << h);
OpenPOWER on IntegriCloud