]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Configure channel switch in wpa_supplicant ap_switch_channel()
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 31 Jul 2025 13:57:01 +0000 (15:57 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 6 Oct 2025 11:00:47 +0000 (14:00 +0300)
Without this the post-channel switch configuration is not stored and all
features (HT/VHT/HE/EHT) will be disabled after the switch. This fixes
P2P channel switching to still use HT after the switch as was announced.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/ap.c

index 3cb33c49bb2b818e17cb32f0186a7417b104542f..311df60754fe653231f13c5d68854f6dae98475e 100644 (file)
@@ -1843,6 +1843,8 @@ int ap_switch_channel(struct wpa_supplicant *wpa_s,
        if (!iface || !iface->bss[0])
                return -1;
 
+       hostapd_chan_switch_config(iface->bss[0], &settings->freq_params);
+
        return hostapd_switch_channel(iface->bss[0], settings);
 #else /* NEED_AP_MLME */
        return -1;