From: "Ortwin Glück" <odi@odi.ch>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 1/2] mac80211: Support iwconfig enc restricted with WEP
Date: Mon, 15 Sep 2008 17:47:10 +0200 [thread overview]
Message-ID: <48CE837E.2010109@odi.ch> (raw)
The mac80211 code doesn't handle WEP with shared keys correctly. Using the ath9k
driver on my MacBook I am unable to put the driver into restricted mode (shared
key). It stays in open mode. That is the following command has no effect:
iwconfig wlan0 enc restricted. I can also confirm this when looking at the
authentication packets that go over the air: they are sent with the open flag,
and not the shared key flag.
Signed-off-by: Ortwin Glueck <odi@odi.ch>
---
net/mac80211/wext.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 34fa8ed..645c276 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -929,6 +929,18 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev,
else
idx--;
+ if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
+ struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+ if (erq->flags & IW_ENCODE_OPEN) {
+ printk("wext: open\n");
+ ifsta->auth_alg = WLAN_AUTH_OPEN;
+ }
+ else if (erq->flags & IW_ENCODE_RESTRICTED) {
+ printk("wext: shared key\n");
+ ifsta->auth_alg = WLAN_AUTH_SHARED_KEY;
+ }
+ }
+
if (erq->flags & IW_ENCODE_DISABLED)
remove = 1;
else if (erq->length == 0) {
--
1.5.6.4
next reply other threads:[~2008-09-15 15:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 15:47 Ortwin Glück [this message]
2008-09-15 15:49 ` [PATCH 1/2] mac80211: Support iwconfig enc restricted with WEP Johannes Berg
2008-09-15 15:56 ` Johannes Berg
2008-09-15 16:06 ` Johannes Berg
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=48CE837E.2010109@odi.ch \
--to=odi@odi.ch \
--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