logo       
Google Custom Search
    AddThis Social Bookmark Button

revision 2987 committed: msg#00172

Subject: revision 2987 committed
Project     : madwifi
Revision    : 2987
Author      : proski (Pavel Roskin)
Date        : 2007-11-28 04:42:55 +0100 (Wed, 28 Nov 2007)

Log Message :
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.

Affected Files:
* madwifi/trunk/regression/ccmp/test_ccmp.c           updated             
* madwifi/trunk/regression/tkip/test_tkip.c           updated             
* madwifi/trunk/regression/wep/test_wep.c             updated             


Modified: madwifi/trunk/regression/ccmp/test_ccmp.c
===================================================================
--- madwifi/trunk/regression/ccmp/test_ccmp.c   2007-11-28 00:51:25 UTC (rev 
2986)
+++ madwifi/trunk/regression/ccmp/test_ccmp.c   2007-11-28 03:42:55 UTC (rev 
2987)
@@ -589,6 +589,11 @@
 
        printk("%s: ", t->name);
 
+       if (!ieee80211_crypto_available(vap, t->cipher)) {
+               printk("FAIL: ieee80211_crypto_available failed\n");
+               return 0;
+       }
+
        /*
         * Setup key.
         */

Modified: madwifi/trunk/regression/tkip/test_tkip.c
===================================================================
--- madwifi/trunk/regression/tkip/test_tkip.c   2007-11-28 00:51:25 UTC (rev 
2986)
+++ madwifi/trunk/regression/tkip/test_tkip.c   2007-11-28 03:42:55 UTC (rev 
2987)
@@ -161,6 +161,11 @@
        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.
         */

Modified: madwifi/trunk/regression/wep/test_wep.c
===================================================================
--- madwifi/trunk/regression/wep/test_wep.c     2007-11-28 00:51:25 UTC (rev 
2986)
+++ madwifi/trunk/regression/wep/test_wep.c     2007-11-28 03:42:55 UTC (rev 
2987)
@@ -194,6 +194,11 @@
 
        printk("%s: ", t->name);
 
+       if (!ieee80211_crypto_available(vap, t->cipher)) {
+               printk("FAIL: ieee80211_crypto_available failed\n");
+               return 0;
+       }
+
        /*
         * Setup key.
         */

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>