intel_idle: native hardware cpuidle driver for latest Intel processors
[safe/jmp/linux-2.6] / net / wireless / wext-sme.c
index 53c6ba9..d5c6140 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
+#include <linux/slab.h>
 #include <net/cfg80211.h>
 #include "wext-compat.h"
 #include "nl80211.h"
@@ -30,7 +31,8 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
        if (wdev->wext.keys) {
                wdev->wext.keys->def = wdev->wext.default_key;
                wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;
-               wdev->wext.connect.privacy = true;
+               if (wdev->wext.default_key != -1)
+                       wdev->wext.connect.privacy = true;
        }
 
        if (!wdev->wext.connect.ssid_len)