Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9fcc4f2 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by John W. Linville
Browse files

mac80211: update the authentication method



This patch updates the authentication method upon giwencode ioctl.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fa6adfe9
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;
}