Date: Tue, 27 May 2008 02:37:10 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 142342 for review Message-ID: <200805270237.m4R2bAd2026638@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142342 Change 142342 by sam@sam_ebb on 2008/05/27 02:36:18 push key cache reloading logic up into net80211 Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#77 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#77 (text+ko) ==== @@ -1066,20 +1066,6 @@ ieee80211_stop_all(ic); } -static void -reset_ucastkey(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - struct ieee80211vap *vap = ni->ni_vap; - struct ieee80211_key *k; - - if (vap->iv_state != IEEE80211_S_RUN) - return; - k = &ni->ni_ucastkey; - if (k->wk_keyix != IEEE80211_KEYIX_NONE) - ath_keyset(sc, k, vap->iv_bss); -} - /* * Reset the key cache since some parts do not reset the * contents on resume. First we clear all entries, then @@ -1092,29 +1078,11 @@ struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct ath_hal *ah = sc->sc_ah; - struct ieee80211vap *vap; int i; for (i = 0; i < sc->sc_keymax; i++) ath_hal_keyreset(ah, i); - /* - * Keys in the global key table of each vap. - * NB: used only during resume so not locking - * the vap list should be safe - */ - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { - if (vap->iv_state != IEEE80211_S_RUN) - continue; - for (i = 0; i < IEEE80211_WEP_NKID; i++) { - const struct ieee80211_key *k = &vap->iv_nw_keys[i]; - if (k->wk_keyix != IEEE80211_KEYIX_NONE) - ath_keyset(sc, k, vap->iv_bss); - } - } - /* - * Unicast keys. - */ - ieee80211_iterate_nodes(&ic->ic_sta, reset_ucastkey, sc); + ieee80211_crypto_reload_keys(ic); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805270237.m4R2bAd2026638>