summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-08-20 14:01:08 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-08-20 14:01:08 +0000
commitf24feee5d61380c133d9971e959dab07cc46d5d2 (patch)
treee9f61e4e47173f95735303fe7a17cc157e369fa1 /sys/dev/pci
parent86eb1281af2e97ab0d595ad9d4769e678fff206d (diff)
- turn the interface down if the user press the radio kill button while
the interface is up. - undef WPI_DEBUG.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_wpi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index f8b412e6ba8..b5a8cd315b8 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.29 2006/08/18 16:04:56 damien Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.30 2006/08/20 14:01:07 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -149,8 +149,6 @@ void wpi_amrr_timeout(void *);
void wpi_newassoc(struct ieee80211com *, struct ieee80211_node *,
int);
-#define WPI_DEBUG
-
#ifdef WPI_DEBUG
#define DPRINTF(x) do { if (wpi_debug > 0) printf x; } while (0)
#define DPRINTFN(n, x) do { if (wpi_debug >= (n)) printf x; } while (0)
@@ -1324,6 +1322,10 @@ wpi_notif_intr(struct wpi_softc *sc)
/* the radio button has to be pushed */
printf("%s: Radio transmitter is off\n",
sc->sc_dev.dv_xname);
+ /* turn the interface down */
+ ifp->if_flags &= ~IFF_UP;
+ wpi_stop(ifp, 1);
+ return; /* no further processing */
}
break;
}
@@ -1401,7 +1403,8 @@ wpi_intr(void *arg)
wakeup(sc);
/* re-enable interrupts */
- WPI_WRITE(sc, WPI_MASK, WPI_INTR_MASK);
+ if (ifp->if_flags & IFF_UP)
+ WPI_WRITE(sc, WPI_MASK, WPI_INTR_MASK);
return 1;
}