mac80211_hwsim: Support boottime in scan results

This makes the age information for cfg80211 scan results more accurate
and fixes issues with wpa_supplicant dropping "old" scan results (e.g.,
"wlan0: Own scan request started a scan in 0.000456 seconds") that
looked like would have been received before a scan started due to the
inaccuracy of the default timing mechanism for calculating the BSS entry
age. This makes hwsim test cases significantly more robust to run.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Jouni Malinen 2019-02-02 01:16:31 +02:00 коммит произвёл Johannes Berg
Родитель bf2fa12593
Коммит 341203e789
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -1273,10 +1273,12 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
* probably doesn't really matter.
*/
if (ieee80211_is_beacon(hdr->frame_control) ||
ieee80211_is_probe_resp(hdr->frame_control))
ieee80211_is_probe_resp(hdr->frame_control)) {
rx_status.boottime_ns = ktime_get_boot_ns();
now = data->abs_bcn_ts;
else
} else {
now = mac80211_hwsim_get_tsf_raw();
}
/* Copy skb to all enabled radios that are on the current frequency */
spin_lock(&hwsim_radio_lock);