summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_ipw.c
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2021-03-12 17:54:50 +0000
committerstsp <stsp@openbsd.org>2021-03-12 17:54:50 +0000
commitf9fa239a57ce1593140e06d7ebef28aaae54833b (patch)
tree89c679be06ff40e7b61be1bd57229c2acb4d2e50 /sys/dev/pci/if_ipw.c
parentAdd deprecation warning for autoconfprivacy. (diff)
downloadwireguard-openbsd-f9fa239a57ce1593140e06d7ebef28aaae54833b.tar.xz
wireguard-openbsd-f9fa239a57ce1593140e06d7ebef28aaae54833b.zip
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
Diffstat (limited to 'sys/dev/pci/if_ipw.c')
-rw-r--r--sys/dev/pci/if_ipw.c8
1 files changed, 7 insertions, 1 deletions
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,