]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Mark HT disabled on channel switch to a 6 GHz channel
authorHarish Rachakonda <quic_rachakon@quicinc.com>
Fri, 21 Feb 2025 10:05:34 +0000 (15:35 +0530)
committerJouni Malinen <j@w1.fi>
Sun, 23 Feb 2025 16:12:29 +0000 (18:12 +0200)
During channel switch processing ht_enabled was left enabled for 6 GHz
channels since those cases do not use NL80211_CHAN_NO_HT. This would
show incorrect channel information in the STATUS control interface
command.

Fix this by clearing ht_enabled when a channel switch event is
indicating a switch to a 6 GHz channel.

Signed-off-by: Harish Rachakonda <quic_rachakon@quicinc.com>
src/drivers/driver_nl80211_event.c

index a58fff2022128eb6a1dfc5f5e686ec6f6f679fd4..cb37a500449f2292c172bb5693e85ab2292deea0 100644 (file)
@@ -1252,6 +1252,8 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
 
        os_memset(&data, 0, sizeof(data));
        data.ch_switch.freq = nla_get_u32(freq);
+       if (is_6ghz_freq(data.ch_switch.freq))
+               ht_enabled = 0;
        data.ch_switch.ht_enabled = ht_enabled;
        data.ch_switch.ch_offset = chan_offset;
        if (punct_bitmap)