diff options
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r-- | net/wireless/sme.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 09d994d192ff..ff6f7ae35586 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -160,7 +160,7 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev) | |||
160 | { | 160 | { |
161 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 161 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
162 | struct cfg80211_connect_params *params; | 162 | struct cfg80211_connect_params *params; |
163 | const u8 *prev_bssid = NULL; | 163 | struct cfg80211_assoc_request req = {}; |
164 | int err; | 164 | int err; |
165 | 165 | ||
166 | ASSERT_WDEV_LOCK(wdev); | 166 | ASSERT_WDEV_LOCK(wdev); |
@@ -187,16 +187,20 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev) | |||
187 | BUG_ON(!rdev->ops->assoc); | 187 | BUG_ON(!rdev->ops->assoc); |
188 | wdev->conn->state = CFG80211_CONN_ASSOCIATING; | 188 | wdev->conn->state = CFG80211_CONN_ASSOCIATING; |
189 | if (wdev->conn->prev_bssid_valid) | 189 | if (wdev->conn->prev_bssid_valid) |
190 | prev_bssid = wdev->conn->prev_bssid; | 190 | req.prev_bssid = wdev->conn->prev_bssid; |
191 | err = __cfg80211_mlme_assoc(rdev, wdev->netdev, | 191 | req.ie = params->ie; |
192 | params->channel, params->bssid, | 192 | req.ie_len = params->ie_len; |
193 | prev_bssid, | 193 | req.use_mfp = params->mfp != NL80211_MFP_NO; |
194 | params->ssid, params->ssid_len, | 194 | req.crypto = params->crypto; |
195 | params->ie, params->ie_len, | 195 | req.flags = params->flags; |
196 | params->mfp != NL80211_MFP_NO, | 196 | req.ht_capa = params->ht_capa; |
197 | ¶ms->crypto, | 197 | req.ht_capa_mask = params->ht_capa_mask; |
198 | params->flags, ¶ms->ht_capa, | 198 | req.vht_capa = params->vht_capa; |
199 | ¶ms->ht_capa_mask); | 199 | req.vht_capa_mask = params->vht_capa_mask; |
200 | |||
201 | err = __cfg80211_mlme_assoc(rdev, wdev->netdev, params->channel, | ||
202 | params->bssid, params->ssid, | ||
203 | params->ssid_len, &req); | ||
200 | if (err) | 204 | if (err) |
201 | __cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, | 205 | __cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, |
202 | NULL, 0, | 206 | NULL, 0, |