]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: update the authentication method
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 24 Jun 2008 10:37:59 +0000 (13:37 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Jun 2008 13:09:19 +0000 (09:09 -0400)
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>
net/mac80211/wext.c

index 3cbaf5301d00e4cc4091178fbf76ad3a344961bb..5e76ab120cd60822e6f4096fe6c96cdc5c816334 100644 (file)
@@ -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;
 }