<%+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 chipname %>

<%:Wireless%>

<% if #devs == 0 then %>
<%:No wireless device found!%>
<% else %>
<% 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 and dev.Enable == "1" then%> <% for _,vif in ipairs(dev.vifs) do %> <% end %> <% if dev.apcli then %> <% end %> <% end %> <% end %> <% end %>
<%=string.split(dev.devname,".")[1]%> <%if not dev.vifs then%> * <%:FATAL ERROR: Incorrect Profile Settings%> <%end%>
<%if dev.version then%> <%:Driver version%>: <%=dev.version%>
<%end%>
">
" 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%>
<%local cfgs = mtkwifi.load_profile(dev.profile)%> <%:Current Band%>: <%=mtkwifi.band(string.split(cfgs.WirelessMode,";")[1])%>
<% if dev.Enable == "0" then%> <%:Wireless device is disabled%> <%else%> <%:Work mode%>: <% if dev.ApCliEnable == "1" then %> APCli <% else %> AP <% end %>
<%local temp = mtkwifi.get_temp(dev.devname)%> <%if temp then%> <%:Tempature%>: <%=temp%>°C <%end%> <%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%> | <%:Wireless 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 %> <% end %> <% else %> <% end %>

<%:Station List%>

<%:Interface%> SSID <%:MAC-Address%> <%:Hostname%> <%:Security%> <%:Signal%> (dBm) <%:TX Rate%> <%:RX Rate%> <%:Connected Time%>
<%:Collecting data...%>
<% end %> <%+footer%>