net80211: split scan_task() (#3) (into scan_start() and


net80211: split scan_task() (#3) (into scan_start() and
scan_curchan_task() functions)

(This part should fix the problem, described in

  • Rename ss_scan_task into ss_scan_start (better describes it's

current purpose)

  • Utilize taskqueue_*_timeout() functions instead of current mechanism:
    • reschedule scan_curchan_task() via taskqueue_enqueue_timeout()

for every 'maxdwell' msecs (will replace infinite loop + sleeping
for 'maxdwell' period via cv_wait());

  • rerun the task immediately when an external event occurs

(instead of waking it up via cv_signal())

Also, use mtx_sleep() to wait for null frame transmission
(allows to drop conditional variable).

Tested with:

  • Intel 3945BG, STA mode;
  • RTL8188EU, STA mode.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5145