diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2009-06-26 11:45:06 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2009-06-26 11:45:06 +0000 |
commit | eb956cd041f956275522092d6ba66671356ff84f (patch) | |
tree | 30aee113c454323f30d4c201e18a0f29e2938074 /sys/dev/pdq | |
parent | be80e49a01a84d1920236c2258b9ccb0df28062d (diff) | |
download | src-eb956cd041f956275522092d6ba66671356ff84f.tar.gz src-eb956cd041f956275522092d6ba66671356ff84f.zip |
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
Notes
Notes:
svn path=/head/; revision=195049
Diffstat (limited to 'sys/dev/pdq')
-rw-r--r-- | sys/dev/pdq/pdq_ifsubr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c index ce1a2087bbd7..ce67b0e7d071 100644 --- a/sys/dev/pdq/pdq_ifsubr.c +++ b/sys/dev/pdq/pdq_ifsubr.c @@ -273,7 +273,7 @@ pdq_os_addr_fill( PDQ_IFNET(sc)->if_flags &= ~IFF_ALLMULTI; #endif - IF_ADDR_LOCK(PDQ_IFNET(sc)); + if_maddr_rlock(PDQ_IFNET(sc)); for (ifma = TAILQ_FIRST(&PDQ_IFNET(sc)->if_multiaddrs); ifma && num_addrs > 0; ifma = TAILQ_NEXT(ifma, ifma_link)) { char *mcaddr; @@ -286,7 +286,7 @@ pdq_os_addr_fill( addr++; num_addrs--; } - IF_ADDR_UNLOCK(PDQ_IFNET(sc)); + if_maddr_runlock(PDQ_IFNET(sc)); /* * If not all the address fit into the CAM, turn on all-multicast mode. */ |