summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-04-01 10:31:47 +0000
committerkn <kn@cvs.openbsd.org>2019-04-01 10:31:47 +0000
commit99734c2b9bcfaa2c6c79dbe1b3508243814e6fcf (patch)
treeb1e825fda6f7b8a4b5bf61d1df7465cd5ce5ab7d /sys/dev/pci
parent0bbaaf01d892b72d48537e1478f54064d56facaa (diff)
Fix interrupt handler to set RUNNING flag when RF switch is enabled
With an UP and RUNNING interface, turning off the hardware kill switch removes the RUNNING flag and powers down the device. Iff still UP, switching it back would not reset the flag accordingly. Fix this in analogy to sys/dev/pci/if_iwn.c revision 1.204 by scheduling iwm_init() unconditionally on both hardware kill switch edges; it'll take care of everything else. Tested with iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0xbb, msi iwm0: hw rev 0x140, fw ver 16.242414.0 OK deraadt stsp
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_iwm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index a11b6ca5230..0b3998abe7d 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.237 2019/02/27 07:47:57 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.238 2019/04/01 10:31:46 kn Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -7339,11 +7339,10 @@ iwm_intr(void *arg)
if (r1 & IWM_CSR_INT_BIT_RF_KILL) {
handled |= IWM_CSR_INT_BIT_RF_KILL;
- if (iwm_check_rfkill(sc)) {
- task_add(systq, &sc->init_task);
- rv = 1;
- goto out;
- }
+ iwm_check_rfkill(sc);
+ task_add(systq, &sc->init_task);
+ rv = 1;
+ goto out_ena;
}
if (r1 & IWM_CSR_INT_BIT_SW_ERR) {