summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwm.c
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-04-01 10:47:14 +0000
committerkn <kn@cvs.openbsd.org>2019-04-01 10:47:14 +0000
commit57294782488dc3da82bdd474d0e0563b61d9cf10 (patch)
tree427e9918b8e202c131b7e3d399cecee5313bd882 /sys/dev/pci/if_iwm.c
parenta8ce73dfd0edeb98dcf91b38e240621869bac478 (diff)
Enable RF_KILL interrupts on resume
Like the interrupt handler, the resume path needs to check the register to update flags in order to propagate the hardware kill switch state, otherwise the driver would still consider the switch to be off after resume even though it may have changed while in S3. Fix the resume path by simply applying the same idiom already found in iwm_start_hw(). This will ensure seemless operation no matter which combination of switch toggling and suspend/resume users will follow. OK stsp
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r--sys/dev/pci/if_iwm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 0b3998abe7d..335033d2109 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.238 2019/04/01 10:31:46 kn Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.239 2019/04/01 10:47:13 kn Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -7892,6 +7892,9 @@ iwm_resume(struct iwm_softc *sc)
reg = pci_conf_read(sc->sc_pct, sc->sc_pcitag, 0x40);
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg & ~0xff00);
+ iwm_enable_rfkill_int(sc);
+ iwm_check_rfkill(sc);
+
return iwm_prepare_card_hw(sc);
}