diff -urp ieee80211-1.2.16/ieee80211_crypt_ccmp.c ieee80211-1.2.16-crypt/ieee80211_crypt_ccmp.c --- ieee80211-1.2.16/ieee80211_crypt_ccmp.c 2007-01-05 10:51:16.000000000 +0800 +++ ieee80211-1.2.16-crypt/ieee80211_crypt_ccmp.c 2007-01-10 17:31:44.000000000 +0800 @@ -89,10 +89,11 @@ static void *ieee80211_ccmp_init(int key #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) priv->tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(priv->tfm)) { #else priv->tfm = crypto_alloc_tfm("aes", 0); + if (priv->tfm == NULL) { #endif - if (IS_ERR(priv->tfm)) { printk(KERN_DEBUG "ieee80211_crypt_ccmp: could not allocate " "crypto API aes\n"); priv->tfm = NULL; diff -urp ieee80211-1.2.16/ieee80211_crypt_tkip.c ieee80211-1.2.16-crypt/ieee80211_crypt_tkip.c --- ieee80211-1.2.16/ieee80211_crypt_tkip.c 2007-01-05 10:51:16.000000000 +0800 +++ ieee80211-1.2.16-crypt/ieee80211_crypt_tkip.c 2007-01-10 17:30:04.000000000 +0800 @@ -93,10 +93,11 @@ static void *ieee80211_tkip_init(int key #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) priv->tx_tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(priv->tx_tfm_arc4)) { #else priv->tx_tfm_arc4 = crypto_alloc_tfm("arc4", 0); + if (priv->tx_tfm_arc4 == NULL) { #endif - if (IS_ERR(priv->tx_tfm_arc4)) { printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " "crypto API arc4\n"); priv->tx_tfm_arc4 = NULL; @@ -106,10 +107,11 @@ static void *ieee80211_tkip_init(int key #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) priv->tx_tfm_michael = crypto_alloc_hash("michael_mic", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(priv->tx_tfm_michael)) { #else priv->tx_tfm_michael = crypto_alloc_tfm("michael_mic", 0); + if (priv->tx_tfm_michael == NULL) { #endif - if (IS_ERR(priv->tx_tfm_michael)) { printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " "crypto API michael_mic\n"); priv->tx_tfm_michael = NULL; @@ -119,10 +121,11 @@ static void *ieee80211_tkip_init(int key #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) priv->rx_tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(priv->rx_tfm_arc4)) { #else priv->rx_tfm_arc4 = crypto_alloc_tfm("arc4", 0); + if (priv->rx_tfm_arc4 == NULL) { #endif - if (IS_ERR(priv->rx_tfm_arc4)) { printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " "crypto API arc4\n"); priv->rx_tfm_arc4 = NULL; @@ -132,10 +135,11 @@ static void *ieee80211_tkip_init(int key #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) priv->rx_tfm_michael = crypto_alloc_hash("michael_mic", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(priv->rx_tfm_michael)) { #else - priv->tx_tfm_michael = crypto_alloc_tfm("michael_mic", 0); + priv->rx_tfm_michael = crypto_alloc_tfm("michael_mic", 0); + if (priv->rx_tfm_michael == NULL) { #endif - if (IS_ERR(priv->rx_tfm_michael)) { printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " "crypto API michael_mic\n"); priv->rx_tfm_michael = NULL; diff -urp ieee80211-1.2.16/ieee80211_crypt_wep.c ieee80211-1.2.16-crypt/ieee80211_crypt_wep.c --- ieee80211-1.2.16/ieee80211_crypt_wep.c 2007-01-05 10:51:16.000000000 +0800 +++ ieee80211-1.2.16-crypt/ieee80211_crypt_wep.c 2007-01-10 17:31:17.000000000 +0800 @@ -50,10 +50,11 @@ static void *prism2_wep_init(int keyidx) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(priv->tx_tfm)) { #else priv->tx_tfm = crypto_alloc_tfm("arc4", 0); + if (priv->tx_tfm == NULL) { #endif - if (IS_ERR(priv->tx_tfm)) { printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate " "crypto API arc4\n"); priv->tx_tfm = NULL; @@ -62,10 +63,11 @@ static void *prism2_wep_init(int keyidx) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(priv->rx_tfm)) { #else priv->rx_tfm = crypto_alloc_tfm("arc4", 0); + if (priv->rx_tfm == NULL) { #endif - if (IS_ERR(priv->rx_tfm)) { printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate " "crypto API arc4\n"); priv->rx_tfm = NULL;