aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/wpi
diff options
context:
space:
mode:
authorBernhard Schmidt <bschmidt@FreeBSD.org>2010-12-19 10:36:06 +0000
committerBernhard Schmidt <bschmidt@FreeBSD.org>2010-12-19 10:36:06 +0000
commit6a9e69db1bacb386c26be78d1c3c428abace9512 (patch)
tree27c796a19a301ffd931c75a88796ad2c21ce4242 /sys/dev/wpi
parent1375a2d077edbb173c38106e0746e42d3425700f (diff)
downloadsrc-6a9e69db1bacb386c26be78d1c3c428abace9512.tar.gz
src-6a9e69db1bacb386c26be78d1c3c428abace9512.zip
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 <henry.hu.sh at gmail.com> MFC after: 3 days
Notes
Notes: svn path=/head/; revision=216557
Diffstat (limited to 'sys/dev/wpi')
-rw-r--r--sys/dev/wpi/if_wpi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c
index 50c045c95e6f..b4f94e03bcea 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);