wifi-scripts: ucode: fix airtime_mode with hostapd-mini
authorZhi-Jun You <[email protected]>
Wed, 8 Oct 2025 06:55:06 +0000 (14:55 +0800)
committerFelix Fietkau <[email protected]>
Mon, 13 Oct 2025 08:56:39 +0000 (10:56 +0200)
Currently wifi-scripts ucode appends airtime_mode to hostapd config file
unconditionally.
However this breaks bringing up interface with hostapd-mini
because the mini variant doesn't support airtime policy.

Fix this by changing the script to append airtime_mode only when
airtime_mode is set to greater than zero value in /etc/config/wireless.

Fixes: #20136
Fixes: #20314
Signed-off-by: Zhi-Jun You <[email protected]>
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc

index 69c853115e61df096e3b4c45c0b537645f22a5da..840b13294deb8ecc65dd2541e5e9e4fd91f09dfa 100644 (file)
@@ -483,7 +483,8 @@ function generate(config) {
        append_vars(config, [ 'noscan' ]);
 
        /* airtime */
-       append_vars(config, [ 'airtime_mode' ]);
+       if (config.airtime_mode)
+               append_vars(config, [ 'airtime_mode' ]);
 
        /* assoc/thresholds */
        append_vars(config, [ 'rssi_reject_assoc_rssi', 'rssi_ignore_probe_request', 'iface_max_num_sta', 'no_probe_resp_if_max_sta' ]);