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:54:03 +0200
commit0e2f08165d43daf25f3719b4876720131f7e1f59 (patch)
tree6f7f5b26070079a3c4eec0988d55ac742c2d2e2d
parent477cde3a1015870f6249051636692ea7450565fb (diff)
downloadNetworkManager-0e2f08165d43daf25f3719b4876720131f7e1f59.tar.gz
core/trivial: add code comment for NMDeviceCheckDevAvailableFlags and NMDeviceCheckConAvailableFlags
(cherry picked from commit e6523fbbbcbf348a803cb202e433f9b7eb1ffe91)
-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 6342a657b4..0d2122c1c3 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -167,9 +167,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,
@@ -190,7 +202,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,