summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-11-21 16:37:00 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-11-21 16:37:00 +0000
commit91b2739663106702cefdf6e89a82db962c77addf (patch)
tree0e2bc2b933fc7eda3997a89b7bd3266b0bbbabe8 /sys
parentf7dd7bd48953d5249f6335823fac33f69bebebf9 (diff)
make the led blink during a scan.
prodded by deraadt
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/athn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index 21bce073215..de1405bfcaa 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.12 2009/11/21 15:17:46 damien Exp $ */
+/* $OpenBSD: athn.c,v 1.13 2009/11/21 16:36:59 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -4334,13 +4334,16 @@ athn_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
int error;
timeout_del(&sc->calib_to);
- if (ic->ic_state == IEEE80211_S_RUN)
+ if (ic->ic_state != IEEE80211_S_SCAN)
athn_gpio_write(sc, sc->led_pin, 1);
switch (nstate) {
case IEEE80211_S_INIT:
break;
case IEEE80211_S_SCAN:
+ /* Make the LED blink while scanning. */
+ athn_gpio_write(sc, sc->led_pin,
+ !athn_gpio_read(sc, sc->led_pin));
error = athn_switch_chan(sc, ic->ic_bss->ni_chan, NULL);
if (error != 0)
return (error);