From c287e219eeb71d8a61f568572cbbfd757f6b4bfa Mon Sep 17 00:00:00 2001 From: hanwckf Date: Fri, 29 Dec 2023 00:09:23 +0800 Subject: [PATCH] luci-app-mtwifi-cfg: add whnat option --- .../applications/luci-app-mtwifi-cfg/po/zh_Hans/mtwifi-cfg.po | 3 +++ .../root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js | 3 +++ .../applications/mtwifi-cfg/files/mtwifi-cfg/mtwifi_defs.lua | 1 + package/mtk/applications/mtwifi-cfg/files/netifd/mtwifi.sh | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/mtk/applications/luci-app-mtwifi-cfg/po/zh_Hans/mtwifi-cfg.po b/package/mtk/applications/luci-app-mtwifi-cfg/po/zh_Hans/mtwifi-cfg.po index 8c3565c693..1f53dec9a1 100644 --- a/package/mtk/applications/luci-app-mtwifi-cfg/po/zh_Hans/mtwifi-cfg.po +++ b/package/mtk/applications/luci-app-mtwifi-cfg/po/zh_Hans/mtwifi-cfg.po @@ -30,3 +30,6 @@ msgstr "弱信号剔除阈值" msgid "Station associate threshold" msgstr "弱信号接入阈值" + +msgid "Wireless HWNAT" +msgstr "无线硬件加速" diff --git a/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js b/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js index a7e3846bc4..4c4619e285 100644 --- a/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js +++ b/package/mtk/applications/luci-app-mtwifi-cfg/root/usr/share/luci-app-mtwifi-cfg/wireless-mtk.js @@ -1017,6 +1017,9 @@ return view.extend({ if (is_dbdc_main) { + o = ss.taboption('advanced', form.Flag, 'whnat', _('Wireless HWNAT')); + o.default = o.enabled; + o = ss.taboption('advanced', form.Value, 'dtim_period', _('DTIM Interval'), _('Delivery Traffic Indication Message Interval')); o.optional = true; o.placeholder = 1; diff --git a/package/mtk/applications/mtwifi-cfg/files/mtwifi-cfg/mtwifi_defs.lua b/package/mtk/applications/mtwifi-cfg/files/mtwifi-cfg/mtwifi_defs.lua index f2a7ec049d..3451a366e0 100644 --- a/package/mtk/applications/mtwifi-cfg/files/mtwifi-cfg/mtwifi_defs.lua +++ b/package/mtk/applications/mtwifi-cfg/files/mtwifi-cfg/mtwifi_defs.lua @@ -85,6 +85,7 @@ mtwifi_defs.chip_cfgs = { -- uci config = dat config, default value ["beacon_int"] = { "BeaconPeriod" , "100"}, ["dtim_period"] = { "DtimPeriod", "1"}, + ["whnat"] = { "WHNAT", "1"}, } mtwifi_defs.reinstall_cfgs = { diff --git a/package/mtk/applications/mtwifi-cfg/files/netifd/mtwifi.sh b/package/mtk/applications/mtwifi-cfg/files/netifd/mtwifi.sh index c8cd232ad4..8bb11942e4 100755 --- a/package/mtk/applications/mtwifi-cfg/files/netifd/mtwifi.sh +++ b/package/mtk/applications/mtwifi-cfg/files/netifd/mtwifi.sh @@ -15,7 +15,7 @@ MTWIFI_CFG_IFNAME_KEY="mtwifi_ifname" drv_mtwifi_init_device_config() { config_add_int txpower beacon_int dtim_period - config_add_boolean mu_beamformer dbdc_main + config_add_boolean mu_beamformer dbdc_main whnat config_add_string country twt }