In case of performing hw scan and not abort it __ieee80211_scan_completed() is currently called from scan work, so does not need to reschedule work to call drv_hw_scan(). Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> --- net/mac80211/scan.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 2e9a70c..cf60f20 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -270,9 +270,9 @@ static bool __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted, return false; if (was_hw_scan && !aborted && ieee80211_prep_hw_scan(local)) { - ieee80211_queue_delayed_work(&local->hw, - &local->scan_work, 0); - return false; + int rc = drv_hw_scan(local, local->scan_sdata, local->hw_scan_req); + if (rc == 0) + return false; } kfree(local->hw_scan_req); @@ -660,11 +660,6 @@ void ieee80211_scan_work(struct work_struct *work) return; } - if (local->hw_scan_req) { - rc = drv_hw_scan(local, sdata, local->hw_scan_req); - goto out_complete; - } - if (local->scan_req && !local->scanning) { struct cfg80211_scan_request *req = local->scan_req; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html