Stefan Sperling
2016-02-04 18:29:24 UTC
HT protection updates forget about restoring the CCMP key to firmware
so WPA breaks when protection mode changes.
Index: if_iwn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.158
diff -u -p -r1.158 if_iwn.c
--- if_iwn.c 25 Jan 2016 11:27:11 -0000 1.158
+++ if_iwn.c 4 Feb 2016 18:24:56 -0000
@@ -5095,6 +5095,15 @@ iwn_update_htprot(struct ieee80211com *i
sc->calib.state = IWN_CALIB_STATE_ASSOC;
sc->calib_cnt = 0;
timeout_add_msec(&sc->calib_to, 500);
+
+ if ((ni->ni_flags & IEEE80211_NODE_RXPROT) &&
+ ni->ni_pairwise_key.k_cipher == IEEE80211_CIPHER_CCMP) {
+ if ((error = iwn_set_key(ic, ni, &ni->ni_pairwise_key)) != 0) {
+ printf("%s: could not set pairwise ccmp key\n",
+ sc->sc_dev.dv_xname);
+ return;
+ }
+ }
}
/*
so WPA breaks when protection mode changes.
Index: if_iwn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.158
diff -u -p -r1.158 if_iwn.c
--- if_iwn.c 25 Jan 2016 11:27:11 -0000 1.158
+++ if_iwn.c 4 Feb 2016 18:24:56 -0000
@@ -5095,6 +5095,15 @@ iwn_update_htprot(struct ieee80211com *i
sc->calib.state = IWN_CALIB_STATE_ASSOC;
sc->calib_cnt = 0;
timeout_add_msec(&sc->calib_to, 500);
+
+ if ((ni->ni_flags & IEEE80211_NODE_RXPROT) &&
+ ni->ni_pairwise_key.k_cipher == IEEE80211_CIPHER_CCMP) {
+ if ((error = iwn_set_key(ic, ni, &ni->ni_pairwise_key)) != 0) {
+ printf("%s: could not set pairwise ccmp key\n",
+ sc->sc_dev.dv_xname);
+ return;
+ }
+ }
}
/*