From: Andreas Oberritter <obi@linuxtv.org>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] mac80211: fix autoloading of crypto modules for WEP
Date: Wed, 22 Jul 2009 22:05:58 +0200 [thread overview]
Message-ID: <4A677126.3040907@linuxtv.org> (raw)
If at least one of arc4 and ecb is built as a module, then autoloading
of the algorithm fails, because crypto_alloc_blkcipher tries to
request the module "ecb(arc4)", which does not exist.
This patch was made against 2.6.30, but should apply cleanly on top of
the wireless-2.6 git tree.
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
---
net/mac80211/wep.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index ef73105..78e9119 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -29,6 +29,17 @@ int ieee80211_wep_init(struct ieee80211_local *local)
/* start WEP IV from a random value */
get_random_bytes(&local->wep_iv, WEP_IV_LEN);
+ /*
+ * crypto_alloc_blkcipher() will request the
+ * module "ecb(arc4)", which does not exist.
+ */
+#ifdef CONFIG_CRYPTO_ARC4_MODULE
+ request_module("arc4");
+#endif
+#ifdef CONFIG_CRYPTO_ECB_MODULE
+ request_module("ecb");
+#endif
+
local->wep_tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0,
CRYPTO_ALG_ASYNC);
if (IS_ERR(local->wep_tx_tfm))
--
1.6.0.4
next reply other threads:[~2009-07-22 20:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 20:05 Andreas Oberritter [this message]
2009-07-22 20:20 ` [PATCH] mac80211: fix autoloading of crypto modules for WEP Johannes Berg
2009-07-23 0:40 ` Herbert Xu
2009-07-23 11:39 ` Andreas Oberritter
2009-07-23 11:49 ` Johannes Berg
2009-07-23 12:19 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A677126.3040907@linuxtv.org \
--to=obi@linuxtv.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox