summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2009-11-21 16:36:59 +0000
committerdamien <damien@openbsd.org>2009-11-21 16:36:59 +0000
commit0d6cd39fffe22b77d0f7cc25be1bc6106b64d52c (patch)
tree0583d44571a74c88e836aa63bf61dfd66e1dd5a7
parenttweak previous; (diff)
downloadwireguard-openbsd-0d6cd39fffe22b77d0f7cc25be1bc6106b64d52c.tar.xz
wireguard-openbsd-0d6cd39fffe22b77d0f7cc25be1bc6106b64d52c.zip
make the led blink during a scan.
prodded by deraadt
-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);