diff options
Diffstat (limited to 'net/wireless/wext-sme.c')
-rw-r--r-- | net/wireless/wext-sme.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index fe1a53639122..907470063f22 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c | |||
@@ -15,6 +15,7 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev, | |||
15 | struct wireless_dev *wdev) | 15 | struct wireless_dev *wdev) |
16 | { | 16 | { |
17 | struct cfg80211_cached_keys *ck = NULL; | 17 | struct cfg80211_cached_keys *ck = NULL; |
18 | const u8 *prev_bssid = NULL; | ||
18 | int err, i; | 19 | int err, i; |
19 | 20 | ||
20 | ASSERT_RDEV_LOCK(rdev); | 21 | ASSERT_RDEV_LOCK(rdev); |
@@ -42,8 +43,12 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev, | |||
42 | for (i = 0; i < 6; i++) | 43 | for (i = 0; i < 6; i++) |
43 | ck->params[i].key = ck->data[i]; | 44 | ck->params[i].key = ck->data[i]; |
44 | } | 45 | } |
46 | |||
47 | if (wdev->wext.prev_bssid_valid) | ||
48 | prev_bssid = wdev->wext.prev_bssid; | ||
49 | |||
45 | err = __cfg80211_connect(rdev, wdev->netdev, | 50 | err = __cfg80211_connect(rdev, wdev->netdev, |
46 | &wdev->wext.connect, ck); | 51 | &wdev->wext.connect, ck, prev_bssid); |
47 | if (err) | 52 | if (err) |
48 | kfree(ck); | 53 | kfree(ck); |
49 | 54 | ||
@@ -184,6 +189,7 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev, | |||
184 | goto out; | 189 | goto out; |
185 | } | 190 | } |
186 | 191 | ||
192 | wdev->wext.prev_bssid_valid = false; | ||
187 | wdev->wext.connect.ssid = wdev->wext.ssid; | 193 | wdev->wext.connect.ssid = wdev->wext.ssid; |
188 | memcpy(wdev->wext.ssid, ssid, len); | 194 | memcpy(wdev->wext.ssid, ssid, len); |
189 | wdev->wext.connect.ssid_len = len; | 195 | wdev->wext.connect.ssid_len = len; |