From fb1c27a83b3ccf75e8eae46e07b288ca5cc1d680 Mon Sep 17 00:00:00 2001 From: bschmidt Date: Sun, 19 Dec 2010 10:36:06 +0000 Subject: Fix panic 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 MFC after: 3 days --- 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 50c045c..b4f94e0 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); -- cgit v1.1