From 8ca7433a14be8154afe96fa8ddff8fddddd23aad Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Fri, 22 Mar 2024 10:05:33 +0100
Subject: [PATCH] wifi: fix the ranges of 5 GHz and 6 GHz bands

The 6 GHz band starts from frequency 5950, anything below is 5 GHz.
---
 src/libnm-platform/wifi/nm-wifi-utils-nl80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c b/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c
index 6109849a69..3b90d180ae 100644
--- a/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c
+++ b/src/libnm-platform/wifi/nm-wifi-utils-nl80211.c
@@ -698,9 +698,9 @@ nl80211_wiphy_info_handler(const struct nl_msg *msg, void *arg)
 
             if (f->freq >= 2401 && f->freq <= 2495)
                 info->caps |= _NM_WIFI_DEVICE_CAP_FREQ_2GHZ;
-            if (f->freq >= 5150 && f->freq <= 5895)
+            if (f->freq >= 5150 && f->freq < 5950)
                 info->caps |= _NM_WIFI_DEVICE_CAP_FREQ_5GHZ;
-            if (f->freq >= 5925 && f->freq <= 7125)
+            if (f->freq >= 5950 && f->freq <= 7125)
                 info->caps |= _NM_WIFI_DEVICE_CAP_FREQ_6GHZ;
 
             info->num_freqs++;
-- 
2.43.0

