mac80211: don't clear sched_scan_sdata on sched scan stop request
authorEliad Peller <eliad@wizery.com>
Sun, 29 Jul 2012 13:25:10 +0000 (16:25 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 30 Jul 2012 07:14:36 +0000 (09:14 +0200)
ieee80211_request_sched_scan_stop() cleared
local->sched_scan_sdata. However, sched_scan_sdata
should be cleared only after the driver calls
ieee80211_sched_scan_stopped() (like with normal hw scan).

Clearing sched_scan_sdata too early caused
ieee80211_sched_scan_stopped_work to exit prematurely
without properly cleaning all the sched scan resources
and without calling cfg80211_sched_scan_stopped (so
userspace wasn't notified about sched scan completion).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/scan.c

index df36280ed78fd06e5cb7799c8cc46be275d42df1..839dd9737989ec78bbb979c814953b1bdd0187a8 100644 (file)
@@ -984,7 +984,6 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata)
                        kfree(local->sched_scan_ies.ie[i]);
 
                drv_sched_scan_stop(local, sdata);
-               rcu_assign_pointer(local->sched_scan_sdata, NULL);
        }
 out:
        mutex_unlock(&local->mtx);