<%+header%> <% local disp = require "luci.dispatcher" -- local request = disp.context.path local request = disp.context.request local mtkwifi = require("mtkwifi") --local devname = string.match(request[5], "(mt.+)%.") local devname = request[5] local devs = mtkwifi.get_all_devs() local dev = {} local vif = {} local vifidx for _,v in ipairs(devs) do if v.devname == devname then dev = v end end local vifname = request[6] or dev.apcli.vifname assert(vifname) vif = dev and dev.vifs[vifname] or nil vifidx = vif and vif.vifidx or nil --print(devs, dev, dev.apcli, devname, vifname) local cfgs = mtkwifi.load_profile(dev.profile) local map_cfgs local first_card_cfgs local appliedMapModeDiff 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 %>
" enctype="multipart/form-data" onreset="return cbi_validate_reset(this);" onsubmit="return validate_all() && cbi_validate_form(this, 'Some fields are invalid, cannot save values!')" autocomplete="off">
ApCli Configurations - <%=vifname and devname.."@"..vifname or devname%> <%local diff = mtkwifi.diff_profile(dev.profile)%> <%if next(diff) ~= nil then%> ( '">Click here to apply changes) <%end%>
Available Wireless Networks

Connection Configurations style="display:none;" <% end %> > style="display:none;"<% end %>> style="display:none;"<% end %>> style="display:none;" <% end %>> style="display:none" <% end %> > style="display: none;"<% end %>>
ApClient Mode checked="checked"<% end %> onclick="toggle_apcli(true)"/> Enable checked="checked"<% end %> onclick="toggle_apcli(false)"/> Disable
MAC Repeater Mode checked="checked"<% end %>/> Enable checked="checked"<% end %>/> Disable
Root AP SSID "/>
Root AP Channel This will overwrite channel of AP!
Root AP Authentication Mode
Root AP Encryption
Root AP WPA Key "/>
ApCli MFPC checked="checked" <% end %> <% if cfgs.ApCliAuthMode == "WPA3PSK" then %> disabled="disabled" <% end %> type="checkbox">
ApCli MFPR checked="checked" <% end %> <% if cfgs.ApCliAuthMode == "WPA3PSK" then %> disabled="disabled" <% end %> type="checkbox">
ApCli MFPSHA256 checked="checked" <% end %> <% if cfgs.ApCliAuthMode == "WPA3PSK" then %> disabled="disabled" <% end %> type="checkbox">
Root AP Encryption
WEP Default Key
Root AP WEP Key 1 " maxlength="26"/>
WEP Key 1 Type
Root AP WEP Key 2 " maxlength="26"/>
WEP Key 2 Type
Root AP WEP Key 3 " maxlength="26"/>
WEP Key 3 Type
Root AP WEP Key 4 " maxlength="26"/>
WEP Key 4 Type
<%+footer%>