]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix uses_6ghz flag
authorMatthew Wang <matthewmwang@chromium.org>
Fri, 2 Jun 2023 22:15:09 +0000 (15:15 -0700)
committerJouni Malinen <j@w1.fi>
Tue, 31 Oct 2023 10:01:26 +0000 (12:01 +0200)
Presence of any 6ghz channels indicates nl80211 driver 6 GHz support,
not non-DISABLED channels. This increases the timeout for scan
completion for cases where 6 GHz might get scanned even if all the
channel there are currently DISABLED.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
src/drivers/driver_nl80211_capa.c

index 8ec01c866a19619f4959f8c4da9b647651489fef..1658da697b012e639b19a4d2f2a44c883fc9d9a6 100644 (file)
@@ -2560,8 +2560,7 @@ static void nl80211_dump_chan_list(struct wpa_driver_nl80211_data *drv,
                for (j = 0; j < mode->num_channels; j++) {
                        struct hostapd_channel_data *chan = &mode->channels[j];
 
-                       if (chan->freq >= 5925 && chan->freq <= 7125 &&
-                           !(chan->flag & HOSTAPD_CHAN_DISABLED))
+                       if (is_6ghz_freq(chan->freq))
                                drv->uses_6ghz = true;
                        res = os_snprintf(pos, end - pos, " %d%s%s%s",
                                          chan->freq,