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 <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2026-07-10 12:25:58 +02:00
parent c5c316b0ab
commit a2c5be2783

View file

@ -130,6 +130,15 @@ function iface_freq_info(iface, config, params)
if (freq < 4000) if (freq < 4000)
width = 0; 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); return hostapd.freq_info(freq, sec_offset, width);
} }