From 17615fbc2b1b7d16557bc2af29b4409cf653a06a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 28 Apr 2020 14:56:06 +0200 Subject: [PATCH] wifi: express SCAN_RAND_MAC_ADDRESS_EXPIRE time in seconds We commonly use already seconds and milliseconds scales for computing timeouts. Reduce the number of difference scales and don't also use minutes. (cherry picked from commit f6e438860bdb03166bbf38d61e115e960e5c60c7) --- src/devices/wifi/nm-device-wifi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 8aee27f4ce..f14e2b25e7 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -48,7 +48,7 @@ _LOG_DECLARE_SELF(NMDeviceWifi); #define SCAN_INTERVAL_SEC_STEP 20 #define SCAN_INTERVAL_SEC_MAX 120 -#define SCAN_RAND_MAC_ADDRESS_EXPIRE_MIN 5 +#define SCAN_RAND_MAC_ADDRESS_EXPIRE_SEC (5*60) /*****************************************************************************/ @@ -1169,7 +1169,7 @@ _hw_addr_set_scanning (NMDeviceWifi *self, gboolean do_reset) * We don't bother with to update the MAC address exactly when * it expires, instead on the next scan request, we will generate * a new one.*/ - priv->hw_addr_scan_expire = now + (SCAN_RAND_MAC_ADDRESS_EXPIRE_MIN * 60); + priv->hw_addr_scan_expire = now + SCAN_RAND_MAC_ADDRESS_EXPIRE_SEC; generate_mac_address_mask = nm_config_data_get_device_config (NM_CONFIG_GET_DATA, "wifi.scan-generate-mac-address-mask",