Print a prominent message if kernel AES is not available
[madwifi/.git] / net80211 / ieee80211_crypto_ccmp.c
index bf4d99be300da399c504883fb1f5a8bbfa9da35d..16864cd479ecb7fde0ed26d3c0fc2bdbcb07a4ec 100644 (file)
@@ -107,6 +107,7 @@ ccmp_attach(struct ieee80211vap *vap, struct ieee80211_key *k)
        if (ctx == NULL) {
                vap->iv_stats.is_crypto_nomem++;
                status = 0;
+               goto out;
        }
 
 /* This function crypto_alloc_foo might sleep. Therefore:
@@ -122,11 +123,9 @@ ccmp_attach(struct ieee80211vap *vap, struct ieee80211_key *k)
 #endif
        
                if (ctx->cc_tfm == NULL) {
-                       IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
-                                       "%s: kernel support for AES "
-                                       "cryptography is not available; the "
-                                       "module may not be loaded.\n", 
-                                       __func__);
+                       printk(KERN_ERR "%s: kernel AES support is missing; "
+                              "some modules may need to be loaded\n",
+                              vap->iv_dev->name);
                        FREE(ctx, M_DEVBUF);
                        ctx = NULL;
                        vap->iv_stats.is_crypto_nocipher++;
@@ -134,6 +133,7 @@ ccmp_attach(struct ieee80211vap *vap, struct ieee80211_key *k)
                }
        }
 
+out:
        if (!status)
                _MOD_DEC_USE(THIS_MODULE);
        else {