diff options
author | Barak Bercovitz <barak@wizery.com> | 2013-12-05 11:21:26 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-05 17:15:38 +0100 |
commit | 24d584d70e478bf2e815135e8bf60f72685046f7 (patch) | |
tree | 211e09aaa79c1a3d3fc99e4e3dace0b5a0765e7f /net/wireless/core.c | |
parent | d1e33e654ef6bb3dee766353ed9dd31e7dcb8a94 (diff) | |
download | op-kernel-dev-24d584d70e478bf2e815135e8bf60f72685046f7.zip op-kernel-dev-24d584d70e478bf2e815135e8bf60f72685046f7.tar.gz |
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/core.c')
-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 fc968c8..c044355 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -756,13 +756,16 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev, { struct net_device *dev = wdev->netdev; + ASSERT_RTNL(); + switch (wdev->iftype) { case NL80211_IFTYPE_ADHOC: cfg80211_leave_ibss(rdev, dev, true); break; case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_STATION: - __cfg80211_stop_sched_scan(rdev, false); + if (rdev->sched_scan_req && dev == rdev->sched_scan_req->dev) + __cfg80211_stop_sched_scan(rdev, false); wdev_lock(wdev); #ifdef CONFIG_CFG80211_WEXT |