aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-11-03 09:11:10 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-11-11 01:01:25 -0500
commit5b98b1f7daf6d52ccc446486aca0b8bc9a588b2c (patch)
tree47d80c61cdebd35ebb8d9b0e577a0e5fd334cde1 /net/mac80211/ieee80211_ioctl.c
parent56db6c52bb61509c114b9f1b1eecc7461229770a (diff)
mac80211: use IW_AUTH_PRIVACY_INVOKED rather than IW_AUTH_KEY_MGMT
In the long bug-hunt for why dynamic WEP networks didn't work it turned out that mac80211 incorrectly uses IW_AUTH_KEY_MGMT while it should use IW_AUTH_PRIVACY_INVOKED to determine whether to associate to protected networks or not. This patch changes the behaviour to be that way and clarifies the existing code. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_ioctl.c')
-rw-r--r--net/mac80211/ieee80211_ioctl.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 3645660a364a..7027eed4d4ae 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -926,19 +926,21 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
926 case IW_AUTH_CIPHER_GROUP: 926 case IW_AUTH_CIPHER_GROUP:
927 case IW_AUTH_WPA_ENABLED: 927 case IW_AUTH_WPA_ENABLED:
928 case IW_AUTH_RX_UNENCRYPTED_EAPOL: 928 case IW_AUTH_RX_UNENCRYPTED_EAPOL:
929 case IW_AUTH_PRIVACY_INVOKED:
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: