diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-08-26 17:12:01 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-08-26 17:12:01 +0000 |
commit | 92f179a1caa44e2892fe8c59b513554ceea54a71 (patch) | |
tree | 943d9d6c786364e619bbbb0ad27c7e01ea271755 | |
parent | ac1a5974814c82ddfda00178a96287bf873af4da (diff) |
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@
-rw-r--r-- | sys/dev/pci/if_iwm.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_iwx.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index c788d9762fd..40fae2a53d2 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.313 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.314 2020/08/26 17:12:00 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -6666,6 +6666,7 @@ iwm_deauth(struct iwm_softc *sc) return err; } sc->sc_flags &= ~IWM_FLAG_STA_ACTIVE; + sc->sc_rx_ba_sessions = 0; } tfd_queue_msk = 0; @@ -6743,6 +6744,7 @@ iwm_disassoc(struct iwm_softc *sc) return err; } sc->sc_flags &= ~IWM_FLAG_STA_ACTIVE; + sc->sc_rx_ba_sessions = 0; } return 0; @@ -8117,6 +8119,8 @@ iwm_stop(struct ifnet *ifp) sc->sc_flags &= ~IWM_FLAG_HW_ERR; sc->sc_flags &= ~IWM_FLAG_SHUTDOWN; + sc->sc_rx_ba_sessions = 0; + sc->sc_newstate(ic, IEEE80211_S_INIT, -1); timeout_del(&sc->sc_calib_to); /* XXX refcount? */ 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; |