From 4ccda29786e5752a02e31f85f0ae9f4ce40e4eea Mon Sep 17 00:00:00 2001 From: stsp Date: Wed, 6 Oct 2021 13:36:47 +0000 Subject: [PATCH] Allow AUTH->AUTH state transitions in the iwm(4) and iwx(4) drivers again. AUTH->AUTH state transitions happen if the access point uses band-steering. This was originally implemented to fix interop with some Aruba APs, and was probably broken by my recent CVS commit XeKkqPoaUCklmgtC ("prevent attempts to transition towards the same state"). ok mpi@ --- sys/dev/pci/if_iwm.c | 8 +++++--- sys/dev/pci/if_iwx.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 462b119590b..112de43e9ce 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.372 2021/10/06 13:35:55 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.373 2021/10/06 13:36:47 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -9008,9 +9008,11 @@ iwm_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) /* * Prevent attemps to transition towards the same state, unless * we are scanning in which case a SCAN -> SCAN transition - * triggers another scan iteration. + * triggers another scan iteration. And AUTH -> AUTH is needed + * to support band-steering. */ - if (sc->ns_nstate == nstate && nstate != IEEE80211_S_SCAN) + if (sc->ns_nstate == nstate && nstate != IEEE80211_S_SCAN && + nstate != IEEE80211_S_AUTH) return 0; if (ic->ic_state == IEEE80211_S_RUN) { diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 692f12524d7..55d0375ff3f 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.114 2021/10/02 07:48:20 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.115 2021/10/06 13:36:47 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -7874,9 +7874,11 @@ iwx_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) /* * Prevent attemps to transition towards the same state, unless * we are scanning in which case a SCAN -> SCAN transition - * triggers another scan iteration. + * triggers another scan iteration. And AUTH -> AUTH is needed + * to support band-steering. */ - if (sc->ns_nstate == nstate && nstate != IEEE80211_S_SCAN) + if (sc->ns_nstate == nstate && nstate != IEEE80211_S_SCAN && + nstate != IEEE80211_S_AUTH) return 0; if (ic->ic_state == IEEE80211_S_RUN) { -- 2.20.1