diff options
author | 2020-08-26 17:12:00 +0000 | |
---|---|---|
committer | 2020-08-26 17:12:00 +0000 | |
commit | 3da64d66b357bef081ff30e524197e69caadf121 (patch) | |
tree | 8851198db74428edf5e56812aae50c61ecbccab9 /sys/dev/pci/if_iwx.c | |
parent | Let aml_copyvalue() handle AML_OBJTYPE_DEVICE. (diff) | |
download | wireguard-openbsd-3da64d66b357bef081ff30e524197e69caadf121.tar.xz wireguard-openbsd-3da64d66b357bef081ff30e524197e69caadf121.zip |
Reset the Rx block ack session counter when an iwm/iwx interface disassociates
from an access point or is put down via ifconfig. Otherwise new Rx block ack
sessions could be refused upon reassociation due to a bogus counter value.
Found by zxystd from the OpenIntelWireless project (drivers for macOS).
Testing by jmc@, kevlo@, and Sven Falempin.
ok phessler@ mpi@ kevlo@
Diffstat (limited to 'sys/dev/pci/if_iwx.c')
-rw-r--r-- | sys/dev/pci/if_iwx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 0482cf039bd..458e72f5d2c 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.43 2020/08/02 11:11:07 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.44 2020/08/26 17:12:00 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -5736,6 +5736,7 @@ iwx_deauth(struct iwx_softc *sc) return err; } sc->sc_flags &= ~IWX_FLAG_STA_ACTIVE; + sc->sc_rx_ba_sessions = 0; } if (sc->sc_flags & IWX_FLAG_BINDING_ACTIVE) { @@ -5801,6 +5802,7 @@ iwx_disassoc(struct iwx_softc *sc) return err; } sc->sc_flags &= ~IWX_FLAG_STA_ACTIVE; + sc->sc_rx_ba_sessions = 0; } return 0; @@ -6760,6 +6762,8 @@ iwx_stop(struct ifnet *ifp) sc->sc_flags &= ~IWX_FLAG_HW_ERR; sc->sc_flags &= ~IWX_FLAG_SHUTDOWN; + sc->sc_rx_ba_sessions = 0; + sc->sc_newstate(ic, IEEE80211_S_INIT, -1); ifp->if_timer = sc->sc_tx_timer = 0; |