<% if chipname ~= string.split(dev.devname,".")[1].."."..(dev.mainidx) then %>
<% chipname = string.split(dev.devname,".")[1].."."..(dev.mainidx) %>
<%=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%>
">
',
'<%=luci.dispatcher.build_url("admin", "network", "wifi", "chip_cfg_view", dev.devname)%>')"><%:CONFIG%>
" style="display:none">
<%:Processing request.%>
<% end %>
<%=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%>
')"><%:Restore Profile to Factory Settings%>
<%else%>
')"><%:RELOAD%>
')"><%:CONFIG%>
<%:ADD%>
<%end%>
<%:Processing request.%>
<% if dev.vifs and dev.Enable == "1" then%>
<% for _,vif in ipairs(dev.vifs) do %>
<% 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 %>
<%:ENABLE%>
<% elseif vif.state == "up" then %>
')"><%:DISABLE%>
<% else %>
')"><%:ENABLE%>
<% end %>
')"><%:CONFIG%>
')"><%:REMOVE%>
<%:Processing request.%>
<% end %>
<% if dev.apcli then %>
<% 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 connection information of%> <%=dev.apcli.devname%>
BSSID: |
SSID:
style="display:none" <% end %>><%:Wireless is disabled or not associated%>
<% if dev.ApCliEnable ~= "1" then %>
<% if dev.apcli.state == "up" then %>
')"><%:DISABLE%>
')"><%:RECONNECT%>
<% end %>
')"><%:CONFIG%>
<% else %>
')"><%:DISABLE%>
')"><%:ENABLE%>
')"><%:DISCONNECT%>
')"><%:RECONNECT%>
')"><%:CONFIG%>
<% end %>
<%:Processing request.%>
<% end %>
<% end %>
<% end %>
<% end %>