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/ti/if_ti.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/ti') diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index a1b9c9d..488d038 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -1851,7 +1851,7 @@ ti_setmulti(sc) } /* Now program new ones. */ - IF_ADDR_LOCK(ifp); + if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; @@ -1866,7 +1866,7 @@ ti_setmulti(sc) SLIST_INSERT_HEAD(&sc->ti_mc_listhead, mc, mc_entries); ti_add_mcast(sc, &mc->mc_addr); } - IF_ADDR_UNLOCK(ifp); + if_maddr_runlock(ifp); /* Re-enable interrupts. */ CSR_WRITE_4(sc, TI_MB_HOSTINTR, intrs); -- cgit v1.1