diff options
author | Sam Leffler <sam@FreeBSD.org> | 2003-11-14 19:00:32 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2003-11-14 19:00:32 +0000 |
commit | 5120abbfb44aea8edaca3311a60e73429dc71942 (patch) | |
tree | 0e5901939d8633065a9035209aa5138fe4ea6820 /sys/dev/wl | |
parent | 274461c9441dd719a672a8fef48458e127b3885e (diff) | |
download | src-5120abbfb44aea8edaca3311a60e73429dc71942.tar.gz src-5120abbfb44aea8edaca3311a60e73429dc71942.zip |
Drop the driver lock around calls to if_input to avoid a LOR when
the packets are immediately returned for sending (e.g. when bridging
or packet forwarding). There are more efficient ways to do this
but for now use the least intrusive approach.
Reviewed by: imp, rwatson
Notes
Notes:
svn path=/head/; revision=122689
Diffstat (limited to 'sys/dev/wl')
-rw-r--r-- | sys/dev/wl/if_wl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c index ecf1fa479857..465a49063cea 100644 --- a/sys/dev/wl/if_wl.c +++ b/sys/dev/wl/if_wl.c @@ -265,6 +265,7 @@ struct wl_softc{ }; #define WL_LOCK(_sc) mtx_lock(&(_sc)->wl_mtx) +#define WL_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->wl_mtx, MA_OWNED) #define WL_UNLOCK(_sc) mtx_unlock(&(_sc)->wl_mtx) static int wlprobe(device_t); @@ -1069,6 +1070,7 @@ wlread(struct wl_softc *sc, u_short fd_p) u_short mlen, len; u_short bytes_in_msg, bytes_in_mbuf, bytes; + WL_LOCK_ASSERT(sc); #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) @@ -1212,7 +1214,9 @@ wlread(struct wl_softc *sc, u_short fd_p) * received packet is now in a chain of mbuf's. next step is * to pass the packet upwards. */ + WL_UNLOCK(sc); (*ifp->if_input)(ifp, m); + WL_LOCK(sc); return 1; } |