<%+header%> <% local disp = require "luci.dispatcher" local path = disp.context.path local request = disp.context.request local mtkwifi = require("mtkwifi") local devs = mtkwifi.get_all_devs() local devname local vifname, vifidx local dev = {} local vif = {} if request[4] == "vif_add_view" then devname, vifname = request[5], request[6] dev = devs and devs[devname] vifname = vifname..#dev.vifs vifidx = #dev.vifs + 1 elseif request[4] == "vif_cfg_view" then devname, vifname = request[5], request[6] dev = devs and devs[devname] or nil vif = dev and dev.vifs[vifname] or nil vifidx = vif and vif.vifidx or nil end local cfgs = mtkwifi.load_profile(dev.profile) local diff = mtkwifi.diff_profile(dev.profile) local WscValue = mtkwifi.token_get(cfgs["WscConfMode"], vifidx, "0") or "0" local appliedWscValue = diff["WscConfMode"] and mtkwifi.token_get(diff["WscConfMode"][2], vifidx) or nil local map_cfgs local appliedMapEnableDiff if pcall(require, "map_helper") then map_cfgs = mtkwifi.load_profile(mtkwifi.__easymesh_profile_path()) local appliedMapDiffTable = mtkwifi.diff_profile(mtkwifi.__easymesh_profile_path()) appliedMapEnableDiff = appliedMapDiffTable["MapEnable"] and appliedMapDiffTable["MapEnable"][2] or nil end %>
" enctype="multipart/form-data" onsubmit="return validate_all('<%=vifidx%>','<%=cfgs["HT_DisallowTKIP"]%>')" autocomplete="off"> <% if not dev or not vif then%>
Interface Not Exist - <%=vifname and devname.."@"..vifname or devname%>
<% else %>
Interface Configurations - <%=vifname and devname.."@"..vifname or devname%> <%if next(diff) ~= nil then%> ( '">Click here to apply changes) <%end%> <% if dev.DBDC_MODE == "0" then %> <% end %>
SSID " name="<%="SSID"..vifidx%>">
Channel
Auth Mode
Hidden checked="checked" <% end %> type="checkbox">
AP Isolation checked="checked" <% end %> type="checkbox">
WMM Capable checked="checked" <% end %> type="checkbox">
TX Rate
<%if tostring(mtkwifi.__any_wsc_enabled(WscValue)) == "1" then%> <% if not appliedWscValue or (WscValue == appliedWscValue) then%> <% else %> <% end %> <% end %> <% if request[4] == "vif_cfg_view" then%> <% end %> <% if map_cfgs then %>
Access Control - <%=vifname and devname.."@"..vifname or devname%>
Access Policy disabled="disabled" <% end %> <% if cfgs["AccessPolicy"..(vifidx-1)] == "0" then %> checked="checked"<% end %>/> Disable
disabled="disabled" <% end %> <% if cfgs["AccessPolicy"..(vifidx-1)] == "1" then %> checked="checked"<% end %>/> White List
disabled="disabled" <% end %> <% if cfgs["AccessPolicy"..(vifidx-1)] == "2" then %> checked="checked"<% end %>/> Black List
<% if map_cfgs.MapEnable == "1" then %> To set Black List see MAP application note when EasyMesh is enabled. <% end %>
# 1. one MAC one line.
# 2. empty lines will be ignored.
# 3. lines start with "#" will be ignored.
# 4. invalid MAC will be ignored.

11:22:33:44:55:66
AA:BB:CC:DD:EE:FF
11:22:33:aa:bb:cc
            
<% else %>
Access Control - <%=vifname and devname.."@"..vifname or devname%>
Access Policy checked="checked"<% end %>/> Disable
checked="checked"<% end %>/> White List
checked="checked"<% end %>/> Black List
# 1. one MAC one line.
# 2. empty lines will be ignored.
# 3. lines start with "#" will be ignored.
# 4. invalid MAC will be ignored.

11:22:33:44:55:66
AA:BB:CC:DD:EE:FF
11:22:33:aa:bb:cc
            
<% end %>
<% end %> <%+footer%>