From f9fa239a57ce1593140e06d7ebef28aaae54833b Mon Sep 17 00:00:00 2001 From: stsp Date: Fri, 12 Mar 2021 17:54:50 +0000 Subject: [PATCH] In ipw(4), ensure that net80211 is in ASSOC state while we are expecting an assoc response from the AP during the association sequence. Otherwise net80211 would ignore the auth response, resulting in a state mismatch between firmware and net80211. A symptom of this was that WPA didn't work. Problem reported and fix tested by Ricardo Mottola --- sys/dev/pci/if_ipw.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index 20a9b617e6d..ab16cd51ba6 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.127 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.128 2021/03/12 17:54:50 stsp Exp $ */ /*- * Copyright (c) 2004-2008 @@ -1781,6 +1781,12 @@ ipw_auth_and_assoc(void *arg1) if (error != 0) goto fail; + /* + * net80211 won't see the AP's auth response. Move to ASSOC state + * in order to make net80211 accept the AP's assoc response. + */ + ic->ic_newstate(ic, IEEE80211_S_ASSOC, -1); + return; fail: printf("%s: association failed (error=%d)\n", sc->sc_dev.dv_xname, -- 2.20.1