From a2c5be278383887a785275b9ab247419a8d15f9e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 10 Jul 2026 12:25:58 +0200 Subject: [PATCH] hostapd: ucode: compute 6 GHz segment centre in iface_freq_info On 6 GHz there is no HT Operation IE, so a 0 secondary-channel offset made freq_info() return without a segment centre frequency, leaving wide-channel switches (80/160/320 MHz) on the stale centre. Pass a null offset for wide 6 GHz channels so the centre is auto-derived. Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.uc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index d7d0ff8ff2..1258f2d52f 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -130,6 +130,15 @@ function iface_freq_info(iface, config, params) if (freq < 4000) width = 0; + /* + * 6 GHz has no HT Operation IE, so the secondary channel offset cannot + * be derived the usual way. For wide channels pass a null offset so the + * C helper auto-derives it and computes the segment centre frequency; a + * 0 offset would make it skip the centre calculation. + */ + if (freq > 5925 && width > 0 && sec_offset == 0) + sec_offset = null; + return hostapd.freq_info(freq, sec_offset, width); }