diff options
Diffstat (limited to 'net/wireless/wext-sme.c')
-rw-r--r-- | net/wireless/wext-sme.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index bf725275eb8d..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) |
@@ -229,8 +230,7 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev, | |||
229 | data->flags = 1; | 230 | data->flags = 1; |
230 | data->length = wdev->wext.connect.ssid_len; | 231 | data->length = wdev->wext.connect.ssid_len; |
231 | memcpy(ssid, wdev->wext.connect.ssid, data->length); | 232 | memcpy(ssid, wdev->wext.connect.ssid, data->length); |
232 | } else | 233 | } |
233 | data->flags = 0; | ||
234 | wdev_unlock(wdev); | 234 | wdev_unlock(wdev); |
235 | 235 | ||
236 | return 0; | 236 | return 0; |
@@ -306,8 +306,6 @@ int cfg80211_mgd_wext_giwap(struct net_device *dev, | |||
306 | wdev_lock(wdev); | 306 | wdev_lock(wdev); |
307 | if (wdev->current_bss) | 307 | if (wdev->current_bss) |
308 | memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN); | 308 | memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN); |
309 | else if (wdev->wext.connect.bssid) | ||
310 | memcpy(ap_addr->sa_data, wdev->wext.connect.bssid, ETH_ALEN); | ||
311 | else | 309 | else |
312 | memset(ap_addr->sa_data, 0, ETH_ALEN); | 310 | memset(ap_addr->sa_data, 0, ETH_ALEN); |
313 | wdev_unlock(wdev); | 311 | wdev_unlock(wdev); |