From 80778295f9f4ca76d5c6bc4f9c7bb56441e0cde9 Mon Sep 17 00:00:00 2001 From: bschmidt Date: Sun, 26 Dec 2010 14:10:12 +0000 Subject: [PATCH] MFC r216557: Fix panic while trying to use monitor mode. The iwn_cmd() calls issued by iwn_config() want to msleep() on the mutex. PR: kern/138427 Submitted by: Henry Hu Approved by: re (kib) git-svn-id: svn://svn.freebsd.org/base/releng/8.2@216710 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/wpi/if_wpi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 50c045c9..b4f94e03 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -3561,7 +3561,9 @@ wpi_set_channel(struct ieee80211com *ic) * are already taken care of by their respective firmware commands. */ if (ic->ic_opmode == IEEE80211_M_MONITOR) { + WPI_LOCK(sc); error = wpi_config(sc); + WPI_UNLOCK(sc); if (error != 0) device_printf(sc->sc_dev, "error %d settting channel\n", error); -- 2.45.0