diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-09-24 03:00:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-28 16:55:04 -0400 |
commit | 4be3bd8ccc195297870b9ffca4ef18bcbc2f1822 (patch) | |
tree | d8a1bed71b9b1dfb4f017494378c80a02eda6ea9 /net/wireless/wext-sme.c | |
parent | 33de4f9d787e01646f715ac10c2699fb98fd479e (diff) |
cfg80211: don't set privacy w/o key
When wpa_supplicant is used to connect to open networks,
it causes the wdev->wext.keys to point to key memory, but
that key memory is all empty. Only use privacy when there
is a default key to be used.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/wext-sme.c')
-rw-r--r-- | net/wireless/wext-sme.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index 53c6ba98dc25..5615a8802536 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c | |||
@@ -30,7 +30,8 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev, | |||
30 | if (wdev->wext.keys) { | 30 | if (wdev->wext.keys) { |
31 | wdev->wext.keys->def = wdev->wext.default_key; | 31 | wdev->wext.keys->def = wdev->wext.default_key; |
32 | wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key; | 32 | wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key; |
33 | wdev->wext.connect.privacy = true; | 33 | if (wdev->wext.default_key != -1) |
34 | wdev->wext.connect.privacy = true; | ||
34 | } | 35 | } |
35 | 36 | ||
36 | if (!wdev->wext.connect.ssid_len) | 37 | if (!wdev->wext.connect.ssid_len) |