aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-06-24 06:37:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-27 09:09:19 -0400
commitb9fcc4f2987a757acb3af43aa31dc860bb957970 (patch)
treebe53fae0069f4540b80d38cb5020a6ac129ca3a4 /net/mac80211
parentfa6adfe9e625a6a843a1abed5f4e7a000c11952c (diff)
mac80211: update the authentication method
This patch updates the authentication method upon giwencode ioctl. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/wext.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 3cbaf5301d00..5e76ab120cd6 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -952,6 +952,19 @@ static int ieee80211_ioctl_giwencode(struct net_device *dev,
952 erq->length = sdata->keys[idx]->conf.keylen; 952 erq->length = sdata->keys[idx]->conf.keylen;
953 erq->flags |= IW_ENCODE_ENABLED; 953 erq->flags |= IW_ENCODE_ENABLED;
954 954
955 if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
956 struct ieee80211_if_sta *ifsta = &sdata->u.sta;
957 switch (ifsta->auth_alg) {
958 case WLAN_AUTH_OPEN:
959 case WLAN_AUTH_LEAP:
960 erq->flags |= IW_ENCODE_OPEN;
961 break;
962 case WLAN_AUTH_SHARED_KEY:
963 erq->flags |= IW_ENCODE_RESTRICTED;
964 break;
965 }
966 }
967
955 return 0; 968 return 0;
956} 969}
957 970