diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2010-10-06 05:22:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-06 16:30:42 -0400 |
commit | 6eb11a9a311a0f7e5b9b66c18f7498a26c9ec206 (patch) | |
tree | d65e943dc4e3099c84968fed00451bd118a0470d /net/mac80211 | |
parent | 4136c4224ccf1907d309e1cdfaefef9da97dbc5e (diff) |
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: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/scan.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 4dbef714d946..9aab921f7ca8 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -269,9 +269,9 @@ static bool __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted, | |||
269 | return false; | 269 | return false; |
270 | 270 | ||
271 | if (was_hw_scan && !aborted && ieee80211_prep_hw_scan(local)) { | 271 | if (was_hw_scan && !aborted && ieee80211_prep_hw_scan(local)) { |
272 | ieee80211_queue_delayed_work(&local->hw, | 272 | int rc = drv_hw_scan(local, local->scan_sdata, local->hw_scan_req); |
273 | &local->scan_work, 0); | 273 | if (rc == 0) |
274 | return false; | 274 | return false; |
275 | } | 275 | } |
276 | 276 | ||
277 | kfree(local->hw_scan_req); | 277 | kfree(local->hw_scan_req); |
@@ -656,15 +656,6 @@ void ieee80211_scan_work(struct work_struct *work) | |||
656 | if (!sdata || !local->scan_req) | 656 | if (!sdata || !local->scan_req) |
657 | goto out; | 657 | goto out; |
658 | 658 | ||
659 | if (local->hw_scan_req) { | ||
660 | int rc = drv_hw_scan(local, sdata, local->hw_scan_req); | ||
661 | if (rc) { | ||
662 | aborted = true; | ||
663 | goto out_complete; | ||
664 | } else | ||
665 | goto out; | ||
666 | } | ||
667 | |||
668 | if (local->scan_req && !local->scanning) { | 659 | if (local->scan_req && !local->scanning) { |
669 | struct cfg80211_scan_request *req = local->scan_req; | 660 | struct cfg80211_scan_request *req = local->scan_req; |
670 | int rc; | 661 | int rc; |