summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libnm-core/nm-setting-wired.h10
-rw-r--r--src/devices/nm-device-ethernet.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/libnm-core/nm-setting-wired.h b/libnm-core/nm-setting-wired.h
index 172aa58a43..7eb53d3021 100644
--- a/libnm-core/nm-setting-wired.h
+++ b/libnm-core/nm-setting-wired.h
@@ -49,11 +49,13 @@ G_BEGIN_DECLS
* @NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST: Wake on broadcast messages
* @NM_SETTING_WIRED_WAKE_ON_LAN_ARP: Wake on ARP
* @NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC: Wake on magic packet
- * @NM_SETTING_WIRED_WAKE_ON_LAN_ALL: Wake on all events
+ * @NM_SETTING_WIRED_WAKE_ON_LAN_ALL: Wake on all events. This does not
+ * include the exclusive flags @NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT or
+ * @NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE.
* @NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT: Use the default value
* @NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE: Don't change configured settings
* @NM_SETTING_WIRED_WAKE_ON_LAN_EXCLUSIVE_FLAGS: Mask of flags that are
- * incompatible with other flags
+ * incompatible with other flags
*
* Options for #NMSettingWired:wake-on-lan. Note that not all options
* are supported by all devices.
@@ -70,10 +72,10 @@ typedef enum { /*< flags >*/
NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC = (1 << 6),
_NM_SETTING_WIRED_WAKE_ON_LAN_LAST_OPT, /*< skip >*/
- NM_SETTING_WIRED_WAKE_ON_LAN_ALL = ((_NM_SETTING_WIRED_WAKE_ON_LAN_LAST_OPT - 1) << 1) - NM_SETTING_WIRED_WAKE_ON_LAN_PHY, /*< skip >*/
+ NM_SETTING_WIRED_WAKE_ON_LAN_ALL = (((_NM_SETTING_WIRED_WAKE_ON_LAN_LAST_OPT - 1) << 1) - 1) - (1 << 0 /*DEFAULT*/), /*< skip >*/
NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT = (1 << 0),
- NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE = (1 << 10),
+ NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE = (1 << 15),
NM_SETTING_WIRED_WAKE_ON_LAN_EXCLUSIVE_FLAGS = NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT | NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE, /*< skip >*/
} NMSettingWiredWakeOnLan;
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index 13923dd9fd..d1202dc72f 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -1237,9 +1237,9 @@ wake_on_lan_enable (NMDevice *device)
G_MAXINT32,
NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT);
- if (NM_FLAGS_ANY (wol, NM_SETTING_WIRED_WAKE_ON_LAN_EXCLUSIVE_FLAGS)
+ if ( NM_FLAGS_ANY (wol, NM_SETTING_WIRED_WAKE_ON_LAN_EXCLUSIVE_FLAGS)
&& !nm_utils_is_power_of_two (wol)) {
- nm_log_dbg (LOGD_ETHER, "invalid default value %d for wake-on-lan", (int) wol);
+ nm_log_dbg (LOGD_ETHER, "invalid default value %u for wake-on-lan", (guint) wol);
wol = NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT;
}
if (wol != NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT)