% local uci = require "luci.model.uci".cursor() local ntm = require "luci.model.network".init() local sys = require "luci.sys" local devices = ntm:get_wifidevs() local changes = uci:changes("wireless") if uci:get('functionlist','functionlist','SUPPORT_REPEATER_MODULE') == '1' then local sta_ap_ap = {} for _, dev in ipairs(devices) do sta_ap_ap[#sta_ap_ap+1] = ntm:get_wifinet_index(dev:name(),"sta_ap",tonumber(1)):name() end end %> <%if redir_page ~= 1 then%> <%if uci:get('functionlist','functionlist','SUPPORT_MYID') == '1' then%> <%+myid%> <%end%> <%+header%> <%end%> <% local radioNum,wifi_dev=0,{} if WLAN24G == '1' then radioNum=radioNum+1 wifi_dev["2.4G"]={"wifi0"} end if WLAN5G == '1' then radioNum=radioNum+1 wifi_dev["5G"]={"wifi1"} if WLAN5G_2=="1" then table.insert(wifi_dev["5G"], "wifi2") end if WLAN5G_2 == '1' then --[[ #### WLAN5G_2 feature ### --]] radioNum=radioNum+1 end --[[ #### WLAN5G_2 feature ### --]] end local devs={} devs["2.4G"]={} --[[ record 2.4G radio --]] devs["5G"]={} --[[ record 5G radio --]] local wifi_ap_enable = {} --[[ record if wifi really up --]] local wifi_all_net={} --[[ record the interfaces of the device --]] for _, dev in ipairs(devices) do wifi_all_net[dev:name()] = dev:get_wifinets_all() if filterRadio and dev:name()==filterRadio then else for i, v in pairs(wifi_dev) do for a, b in pairs(v) do if dev:name() == b then table.insert(devs[i], dev:name()) end end end end if dev:name()=="wifi1" or dev:name()=="wifi2" then wifi_ap_enable[dev:name()] = "0" for _, net in ipairs(wifi_all_net[dev:name()]["all"]) do if net:noise() ~= 0 then wifi_ap_enable[dev:name()] = "1" end end end end local opmode_type = {} if uci:get('functionlist','functionlist','SUPPORT_REPEATER_MODULE') == '1' then opmode_type = {[1]="ap",[2]="sta",[3]="wds_ap",[4]="wds_sta",[5]="wds_bridge",[6]="sta_ap"} else opmode_type = {[1]="ap",[2]="sta",[3]="wds_ap",[4]="wds_sta",[5]="wds_bridge"} end %>
<%+footer%>