]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: ucode: add support for setting he_twt_responder
authorZhi-Jun You <hujy652@protonmail.com>
Mon, 23 Mar 2026 10:06:10 +0000 (18:06 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 25 Mar 2026 15:02:23 +0000 (16:02 +0100)
In hostapd conf this option is set to 1 by default.
Then it's set to 0 if the HE MAC capability bit is not present.

Add an option in wifi-scripts to manually control it.

Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/22577
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc

index 0697e65fc19c4a93beb2b3c4981b7f9c0c9f0e2b..291c97aaace2a8707e6dc730de995286acbca956 100644 (file)
                        "type": "boolean",
                        "default": false
                },
+               "he_twt_responder": {
+                       "description": "Whether TWT (HE) responder is enabled.",
+                       "type": "boolean",
+                       "default": true
+               },
                "hostapd_options": {
                        "type": "array",
                        "items": {
index cc7b9e387091601a372ef45bbfc689b09a281b8b..a373054f551a688d74038da867a3603ec16ab6c4 100644 (file)
@@ -426,12 +426,15 @@ function device_htmode_append(config) {
                        config.he_mu_beamformer = false;
                if (!(he_phy_cap[7] & 0x1))
                        config.he_spr_psr_enabled = false;
+               if (!(he_mac_cap[0] & 0x4))
+                       config.he_twt_responder = false;
                if (!(he_mac_cap[0] & 0x1))
                        config.he_twt_required= false;
 
                append_vars(config, [
                        'ieee80211ax', 'he_oper_chwidth', 'he_oper_centr_freq_seg0_idx',
-                       'he_su_beamformer', 'he_su_beamformee', 'he_mu_beamformer', 'he_twt_required',
+                       'he_su_beamformer', 'he_su_beamformee', 'he_mu_beamformer',
+                       'he_twt_required', 'he_twt_responder',
                        'he_default_pe_duration', 'he_rts_threshold', 'he_mu_edca_qos_info_param_count',
                        'he_mu_edca_qos_info_q_ack', 'he_mu_edca_qos_info_queue_request', 'he_mu_edca_qos_info_txop_request',
                        'he_mu_edca_ac_be_aifsn', 'he_mu_edca_ac_be_aci', 'he_mu_edca_ac_be_ecwmin',