Skip to content

Commit 341203e

Browse files
jmalinenjmberg-intel
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent bf2fa12 commit 341203e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/wireless/mac80211_hwsim.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,10 +1273,12 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
12731273
* probably doesn't really matter.
12741274
*/
12751275
if (ieee80211_is_beacon(hdr->frame_control) ||
1276-
ieee80211_is_probe_resp(hdr->frame_control))
1276+
ieee80211_is_probe_resp(hdr->frame_control)) {
1277+
rx_status.boottime_ns = ktime_get_boot_ns();
12771278
now = data->abs_bcn_ts;
1278-
else
1279+
} else {
12791280
now = mac80211_hwsim_get_tsf_raw();
1281+
}
12801282

12811283
/* Copy skb to all enabled radios that are on the current frequency */
12821284
spin_lock(&hwsim_radio_lock);

0 commit comments

Comments
 (0)