summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-06-15 09:20:57 +0200
committerThomas Haller <thaller@redhat.com>2023-06-15 09:20:57 +0200
commit3a15a41d6fd628d53251ae48e9be6bf3c838c89c (patch)
tree53bb3494ee31c85f4a06a628103fd7b85441eea0
parent85fc59d0e21fe4ac766de09ad11e61b283a3dfb5 (diff)
device/trivial: rename internal identifier carrier_wait_until_ms to have _msec suffix
"_ms" isn't very clear. We should use instead suffices like _sec, _msec, _usec, _nsec. Rename.
-rw-r--r--src/core/devices/nm-device.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index c01f2faa73..144c300d84 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -91,8 +91,8 @@
#define GRACE_PERIOD_MULTIPLIER 2U
-#define CARRIER_WAIT_TIME_MS 6000
-#define CARRIER_WAIT_TIME_AFTER_MTU_MS 10000
+#define CARRIER_WAIT_TIME_MS 6000
+#define CARRIER_WAIT_TIME_AFTER_MTU_MSEC 10000
#define NM_DEVICE_AUTH_RETRIES_UNSET -1
#define NM_DEVICE_AUTH_RETRIES_INFINITY -2
@@ -553,9 +553,9 @@ typedef struct _NMDevicePrivate {
* until taking action.
*
* When changing MTU, the device might take longer then that. So, whenever
- * NM changes the MTU it sets @carrier_wait_until_ms to CARRIER_WAIT_TIME_AFTER_MTU_MS
+ * NM changes the MTU it sets @carrier_wait_until_msec to CARRIER_WAIT_TIME_AFTER_MTU_MSEC
* in the future. This is used to extend the grace period in this particular case. */
- gint64 carrier_wait_until_ms;
+ gint64 carrier_wait_until_msec;
union {
struct {
@@ -6739,7 +6739,7 @@ nm_device_set_carrier(NMDevice *self, gboolean carrier)
gint64 now_ms;
now_ms = nm_utils_get_monotonic_timestamp_msec();
- until_ms = NM_MAX(now_ms + _get_carrier_wait_ms(self), priv->carrier_wait_until_ms);
+ until_ms = NM_MAX(now_ms + _get_carrier_wait_ms(self), priv->carrier_wait_until_msec);
priv->carrier_defer_source =
nm_g_timeout_add_source(until_ms - now_ms, carrier_disconnected_action_cb, self);
_LOGD(LOGD_DEVICE,
@@ -11627,8 +11627,8 @@ _commit_mtu(NMDevice *self)
? "Are the MTU sizes of the slaves large enough?"
: "Did you configure the MTU correctly?"));
}
- priv->carrier_wait_until_ms =
- nm_utils_get_monotonic_timestamp_msec() + CARRIER_WAIT_TIME_AFTER_MTU_MS;
+ priv->carrier_wait_until_msec =
+ nm_utils_get_monotonic_timestamp_msec() + CARRIER_WAIT_TIME_AFTER_MTU_MSEC;
}
if (ip6_mtu && ip6_mtu != _IP6_MTU_SYS()) {
@@ -11657,8 +11657,8 @@ _commit_mtu(NMDevice *self)
msg ? ": " : "",
msg ?: "");
}
- priv->carrier_wait_until_ms =
- nm_utils_get_monotonic_timestamp_msec() + CARRIER_WAIT_TIME_AFTER_MTU_MS;
+ priv->carrier_wait_until_msec =
+ nm_utils_get_monotonic_timestamp_msec() + CARRIER_WAIT_TIME_AFTER_MTU_MSEC;
}
}
@@ -14367,7 +14367,7 @@ carrier_detect_wait(NMDevice *self)
nm_device_add_pending_action(self, NM_PENDING_ACTION_CARRIER_WAIT, FALSE);
now_ms = nm_utils_get_monotonic_timestamp_msec();
- until_ms = NM_MAX(now_ms + _get_carrier_wait_ms(self), priv->carrier_wait_until_ms);
+ until_ms = NM_MAX(now_ms + _get_carrier_wait_ms(self), priv->carrier_wait_until_msec);
priv->carrier_wait_source =
nm_g_timeout_add_source(until_ms - now_ms, carrier_wait_timeout, self);
}
@@ -15896,8 +15896,8 @@ nm_device_cleanup(NMDevice *self, NMDeviceStateReason reason, CleanupType cleanu
ifindex);
if (priv->mtu_initial) {
nm_platform_link_set_mtu(nm_device_get_platform(self), ifindex, priv->mtu_initial);
- priv->carrier_wait_until_ms =
- nm_utils_get_monotonic_timestamp_msec() + CARRIER_WAIT_TIME_AFTER_MTU_MS;
+ priv->carrier_wait_until_msec =
+ nm_utils_get_monotonic_timestamp_msec() + CARRIER_WAIT_TIME_AFTER_MTU_MSEC;
}
if (priv->ip6_mtu_initial) {
char sbuf[64];