From: Hong Liu <hong.liu@intel.com>
To: Jiri Benc <jbenc@suse.cz>, "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 3/5] mac80211: fix key restricted/open display
Date: Fri, 16 Mar 2007 11:28:24 +0800 [thread overview]
Message-ID: <1174015698.3408.41.camel@devlinux-hong> (raw)
Signed-off-by: Hong Liu <hong.liu@intel.com>
---
net/mac80211/ieee80211_ioctl.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
26742fdf9c5835a0abcb75a364840beee08953f8
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index f57e48f..46fd125 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -2934,6 +2934,14 @@ static int ieee80211_ioctl_siwencode(str
else
idx--;
+ if (erq->flags & (IW_ENCODE_OPEN | IW_ENCODE_RESTRICTED))
+ if (sdata->type == IEEE80211_IF_TYPE_STA ||
+ sdata->type == IEEE80211_IF_TYPE_IBSS)
+ sdata->u.sta.auth_algs =
+ (erq->flags & IW_ENCODE_RESTRICTED) ?
+ IEEE80211_AUTH_ALG_SHARED_KEY :
+ IEEE80211_AUTH_ALG_OPEN;
+
if (erq->flags & IW_ENCODE_DISABLED)
alg = ALG_NONE;
else if (erq->length == 0) {
@@ -2993,6 +3001,14 @@ static int ieee80211_ioctl_giwencode(str
erq->length = sdata->keys[idx]->keylen;
erq->flags |= IW_ENCODE_ENABLED;
+ if (sdata->type == IEEE80211_IF_TYPE_STA ||
+ sdata->type == IEEE80211_IF_TYPE_IBSS) {
+ if (sdata->u.sta.auth_algs & IEEE80211_AUTH_ALG_OPEN)
+ erq->flags |= IW_ENCODE_OPEN;
+ else if (sdata->u.sta.auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY)
+ erq->flags |= IW_ENCODE_RESTRICTED;
+ }
+
return 0;
}
--
1.3.3
next reply other threads:[~2007-03-16 3:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 3:28 Hong Liu [this message]
2007-03-16 17:28 ` [PATCH 3/5] mac80211: fix key restricted/open display Michael Wu
2007-03-17 3:46 ` Dan Williams
2007-03-17 3:57 ` Michael Wu
2007-03-17 4:38 ` Dan Williams
2007-03-17 4:57 ` Michael Wu
2007-03-17 17:23 ` Dan Williams
2007-03-18 16:45 ` Jouni Malinen
2007-03-18 23:35 ` Dan Williams
2007-03-22 3:43 ` Hong Liu
2007-03-23 18:27 ` Jiri Benc
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=1174015698.3408.41.camel@devlinux-hong \
--to=hong.liu@intel.com \
--cc=jbenc@suse.cz \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.