From owner-p4-projects@FreeBSD.ORG Tue May 27 02:37:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF082106566C; Tue, 27 May 2008 02:37:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B197C1065675 for ; Tue, 27 May 2008 02:37:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8A68FC17 for ; Tue, 27 May 2008 02:37:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4R2bAGM026640 for ; Tue, 27 May 2008 02:37:10 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4R2bAd2026638 for perforce@freebsd.org; Tue, 27 May 2008 02:37:10 GMT (envelope-from sam@freebsd.org) Date: Tue, 27 May 2008 02:37:10 GMT Message-Id: <200805270237.m4R2bAd2026638@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 142342 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 02:37:11 -0000 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