summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-10-24 18:06:17 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-10-24 18:06:17 +0000
commit8e49b4a81933339e615f2d1b6b141cc1ec842939 (patch)
tree315de641fc62f0efecbb0db72b1ecdf0b9f027e0 /sys/dev/pci
parent4f714de4fb3af3ab6c96cd8a9b4d836b87b3a038 (diff)
iwn_cmd() must be called at splnet().
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_iwn.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index 167440db294..200a8f431d5 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.64 2009/10/24 17:51:34 damien Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.65 2009/10/24 18:06:16 damien Exp $ */
/*-
* Copyright (c) 2007-2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -1582,13 +1582,12 @@ iwn_calib_timeout(void *arg)
struct ieee80211com *ic = &sc->sc_ic;
int s;
+ s = splnet();
if (ic->ic_fixed_rate == -1) {
- s = splnet();
if (ic->ic_opmode == IEEE80211_M_STA)
iwn_iter_func(sc, ic->ic_bss);
else
ieee80211_iterate_nodes(ic, iwn_iter_func, sc);
- splx(s);
}
/* Force automatic TX power calibration every 60 secs. */
if (++sc->calib_cnt >= 120) {
@@ -1599,6 +1598,8 @@ iwn_calib_timeout(void *arg)
sizeof flags, 1);
sc->calib_cnt = 0;
}
+ splx(s);
+
/* Automatic rate control triggered every 500ms. */
timeout_add_msec(&sc->calib_to, 500);
}