On Wed, Mar 29, 2017 at 10:50:07AM +0200, Stefan Sperling wrote: > iwi(4) is being stupid and does not forward state changes to the > net80211 stack. It is a wonder this driver even works at all.
Please ignore the previous diff. I misunderstood how iwi(4) implements state transitions. It is a bit different than other drivers. The problem is that iwi(4) firmware does not pass auth and assoc response frames to the driver. So the net80211 layer never gets to see them and won't adjust its idea of the curren WPA negotiation state. So unfortunately, this driver needs a hack to keep WPA working. This is the best fix I can come up with, for now. And it works. Index: if_iwi.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_iwi.c,v retrieving revision 1.135 diff -u -p -r1.135 if_iwi.c --- if_iwi.c 8 Mar 2017 12:02:41 -0000 1.135 +++ if_iwi.c 29 Mar 2017 10:15:39 -0000 @@ -965,6 +965,7 @@ iwi_notification_intr(struct iwi_softc * struct iwi_notif *notif) { struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_node *ni = ic->ic_bss; struct ifnet *ifp = &ic->ic_if; switch (notif->type) { @@ -1028,6 +1029,8 @@ iwi_notification_intr(struct iwi_softc * break; case IWI_ASSOCIATED: + if (ic->ic_flags & IEEE80211_F_RSNON) + ni->ni_rsn_supp_state = RSNA_SUPP_PTKSTART; ieee80211_new_state(ic, IEEE80211_S_RUN, -1); break;