diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-28 14:56:06 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-28 18:35:59 +0200 |
commit | f6e438860bdb03166bbf38d61e115e960e5c60c7 (patch) | |
tree | ce4d2ed3bef8101b314053fa1537c67f5c474b15 | |
parent | a7476ff082c6f1c13c46447b61360093f4aa82d1 (diff) | |
download | NetworkManager-f6e438860bdb03166bbf38d61e115e960e5c60c7.tar.gz |
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.
-rw-r--r-- | src/devices/wifi/nm-device-wifi.c | 4 |
1 files 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", |