aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/sme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r--net/wireless/sme.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index f2431e41a373..f432bd3755b1 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -192,7 +192,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev)
192 prev_bssid, 192 prev_bssid,
193 params->ssid, params->ssid_len, 193 params->ssid, params->ssid_len,
194 params->ie, params->ie_len, 194 params->ie, params->ie_len,
195 false, &params->crypto, 195 params->mfp != NL80211_MFP_NO,
196 &params->crypto,
196 params->flags, &params->ht_capa, 197 params->flags, &params->ht_capa,
197 &params->ht_capa_mask); 198 &params->ht_capa_mask);
198 if (err) 199 if (err)
@@ -300,7 +301,7 @@ static void __cfg80211_sme_scan_done(struct net_device *dev)
300 301
301 bss = cfg80211_get_conn_bss(wdev); 302 bss = cfg80211_get_conn_bss(wdev);
302 if (bss) { 303 if (bss) {
303 cfg80211_put_bss(bss); 304 cfg80211_put_bss(&rdev->wiphy, bss);
304 } else { 305 } else {
305 /* not found */ 306 /* not found */
306 if (wdev->conn->state == CFG80211_CONN_SCAN_AGAIN) 307 if (wdev->conn->state == CFG80211_CONN_SCAN_AGAIN)
@@ -463,7 +464,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
463 464
464 if (wdev->current_bss) { 465 if (wdev->current_bss) {
465 cfg80211_unhold_bss(wdev->current_bss); 466 cfg80211_unhold_bss(wdev->current_bss);
466 cfg80211_put_bss(&wdev->current_bss->pub); 467 cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub);
467 wdev->current_bss = NULL; 468 wdev->current_bss = NULL;
468 } 469 }
469 470
@@ -479,7 +480,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
479 kfree(wdev->connect_keys); 480 kfree(wdev->connect_keys);
480 wdev->connect_keys = NULL; 481 wdev->connect_keys = NULL;
481 wdev->ssid_len = 0; 482 wdev->ssid_len = 0;
482 cfg80211_put_bss(bss); 483 cfg80211_put_bss(wdev->wiphy, bss);
483 return; 484 return;
484 } 485 }
485 486
@@ -519,10 +520,8 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
519 * - country_ie + 2, the start of the country ie data, and 520 * - country_ie + 2, the start of the country ie data, and
520 * - and country_ie[1] which is the IE length 521 * - and country_ie[1] which is the IE length
521 */ 522 */
522 regulatory_hint_11d(wdev->wiphy, 523 regulatory_hint_11d(wdev->wiphy, bss->channel->band,
523 bss->channel->band, 524 country_ie + 2, country_ie[1]);
524 country_ie + 2,
525 country_ie[1]);
526 kfree(country_ie); 525 kfree(country_ie);
527} 526}
528 527
@@ -587,7 +586,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev,
587 } 586 }
588 587
589 cfg80211_unhold_bss(wdev->current_bss); 588 cfg80211_unhold_bss(wdev->current_bss);
590 cfg80211_put_bss(&wdev->current_bss->pub); 589 cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub);
591 wdev->current_bss = NULL; 590 wdev->current_bss = NULL;
592 591
593 cfg80211_hold_bss(bss_from_pub(bss)); 592 cfg80211_hold_bss(bss_from_pub(bss));
@@ -622,7 +621,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev,
622 621
623 return; 622 return;
624out: 623out:
625 cfg80211_put_bss(bss); 624 cfg80211_put_bss(wdev->wiphy, bss);
626} 625}
627 626
628void cfg80211_roamed(struct net_device *dev, 627void cfg80211_roamed(struct net_device *dev,
@@ -664,7 +663,7 @@ void cfg80211_roamed_bss(struct net_device *dev,
664 663
665 ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp); 664 ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp);
666 if (!ev) { 665 if (!ev) {
667 cfg80211_put_bss(bss); 666 cfg80211_put_bss(wdev->wiphy, bss);
668 return; 667 return;
669 } 668 }
670 669
@@ -705,7 +704,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
705 704
706 if (wdev->current_bss) { 705 if (wdev->current_bss) {
707 cfg80211_unhold_bss(wdev->current_bss); 706 cfg80211_unhold_bss(wdev->current_bss);
708 cfg80211_put_bss(&wdev->current_bss->pub); 707 cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub);
709 } 708 }
710 709
711 wdev->current_bss = NULL; 710 wdev->current_bss = NULL;
@@ -876,7 +875,7 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev,
876 if (bss) { 875 if (bss) {
877 wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT; 876 wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT;
878 err = cfg80211_conn_do_work(wdev); 877 err = cfg80211_conn_do_work(wdev);
879 cfg80211_put_bss(bss); 878 cfg80211_put_bss(wdev->wiphy, bss);
880 } else { 879 } else {
881 /* otherwise we'll need to scan for the AP first */ 880 /* otherwise we'll need to scan for the AP first */
882 err = cfg80211_conn_scan(wdev); 881 err = cfg80211_conn_scan(wdev);