aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index bacdf22fa472..702920134b34 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6214,6 +6214,9 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
6214 sched_scan_req->dev = dev; 6214 sched_scan_req->dev = dev;
6215 sched_scan_req->wiphy = &rdev->wiphy; 6215 sched_scan_req->wiphy = &rdev->wiphy;
6216 6216
6217 if (info->attrs[NL80211_ATTR_SOCKET_OWNER])
6218 sched_scan_req->owner_nlportid = info->snd_portid;
6219
6217 rcu_assign_pointer(rdev->sched_scan_req, sched_scan_req); 6220 rcu_assign_pointer(rdev->sched_scan_req, sched_scan_req);
6218 6221
6219 nl80211_send_sched_scan(rdev, dev, 6222 nl80211_send_sched_scan(rdev, dev,
@@ -12618,6 +12621,13 @@ static int nl80211_netlink_notify(struct notifier_block * nb,
12618 12621
12619 list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) { 12622 list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) {
12620 bool schedule_destroy_work = false; 12623 bool schedule_destroy_work = false;
12624 bool schedule_scan_stop = false;
12625 struct cfg80211_sched_scan_request *sched_scan_req =
12626 rcu_dereference(rdev->sched_scan_req);
12627
12628 if (sched_scan_req && notify->portid &&
12629 sched_scan_req->owner_nlportid == notify->portid)
12630 schedule_scan_stop = true;
12621 12631
12622 list_for_each_entry_rcu(wdev, &rdev->wdev_list, list) { 12632 list_for_each_entry_rcu(wdev, &rdev->wdev_list, list) {
12623 cfg80211_mlme_unregister_socket(wdev, notify->portid); 12633 cfg80211_mlme_unregister_socket(wdev, notify->portid);
@@ -12648,6 +12658,12 @@ static int nl80211_netlink_notify(struct notifier_block * nb,
12648 spin_unlock(&rdev->destroy_list_lock); 12658 spin_unlock(&rdev->destroy_list_lock);
12649 schedule_work(&rdev->destroy_work); 12659 schedule_work(&rdev->destroy_work);
12650 } 12660 }
12661 } else if (schedule_scan_stop) {
12662 sched_scan_req->owner_nlportid = 0;
12663
12664 if (rdev->ops->sched_scan_stop &&
12665 rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN)
12666 schedule_work(&rdev->sched_scan_stop_wk);
12651 } 12667 }
12652 } 12668 }
12653 12669