On Wed, Mar 29, 2017 at 12:22:32PM +0200, Stefan Sperling wrote:
> 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.

New diff which fixes another problem where the iwi(4) firmware won't
receive data frames which are protected with RTS frames. This diff
makes iwi(4) work against WPA2 11n athn(4) hostap.

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 14:04:40 -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;
 
@@ -2038,6 +2041,7 @@ iwi_auth_and_assoc(struct iwi_softc *sc)
        config.disable_multicast_decryption = 1;
        config.silence_threshold = 30;
        config.report_noise = 1;
+       config.allow_mgt = 1;
        config.answer_pbreq =
 #ifndef IEEE80211_STA_ONLY
            (ic->ic_opmode == IEEE80211_M_IBSS) ? 1 :

Reply via email to