]> git.ipfire.org Git - thirdparty/openwrt.git/commit
wifi-scripts: fix WiFi 6E discovery for 6GHz 320MHz operation
authorRyan Chen <rchen14b@gmail.com>
Sun, 18 Jan 2026 02:51:14 +0000 (20:51 -0600)
committerRobert Marko <robimarko@gmail.com>
Wed, 21 Jan 2026 21:31:18 +0000 (22:31 +0100)
commitf70c393d62eef704ea212bbabf02bb3444d4edd1
tree3e9232bbef922a9c35b5d18ef286203f2d176f75
parent687ece117b624dbc6e981e9eee2a89f050e27d67
wifi-scripts: fix WiFi 6E discovery for 6GHz 320MHz operation

WiFi 6E (802.11ax) clients cannot discover 6GHz APs operating at
320MHz because the HE Operation element contains uninitialized
center frequency values.

For EHT320 mode, the code sets eht_oper_centr_freq_seg0_idx but not
the corresponding HE values. Later, the HE values are copied from
VHT values, but VHT is not used on 6GHz, leaving he_oper_chwidth
and he_oper_centr_freq_seg0_idx at 0. This causes WiFi 6E clients
to see incorrect channel width information, making the AP invisible
to them during scanning.

Fix this by:
1. Setting he_oper_chwidth to 3 (160MHz) for EHT320 mode
2. Computing he_oper_centr_freq_seg0_idx based on the 160MHz segment
   that contains the primary channel
3. Preserving these pre-set values instead of overwriting them with
   uninitialized VHT values

WiFi 7 clients continue to see 320MHz operation via the EHT Operation
element, while WiFi 6E clients can now discover and connect at 160MHz.

Signed-off-by: Ryan Chen <rchen14b@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21588
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit a8bdb1e6d65adac21d2dc1b40cdbae1af2af4d15)
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc