aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_ioctl.c')
-rw-r--r--net/mac80211/ieee80211_ioctl.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 6caa3ec2cff7..7027eed4d4ae 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -917,7 +917,6 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
917 struct iw_request_info *info, 917 struct iw_request_info *info,
918 struct iw_param *data, char *extra) 918 struct iw_param *data, char *extra)
919{ 919{
920 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
921 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 920 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
922 int ret = 0; 921 int ret = 0;
923 922
@@ -927,18 +926,21 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
927 case IW_AUTH_CIPHER_GROUP: 926 case IW_AUTH_CIPHER_GROUP:
928 case IW_AUTH_WPA_ENABLED: 927 case IW_AUTH_WPA_ENABLED:
929 case IW_AUTH_RX_UNENCRYPTED_EAPOL: 928 case IW_AUTH_RX_UNENCRYPTED_EAPOL:
930 break;
931 case IW_AUTH_KEY_MGMT: 929 case IW_AUTH_KEY_MGMT:
930 break;
931 case IW_AUTH_PRIVACY_INVOKED:
932 if (sdata->type != IEEE80211_IF_TYPE_STA) 932 if (sdata->type != IEEE80211_IF_TYPE_STA)
933 ret = -EINVAL; 933 ret = -EINVAL;
934 else { 934 else {
935 sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
935 /* 936 /*
936 * Key management was set by wpa_supplicant, 937 * Privacy invoked by wpa_supplicant, store the
937 * we only need this to associate to a network 938 * value and allow associating to a protected
938 * that has privacy enabled regardless of not 939 * network without having a key up front.
939 * having a key.
940 */ 940 */
941 sdata->u.sta.key_management_enabled = !!data->value; 941 if (data->value)
942 sdata->u.sta.flags |=
943 IEEE80211_STA_PRIVACY_INVOKED;
942 } 944 }
943 break; 945 break;
944 case IW_AUTH_80211_AUTH_ALG: 946 case IW_AUTH_80211_AUTH_ALG:
@@ -948,11 +950,6 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
948 else 950 else
949 ret = -EOPNOTSUPP; 951 ret = -EOPNOTSUPP;
950 break; 952 break;
951 case IW_AUTH_PRIVACY_INVOKED:
952 if (local->ops->set_privacy_invoked)
953 ret = local->ops->set_privacy_invoked(
954 local_to_hw(local), data->value);
955 break;
956 default: 953 default:
957 ret = -EOPNOTSUPP; 954 ret = -EOPNOTSUPP;
958 break; 955 break;