luci-app-turboacc: do not display hw nat option for non-mt7621 devices

This commit is contained in:
CN_SZTL 2020-07-19 12:36:55 +08:00
parent a6bb091998
commit 4dded25eca
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI for CPU Freq Setting
LUCI_DEPENDS:=@arm
LUCI_DEPENDS:=@arm @arm64
PKG_NAME:=luci-app-cpufreq
PKG_VERSION:=1
PKG_RELEASE:=5

View File

@ -19,10 +19,12 @@ sw_flow.description = translate("Software based offloading for routing/NAT")
sw_flow:depends("sfe_flow", 0)
end
if luci.sys.call("cat /proc/cpuinfo | grep -q MT7621") == 0 then
hw_flow = s:option(Flag, "hw_flow", translate("Hardware flow offloading"))
hw_flow.default = 0
hw_flow.description = translate("Requires hardware NAT support. Implemented at least for mt7621")
hw_flow:depends("sw_flow", 1)
end
if nixio.fs.access("/lib/modules/" .. kernel_version .. "/fast-classifier.ko") then
sfe_flow = s:option(Flag, "sfe_flow", translate("Shortcut-FE flow offloading"))