From: proski Date: Wed, 28 Nov 2007 03:42:55 +0000 (+0000) Subject: Preload crypto module to be tested with ieee80211_crypto_available() X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=212d62c469f9ee7424813c5276ae5b4872f8a3fb;p=madwifi%2F.git Preload crypto module to be tested with ieee80211_crypto_available() ieee80211_crypto_newkey() will fail if the crypto module for the cipher is not loaded. ieee80211_crypto_available() will try to load the module first. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2987 0192ed92-7a03-0410-a25b-9323aeb14dbd --- diff --git a/regression/ccmp/test_ccmp.c b/regression/ccmp/test_ccmp.c index ac174b3..3e06247 100644 --- a/regression/ccmp/test_ccmp.c +++ b/regression/ccmp/test_ccmp.c @@ -589,6 +589,11 @@ runtest(struct ieee80211vap *vap, struct ciphertest *t) printk("%s: ", t->name); + if (!ieee80211_crypto_available(vap, t->cipher)) { + printk("FAIL: ieee80211_crypto_available failed\n"); + return 0; + } + /* * Setup key. */ diff --git a/regression/tkip/test_tkip.c b/regression/tkip/test_tkip.c index a793a0a..4c0ad9e 100644 --- a/regression/tkip/test_tkip.c +++ b/regression/tkip/test_tkip.c @@ -161,6 +161,11 @@ tkip_test(struct ieee80211vap *vap) int hdrlen; const int keyix = 0; + if (!ieee80211_crypto_available(vap, IEEE80211_CIPHER_TKIP)) { + printk("FAIL: ieee80211_crypto_available failed\n"); + return 0; + } + /* * Setup key. */ diff --git a/regression/wep/test_wep.c b/regression/wep/test_wep.c index 5a2fed9..13b9279 100644 --- a/regression/wep/test_wep.c +++ b/regression/wep/test_wep.c @@ -194,6 +194,11 @@ runtest(struct ieee80211vap *vap, struct ciphertest *t) printk("%s: ", t->name); + if (!ieee80211_crypto_available(vap, t->cipher)) { + printk("FAIL: ieee80211_crypto_available failed\n"); + return 0; + } + /* * Setup key. */