diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-06-24 12:37:59 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-27 15:09:19 +0200 |
commit | b9fcc4f2987a757acb3af43aa31dc860bb957970 (patch) | |
tree | be53fae0069f4540b80d38cb5020a6ac129ca3a4 | |
parent | mac80211: don't return -EINVAL upon iwconfig wlan0 rts auto (diff) | |
download | linux-b9fcc4f2987a757acb3af43aa31dc860bb957970.tar.xz linux-b9fcc4f2987a757acb3af43aa31dc860bb957970.zip |
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>
-rw-r--r-- | net/mac80211/wext.c | 13 |
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, erq->length = sdata->keys[idx]->conf.keylen; erq->flags |= IW_ENCODE_ENABLED; + if (sdata->vif.type == IEEE80211_IF_TYPE_STA) { + struct ieee80211_if_sta *ifsta = &sdata->u.sta; + switch (ifsta->auth_alg) { + case WLAN_AUTH_OPEN: + case WLAN_AUTH_LEAP: + erq->flags |= IW_ENCODE_OPEN; + break; + case WLAN_AUTH_SHARED_KEY: + erq->flags |= IW_ENCODE_RESTRICTED; + break; + } + } + return 0; } |