From owner-p4-projects@FreeBSD.ORG Fri Dec 3 01:56:25 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4B8216A4D0; Fri, 3 Dec 2004 01:56:21 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6927B16A4CE for ; Fri, 3 Dec 2004 01:56:21 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C1D543D3F for ; Fri, 3 Dec 2004 01:56:21 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iB31uLCR026211 for ; Fri, 3 Dec 2004 01:56:21 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iB31uLT2026208 for perforce@freebsd.org; Fri, 3 Dec 2004 01:56:21 GMT (envelope-from sam@freebsd.org) Date: Fri, 3 Dec 2004 01:56:21 GMT Message-Id: <200412030156.iB31uLT2026208@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 Subject: PERFORCE change 66292 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2004 01:56:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=66292 Change 66292 by sam@sam_ebb on 2004/12/03 01:55:58 add a way to check if a cipher is loaded/available Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#4 edit .. //depot/projects/wifi/sys/net80211/ieee80211_crypto.h#4 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#4 (text+ko) ==== @@ -190,6 +190,12 @@ ciphers[cip->ic_cipher] = NULL; } +int +ieee80211_crypto_available(u_int cipher) +{ + return cipher < IEEE80211_CIPHER_MAX && ciphers[cipher] != NULL; +} + /* XXX well-known names! */ static const char *cipher_modnames[] = { "wlan_wep", /* IEEE80211_CIPHER_WEP */ ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto.h#4 (text+ko) ==== @@ -166,6 +166,7 @@ extern void ieee80211_crypto_register(const struct ieee80211_cipher *); extern void ieee80211_crypto_unregister(const struct ieee80211_cipher *); +extern int ieee80211_crypto_available(u_int cipher); extern struct ieee80211_key *ieee80211_crypto_encap(struct ieee80211com *, struct ieee80211_node *, struct mbuf *);