Skip to content

Commit

Permalink
mac80211: update the authentication method
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Jun 27, 2008
1 parent fa6adfe commit b9fcc4f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions net/mac80211/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b9fcc4f

Please sign in to comment.