Commit 6eb11a9a authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville

mac80211: do not requeue scan work when not needed

When 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: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4136c422
...@@ -269,9 +269,9 @@ static bool __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted, ...@@ -269,9 +269,9 @@ static bool __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
return false; return false;
if (was_hw_scan && !aborted && ieee80211_prep_hw_scan(local)) { if (was_hw_scan && !aborted && ieee80211_prep_hw_scan(local)) {
ieee80211_queue_delayed_work(&local->hw, int rc = drv_hw_scan(local, local->scan_sdata, local->hw_scan_req);
&local->scan_work, 0); if (rc == 0)
return false; return false;
} }
kfree(local->hw_scan_req); kfree(local->hw_scan_req);
...@@ -656,15 +656,6 @@ void ieee80211_scan_work(struct work_struct *work) ...@@ -656,15 +656,6 @@ void ieee80211_scan_work(struct work_struct *work)
if (!sdata || !local->scan_req) if (!sdata || !local->scan_req)
goto out; goto out;
if (local->hw_scan_req) {
int rc = drv_hw_scan(local, sdata, local->hw_scan_req);
if (rc) {
aborted = true;
goto out_complete;
} else
goto out;
}
if (local->scan_req && !local->scanning) { if (local->scan_req && !local->scanning) {
struct cfg80211_scan_request *req = local->scan_req; struct cfg80211_scan_request *req = local->scan_req;
int rc; int rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment