From: Emmanuel Grumbach Date: Tue, 24 Jun 2008 10:37:59 +0000 (+0300) Subject: mac80211: update the authentication method X-Git-Tag: v3.12-rc1~19957^2~255^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9fcc4f2987a757acb3af43aa31dc860bb957970;p=kernel%2Fkernel-generic.git mac80211: update the authentication method This patch updates the authentication method upon giwencode ioctl. Signed-off-by: Emmanuel Grumbach Signed-off-by: Tomas Winkler Acked-by: Johannes Berg Acked-by: Dan Williams Signed-off-by: John W. Linville --- diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 3cbaf53..5e76ab1 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; }