% local cbi = require "luci.cbi" local tpl = require "luci.template" local ntm = require "luci.model.network" local uci = require "luci.model.uci".cursor() ntm.init(uci) local disabled_radio2G = "1" local disabled_radio5G = "1" local disabled_radio52G = "1" local wifi_status = {} uci:foreach("wireless", "wifi-iface", function(s) if uci:get('functionlist','functionlist','SUPPORT_WLAN24G') == '1' then --[[ #### WLAN24G feature ### --]] WLAN24G="1" if s.device == "wifi0" and (s.mode_display == "ap" or (s.mode_display == "wds_ap" and s.nawds == "0")) then if s.disabled == "0" then disabled_radio2G = "0" end if s.status == "1" then wifi_status["2G"] = tostring(wifi_status["2G"]) == "nil" and s[".name"] or wifi_status["2G"]..","..s[".name"] end end end --[[ #### WLAN24G feature ### --]] if uci:get('functionlist','functionlist','SUPPORT_WLAN5G') == '1' then --[[ #### WLAN5G feature ### --]] WLAN5G="1" if s.device == "wifi1" and (s.mode_display == "ap" or (s.mode_display == "wds_ap" and s.nawds == "0")) then if s.disabled == "0" then disabled_radio5G = "0" end if s.status == "1" then wifi_status["5G"] = tostring(wifi_status["5G"]) == "nil" and s[".name"] or wifi_status["5G"]..","..s[".name"] end end end --[[ #### WLAN5G feature ### --]] if uci:get('functionlist','functionlist','SUPPORT_WLAN5G_2') == '1' then --[[ #### WLAN5G_2 feature ### --]] WLAN52G="1" if s.device == "wifi2" and (s.mode_display == "ap" or (s.mode_display == "wds_ap" and s.nawds == "0")) then if s.disabled == "0" then disabled_radio52G = "0" end if s.status == "1" then wifi_status["52G"] = tostring(wifi_status["52G"]) == "nil" and s[".name"] or wifi_status["52G"]..","..s[".name"] end end htmode_52g = luci.http.formvalue("htmode_52g") end --[[ #### WLAN5G_2 feature ### --]] end) local htmode = luci.http.formvalue("htmode") local domain = luci.util.exec("setconfig -g 4 | awk {'printf $1'}") %>