about summary refs log tree commit diff
path: root/src/libnm-client-impl/nm-access-point.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2026-07-03 19:53:18 +0200
committerMichael Biebl <biebl@debian.org>2026-07-03 19:53:18 +0200
commit537bfce2bda471c92caabd388589230200891509 (patch)
treeaedeccfaf0ba52c238ecf51fc009c0db5d4b60f0 /src/libnm-client-impl/nm-access-point.c
parent869e9027026cdbb15d4e4a6327ff41d2697858eb (diff)
New upstream version 1.58~rc1 upstream/1.58_rc1
Diffstat (limited to 'src/libnm-client-impl/nm-access-point.c')
-rw-r--r--src/libnm-client-impl/nm-access-point.c12
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;
         }