summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-10-24 21:01:19 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-10-24 21:01:19 +0000
commitd6cd65b08794ef29df05f8224a6089211719e572 (patch)
tree4e2f2b91309e48d1a13a8603aa706abd4c5f052f /sys
parentd0a6f98358ceeddb8063a66cbb2c6eeaf8af0b9b (diff)
call wpi_power_calibration() at splnet().
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_wpi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index fe49035f747..d91310d6542 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.94 2009/10/24 20:17:17 damien Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.95 2009/10/24 21:01:18 damien Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -1113,14 +1113,13 @@ wpi_calib_timeout(void *arg)
struct ieee80211com *ic = &sc->sc_ic;
int temp, s;
+ s = splnet();
/* Automatic rate control triggered every 500ms. */
if (ic->ic_fixed_rate == -1) {
- s = splnet();
if (ic->ic_opmode == IEEE80211_M_STA)
wpi_iter_func(sc, ic->ic_bss);
else
ieee80211_iterate_nodes(ic, wpi_iter_func, sc);
- splx(s);
}
/* Update sensor. */
temp = (int)WPI_READ(sc, WPI_UCODE_GP2);
@@ -1131,6 +1130,8 @@ wpi_calib_timeout(void *arg)
wpi_power_calibration(sc, temp);
sc->calib_cnt = 0;
}
+ splx(s);
+
/* Automatic rate control triggered every 500ms. */
timeout_add_msec(&sc->calib_to, 500);
}