%+header%> <% local mtkwifi = require("mtkwifi") %> <% if not mtkwifi then %>
<% else %> <% local devs = mtkwifi.get_all_devs() local l1dat, l1 = mtkwifi.__get_l1dat() local bands = mtkwifi.detect_triband() local cfg_1905d = mtkwifi.load_profile("/etc/map/1905d.cfg") local driver_cfgs local allDevDiff = {} local map_cfgs = mtkwifi.load_profile(mtkwifi.__read_easymesh_profile_path()) local first_card_cfgs = mtkwifi.load_profile(mtkwifi.detect_first_card()) local appliedMapDiffTable = mtkwifi.diff_profile(mtkwifi.detect_first_card()) local appliedMapModeDiff = appliedMapDiffTable["MapMode"] and appliedMapDiffTable["MapMode"][2] or nil local isMapSupported = true local mapd_default_cfg = mtkwifi.load_profile("/etc/map/mapd_default.cfg") local mapd_user_cfg = mtkwifi.load_profile("/etc/map/mapd_user.cfg") local eth_mode = mapd_default_cfg.mode if mapd_user_cfg.mode then eth_mode = mapd_user_cfg.mode end local dpp_cfg = mtkwifi.load_profile("/etc/dpp_cfg.txt") %> <% if not l1dat or not l1 then %> <% else %> <% for idx,dev in ipairs(devs) do local zone = l1.l1_path_to_zone(dev.profile) local diff = mtkwifi.diff_profile(dev.profile) if next(diff) ~= nil then allDevDiff[dev.devname] = diff end if not dev.isMultiAPSupported then isMapSupported = false end if zone == "dev1" then driver_cfgs = mtkwifi.load_profile(dev.profile) end end %> <% if not isMapSupported then %> <% else %> <% if not driver_cfgs or not map_cfgs then %> <% else %>