]> git.ipfire.org Git - thirdparty/hostap.git/commit
Update conf->op_class in hostapd_change_config_freq()
authorHariharan Basuthkar <hbasuthk@qti.qualcomm.com>
Tue, 7 Oct 2025 21:33:34 +0000 (03:03 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 8 Oct 2025 09:39:02 +0000 (12:39 +0300)
commit3bc01a901803ce17dac04ca37bacbaad7e0418ba
tree0382b55e2d27701419092044a3d2a11c84843d04
parent9fb3c0b6f805691dcd29660c2fc30b09c7f25ea6
Update conf->op_class in hostapd_change_config_freq()

Some cases of channel switching, e.g., when changing from a 320 MHz
channel to a 80 MHz channel in the 6 GHz band, has been observed to
cause disconnections due to non-AP MLDs getting confused with inaccurate
information.

On the AP side, the new target channel's ccfs0 and ccfs1 have incorrect
values in the EHT Operating Information element. This is because,
in hostapd_eid_eht_operation(), the ch_width is calculated based on
conf->op_class and during the channel switch, hostapd_change_config_freq()
does not assign the target channel's op_class to conf->op_class during
the construction of the Beacon frame template.

Fix this issue by assigning conf->op_class in
hostapd_change_config_freq().

Also, change the datatype of channel in hostapd_change_config_freq()
from int to u8, as IEEE 802.11 channel numbers are represented with 8
bits, and can only be between 1 to 255.

Signed-off-by: Hariharan Basuthkar <hbasuthk@qti.qualcomm.com>
src/ap/hostapd.c