Commit 4be3bd8ccc195297870b9ffca4ef18bcbc2f1822

Authored by Johannes Berg
Committed by John W. Linville
1 parent 33de4f9d78

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>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

net/wireless/wext-sme.c
... ... @@ -30,7 +30,8 @@
30 30 if (wdev->wext.keys) {
31 31 wdev->wext.keys->def = wdev->wext.default_key;
32 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 37 if (!wdev->wext.connect.ssid_len)