diff options
author | 2020-05-26 11:57:08 +0000 | |
---|---|---|
committer | 2020-05-26 11:57:08 +0000 | |
commit | 9e40f374cdea54d46b95f9ee51e75e7809b875f9 (patch) | |
tree | 1a9239b462ec7f53a3d1c4e033fefcff583c50e5 /sys | |
parent | Make iwx(4) binding command work on -48 firmware. (diff) | |
download | wireguard-openbsd-9e40f374cdea54d46b95f9ee51e75e7809b875f9.tar.xz wireguard-openbsd-9e40f374cdea54d46b95f9ee51e75e7809b875f9.zip |
Make iwx(4) flush the Tx path before removing the AP from the firmware's
station table. The Tx flush operation depends on the station being present.
Avoids a fatal firmware error when the driver moves out of AUTH state.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_iwx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 9b08c05d523..eb59a6517b5 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.14 2020/05/26 11:56:25 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.15 2020/05/26 11:57:08 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -5673,6 +5673,12 @@ iwx_deauth(struct iwx_softc *sc) iwx_unprotect_session(sc, in); if (sc->sc_flags & IWX_FLAG_STA_ACTIVE) { + err = iwx_flush_tx_path(sc); + if (err) { + printf("%s: could not flush Tx path (error %d)\n", + DEVNAME(sc), err); + return err; + } err = iwx_rm_sta_cmd(sc, in); if (err) { printf("%s: could not remove STA (error %d)\n", @@ -5682,13 +5688,6 @@ iwx_deauth(struct iwx_softc *sc) sc->sc_flags &= ~IWX_FLAG_STA_ACTIVE; } - err = iwx_flush_tx_path(sc); - if (err) { - printf("%s: could not flush Tx path (error %d)\n", - DEVNAME(sc), err); - return err; - } - if (sc->sc_flags & IWX_FLAG_BINDING_ACTIVE) { err = iwx_binding_cmd(sc, in, IWX_FW_CTXT_ACTION_REMOVE); if (err) { |