From 9cdfbde46e6fd333aeb151621c9b76dbf795eb52 Mon Sep 17 00:00:00 2001 From: "Li-Hao Liao (Leon Liao)" Date: Tue, 4 Aug 2020 16:56:23 +0800 Subject: [PATCH] platform: add the NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE status check In some cases, the wow is not configured and the NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE is set. So, add the NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE status check. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/597 (cherry picked from commit 3ba31aad5817547058c9d04dd4f690c6bd488cb4) (cherry picked from commit 0107c1add3836d61530cb3878e5cf72b6819b2d3) --- src/platform/nm-linux-platform.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index a721fc7cfa..cc38a2d3c7 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -8106,7 +8106,10 @@ link_get_wake_on_lan (NMPlatform *platform, int ifindex) if (!wifi_data) return FALSE; - return nm_wifi_utils_get_wake_on_wlan (wifi_data) != NM_SETTING_WIRELESS_WAKE_ON_WLAN_NONE; + return !NM_IN_SET (nm_wifi_utils_get_wake_on_wlan (wifi_data), + NM_SETTING_WIRELESS_WAKE_ON_WLAN_NONE, + NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE); + } else return FALSE; }