Someone may continuously see CTRL-EVENT-SCAN-FAILED and not be able to connect to an AP
when directly using wpa_supplicant(8) in the command line, and someone specifies
ifconfig_wlan0="WPA in /etc/rc.conf will not encounter this problem because commit 5fcdc19a81115 and d06d7eb09131 use a weird way to address the problem. Even though the weird way may not
successfully connect to AP every time.
The problem is that wpa_supplicant fail to request scan since net80211(4) has already
fired a scan, and sometimes it will continue to be issued by net80211, and never
end (see D38508).
I have added a timer in wpa_driver_ops::scan2() when scan request fails, so wpa_supplicant
will get EVENT_SCAN_RESULTS and call wpa_driver_ops::get_scan_results2() for scan results
when a timeout occurs.
This patch is just for testing, the codes should be merged upstream (hostap.git).