]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: ucode: support 320 MHz in freq_info
authorFelix Fietkau <nbd@nbd.name>
Fri, 10 Jul 2026 10:23:50 +0000 (12:23 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 16 Jul 2026 09:50:21 +0000 (11:50 +0200)
uc_wpa_freq_info() rejected any operating width above 160 MHz, returning
null for EHT320 (width 3). Add the 320 MHz case; the existing segment-0
centre arithmetic (8 << width / 4 << width) extends correctly to width 3.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/src/src/utils/ucode.c

index b5fdf6676c264c2ed38ef9feac1efdd4fc3aefe2..4eb50691fa105fe85debfa697b15edc6f21649da 100644 (file)
@@ -139,6 +139,9 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs)
        case 2:
                chanwidth = CONF_OPER_CHWIDTH_160MHZ;
                break;
+       case 3:
+               chanwidth = CONF_OPER_CHWIDTH_320MHZ;
+               break;
        default:
                return NULL;
        }