diff options
| author | Michael Biebl <biebl@debian.org> | 2026-07-03 19:53:23 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2026-07-03 19:53:23 +0200 |
| commit | aa308069bebf2d5a3200728caa69a76137c03d8b (patch) | |
| tree | c0ba2281e801c4720a0d8a5e5ee943688234f088 /src/libnm-client-impl/nm-access-point.c | |
| parent | 0a4b2c29da4ccf259bbcea3298d15abebb94348f (diff) | |
| parent | 537bfce2bda471c92caabd388589230200891509 (diff) | |
Update upstream source from tag 'upstream/1.58_rc1'
Update to upstream version '1.58~rc1' with Debian dir 451489c9234e2b6b7c2f41ca6670287ea3ac3efd
Diffstat (limited to 'src/libnm-client-impl/nm-access-point.c')
| -rw-r--r-- | src/libnm-client-impl/nm-access-point.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libnm-client-impl/nm-access-point.c b/src/libnm-client-impl/nm-access-point.c index a06bee48..28f190de 100644 --- a/src/libnm-client-impl/nm-access-point.c +++ b/src/libnm-client-impl/nm-access-point.c @@ -18,6 +18,7 @@ #include "nm-dbus-interface.h" #include "nm-object-private.h" +#include "libnm-core-aux-intern/nm-libnm-core-utils.h" /*****************************************************************************/ @@ -338,11 +339,14 @@ nm_access_point_connection_valid(NMAccessPoint *ap, NMConnection *connection) ap_freq = nm_access_point_get_frequency(ap); if (ap_freq) { setting_band = nm_setting_wireless_get_band(s_wifi); - if (g_strcmp0(setting_band, "a") == 0) { - if (ap_freq < 4915 || ap_freq > 5825) + if (nm_streq0(setting_band, "a")) { + if (ap_freq < _NM_WIFI_FREQ_MIN_5GHZ || ap_freq > _NM_WIFI_FREQ_MAX_5GHZ) return FALSE; - } else if (g_strcmp0(setting_band, "bg") == 0) { - if (ap_freq < 2412 || ap_freq > 2484) + } else if (nm_streq0(setting_band, "bg")) { + if (ap_freq < _NM_WIFI_FREQ_MIN_2GHZ || ap_freq > _NM_WIFI_FREQ_MAX_2GHZ) + return FALSE; + } else if (nm_streq0(setting_band, "6GHz")) { + if (ap_freq < _NM_WIFI_FREQ_MIN_6GHZ || ap_freq > _NM_WIFI_FREQ_MAX_6GHZ) return FALSE; } |