From be5740a255fbcb1d4053e709cb7f22bb96320eb0 Mon Sep 17 00:00:00 2001 From: rwatson Date: Fri, 26 Jun 2009 11:45:06 +0000 Subject: Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks --- sys/dev/de/if_de.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/de/if_de.c') diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index cda4d3b..2acf1a8 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -3041,7 +3041,7 @@ tulip_addr_filter(tulip_softc_t * const sc) multicnt = 0; ifp = sc->tulip_ifp; - IF_ADDR_LOCK(ifp); + if_maddr_rlock(ifp); /* Copy MAC address on stack to align. */ if (ifp->if_input != NULL) @@ -3134,7 +3134,7 @@ tulip_addr_filter(tulip_softc_t * const sc) *sp++ = TULIP_SP_MAC(eaddr[2]); } } - IF_ADDR_UNLOCK(ifp); + if_maddr_runlock(ifp); } static void -- cgit v1.1