PERFORCE change 142342 for review
Sam Leffler
sam at FreeBSD.org
Tue May 27 02:37:11 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=142342
Change 142342 by sam at 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
More information about the p4-projects
mailing list