summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-10-17 12:13:49 +0200
committerThomas Haller <thaller@redhat.com>2018-10-17 15:06:52 +0200
commite6523fbbbcbf348a803cb202e433f9b7eb1ffe91 (patch)
tree030c6ea0e86700a3bfd3814cc39c1438dc9c8825
parentc37b028abad9105525a5f12dd833fe6592cd0b95 (diff)
downloadNetworkManager-e6523fbbbcbf348a803cb202e433f9b7eb1ffe91.tar.gz
core/trivial: add code comment for NMDeviceCheckDevAvailableFlags and NMDeviceCheckConAvailableFlags
-rw-r--r--src/devices/nm-device.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
index 199ef51b0b..bd7af87fd6 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -168,9 +168,21 @@ typedef enum NMActStageReturn NMActStageReturn;
typedef enum { /*< skip >*/
NM_DEVICE_CHECK_CON_AVAILABLE_NONE = 0,
+ /* since NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST is a collection of flags with more fine grained
+ * parts, this flag in general indicates that this is a user-request. */
_NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST = (1L << 0),
+
+ /* we also consider devices which have no carrier but are still waiting for the driver
+ * to detect carrier. Usually, such devices are not yet available, however for a user-request
+ * they are. They might fail later if carrier doesn't come. */
_NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_WAITING_CARRIER = (1L << 1),
+
+ /* usually, a profile is only available if the Wi-Fi AP is in range. For an
+ * explicit user request, we also consider profiles for APs that are not (yet)
+ * visible. */
_NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_IGNORE_AP = (1L << 2),
+
+ /* a collection of flags, that are commonly set for an explict user-request. */
NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST = _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST
| _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_WAITING_CARRIER
| _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_IGNORE_AP,
@@ -191,7 +203,12 @@ struct _NMDevice {
typedef enum { /*< skip >*/
NM_DEVICE_CHECK_DEV_AVAILABLE_NONE = 0,
+ /* the device is considered available, even if it has no carrier.
+ *
+ * For various device types (software devices) we ignore carrier based
+ * on the type. So, for them, this flag has no effect anyway. */
_NM_DEVICE_CHECK_DEV_AVAILABLE_IGNORE_CARRIER = (1L << 0),
+
NM_DEVICE_CHECK_DEV_AVAILABLE_FOR_USER_REQUEST = _NM_DEVICE_CHECK_DEV_AVAILABLE_IGNORE_CARRIER,
NM_DEVICE_CHECK_DEV_AVAILABLE_ALL = (1L << 1) - 1,