(This part should fix the problem, described in https://lists.freebsd.org/pipermail/freebsd-wireless/2016-January/006420.html)
- 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).