diff options
author | Barak Bercovitz <barak@wizery.com> | 2013-12-05 04:21:26 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-05 11:15:38 -0500 |
commit | 24d584d70e478bf2e815135e8bf60f72685046f7 (patch) | |
tree | 211e09aaa79c1a3d3fc99e4e3dace0b5a0765e7f /net/wireless | |
parent | d1e33e654ef6bb3dee766353ed9dd31e7dcb8a94 (diff) |
cfg80211: stop sched scan only when needed
cfg80211_leave stops sched scan when any station vif
is leaving. Add an explicit check and call it only
when the relevant vif (the one we scan on) is leaving.
Signed-off-by: Barak Bercovitz <barak@wizery.com>
[Eliad - changed the commit message a bit]
Signed-off-by: Eliad Peller <eliad@wizery.com>
[Johannes - add ASSERT_RTNL since that protects the pointer]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index fc968c861ee4..c0443558b7bf 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -756,13 +756,16 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev, | |||
756 | { | 756 | { |
757 | struct net_device *dev = wdev->netdev; | 757 | struct net_device *dev = wdev->netdev; |
758 | 758 | ||
759 | ASSERT_RTNL(); | ||
760 | |||
759 | switch (wdev->iftype) { | 761 | switch (wdev->iftype) { |
760 | case NL80211_IFTYPE_ADHOC: | 762 | case NL80211_IFTYPE_ADHOC: |
761 | cfg80211_leave_ibss(rdev, dev, true); | 763 | cfg80211_leave_ibss(rdev, dev, true); |
762 | break; | 764 | break; |
763 | case NL80211_IFTYPE_P2P_CLIENT: | 765 | case NL80211_IFTYPE_P2P_CLIENT: |
764 | case NL80211_IFTYPE_STATION: | 766 | case NL80211_IFTYPE_STATION: |
765 | __cfg80211_stop_sched_scan(rdev, false); | 767 | if (rdev->sched_scan_req && dev == rdev->sched_scan_req->dev) |
768 | __cfg80211_stop_sched_scan(rdev, false); | ||
766 | 769 | ||
767 | wdev_lock(wdev); | 770 | wdev_lock(wdev); |
768 | #ifdef CONFIG_CFG80211_WEXT | 771 | #ifdef CONFIG_CFG80211_WEXT |