From owner-p4-projects@FreeBSD.ORG Sun Oct 19 21:38:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A64E4106567A; Sun, 19 Oct 2008 21:38:03 +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 6A65A1065675 for ; Sun, 19 Oct 2008 21:38:03 +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 593538FC1C for ; Sun, 19 Oct 2008 21:38:03 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9JLc3Lw066391 for ; Sun, 19 Oct 2008 21:38:03 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9JLc3Hk066389 for perforce@freebsd.org; Sun, 19 Oct 2008 21:38:03 GMT (envelope-from sam@freebsd.org) Date: Sun, 19 Oct 2008 21:38:03 GMT Message-Id: <200810192138.m9JLc3Hk066389@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 151573 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: Sun, 19 Oct 2008 21:38:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=151573 Change 151573 by sam@sam_ebb on 2008/10/19 21:37:47 change driver key alloc routines to honor a requested key index so static key wep works Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#110 edit .. //depot/projects/vap/sys/dev/mwl/if_mwl.c#19 edit .. //depot/projects/vap/sys/dev/ral/rt2661.c#41 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#110 (text+ko) ==== @@ -2439,7 +2439,8 @@ * it permits us to support multiple users for adhoc and/or * multi-station operation. */ - if ((k->wk_flags & IEEE80211_KEY_GROUP) && !sc->sc_mcastkey) { + if (k->wk_keyix != IEEE80211_KEYIX_NONE || /* global key */ + ((k->wk_flags & IEEE80211_KEY_GROUP) && !sc->sc_mcastkey)) { if (!(&vap->iv_nw_keys[0] <= k && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { /* should not happen */ ==== //depot/projects/vap/sys/dev/mwl/if_mwl.c#19 (text+ko) ==== @@ -1883,7 +1883,8 @@ { struct mwl_softc *sc = vap->iv_ic->ic_ifp->if_softc; - if (k->wk_flags & IEEE80211_KEY_GROUP) { + if (k->wk_keyix != IEEE80211_KEYIX_NONE || + (k->wk_flags & IEEE80211_KEY_GROUP)) { if (!(&vap->iv_nw_keys[0] <= k && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { /* should not happen */ ==== //depot/projects/vap/sys/dev/ral/rt2661.c#41 (text) ==== @@ -935,7 +935,8 @@ struct rt2661_softc *sc = vap->iv_ic->ic_ifp->if_softc; u_int i, keyix; - if (k->wk_flags & IEEE80211_KEY_GROUP) { + if (k->wk_keyix != IEEE80211_KEYIX_NONE || + (k->wk_flags & IEEE80211_KEY_GROUP)) { if (!(&vap->iv_nw_keys[0] <= k && k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { /* should not happen */