<%+header%> <% local mtkwifi = require("mtkwifi") local devs = mtkwifi.get_all_devs() local l1dat, l1 = mtkwifi.__get_l1dat() local dridx = l1.DEV_RINDEX local main_ifname local map_cfgs local first_card_cfgs local appliedMapModeDiff local chipname if pcall(require, "map_helper") then map_cfgs = mtkwifi.load_profile(mtkwifi.__read_easymesh_profile_path()) first_card_cfgs = mtkwifi.load_profile(mtkwifi.detect_first_card()) local appliedMapDiffTable = mtkwifi.diff_profile(mtkwifi.detect_first_card()) appliedMapModeDiff = appliedMapDiffTable["MapMode"] and appliedMapDiffTable["MapMode"][2] or nil end %>

Wireless Overview

<% if #devs == 0 then %>
No wireless device found!
<% end %> <% for _,dev in ipairs(devs) do %> <% main_ifname = l1dat and l1dat[dridx][dev.devname].main_ifname or dbdc_prefix[mainidx][subidx].."0" %> <% if mtkwifi.exists("/sys/class/net/"..main_ifname) then %>
<% if chipname ~= string.split(dev.devname,".")[1].."."..(dev.mainidx) then %> <% chipname = string.split(dev.devname,".")[1].."."..(dev.mainidx) %> <% end %> <% if dev.vifs then%> <% for _,vif in ipairs(dev.vifs) do %> <% end %> <% if dev.apcli then %> <% end %> <% end %>
<%=string.split(dev.devname,".")[1]%> <%if not dev.vifs then%> * FATAL ERROR: Incorrect Profile Settings <%end%>
Driver version: <%=dev.version%>
"> ','<%=luci.dispatcher.build_url("admin", "mtk", "wifi", "chip_cfg_view", dev.devname)%>')">
" style="display:none"> Processing request.
<%=dev.devname%> <%local diff = mtkwifi.diff_profile(dev.profile)%> <%if next(diff) ~= nil then%> * need reload to apply changes <%end%>
Work mode: <% if dev.ApCliEnable == "1" then %> APCli <% else %> AP <% end %>
<%if not dev.vifs then%> ')"> <%else%> ')"> ')"> <%end%>
<% if vif.state == "up" then %> <% else %> <% end %> Interface: <%=vif.vifname%> | Type: AP | SSID: <% if vif.__ssid == "" then %> Error: value not present in dat file <% else %> <%=vif.__ssid and vif.__ssid:gsub(" "," ") or nil%> <% end %> | Channel: <%=vif.__channel or dev.Channel%>
<% if vif.state == "up" then %> BSSID: <%=vif.__bssid%> | Mode: <%=dev.WirelessModeList[tonumber(vif.__wirelessmode)]%> <% else %> Wireless is disabled or not associated <% end %>
<% if not vif.state then %> <% elseif vif.state == "up" then %> ')"> <% else %> ')"> <% end %> ')"> ')">
<% if dev.apcli.state == "up" then %> <% else %> <% end %> Interface: <%=dev.apcli.devname%> | Type: STA | Status: <% if dev.ApCliEnable ~= "1" then %> Disconnected <% end %>
style="display:none" <% end %>> <%:Loading%>  Loading connection information of <%=dev.apcli.devname%>
style="display:none" <% end %>>Wireless is disabled or not associated
<% if dev.ApCliEnable ~= "1" then %> <% if dev.apcli.state == "up" then %> ')"> <% else %> ')"> <% end %> ')"> ')"> <% else %> ')"> ')"> ')"> ')"> ')"> <% end %>
<% end %> <% end %> <%+footer%>