summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_tl.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-02-06 10:12:15 +0000
committerphk <phk@FreeBSD.org>2001-02-06 10:12:15 +0000
commitd214ae21714540c7d954bd861ed084fb157abeb9 (patch)
tree7c665d67872a65310572d737c33defbe1a63008e /sys/pci/if_tl.c
parent43450ced687857ec4a35796cfed2820c891c103d (diff)
downloadFreeBSD-src-d214ae21714540c7d954bd861ed084fb157abeb9.zip
FreeBSD-src-d214ae21714540c7d954bd861ed084fb157abeb9.tar.gz
Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that. Reviewed by: mikeh
Diffstat (limited to 'sys/pci/if_tl.c')
-rw-r--r--sys/pci/if_tl.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c
index eaa3f058..718498a 100644
--- a/sys/pci/if_tl.c
+++ b/sys/pci/if_tl.c
@@ -952,14 +952,7 @@ static void tl_setmulti(sc)
hashes[1] = 0xFFFFFFFF;
} else {
i = 1;
- /* First find the tail of the list. */
- LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
- if (LIST_NEXT(ifma, ifma_link) == NULL)
- break;
- }
- /* Now traverse the list backwards. */
- for (; ifma != NULL && ifma != (void *)&ifp->if_multiaddrs;
- ifma = (struct ifmultiaddr *)ifma->ifma_link.le_prev) {
+ TAILQ_FOREACH_REVERSE(ifma, &ifp->if_multiaddrs, ifmultihead, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
/*
OpenPOWER on IntegriCloud