mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 18:59:13 +08:00
mtwifi: remove outdated package
This commit is contained in:
parent
3e21dedb8a
commit
ca43475283
@ -1,18 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_MAINTAINER:=Hua Shao <nossiac@163.com>
|
||||
|
||||
LUCI_TITLE:=LuCI support for mt wifi driver
|
||||
LUCI_DEPENDS:=+kmod-mt_wifi
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=8
|
||||
|
||||
define Package/luci-app-mtwifi/conffiles
|
||||
/etc/wireless/mt7615/
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
@ -1,838 +0,0 @@
|
||||
-- This module is a demo to configure MTK' proprietary WiFi driver.
|
||||
-- Basic idea is to bypass uci and edit wireless profile (mt76xx.dat) directly.
|
||||
-- LuCI's WiFi configuration is more logical and elegent, but it's quite tricky to
|
||||
-- translate uci into MTK's WiFi profile (like we did in "uci2dat").
|
||||
-- And you will get your hands dirty.
|
||||
--
|
||||
-- Hua Shao <nossiac@163.com>
|
||||
|
||||
module("luci.controller.mtkwifi", package.seeall)
|
||||
local http = require("luci.http")
|
||||
local mtkwifi = require("mtkwifi")
|
||||
|
||||
function __mtkwifi_reload(devname)
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
|
||||
for dev,profile in pairs(profiles) do
|
||||
if not devname or devname == dev then
|
||||
local diff = mtkwifi.diff_profile(profile)
|
||||
-- Adding or deleting a vif will need to reinstall the wifi ko,
|
||||
-- so we call "mtkwifi restart" here.
|
||||
if diff.BssidNum then
|
||||
os.execute("/sbin/mtkwifi restart "..devname)
|
||||
else
|
||||
os.execute("/sbin/mtkwifi reload "..devname)
|
||||
end
|
||||
-- keep a backup for this commit
|
||||
-- it will be used in mtkwifi.diff_profile()
|
||||
os.execute("cp -f "..profile.." "..mtkwifi.__profile_bak_path(profile))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function index()
|
||||
|
||||
entry({"admin", "network", "wifi"}, template("admin_mtk/mtk_wifi_overview"), _("Wireless"), 25)
|
||||
entry({"admin", "network", "wifi", "dev_cfg_view"}, template("admin_mtk/mtk_wifi_dev_cfg")).leaf = true
|
||||
entry({"admin", "network", "wifi", "dev_cfg"}, call("dev_cfg")).leaf = true
|
||||
entry({"admin", "network", "wifi", "dev_cfg_reset"}, call("dev_cfg_reset")).leaf = true
|
||||
entry({"admin", "network", "wifi", "dev_cfg_raw"}, call("dev_cfg_raw")).leaf = true
|
||||
entry({"admin", "network", "wifi", "vif_cfg_view"}, template("admin_mtk/mtk_wifi_vif_cfg")).leaf = true
|
||||
entry({"admin", "network", "wifi", "vif_cfg"}, call("vif_cfg")).leaf = true
|
||||
entry({"admin", "network", "wifi", "vif_add_view"}, template("admin_mtk/mtk_wifi_vif_cfg")).leaf = true
|
||||
entry({"admin", "network", "wifi", "vif_add"}, call("vif_cfg")).leaf = true
|
||||
entry({"admin", "network", "wifi", "vif_del"}, call("vif_del")).leaf = true
|
||||
entry({"admin", "network", "wifi", "vif_disable"}, call("vif_disable")).leaf = true
|
||||
entry({"admin", "network", "wifi", "vif_enable"}, call("vif_enable")).leaf = true
|
||||
entry({"admin", "network", "wifi", "get_station_list"}, call("get_station_list"))
|
||||
entry({"admin", "network", "wifi", "get_country_region_list"}, call("get_country_region_list")).leaf = true
|
||||
entry({"admin", "network", "wifi", "get_channel_list"}, call("get_channel_list"))
|
||||
entry({"admin", "network", "wifi", "get_HT_ext_channel_list"}, call("get_HT_ext_channel_list"))
|
||||
entry({"admin", "network", "wifi", "get_5G_2nd_80Mhz_channel_list"}, call("get_5G_2nd_80Mhz_channel_list"))
|
||||
entry({"admin", "network", "wifi", "reset"}, call("reset_wifi")).leaf = true
|
||||
entry({"admin", "network", "wifi", "reload"}, call("reload_wifi")).leaf = true
|
||||
entry({"admin", "network", "wifi", "get_raw_profile"}, call("get_raw_profile"))
|
||||
entry({"admin", "network", "wifi", "apcli_cfg_view"}, template("admin_mtk/mtk_wifi_apcli")).leaf = true
|
||||
entry({"admin", "network", "wifi", "apcli_cfg"}, call("apcli_cfg")).leaf = true
|
||||
entry({"admin", "network", "wifi", "apcli_disconnect"}, call("apcli_disconnect")).leaf = true
|
||||
entry({"admin", "network", "wifi", "apcli_connect"}, call("apcli_connect")).leaf = true
|
||||
entry({"admin", "network", "wifi", "apcli_scan"}, call("apcli_scan")).leaf = true;
|
||||
end
|
||||
|
||||
function dev_cfg(devname)
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
assert(profiles[devname])
|
||||
local cfgs = mtkwifi.load_profile(profiles[devname])
|
||||
|
||||
for k,v in pairs(http.formvalue()) do
|
||||
if type(v) ~= type("") and type(v) ~= type(0) then
|
||||
nixio.syslog("err", "dev_cfg, invalid value type for "..k..","..type(v))
|
||||
elseif string.byte(k) == string.byte("_") then
|
||||
nixio.syslog("err", "dev_cfg, special: "..k.."="..v)
|
||||
else
|
||||
cfgs[k] = v or ""
|
||||
end
|
||||
end
|
||||
|
||||
if mtkwifi.band(cfgs.WirelessMode) == "5G" then
|
||||
cfgs.CountryRegionABand = http.formvalue("__cr");
|
||||
else
|
||||
cfgs.CountryRegion = http.formvalue("__cr");
|
||||
end
|
||||
|
||||
if cfgs.Channel == "0" then -- Auto Channel Select
|
||||
cfgs.AutoChannelSelect = "3"
|
||||
else
|
||||
cfgs.AutoChannelSelect = "0"
|
||||
end
|
||||
|
||||
if http.formvalue("__bw") == "20" then
|
||||
cfgs.HT_BW = 0
|
||||
cfgs.VHT_BW = 0
|
||||
elseif http.formvalue("__bw") == "40" then
|
||||
cfgs.HT_BW = 1
|
||||
cfgs.VHT_BW = 0
|
||||
cfgs.HT_BSSCoexistence = 0
|
||||
elseif http.formvalue("__bw") == "60" then
|
||||
cfgs.HT_BW = 1
|
||||
cfgs.VHT_BW = 0
|
||||
cfgs.HT_BSSCoexistence = 1
|
||||
elseif http.formvalue("__bw") == "80" then
|
||||
cfgs.HT_BW = 1
|
||||
cfgs.VHT_BW = 1
|
||||
elseif http.formvalue("__bw") == "160" then
|
||||
cfgs.HT_BW = 1
|
||||
cfgs.VHT_BW = 2
|
||||
elseif http.formvalue("__bw") == "161" then
|
||||
cfgs.HT_BW = 1
|
||||
cfgs.VHT_BW = 3
|
||||
cfgs.VHT_Sec80_Channel = http.formvalue("VHT_Sec80_Channel") or ""
|
||||
end
|
||||
|
||||
if cfgs.ApCliAuthMode == "WEP" then
|
||||
cfgs.ApCliEncrypType = http.formvalue("__apcli_wep_enctype")
|
||||
else
|
||||
cfgs.ApCliEncrypType = http.formvalue("__apcli_wpa_enctype")
|
||||
end
|
||||
|
||||
local mimo = http.formvalue("__mimo")
|
||||
if mimo == "0" then
|
||||
cfgs.ETxBfEnCond=1
|
||||
cfgs.MUTxRxEnable=0
|
||||
cfgs.ITxBfEn=0
|
||||
elseif mimo == "1" then
|
||||
cfgs.ETxBfEnCond=0
|
||||
cfgs.MUTxRxEnable=0
|
||||
cfgs.ITxBfEn=1
|
||||
elseif mimo == "2" then
|
||||
cfgs.ETxBfEnCond=1
|
||||
cfgs.MUTxRxEnable=0
|
||||
cfgs.ITxBfEn=1
|
||||
elseif mimo == "3" then
|
||||
cfgs.ETxBfEnCond=1
|
||||
if tonumber(cfgs.ApCliEnable) == 1 then
|
||||
cfgs.MUTxRxEnable=3
|
||||
else
|
||||
cfgs.MUTxRxEnable=1
|
||||
end
|
||||
cfgs.ITxBfEn=0
|
||||
elseif mimo == "4" then
|
||||
cfgs.ETxBfEnCond=1
|
||||
if tonumber(cfgs.ApCliEnable) == 1 then
|
||||
cfgs.MUTxRxEnable=3
|
||||
else
|
||||
cfgs.MUTxRxEnable=1
|
||||
end
|
||||
cfgs.ITxBfEn=1
|
||||
else
|
||||
cfgs.ETxBfEnCond=0
|
||||
cfgs.MUTxRxEnable=0
|
||||
cfgs.ITxBfEn=0
|
||||
end
|
||||
|
||||
-- if cfgs.ApCliEnable == "1" then
|
||||
-- cfgs.Channel = http.formvalue("__apcli_channel")
|
||||
-- end
|
||||
|
||||
-- VOW
|
||||
-- ATC should actually be scattered into each SSID, but I'm just lazy.
|
||||
if cfgs.VOW_Airtime_Fairness_En then
|
||||
for i = 1,tonumber(cfgs.BssidNum) do
|
||||
__atc_tp = http.formvalue("__atc_vif"..i.."_tp") or "0"
|
||||
__atc_min_tp = http.formvalue("__atc_vif"..i.."_min_tp") or "0"
|
||||
__atc_max_tp = http.formvalue("__atc_vif"..i.."_max_tp") or "0"
|
||||
__atc_at = http.formvalue("__atc_vif"..i.."_at") or "0"
|
||||
__atc_min_at = http.formvalue("__atc_vif"..i.."_min_at") or "0"
|
||||
__atc_max_at = http.formvalue("__atc_vif"..i.."_max_at") or "0"
|
||||
|
||||
nixio.syslog("info", "ATC.__atc_tp ="..i..__atc_tp );
|
||||
nixio.syslog("info", "ATC.__atc_min_tp ="..i..__atc_min_tp );
|
||||
nixio.syslog("info", "ATC.__atc_max_tp ="..i..__atc_max_tp );
|
||||
nixio.syslog("info", "ATC.__atc_at ="..i..__atc_at );
|
||||
nixio.syslog("info", "ATC.__atc_min_at ="..i..__atc_min_at );
|
||||
nixio.syslog("info", "ATC.__atc_max_at ="..i..__atc_max_at );
|
||||
|
||||
cfgs.VOW_Rate_Ctrl_En = mtkwifi.token_set(cfgs.VOW_Rate_Ctrl_En, i, __atc_tp)
|
||||
cfgs.VOW_Group_Min_Rate = mtkwifi.token_set(cfgs.VOW_Group_Min_Rate, i, __atc_min_tp)
|
||||
cfgs.VOW_Group_Max_Rate = mtkwifi.token_set(cfgs.VOW_Group_Max_Rate, i, __atc_max_tp)
|
||||
|
||||
cfgs.VOW_Airtime_Ctrl_En = mtkwifi.token_set(cfgs.VOW_Airtime_Ctrl_En, i, __atc_at)
|
||||
cfgs.VOW_Group_Min_Ratio = mtkwifi.token_set(cfgs.VOW_Group_Min_Ratio, i, __atc_min_at)
|
||||
cfgs.VOW_Group_Max_Ratio = mtkwifi.token_set(cfgs.VOW_Group_Max_Ratio, i, __atc_max_at)
|
||||
end
|
||||
|
||||
cfgs.VOW_RX_En = http.formvalue("VOW_RX_En") or "0"
|
||||
end
|
||||
|
||||
-- http.write_json(http.formvalue())
|
||||
mtkwifi.save_profile(cfgs, profiles[devname])
|
||||
|
||||
if http.formvalue("__apply") then
|
||||
__mtkwifi_reload(devname)
|
||||
end
|
||||
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg_view",devname))
|
||||
end
|
||||
|
||||
function dev_cfg_raw(devname)
|
||||
-- http.write_json(http.formvalue())
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
assert(profiles[devname])
|
||||
|
||||
local raw = http.formvalue("raw")
|
||||
raw = string.gsub(raw, "\r\n", "\n")
|
||||
local cfgs = mtkwifi.load_profile(nil, raw)
|
||||
mtkwifi.save_profile(cfgs, profiles[devname])
|
||||
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg_view", devname))
|
||||
end
|
||||
|
||||
function dev_cfg_reset(devname)
|
||||
-- http.write_json(http.formvalue())
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
assert(profiles[devname])
|
||||
|
||||
local fd = io.open("/rom"..profiles[devname], "r")
|
||||
if fd then
|
||||
fd:close() -- just to test if file exists.
|
||||
os.execute("cp -f /rom"..profiles[devname].." "..profiles[devname])
|
||||
else
|
||||
mtkwifi.debug("unable to find /rom"..profiles[devname])
|
||||
end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg_view", devname))
|
||||
end
|
||||
|
||||
function vif_del(dev, vif)
|
||||
mtkwifi.debug("vif_del("..dev..vif..")")
|
||||
local devname,vifname = dev, vif
|
||||
mtkwifi.debug("devname="..devname)
|
||||
mtkwifi.debug("vifname="..vifname)
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
local idx = devs[devname]["vifs"][vifname].vifidx -- or tonumber(string.match(vifname, "%d+")) + 1
|
||||
mtkwifi.debug("idx="..idx, devname, vifname)
|
||||
local profile = devs[devname].profile
|
||||
assert(profile)
|
||||
if idx and tonumber(idx) >= 0 then
|
||||
local cfgs = mtkwifi.load_profile(profile)
|
||||
if cfgs then
|
||||
mtkwifi.debug("ssid"..idx.."="..cfgs["SSID"..idx].."<br>")
|
||||
cfgs["SSID"..idx] = ""
|
||||
mtkwifi.debug("ssid"..idx.."="..cfgs["SSID"..idx].."<br>")
|
||||
mtkwifi.debug("wpapsk"..idx.."="..cfgs["WPAPSK"..idx].."<br>")
|
||||
cfgs["WPAPSK"..idx] = ""
|
||||
local ssidlist = {}
|
||||
local j = 1
|
||||
for i = 1,16 do
|
||||
if cfgs["SSID"..i] ~= "" then
|
||||
ssidlist[j] = cfgs["SSID"..i]
|
||||
j = j + 1
|
||||
end
|
||||
end
|
||||
for i,v in ipairs(ssidlist) do
|
||||
mtkwifi.debug("ssidlist"..i.."="..v)
|
||||
end
|
||||
mtkwifi.debug("cfgs.BssidNum="..cfgs.BssidNum.." #ssidlist="..#ssidlist)
|
||||
assert(tonumber(cfgs.BssidNum) == #ssidlist + 1, "Please delete vif from larger idx.")
|
||||
cfgs.BssidNum = #ssidlist
|
||||
for i = 1,16 do
|
||||
if i <= cfgs.BssidNum then
|
||||
cfgs["SSID"..i] = ssidlist[i]
|
||||
elseif cfgs["SSID"..i] then
|
||||
cfgs["SSID"..i] = ""
|
||||
end
|
||||
end
|
||||
|
||||
mtkwifi.save_profile(cfgs, profile)
|
||||
else
|
||||
mtkwifi.debug(profile.." cannot be found!")
|
||||
end
|
||||
end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
end
|
||||
|
||||
function vif_disable(iface)
|
||||
os.execute("ifconfig "..iface.." down")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
end
|
||||
|
||||
function vif_enable(iface)
|
||||
os.execute("ifconfig "..iface.." up")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
-- security config in mtk wifi is quite complicated!
|
||||
-- cfgs listed below are attached with vif and combined like "0;0;0;0". They need specicial treatment.
|
||||
TxRate, WmmCapable, NoForwarding,
|
||||
HideSSID, IEEE8021X, PreAuth,
|
||||
AuthMode, EncrypType, RekeyMethod,
|
||||
RekeyInterval, PMKCachePeriod,
|
||||
DefaultKeyId, Key{n}Type, HT_EXTCHA,
|
||||
RADIUS_Server, RADIUS_Port,
|
||||
]]
|
||||
|
||||
local function conf_wep_keys(cfgs,vifidx)
|
||||
cfgs.DefaultKeyID = mtkwifi.token_set(cfgs.DefaultKeyID, vifidx, http.formvalue("__DefaultKeyID") or 1)
|
||||
cfgs["Key1Str"..vifidx] = http.formvalue("Key1Str"..vifidx)
|
||||
cfgs["Key2Str"..vifidx] = http.formvalue("Key2Str"..vifidx)
|
||||
cfgs["Key3Str"..vifidx] = http.formvalue("Key3Str"..vifidx)
|
||||
cfgs["Key4Str"..vifidx] = http.formvalue("Key4Str"..vifidx)
|
||||
|
||||
cfgs["Key1Type"]=mtkwifi.token_set(cfgs["Key1Type"],vifidx, http.formvalue("WEP1Type"..vifidx))
|
||||
cfgs["Key2Type"]=mtkwifi.token_set(cfgs["Key2Type"],vifidx, http.formvalue("WEP2Type"..vifidx))
|
||||
cfgs["Key3Type"]=mtkwifi.token_set(cfgs["Key3Type"],vifidx, http.formvalue("WEP3Type"..vifidx))
|
||||
cfgs["Key4Type"]=mtkwifi.token_set(cfgs["Key4Type"],vifidx, http.formvalue("WEP4Type"..vifidx))
|
||||
|
||||
return cfgs
|
||||
end
|
||||
|
||||
local function __security_cfg(cfgs, vif_idx)
|
||||
mtkwifi.debug("__security_cfg, before, HideSSID="..tostring(cfgs.HideSSID))
|
||||
mtkwifi.debug("__security_cfg, before, NoForwarding="..tostring(cfgs.NoForwarding))
|
||||
mtkwifi.debug("__security_cfg, before, WmmCapable="..tostring(cfgs.WmmCapable))
|
||||
mtkwifi.debug("__security_cfg, before, TxRate="..tostring(cfgs.TxRate))
|
||||
mtkwifi.debug("__security_cfg, before, RekeyInterval="..tostring(cfgs.RekeyInterval))
|
||||
mtkwifi.debug("__security_cfg, before, AuthMode="..tostring(cfgs.AuthMode))
|
||||
mtkwifi.debug("__security_cfg, before, EncrypType="..tostring(cfgs.EncrypType))
|
||||
mtkwifi.debug("__security_cfg, before, WscModeOption="..tostring(cfgs.WscModeOption))
|
||||
mtkwifi.debug("__security_cfg, before, RekeyMethod="..tostring(cfgs.RekeyMethod))
|
||||
mtkwifi.debug("__security_cfg, before, IEEE8021X="..tostring(cfgs.IEEE8021X))
|
||||
mtkwifi.debug("__security_cfg, before, DefaultKeyID="..tostring(cfgs.DefaultKeyID))
|
||||
mtkwifi.debug("__security_cfg, before, PMFMFPC="..tostring(cfgs.PMFMFPC))
|
||||
mtkwifi.debug("__security_cfg, before, PMFMFPR="..tostring(cfgs.PMFMFPR))
|
||||
mtkwifi.debug("__security_cfg, before, PMFSHA256="..tostring(cfgs.PMFSHA256))
|
||||
mtkwifi.debug("__security_cfg, before, RADIUS_Server="..tostring(cfgs.RADIUS_Server))
|
||||
mtkwifi.debug("__security_cfg, before, RADIUS_Port="..tostring(cfgs.RADIUS_Port))
|
||||
mtkwifi.debug("__security_cfg, before, session_timeout_interval="..tostring(cfgs.session_timeout_interval))
|
||||
mtkwifi.debug("__security_cfg, before, PMKCachePeriod="..tostring(cfgs.PMKCachePeriod))
|
||||
mtkwifi.debug("__security_cfg, before, PreAuth="..tostring(cfgs.PreAuth))
|
||||
mtkwifi.debug("__security_cfg, before, Wapiifname="..tostring(cfgs.Wapiifname))
|
||||
|
||||
cfgs.HideSSID = mtkwifi.token_set(cfgs.HideSSID, vif_idx, http.formvalue("__hidessid") or "0")
|
||||
cfgs.NoForwarding = mtkwifi.token_set(cfgs.NoForwarding, vif_idx, http.formvalue("__noforwarding") or "0")
|
||||
cfgs.WmmCapable = mtkwifi.token_set(cfgs.WmmCapable, vif_idx, http.formvalue("__wmmcapable") or "0")
|
||||
cfgs.TxRate = mtkwifi.token_set(cfgs.TxRate, vif_idx, http.formvalue("__txrate") or "0");
|
||||
cfgs.RekeyInterval = mtkwifi.token_set(cfgs.RekeyInterval, vif_idx, http.formvalue("__rekeyinterval") or "0");
|
||||
|
||||
local __authmode = http.formvalue("__authmode") or "Disable"
|
||||
cfgs.AuthMode = mtkwifi.token_set(cfgs.AuthMode, vif_idx, __authmode)
|
||||
|
||||
--[[ need to handle disable case as it conflicts with OPENWEP
|
||||
case = disable; authmode = OPEN, encryption = NONE
|
||||
case = open/OPENWEP; authmode = OPEN, encryption = WEP
|
||||
]]
|
||||
if __authmode == "Disable" then
|
||||
cfgs.AuthMode = mtkwifi.token_set(cfgs.AuthMode, vif_idx, "OPEN")
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, "NONE")
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "DISABLE")
|
||||
elseif __authmode == "OPEN" or __authmode == "SHARED" or __authmode == "WEPAUTO" then
|
||||
--[[ the following required cfgs are already set in loop above
|
||||
cfgs.Key{n}Str, ...
|
||||
cfgs.Key{n}Type, ...
|
||||
cfgs.DefaultKeyID
|
||||
]]
|
||||
cfgs.WscModeOption = "0"
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, "WEP")
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "DISABLE")
|
||||
cfgs = conf_wep_keys(cfgs,vif_idx)
|
||||
cfgs.WscConfMode = mtkwifi.token_set(cfgs.WscConfMode, vif_idx, 0)
|
||||
elseif __authmode == "WPAPSK" or __authmode == "WPAPSKWPA2PSK" then
|
||||
--[[ the following required cfgs are already set in loop above
|
||||
cfgs.WPAPSK{n}, ...
|
||||
cfgs.RekeyInterval
|
||||
]]
|
||||
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "TIME")
|
||||
cfgs.IEEE8021X = mtkwifi.token_set(cfgs.IEEE8021X, vif_idx, "0")
|
||||
cfgs.DefaultKeyID = mtkwifi.token_set(cfgs.DefaultKeyID, vif_idx, "2")
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, http.formvalue("__wpa_encrypttype") or "NONE")
|
||||
--cfgs["WPAPSK"..vif_idx] = http.formvalue("WPAPSK"..vif_idx)
|
||||
elseif __authmode == "WPA2PSK" then
|
||||
--[[ the following required cfgs are already set in loop above
|
||||
cfgs.WPAPSK{n}, ...
|
||||
cfgs.RekeyInterval
|
||||
]]
|
||||
-- for DOT11W_PMF_SUPPORT
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, http.formvalue("__wpa_encrypttype") or "0")
|
||||
if cfgs.PMFMFPC then
|
||||
cfgs.PMFMFPC = mtkwifi.token_set(cfgs.PMFMFPC, vif_idx, http.formvalue("__pmfmfpc") or "0")
|
||||
end
|
||||
if cfgs.PMFMFPR then
|
||||
cfgs.PMFMFPR = mtkwifi.token_set(cfgs.PMFMFPR, vif_idx, http.formvalue("__pmfmfpr") or "0")
|
||||
end
|
||||
if cfgs.PMFSHA256 then
|
||||
cfgs.PMFSHA256 = mtkwifi.token_set(cfgs.PMFSHA256, vif_idx, http.formvalue("__pmfsha256") or "0")
|
||||
end
|
||||
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "TIME")
|
||||
cfgs.IEEE8021X = mtkwifi.token_set(cfgs.IEEE8021X, vif_idx, "0")
|
||||
cfgs.DefaultKeyID = mtkwifi.token_set(cfgs.DefaultKeyID, vif_idx, "2")
|
||||
elseif __authmode == "WPA" then
|
||||
--[[ the following required cfgs are already set in loop above
|
||||
cfgs.WPAPSK{n}, ...
|
||||
cfgs.RekeyInterval
|
||||
cfgs.RADIUS_Key
|
||||
]]
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, http.formvalue("__wpa_encrypttype") or "0")
|
||||
cfgs.RADIUS_Server = mtkwifi.token_set(cfgs.RADIUS_Server, vif_idx, http.formvalue("__radius_server") or "0")
|
||||
cfgs.RADIUS_Port = mtkwifi.token_set(cfgs.RADIUS_Port, vif_idx, http.formvalue("__radius_port") or "0")
|
||||
cfgs.session_timeout_interval = mtkwifi.token_set(cfgs.session_timeout_interval, vif_idx, http.formvalue("__session_timeout_interval") or "0")
|
||||
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "TIME")
|
||||
cfgs.IEEE8021X = mtkwifi.token_set(cfgs.IEEE8021X, vif_idx, "0")
|
||||
cfgs.DefaultKeyID = mtkwifi.token_set(cfgs.DefaultKeyID, vif_idx, "2")
|
||||
elseif __authmode == "WPA2" then
|
||||
--[[ the following required cfgs are already set in loop above
|
||||
cfgs.WPAPSK{n}, ...
|
||||
cfgs.RekeyInterval
|
||||
cfgs.RADIUS_Key
|
||||
]]
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, http.formvalue("__wpa_encrypttype") or "0")
|
||||
cfgs.RADIUS_Server = mtkwifi.token_set(cfgs.RADIUS_Server, vif_idx, http.formvalue("__radius_server") or "0")
|
||||
cfgs.RADIUS_Port = mtkwifi.token_set(cfgs.RADIUS_Port, vif_idx, http.formvalue("__radius_port") or "0")
|
||||
cfgs.session_timeout_interval = mtkwifi.token_set(cfgs.session_timeout_interval, vif_idx, http.formvalue("__session_timeout_interval") or "0")
|
||||
cfgs.PMKCachePeriod = mtkwifi.token_set(cfgs.PMKCachePeriod, vif_idx, http.formvalue("__pmkcacheperiod") or "0")
|
||||
cfgs.PreAuth = mtkwifi.token_set(cfgs.PreAuth, vif_idx, http.formvalue("__preauth") or "0")
|
||||
-- for DOT11W_PMF_SUPPORT
|
||||
if cfgs.PMFMFPC then
|
||||
cfgs.PMFMFPC = mtkwifi.token_set(cfgs.PMFMFPC, vif_idx, http.formvalue("__pmfmfpc") or "0")
|
||||
end
|
||||
if cfgs.PMFMFPR then
|
||||
cfgs.PMFMFPR = mtkwifi.token_set(cfgs.PMFMFPR, vif_idx, http.formvalue("__pmfmfpr") or "0")
|
||||
end
|
||||
if cfgs.PMFSHA256 then
|
||||
cfgs.PMFSHA256 = mtkwifi.token_set(cfgs.PMFSHA256, vif_idx, http.formvalue("__pmfsha256") or "0")
|
||||
end
|
||||
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "TIME")
|
||||
cfgs.IEEE8021X = mtkwifi.token_set(cfgs.IEEE8021X, vif_idx, "0")
|
||||
cfgs.DefaultKeyID = mtkwifi.token_set(cfgs.DefaultKeyID, vif_idx, "2")
|
||||
elseif __authmode == "WPA1WPA2" then
|
||||
--[[ the following required cfgs are already set in loop above
|
||||
cfgs.WPAPSK{n}, ...
|
||||
cfgs.RekeyInterval
|
||||
cfgs.RADIUS_Key
|
||||
]]
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, http.formvalue("__wpa_encrypttype") or "0")
|
||||
cfgs.RADIUS_Server = mtkwifi.token_set(cfgs.RADIUS_Server, vif_idx, http.formvalue("__radius_server") or "0")
|
||||
cfgs.RADIUS_Port = mtkwifi.token_set(cfgs.RADIUS_Port, vif_idx, http.formvalue("__radius_port") or "1812")
|
||||
cfgs.session_timeout_interval = mtkwifi.token_set(cfgs.session_timeout_interval, vif_idx, http.formvalue("__session_timeout_interval") or "0")
|
||||
cfgs.PMKCachePeriod = mtkwifi.token_set(cfgs.PMKCachePeriod, vif_idx, http.formvalue("__pmkcacheperiod") or "0")
|
||||
cfgs.PreAuth = mtkwifi.token_set(cfgs.PreAuth, vif_idx, http.formvalue("__preauth") or "0")
|
||||
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "TIME")
|
||||
cfgs.IEEE8021X = mtkwifi.token_set(cfgs.IEEE8021X, vif_idx, "0")
|
||||
cfgs.DefaultKeyID = mtkwifi.token_set(cfgs.DefaultKeyID, vif_idx, "2")
|
||||
elseif __authmode == "IEEE8021X" then
|
||||
cfgs.RekeyMethod = mtkwifi.token_set(cfgs.RekeyMethod, vif_idx, "DISABLE")
|
||||
cfgs.AuthMode = mtkwifi.token_set(cfgs.AuthMode, vif_idx, "OPEN")
|
||||
cfgs.IEEE8021X = mtkwifi.token_set(cfgs.IEEE8021X, vif_idx, "1")
|
||||
cfgs.RADIUS_Server = mtkwifi.token_set(cfgs.RADIUS_Server, vif_idx, http.formvalue("__radius_server") or "0")
|
||||
cfgs.RADIUS_Port = mtkwifi.token_set(cfgs.RADIUS_Port, vif_idx, http.formvalue("__radius_port") or "0")
|
||||
cfgs.session_timeout_interval = mtkwifi.token_set(cfgs.session_timeout_interval, vif_idx, http.formvalue("__session_timeout_interval") or "0")
|
||||
if http.formvalue("__8021x_wep") then
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, "WEP")
|
||||
else
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, "NONE")
|
||||
end
|
||||
elseif __authmode == "WAICERT" then
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, "SMS4")
|
||||
cfgs.Wapiifname = mtkwifi.token_set(cfgs.Wapiifname, vif_idx, "br-lan")
|
||||
-- cfgs.wapicert_asipaddr
|
||||
-- cfgs.WapiAsPort
|
||||
-- cfgs.wapicert_ascert
|
||||
-- cfgs.wapicert_usercert
|
||||
elseif __authmode == "WAIPSK" then
|
||||
cfgs.EncrypType = mtkwifi.token_set(cfgs.EncrypType, vif_idx, "SMS4")
|
||||
-- cfgs.wapipsk_keytype
|
||||
-- cfgs.wapipsk_prekey
|
||||
end
|
||||
|
||||
mtkwifi.debug("__security_cfg, after, HideSSID="..tostring(cfgs.HideSSID))
|
||||
mtkwifi.debug("__security_cfg, after, NoForwarding="..tostring(cfgs.NoForwarding))
|
||||
mtkwifi.debug("__security_cfg, after, WmmCapable="..tostring(cfgs.WmmCapable))
|
||||
mtkwifi.debug("__security_cfg, after, TxRate="..tostring(cfgs.TxRate))
|
||||
mtkwifi.debug("__security_cfg, after, RekeyInterval="..tostring(cfgs.RekeyInterval))
|
||||
mtkwifi.debug("__security_cfg, after, AuthMode="..tostring(cfgs.AuthMode))
|
||||
mtkwifi.debug("__security_cfg, after, EncrypType="..tostring(cfgs.EncrypType))
|
||||
mtkwifi.debug("__security_cfg, after, WscModeOption="..tostring(cfgs.WscModeOption))
|
||||
mtkwifi.debug("__security_cfg, after, RekeyMethod="..tostring(cfgs.RekeyMethod))
|
||||
mtkwifi.debug("__security_cfg, after, IEEE8021X="..tostring(cfgs.IEEE8021X))
|
||||
mtkwifi.debug("__security_cfg, after, DefaultKeyID="..tostring(cfgs.DefaultKeyID))
|
||||
mtkwifi.debug("__security_cfg, after, PMFMFPC="..tostring(cfgs.PMFMFPC))
|
||||
mtkwifi.debug("__security_cfg, after, PMFMFPR="..tostring(cfgs.PMFMFPR))
|
||||
mtkwifi.debug("__security_cfg, after, PMFSHA256="..tostring(cfgs.PMFSHA256))
|
||||
mtkwifi.debug("__security_cfg, after, RADIUS_Server="..tostring(cfgs.RADIUS_Server))
|
||||
mtkwifi.debug("__security_cfg, after, RADIUS_Port="..tostring(cfgs.RADIUS_Port))
|
||||
mtkwifi.debug("__security_cfg, after, session_timeout_interval="..tostring(cfgs.session_timeout_interval))
|
||||
mtkwifi.debug("__security_cfg, after, PMKCachePeriod="..tostring(cfgs.PMKCachePeriod))
|
||||
mtkwifi.debug("__security_cfg, after, PreAuth="..tostring(cfgs.PreAuth))
|
||||
mtkwifi.debug("__security_cfg, after, Wapiifname="..tostring(cfgs.Wapiifname))
|
||||
end
|
||||
|
||||
function initialize_multiBssParameters(cfgs,vif_idx)
|
||||
cfgs["WPAPSK"..vif_idx]="12345678"
|
||||
cfgs["Key1Type"]=mtkwifi.token_set(cfgs["Key1Type"],vif_idx,"0")
|
||||
cfgs["Key2Type"]=mtkwifi.token_set(cfgs["Key2Type"],vif_idx,"0")
|
||||
cfgs["Key3Type"]=mtkwifi.token_set(cfgs["Key3Type"],vif_idx,"0")
|
||||
cfgs["Key4Type"]=mtkwifi.token_set(cfgs["Key4Type"],vif_idx,"0")
|
||||
cfgs["RADIUS_Server"]=mtkwifi.token_set(cfgs["RADIUS_Server"],vif_idx,"0")
|
||||
cfgs["RADIUS_Key"..vif_idx]="ralink"
|
||||
cfgs["DefaultKeyID"]=mtkwifi.token_set(cfgs["DefaultKeyID"],vif_idx,"1")
|
||||
cfgs["IEEE8021X"]=mtkwifi.token_set(cfgs["IEEE8021X"],vif_idx,"0")
|
||||
cfgs["WscConfMode"]=mtkwifi.token_set(cfgs["WscConfMode"],vif_idx,"0")
|
||||
cfgs["PreAuth"]=mtkwifi.token_set(cfgs["PreAuth"],vif_idx,"0")
|
||||
return cfgs
|
||||
end
|
||||
|
||||
function vif_cfg(dev, vif)
|
||||
local devname, vifname = dev, vif
|
||||
if not devname then devname = vif end
|
||||
mtkwifi.debug("devname="..devname)
|
||||
mtkwifi.debug("vifname="..(vifname or ""))
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
local profile = devs[devname].profile
|
||||
assert(profile)
|
||||
|
||||
local cfgs = mtkwifi.load_profile(profile)
|
||||
|
||||
for k,v in pairs(http.formvalue()) do
|
||||
if type(v) == type("") or type(v) == type(0) then
|
||||
nixio.syslog("debug", "post."..k.."="..tostring(v))
|
||||
else
|
||||
nixio.syslog("debug", "post."..k.." invalid, type="..type(v))
|
||||
end
|
||||
end
|
||||
|
||||
-- sometimes vif_idx start from 0, like AccessPolicy0
|
||||
-- sometimes it starts from 1, like WPAPSK1. nice!
|
||||
local vif_idx
|
||||
local to_url
|
||||
if http.formvalue("__action") == "vif_cfg_view" then
|
||||
vif_idx = devs[devname]["vifs"][vifname].vifidx
|
||||
mtkwifi.debug("vif_idx=", vif_idx, devname, vifname)
|
||||
to_url = luci.dispatcher.build_url("admin", "network", "wifi", "vif_cfg_view", devname, vifname)
|
||||
elseif http.formvalue("__action") == "vif_add_view" then
|
||||
cfgs.BssidNum = tonumber(cfgs.BssidNum) + 1
|
||||
vif_idx = tonumber(cfgs.BssidNum)
|
||||
to_url = luci.dispatcher.build_url("admin", "network", "wifi")
|
||||
-- initializing ; separated parameters for the new interface
|
||||
cfgs = initialize_multiBssParameters(cfgs, vif_idx)
|
||||
|
||||
end
|
||||
|
||||
-- "__" should not be in the name if user wants to copy formvalue data directly in the dat file variable
|
||||
for k,v in pairs(http.formvalue()) do
|
||||
if type(v) ~= type("") and type(v) ~= type(0) then
|
||||
nixio.syslog("err", "vif_cfg, invalid value type for "..k..","..type(v))
|
||||
elseif string.byte(k) ~= string.byte("_") then
|
||||
mtkwifi.debug("copying values for "..k)
|
||||
cfgs[k] = v or ""
|
||||
end
|
||||
end
|
||||
|
||||
cfgs["AccessPolicy"..vif_idx-1] = http.formvalue("__accesspolicy")
|
||||
local t = mtkwifi.parse_mac(http.formvalue("__maclist"))
|
||||
cfgs["AccessControlList"..vif_idx-1] = table.concat(t, ";")
|
||||
|
||||
__security_cfg(cfgs, vif_idx)
|
||||
|
||||
mtkwifi.debug(devname, profile)
|
||||
mtkwifi.save_profile(cfgs, profile)
|
||||
if http.formvalue("__apply") then
|
||||
__mtkwifi_reload(devname)
|
||||
end
|
||||
return luci.http.redirect(to_url)
|
||||
end
|
||||
|
||||
function apcli_scan(ifname)
|
||||
local aplist = mtkwifi.scan_ap(ifname)
|
||||
http.write_json(aplist)
|
||||
end
|
||||
|
||||
function get_station_list()
|
||||
http.write("get_station_list")
|
||||
end
|
||||
|
||||
function reset_wifi(devname)
|
||||
if devname then
|
||||
os.execute("cp -f /rom/etc/wireless/"..devname.."/ /etc/wireless/")
|
||||
else
|
||||
os.execute("cp -rf /rom/etc/wireless /etc/")
|
||||
end
|
||||
os.execute("rm -rf /tmp/mtk/wifi")
|
||||
__mtkwifi_reload(devname)
|
||||
return luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
end
|
||||
|
||||
function reload_wifi(devname)
|
||||
__mtkwifi_reload(devname)
|
||||
return luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
end
|
||||
|
||||
function get_raw_profile()
|
||||
local sid = http.formvalue("sid")
|
||||
http.write_json("get_raw_profile")
|
||||
end
|
||||
|
||||
function get_country_region_list()
|
||||
local mode = http.formvalue("mode")
|
||||
local cr_list;
|
||||
|
||||
if mtkwifi.band(mode) == "5G" then
|
||||
cr_list = mtkwifi.CountryRegionList_5G_All
|
||||
else
|
||||
cr_list = mtkwifi.CountryRegionList_2G_All
|
||||
end
|
||||
|
||||
http.write_json(cr_list)
|
||||
end
|
||||
|
||||
function remove_ch_by_region(ch_list, region)
|
||||
for i = #ch_list,2,-1 do
|
||||
if not ch_list[i].region[region] then
|
||||
table.remove(ch_list, i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function get_channel_list()
|
||||
local mode = http.formvalue("mode")
|
||||
local region = tonumber(http.formvalue("country_region")) or 1
|
||||
local ch_list
|
||||
|
||||
if mtkwifi.band(mode) == "5G" then
|
||||
ch_list = mtkwifi.ChannelList_5G_All
|
||||
else
|
||||
ch_list = mtkwifi.ChannelList_2G_All
|
||||
end
|
||||
|
||||
remove_ch_by_region(ch_list, region)
|
||||
http.write_json(ch_list)
|
||||
end
|
||||
|
||||
function get_HT_ext_channel_list()
|
||||
local ch_cur = tonumber(http.formvalue("ch_cur"))
|
||||
local region = tonumber(http.formvalue("country_region")) or 1
|
||||
local ext_ch_list = {}
|
||||
|
||||
if ch_cur <= 14 then -- 2.4G Channel
|
||||
local ch_list = mtkwifi.ChannelList_2G_All
|
||||
local below_ch = ch_cur - 4
|
||||
local above_ch = ch_cur + 4
|
||||
local i = 1
|
||||
|
||||
if below_ch > 0 and ch_list[below_ch + 1].region[region] then
|
||||
ext_ch_list[i] = {}
|
||||
ext_ch_list[i].val = 0
|
||||
ext_ch_list[i].text = ch_list[below_ch + 1].text
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
if above_ch <= 14 and ch_list[above_ch + 1].region[region] then
|
||||
ext_ch_list[i] = {}
|
||||
ext_ch_list[i].val = 1
|
||||
ext_ch_list[i].text = ch_list[above_ch + 1].text
|
||||
end
|
||||
else -- 5G Channel
|
||||
local ch_list = mtkwifi.ChannelList_5G_All
|
||||
local ext_ch_idx = -1
|
||||
local len = 0
|
||||
|
||||
for k, v in ipairs(ch_list) do
|
||||
len = len + 1
|
||||
if v.channel == ch_cur then
|
||||
ext_ch_idx = (k % 2 == 0) and k + 1 or k - 1
|
||||
end
|
||||
end
|
||||
|
||||
if ext_ch_idx > 0 and ext_ch_idx < len and ch_list[ext_ch_idx].region[region] then
|
||||
ext_ch_list[1] = {}
|
||||
ext_ch_list[1].val = ext_ch_idx % 2
|
||||
ext_ch_list[1].text = ch_list[ext_ch_idx].text
|
||||
end
|
||||
end
|
||||
|
||||
http.write_json(ext_ch_list)
|
||||
end
|
||||
|
||||
function get_5G_2nd_80Mhz_channel_list()
|
||||
local ch_cur = tonumber(http.formvalue("ch_cur"))
|
||||
local region = tonumber(http.formvalue("country_region"))
|
||||
local ch_list = mtkwifi.ChannelList_5G_2nd_80MHZ_ALL
|
||||
local ch_list_5g = mtkwifi.ChannelList_5G_All
|
||||
local i, j, test_ch, test_idx
|
||||
local bw80_1st_idx = -1
|
||||
|
||||
-- remove adjacent freqencies starting from list tail.
|
||||
for i = #ch_list,1,-1 do
|
||||
for j = 0,3 do
|
||||
if ch_list[i].channel == -1 then
|
||||
break
|
||||
end
|
||||
|
||||
test_ch = ch_list[i].channel + j * 4
|
||||
test_idx = ch_list[i].chidx + j
|
||||
|
||||
if test_ch == ch_cur then
|
||||
if i + 1 <= #ch_list and ch_list[i + 1] then
|
||||
table.remove(ch_list, i + 1)
|
||||
end
|
||||
table.remove(ch_list, i)
|
||||
bw80_1st_idx = i
|
||||
break
|
||||
end
|
||||
|
||||
if i == (bw80_1st_idx - 1) or (not ch_list_5g[test_idx].region[region]) then
|
||||
table.remove(ch_list, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- remove unused channel.
|
||||
for i = #ch_list,1,-1 do
|
||||
if ch_list[i].channel == -1 then
|
||||
table.remove(ch_list, i)
|
||||
end
|
||||
end
|
||||
http.write_json(ch_list)
|
||||
end
|
||||
|
||||
function apcli_cfg(dev, vif)
|
||||
local devname = dev
|
||||
mtkwifi.debug(devname)
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
mtkwifi.debug(profiles[devname])
|
||||
assert(profiles[devname])
|
||||
|
||||
local cfgs = mtkwifi.load_profile(profiles[devname])
|
||||
|
||||
for k,v in pairs(http.formvalue()) do
|
||||
if type(v) ~= type("") and type(v) ~= type(0) then
|
||||
nixio.syslog("err", "apcli_cfg, invalid value type for "..k..","..type(v))
|
||||
elseif string.byte(k) ~= string.byte("_") then
|
||||
cfgs[k] = v or ""
|
||||
end
|
||||
end
|
||||
|
||||
cfgs.ApCliSsid = ''..mtkwifi.__handleSpecialChars(http.formvalue("ApCliSsid"))
|
||||
local __authmode = http.formvalue("ApCliAuthMode")
|
||||
if __authmode == "Disable" then
|
||||
cfgs.ApCliAuthMode = "OPEN"
|
||||
cfgs.ApCliEncrypType = "NONE"
|
||||
elseif __authmode == "OPEN" or __authmode == "SHARED" then
|
||||
cfgs.ApCliAuthMode = __authmode
|
||||
cfgs.ApCliEncrypType = http.formvalue("wep_ApCliEncrypType")
|
||||
else
|
||||
cfgs.ApCliAuthMode = __authmode
|
||||
cfgs.ApCliEncrypType = http.formvalue("wpa_ApCliEncrypType")
|
||||
end
|
||||
|
||||
mtkwifi.save_profile(cfgs, profiles[devname])
|
||||
|
||||
if http.formvalue("__apply") then
|
||||
__mtkwifi_reload(devname)
|
||||
end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi", "apcli_cfg_view", dev, vif))
|
||||
end
|
||||
|
||||
function apcli_connect(dev, vif)
|
||||
-- dev_vif can be
|
||||
-- 1. mt7620.apcli0 # simple case
|
||||
-- 2. mt7615e.1.apclix0 # multi-card
|
||||
-- 3. mt7615e.1.2G.apclix0 # multi-card & multi-profile
|
||||
local devname,vifname = dev, vif
|
||||
mtkwifi.debug("devname=", dev, "vifname=", vif)
|
||||
mtkwifi.debug(devname)
|
||||
mtkwifi.debug(vifname)
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
mtkwifi.debug(profiles[devname])
|
||||
assert(profiles[devname])
|
||||
|
||||
local cfgs = mtkwifi.load_profile(profiles[devname])
|
||||
cfgs.ApCliEnable = "1"
|
||||
mtkwifi.save_profile(cfgs, profiles[devname])
|
||||
|
||||
os.execute("ifconfig "..vifname.." up")
|
||||
local brvifs = mtkwifi.__trim(mtkwifi.read_pipe("uci get network.lan.ifname"))
|
||||
if not string.match(brvifs, vifname) then
|
||||
brvifs = brvifs.." "..vifname
|
||||
nixio.syslog("debug", "add "..vifname.." into lan")
|
||||
os.execute("uci set network.lan.ifname=\""..brvifs.."\"")
|
||||
os.execute("uci commit")
|
||||
os.execute("ubus call network.interface.lan add_device \"{\\\"name\\\":\\\""..vifname.."\\\"}\"")
|
||||
end
|
||||
|
||||
os.execute("iwpriv "..vifname.." set MACRepeaterEn="..cfgs.MACRepeaterEn)
|
||||
os.execute("iwpriv "..vifname.." set ApCliEnable=0")
|
||||
os.execute("iwpriv "..vifname.." set Channel="..cfgs.Channel)
|
||||
os.execute("iwpriv "..vifname.." set ApCliAuthMode="..cfgs.ApCliAuthMode)
|
||||
os.execute("iwpriv "..vifname.." set ApCliEncrypType="..cfgs.ApCliEncrypType)
|
||||
if cfgs.ApCliAuthMode == "WEP" then
|
||||
os.execute("#iwpriv "..vifname.." set ApCliDefaultKeyID="..cfgs.ApCliDefaultKeyID)
|
||||
os.execute("#iwpriv "..vifname.." set ApCliKey1="..cfgs.ApCliKey1Str)
|
||||
elseif cfgs.ApCliAuthMode == "WPAPSK"
|
||||
or cfgs.ApCliAuthMode == "WPA2PSK"
|
||||
or cfgs.ApCliAuthMode == "WPA1PSKWPA2PSK" then
|
||||
os.execute("iwpriv "..vifname.." set ApCliWPAPSK="..cfgs.ApCliWPAPSK)
|
||||
end
|
||||
os.execute("iwpriv "..vifname.." set ApCliSsid=\""..cfgs.ApCliSsid.."\"")
|
||||
os.execute("iwpriv "..vifname.." set ApCliEnable=1")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
end
|
||||
|
||||
function apcli_disconnect(dev, vif)
|
||||
-- dev_vif can be
|
||||
-- 1. mt7620.apcli0 # simple case
|
||||
-- 2. mt7615e.1.apclix0 # multi-card
|
||||
-- 3. mt7615e.1.2G.apclix0 # multi-card & multi-profile
|
||||
local devname,vifname = dev, vif
|
||||
mtkwifi.debug("devname=", dev, "vifname", vif)
|
||||
mtkwifi.debug(devname)
|
||||
mtkwifi.debug(vifname)
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
mtkwifi.debug(profiles[devname])
|
||||
assert(profiles[devname])
|
||||
|
||||
local cfgs = mtkwifi.load_profile(profiles[devname])
|
||||
cfgs.ApCliEnable = "1"
|
||||
mtkwifi.save_profile(cfgs, profiles[devname])
|
||||
|
||||
os.execute("iwpriv "..vifname.." set ApCliEnable=0")
|
||||
|
||||
local brvifs = mtkwifi.__trim(mtkwifi.read_pipe("uci get network.lan.ifname"))
|
||||
if string.match(brvifs, vifname) then
|
||||
brvifs = mtkwifi.__trim(string.gsub(brvifs, vifname, ""))
|
||||
nixio.syslog("debug", "add "..vifname.." into lan")
|
||||
os.execute("uci set network.lan.ifname=\""..brvifs.."\"")
|
||||
os.execute("uci commit")
|
||||
os.execute("ubus call network.interface.lan remove_device \"{\\\"name\\\":\\\""..vifname.."\\\"}\"")
|
||||
end
|
||||
os.execute("ifconfig "..vifname.." down")
|
||||
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
end
|
||||
|
@ -1,343 +0,0 @@
|
||||
|
||||
<%+header%>
|
||||
<!--
|
||||
This module is a demo to configure MTK' proprietary WiFi driver.
|
||||
Basic idea is to bypass uci and edit wireless profile (mt76xx.dat) directly.
|
||||
LuCI's WiFi configuration is more logical and elegent, but it's quite tricky to
|
||||
translate uci into MTK's WiFi profile (like we did in "uci2dat").
|
||||
|
||||
Hua Shao <nossiac@163.com>
|
||||
-->
|
||||
<%
|
||||
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 debug = 0
|
||||
%>
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-17.250.41546-90ac861"></script>
|
||||
|
||||
<div id="loading" style="margin-top: 1em; display: none;">
|
||||
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:e;" />
|
||||
Please waiting while the page is loading......
|
||||
</div>
|
||||
|
||||
<form method="post" name="cbi" action="<%=luci.dispatcher.build_url("admin", "network", "wifi", "apcli_cfg", devname, vifname)%>" enctype="multipart/form-data" onreset="return cbi_validate_reset(this)" onsubmit="return cbi_validate_form(this, 'Some fields are invalid, cannot save values!')" autocomplete="off">
|
||||
|
||||
<fieldset class="cbi-section" id="vif-cfg-apcli">
|
||||
<legend> <a name="apcli_scan_section">Wireless Repeater - <%=devname.."@"..vifname%> </a></legend>
|
||||
<pre> Manually setup apcli0 connection:
|
||||
iwpriv <%=vifname%> set ApCliEnable=0 // disable sta mode first
|
||||
iwpriv <%=vifname%> set ApCliAuthMode= // root ap authentication mode
|
||||
iwpriv <%=vifname%> set ApCliEncrypType= // root ap encryption type
|
||||
iwpriv <%=vifname%> set ApCliWPAPSK= // root ap password
|
||||
iwpriv <%=vifname%> set ApCliWirelessMode= // root ap wifi mode
|
||||
iwpriv <%=vifname%> set ApCliSsid= // root ap ssid
|
||||
iwpriv <%=vifname%> set ApCliEnable=1 // enable sta mode</pre>
|
||||
<br />
|
||||
<p class="left">
|
||||
<input id="scan" type="button" class="cbi-button cbi-button-find" onclick="get_ap_list('<%=vifname%>')" value="Scan Wireless Network" />
|
||||
</p>
|
||||
<div id="loading" style="display:none;">
|
||||
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle;" />
|
||||
Please waiting while the page is loading......
|
||||
</div>
|
||||
<div id="aplist">
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="vif-cfg-apcli-config">
|
||||
<legend> <a name="apcli_cfg_section"> Connection Configurations</a> </legend>
|
||||
<table class="cbi-section-table">
|
||||
<tbody>
|
||||
<tr><th class="th1"></th><th></th><th></th></tr>
|
||||
<tr>
|
||||
<td>MAC Repeater Mode</td>
|
||||
<td>
|
||||
<input type="radio" name="MACRepeaterEn" value="1" <% if cfgs.MACRepeaterEn == "1" then %> checked="checked"<% end %> /> Enable
|
||||
<input type="radio" name="MACRepeaterEn" value="0" <% if cfgs.MACRepeaterEn ~= "1" then %> checked="checked"<% end %> /> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Root AP SSID</td>
|
||||
<td>
|
||||
<input type="text" name="ApCliSsid" id="ApCliSsid" value="<%=cfgs.ApCliSsid%>"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Root AP Channel</td>
|
||||
<td>
|
||||
<input type="text" name="Channel" id="Channel" value="<%=dev.Channel%>"/>
|
||||
</td>
|
||||
<td> <span style="color:red;">This will overwrite ap channel.</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Root AP Authentication Mode</td>
|
||||
<td>
|
||||
<select name="ApCliAuthMode" cfg="ApCliAuthMode" id="ApCliAuthMode" onchange="ApCliAuthMode_onchange(this.options[this.options.selectedIndex].value)">
|
||||
<% for _,v in ipairs(dev.ApCliAuthModeList) do %>
|
||||
<% if (cfgs.ApCliAuthMode == "OPEN" and cfgs.ApCliEncrypType== "NONE") then
|
||||
if(v == "Disable") then %>
|
||||
<option value="<%=v%>" selected="selected" ><%=v%>
|
||||
</option>
|
||||
<% else %>
|
||||
<option value="<%=v%>" ><%=v%>
|
||||
</option>
|
||||
<% end
|
||||
else %>
|
||||
<option value="<%=v%>" <% if cfgs.ApCliAuthMode==v then %>selected="selected" <% end %>><%=v%>
|
||||
</option>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="apcli_wpa"<% if cfgs.ApCliAuthMode ~= "WPA2PSK" then %> style="display: none;"<% end %>>
|
||||
<tr>
|
||||
<td>Root AP Encryption</td>
|
||||
<td>
|
||||
<select name="wpa_ApCliEncrypType" id="wpa_ApCliEncrypType" >
|
||||
<% for _, v in ipairs(dev.WPA_Enc_List) do %>
|
||||
<option value="<%=v%>" <% if cfgs.ApCliEncrypType==v then %>selected="selected" <% end %>><%=v%>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Root AP WPA Key</td>
|
||||
<td>
|
||||
<input type="text" name="ApCliWPAPSK" id="ApCliWPAPSK" value="<%=cfgs.ApCliWPAPSK%>"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="apcli_wep"<% if cfgs.ApCliAuthMode ~= "WEP" then %> style="display: none;"<% end %>>
|
||||
<tr>
|
||||
<td>Root AP Encryption</td>
|
||||
<td>
|
||||
<select name="wep_ApCliEncrypType" id="wep_ApCliEncrypType" >
|
||||
<% for _, v in ipairs(dev.WEP_Enc_List) do %>
|
||||
<option value="<%=v%>" <% if cfgs.ApCliEncrypType==v then %>selected="selected" <% end %>><%=v%>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Root AP WEP Key</td>
|
||||
<td>
|
||||
<input type="text" name="ApCliKey1Str" id="ApCliKey1Str" value="<%=cfgs.ApCliKey1Str%>"/>
|
||||
<input type="hidden" name="ApCliDefaultKeyID" value="1"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<div class="cbi-page-actions" id="apcli_form_buttons">
|
||||
<input class="cbi-button cbi-button-apply" value="Reload" type="button" onclick='wifi_reload("<%=luci.dispatcher.build_url("admin", "network", "wifi", "reload", devname)%>");' />
|
||||
<input class="cbi-button cbi-button-apply" value="Save" type="submit" />
|
||||
<input class="cbi-button cbi-button-reset" value="Reset" type="reset" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function wifi_reload(url) {
|
||||
window.scrollTo(0, 0);
|
||||
document.getElementById('loading').style.display="";
|
||||
XHR.get(url, null,
|
||||
function(x)
|
||||
{
|
||||
console.log(x);
|
||||
document.getElementById("loading").style.display="none";
|
||||
window.location.reload();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function decode_ssid(ssid)
|
||||
{
|
||||
ssid = ssid.replace(/&/g, "&");
|
||||
ssid = ssid.replace(/</g, "<");
|
||||
ssid = ssid.replace(/>/g, ">");
|
||||
ssid = ssid.replace(/"/g, "\"");
|
||||
ssid = ssid.replace(/'/g, "'");
|
||||
ssid = ssid.replace(/ /g, " ");
|
||||
var patt = new RegExp(/&#(\d+);/);
|
||||
|
||||
while (res = patt.exec(ssid))
|
||||
{
|
||||
ssid = ssid.replace("&#" + res[1] + ";", String.fromCharCode(res[1]));
|
||||
}
|
||||
return ssid;
|
||||
}
|
||||
|
||||
var ap_list;
|
||||
function create_ap_table (aplist) {
|
||||
var table = document.createElement('table');
|
||||
table.setAttribute("id", "aplist_table");
|
||||
for (i in aplist) {
|
||||
var tr = table.insertRow(i);
|
||||
var td0 = tr.insertCell(0);
|
||||
td0.innerHTML = aplist[i].ssid;
|
||||
var td1 = tr.insertCell(1);
|
||||
td1.innerHTML = aplist[i].channel;
|
||||
var td2 = tr.insertCell(2);
|
||||
td2.innerHTML = aplist[i].bssid;
|
||||
var td3 = tr.insertCell(3);
|
||||
td3.innerHTML = aplist[i].security;
|
||||
var td4 = tr.insertCell(4);
|
||||
td4.innerHTML = aplist[i].rssi;
|
||||
var td5 = tr.insertCell(5);
|
||||
if (aplist[i].authmode == "OPEN"
|
||||
|| aplist[i].authmode == "WPAPSK"
|
||||
|| aplist[i].authmode == "WPA2PSK"
|
||||
|| aplist[i].authmode == "WPAPSKWPA2PSK") {
|
||||
td5.innerHTML = '<a href="javascript:choose_rootap(\''+i+'\')" >Choose This</a>';
|
||||
|
||||
} else {
|
||||
td5.innerHTML = 'Security Not Supported';
|
||||
}
|
||||
}
|
||||
|
||||
var tr = table.insertRow(0);
|
||||
var td0 = tr.insertCell(0);
|
||||
td0.innerHTML = '<strong>SSID</strong>';
|
||||
var td1 = tr.insertCell(1);
|
||||
td1.innerHTML = '<strong>Channel</strong>';
|
||||
var td2 = tr.insertCell(2);
|
||||
td2.innerHTML = '<strong>BSSID</strong>';
|
||||
var td3 = tr.insertCell(3);
|
||||
td3.innerHTML = '<strong>Security</strong>';
|
||||
var td4 = tr.insertCell(4);
|
||||
td4.innerHTML = '<strong>RSSI</strong>';
|
||||
var td5 = tr.insertCell(5);
|
||||
td5.innerHTML = '<strong>Action</strong>';
|
||||
|
||||
var div = document.getElementById('aplist');
|
||||
div.innerHTML = "";
|
||||
div.appendChild(table);
|
||||
}
|
||||
|
||||
function get_ap_list(vifname) {
|
||||
|
||||
document.getElementById("loading").style.display="";
|
||||
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "apcli_scan")%>/' + vifname, null,
|
||||
function(x)
|
||||
{
|
||||
console.log(x)
|
||||
ap_list = eval(x.response);
|
||||
console.log(ap_list);
|
||||
create_ap_table(ap_list);
|
||||
document.getElementById("loading").style.display="none";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function toggle_apcli (show) {
|
||||
if (show) {
|
||||
document.getElementById('apcli_cfg').style.display = "";
|
||||
|
||||
var a = document.getElementById('ApCliAuthMode')
|
||||
var to = a.options[a.options.selectedIndex].value
|
||||
if (to == "WPA2PSK"
|
||||
|| to == "WPAPSK"
|
||||
|| to == "WPAPSKWPA2PSK") {
|
||||
document.getElementById("apcli_wpa").style.display="";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
} else if (to == "WEP") {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="";
|
||||
} else {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
}
|
||||
}
|
||||
else {
|
||||
document.getElementById('apcli_cfg').style.display = "none";
|
||||
document.getElementById('apcli_wpa').style.display = "none";
|
||||
document.getElementById('apcli_wep').style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function ApCliAuthMode_onchange (to) {
|
||||
if (to == "WPA2PSK"
|
||||
|| to == "WPAPSK"
|
||||
|| to == "WPAPSKWPA2PSK") {
|
||||
document.getElementById("apcli_wpa").style.display="";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
} else if (to == "OPEN" || to == "SHARED") {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="";
|
||||
} else {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
}
|
||||
}
|
||||
|
||||
function choose_rootap(index) {
|
||||
document.getElementById("ApCliSsid").value=decode_ssid(ap_list[index].ssid);
|
||||
document.getElementById("Channel").value=ap_list[index].channel;
|
||||
document.getElementById("ApCliAuthMode").value=ap_list[index].authmode;
|
||||
if (ap_list[index].authmode == "WPA2PSK"
|
||||
|| ap_list[index].authmode == "WPAPSK"
|
||||
|| ap_list[index].authmode == "WPAPSKWPA2PSK") {
|
||||
document.getElementById("wpa_ApCliEncrypType").value=ap_list[index].encrypttype;
|
||||
} else if (ap_list[index].authmode == "OPEN" || ap_list[index].authmode == "SHARED") {
|
||||
if (ap_list[index].encrypttype == "NONE")
|
||||
{
|
||||
document.getElementById("ApCliAuthMode").value="Disable";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("wep_ApCliEncrypType").value=ap_list[index].encrypttype;
|
||||
}
|
||||
}
|
||||
ApCliAuthMode_onchange(document.getElementById("ApCliAuthMode").value);
|
||||
document.getElementById("ApCliWPAPSK").value="";
|
||||
document.getElementById("ApCliKey1Str").value="";
|
||||
location.href="#apcli_cfg_section";
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
ApCliAuthMode_onchange(document.getElementById("ApCliAuthMode").value);
|
||||
<% if cfgs.ApCliEnable == "1" then %>
|
||||
toggle_apcli(true);
|
||||
<% else %>
|
||||
toggle_apcli(false);
|
||||
<% end %>
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<%+footer%>
|
@ -1,851 +0,0 @@
|
||||
|
||||
<%+header%>
|
||||
<!--
|
||||
This module is a demo to configure MTK' proprietary WiFi driver.
|
||||
Basic idea is to bypass uci and edit wireless profile (mt76xx.dat) directly.
|
||||
LuCI's WiFi configuration is more logical and elegent, but it's quite tricky to
|
||||
translate uci into MTK's WiFi profile (like we did in "uci2dat").
|
||||
|
||||
Hua Shao <nossiac@163.com>
|
||||
-->
|
||||
|
||||
<%
|
||||
local disp = require "luci.dispatcher"
|
||||
-- local request = disp.context.path
|
||||
local request = disp.context.request
|
||||
local mtkwifi = require("mtkwifi")
|
||||
local devname = request[5]
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
local dev = {}
|
||||
for _,v in ipairs(devs) do
|
||||
if v.devname == devname then
|
||||
dev = v
|
||||
end
|
||||
end
|
||||
|
||||
local cfgs = mtkwifi.load_profile(dev.profile)
|
||||
|
||||
%>
|
||||
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-17.250.41546-90ac861"></script>
|
||||
|
||||
<div id="loading" style="margin-top: 1em; display: none;">
|
||||
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:e;" />
|
||||
Please waiting while the page is loading......
|
||||
</div>
|
||||
|
||||
<form method="post" name="cbi" action="<%=luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg", devname)%>" enctype="multipart/form-data" onreset="return cbi_validate_reset(this)" onsubmit="return cbi_validate_form(this, 'Some fields are invalid, cannot save values!')" autocomplete="false">
|
||||
<fieldset class="cbi-section">
|
||||
<legend> Device Configurations - <%=devname%>
|
||||
<%
|
||||
local diff = mtkwifi.diff_profile(dev.profile)
|
||||
if next(diff) ~= nil then
|
||||
%>
|
||||
<span style="color:red;">(<a href="javascript:location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "reload", dev.devname)%>'">reload</a> to apply changes)</span>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
</legend>
|
||||
<table id="dev-cfg-basic" class="cbi-section-table">
|
||||
<tr><th></th><td></td><td></td></tr>
|
||||
<tr>
|
||||
<td>Mode</td>
|
||||
<td>
|
||||
<select style="width:auto" name="WirelessMode" id="WirelessMode" onchange="WirelessMode_onchange(this.options[this.options.selectedIndex].value)">
|
||||
<% for k,v in pairs(dev.WirelessModeList) do %>
|
||||
<option value="<%=k%>" <% if tonumber(dev.WirelessMode) == tonumber(k) then%> selected="selected"<% end %>><%=k%> - <%=v%></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Channel</td>
|
||||
<td>
|
||||
<select style="width:auto; min-width:180px;" name="Channel" id="Channel" onchange="Channel_onchange(this.value)" <% if cfgs.ApCliEnable == "1" then %> disabled="disabled" <% end %>>
|
||||
</select>
|
||||
</td>
|
||||
<td><% if cfgs.ApCliEnable == "1" then %> APClient/Repeater Mode. <% end %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Country Code</td>
|
||||
<td>
|
||||
<select name="CountryCode" style="width:auto">
|
||||
<option value="US" id="advCountryCodeUS" <% if cfgs.CountryCode == "US" then %> selected="selected"<% end %>>US (United States)</option>
|
||||
<option value="JP" id="advCountryCodeJP" <% if cfgs.CountryCode == "JP" then %> selected="selected"<% end %>>JP (Japan)</option>
|
||||
<option value="FR" id="advCountryCodeFR" <% if cfgs.CountryCode == "FR" then %> selected="selected"<% end %>>FR (France)</option>
|
||||
<option value="TW" id="advCountryCodeTW" <% if cfgs.CountryCode == "TW" then %> selected="selected"<% end %>>TW (Taiwan)</option>
|
||||
<option value="IE" id="advCountryCodeIE" <% if cfgs.CountryCode == "IE" then %> selected="selected"<% end %>>IE (Ireland)</option>
|
||||
<option value="HK" id="advCountryCodeHK" <% if cfgs.CountryCode == "HK" then %> selected="selected"<% end %>>HK (Hong Kong)</option>
|
||||
<option value="NONE" id="advCountryCodeNONE"<% if cfgs.CountryCode == "NONE" then %> checked="checked"<% end %>>NONE</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Country Region</td>
|
||||
<td>
|
||||
<select style="width:auto; min-width:180px;" name="__cr" id="__cr" onchange="CountryRegion_onchange(this.value)">
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% if cfgs.HT_OpMode then %>
|
||||
<tr>
|
||||
<td>Operating Mode</td>
|
||||
<td>
|
||||
<select style="width:auto" name="HT_OpMode">
|
||||
<option value="0" <% if cfgs.HT_OpMode == "0" then %> selected="selected"<% end%>>Mixed Mode</option>
|
||||
<option value="1" <% if cfgs.HT_OpMode == "1" then %> selected="selected"<% end%>>Green Field</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.HT_GI then %>
|
||||
<tr>
|
||||
<td>HT Guard Interval</td>
|
||||
<td>
|
||||
<select style="width:auto" name="HT_GI">
|
||||
<option value="0" <% if cfgs.HT_GI == "0" then %> selected="selected"<% end%>>Long</option>
|
||||
<option value="1" <% if cfgs.HT_GI == "1" then %> selected="selected"<% end%>>Short</option>
|
||||
<option value="2" <% if cfgs.HT_GI == "2" then %> selected="selected"<% end%>>Auto</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td>Channel BandWidth</td>
|
||||
<td>
|
||||
<select style="width:auto" name="__bw" id="__bw" onchange="Bw_onchange(this.options[this.options.selectedIndex].value)">
|
||||
<option value="20" <% if dev.__bw == "20" then %> selected="selected"<% end%>>20 MHz</option>
|
||||
<option value="40" <% if dev.__bw == "40" then %> selected="selected"<% end%>>40 MHz</option>
|
||||
<option value="60" <% if dev.__bw == "60" then %> selected="selected"<% end%>>20/40 MHz</option>
|
||||
<option value="80" <% if dev.__bw == "80" then %> selected="selected"<% end%>>80 MHz</option>
|
||||
<option value="160" <% if dev.__bw == "160" then %> selected="selected"<% end%>>160 MHz</option>
|
||||
<option value="161" <% if dev.__bw == "161" then %> selected="selected"<% end%>>80+80 MHz</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% if cfgs.VHT_BW then %>
|
||||
<tr>
|
||||
<td>2G 40Mhz Ext Channel</td>
|
||||
<td>
|
||||
<select style="width:auto; min-width:180px;" name="HT_EXTCHA" id="HT_EXTCHA" <% if cfgs.ApCliEnable == "1" or dev.__bw ~= "40" or dev.__bw ~= "60" then %> disabled="disabled" <% end %>>
|
||||
</select>
|
||||
</td>
|
||||
<td><% if cfgs.ApCliEnable == "1" then %> APClient/Repeater Mode. <% end %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5G 2nd 80Mhz Channel</td>
|
||||
<td>
|
||||
<select style="width:auto; min-width:180px;" name="VHT_Sec80_Channel" id="VHT_Sec80_Channel" <% if cfgs.ApCliEnable == "1" or dev.__bw ~= "180" then %> disabled="disabled" <% end %>>
|
||||
</select>
|
||||
</td>
|
||||
<td><% if cfgs.ApCliEnable == "1" then %> APClient/Repeater Mode. <% end %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.HT_STBC then %>
|
||||
<tr>
|
||||
<td>STBC</td>
|
||||
<td>
|
||||
<input type="radio" name="HT_STBC" value="1" <% if cfgs.HT_STBC == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="HT_STBC" value="0" <% if cfgs.HT_STBC == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.HT_AMSDU then %>
|
||||
<tr>
|
||||
<td>A-MSDU</td>
|
||||
<td>
|
||||
<input type="radio" name="HT_AMSDU" value="1" <% if cfgs.HT_AMSDU == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="HT_AMSDU" value="0" <% if cfgs.HT_AMSDU == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.HT_AutoBA then %>
|
||||
<tr>
|
||||
<td>Auto Block ACK</td>
|
||||
<td>
|
||||
<input type="radio" name="HT_AutoBA" value="1" <% if cfgs.HT_AutoBA == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="HT_AutoBA" value="0" <% if cfgs.HT_AutoBA == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.HT_BADecline then %>
|
||||
<tr>
|
||||
<td>Decline BA Request</td>
|
||||
<td>
|
||||
<input type="radio" name="HT_BADecline" value="1" <% if cfgs.HT_BADecline == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="HT_BADecline" value="0" <% if cfgs.HT_BADecline == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.HT_DisallowTKIP then %>
|
||||
<tr>
|
||||
<td>HT Disallow TKIP</td>
|
||||
<td>
|
||||
<input type="radio" name="HT_DisallowTKIP" value="1" <% if cfgs.HT_DisallowTKIP == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="HT_DisallowTKIP" value="0" <% if cfgs.HT_DisallowTKIP == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.HT_LDPC then %>
|
||||
<tr>
|
||||
<td>HT LDPC</td>
|
||||
<td>
|
||||
<input type="radio" name="HT_LDPC" value="1" <% if cfgs.HT_LDPC == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="HT_LDPC" value="0" <% if cfgs.HT_LDPC == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.VHT_SGI then %>
|
||||
<tr>
|
||||
<td>VHT Short GI</td>
|
||||
<td>
|
||||
<select style="width:auto" name="VHT_SGI">
|
||||
<option value="0" <% if cfgs.VHT_SGI == "0" then %> selected="selected"<% end%>>Long</option>
|
||||
<option value="1" <% if cfgs.VHT_SGI == "1" then %> selected="selected"<% end%>>Short</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.VHT_STBC then %>
|
||||
<tr>
|
||||
<td>VHT STBC</td>
|
||||
<td>
|
||||
<input type="radio" name="VHT_STBC" value="1" <% if cfgs.VHT_STBC == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="VHT_STBC" value="0" <% if cfgs.VHT_STBC == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.VHT_BW_SIGNAL then %>
|
||||
<tr>
|
||||
<td>VHT BW Signaling</td>
|
||||
<td>
|
||||
<input type="radio" name="VHT_BW_SIGNAL" value="1" <% if cfgs.VHT_BW_SIGNAL == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="VHT_BW_SIGNAL" value="0" <% if cfgs.VHT_BW_SIGNAL == "0" then %> checked="checked"<% end %>/> Disable
|
||||
<input type="radio" name="VHT_BW_SIGNAL" value="0" <% if cfgs.VHT_BW_SIGNAL == "2" then %> checked="checked"<% end %>/> Dynamic
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.VHT_LDPC then %>
|
||||
<tr>
|
||||
<td>VHT LDPC</td>
|
||||
<td>
|
||||
<input type="radio" name="VHT_LDPC" value="1" <% if cfgs.VHT_LDPC == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="VHT_LDPC" value="0" <% if cfgs.VHT_LDPC == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.BGProtection then %>
|
||||
<tr>
|
||||
<td>BG Protection Mode</td>
|
||||
<td>
|
||||
<select name="BGProtection" style="width:auto">
|
||||
<option value="0" <% if cfgs.BGProtection == "0" then %>selected="selected"<% end %>>Auto</option>
|
||||
<option value="1" <% if cfgs.BGProtection == "1" then %>selected="selected"<% end %>>Always On</option>
|
||||
<option value="2" <% if cfgs.BGProtection == "2" then %>selected="selected"<% end %>>Always Off</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.VHT_BW then %>
|
||||
<tr>
|
||||
<td>HT Protection</td>
|
||||
<td>
|
||||
<input type="radio" name="HT_PROTECT" value="1" <% if cfgs.HT_PROTECT == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="HT_PROTECT" value="0" <% if cfgs.HT_PROTECT == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.BeaconPeriod then %>
|
||||
<tr>
|
||||
<td>Beacon Interval</td>
|
||||
<td>
|
||||
<input name="BeaconPeriod" value="<%=cfgs.BeaconPeriod%>" />ms(range 20-999, default 100)
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.DtimPeriod then %>
|
||||
<tr>
|
||||
<td>Data Beacon Rate (DTIM)</td>
|
||||
<td>
|
||||
<input name="DtimPeriod" value="<%=cfgs.DtimPeriod%>" />ms(range 1-255, default 1)
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.FragThreshold then %>
|
||||
<tr>
|
||||
<td>Fragment Threshold</td>
|
||||
<td>
|
||||
<input name="FragThreshold" value="<%=cfgs.FragThreshold%>" />(range 256-2346, default 2346)
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.RTSThreshold then %>
|
||||
<tr>
|
||||
<td>RTS Threshold</td>
|
||||
<td>
|
||||
<input name="RTSThreshold" value="<%=cfgs.RTSThreshold%>" />(range 256-2347, default 2347)
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.TxPower then %>
|
||||
<tr>
|
||||
<td>TX Power</td>
|
||||
<td>
|
||||
<input name="TxPower" value="<%=cfgs.TxPower%>" />dbm(range 1-100, default 100)
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.TxPreamble then %>
|
||||
<tr>
|
||||
<td>Short Preamble</td>
|
||||
<td>
|
||||
<input type="radio" name="TxPreamble" value="1" <% if cfgs.TxPreamble == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="TxPreamble" value="0" <% if cfgs.TxPreamble == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.ShortSlot then %>
|
||||
<tr>
|
||||
<td>Short Slot</td>
|
||||
<td>
|
||||
<input type="radio" name="ShortSlot" value="1" <% if cfgs.ShortSlot == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="ShortSlot" value="0" <% if cfgs.ShortSlot == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.TxBurst then %>
|
||||
<tr>
|
||||
<td>TX Burst</td>
|
||||
<td>
|
||||
<input type="radio" name="TxBurst" value="1" <% if cfgs.TxBurst == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="TxBurst" value="0" <% if cfgs.TxBurst == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.PktAggregate then %>
|
||||
<tr>
|
||||
<td>Packet Aggregate</td>
|
||||
<td>
|
||||
<input type="radio" name="PktAggregate" value="1" <% if cfgs.PktAggregate == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="PktAggregate" value="0" <% if cfgs.PktAggregate == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if cfgs.IEEE80211H then %>
|
||||
<tr>
|
||||
<td>802.11H</td>
|
||||
<td>
|
||||
<input type="radio" name="IEEE80211H" value="1" <% if cfgs.IEEE80211H == "1" then %> checked="checked"<% end %>/> Enable
|
||||
<input type="radio" name="IEEE80211H" value="0" <% if cfgs.IEEE80211H == "0" then %> checked="checked"<% end %>/> Disable
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
|
||||
</fieldset>
|
||||
<div class="cbi-page-actions">
|
||||
<input class="cbi-button cbi-button-apply" value="Reload" type="button" onclick='wifi_reload("<%=luci.dispatcher.build_url("admin", "network", "wifi", "reload", devname)%>");' />
|
||||
<input class="cbi-button cbi-button-apply" value="Save" type="submit" />
|
||||
<input class="cbi-button cbi-button-apply" name="__apply" value="Save & Apply" type="submit" />
|
||||
<input class="cbi-button cbi-button-reset" value="Reset" type="reset" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form method="post" name="cbi2" action="<%=luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg_raw", devname)%>" enctype="multipart/form-data" onreset="return cbi_validate_reset(this)" onsubmit="return cbi_validate_form(this, 'Some fields are invalid, cannot save values!')" autocomplete="off">
|
||||
<fieldset class="cbi-section">
|
||||
<legend> Raw Configurations ( Edit WiFi profile directly )</legend>
|
||||
<p> <span style="color: red"><b>WARNING</b></span> : DO NOT MESS WITH IT IF YOU DON'T UNDERSTAND IT!</p>
|
||||
<textarea name="raw" id="raw" style="width:98%; height: 200px;"><%
|
||||
local fd = io.open(dev.profile)
|
||||
for line in fd:lines() do
|
||||
print(line)
|
||||
end
|
||||
%></textarea>
|
||||
</fieldset>
|
||||
<div class="cbi-page-actions">
|
||||
<input class="cbi-button cbi-button-reset" value="Reset" onclick="location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg_view", devname)%>'" type="button" />
|
||||
<input class="cbi-button cbi-button-apply" id="save" value="Save" type="submit" onclick="if (confirm('You are going to overwrite the profile directly, are you sure?')) return true; else return false;" />
|
||||
<input class="cbi-button cbi-button-apply" id="reset" value="Restore Profile to Factory Setting" type="button" onclick="if (confirm('You are going to reset the profile of <%=devname%> to factory default, are you sure?')) location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg_reset", devname)%>'" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function wifi_reload(url) {
|
||||
window.scrollTo(0, 0);
|
||||
document.getElementById('loading').style.display="";
|
||||
XHR.get(url, null,
|
||||
function(x)
|
||||
{
|
||||
console.log(x);
|
||||
document.getElementById("loading").style.display="none";
|
||||
window.location.reload();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function WirelessMode_onchange (mode) {
|
||||
var cr = GetCountryRegion(mode);
|
||||
|
||||
getCountryRegionList(mode, cr);
|
||||
}
|
||||
|
||||
function CountryRegion_onchange(country_region) {
|
||||
var wmode_o = document.getElementById('WirelessMode');
|
||||
var wmode;
|
||||
|
||||
if (wmode_o)
|
||||
wmode = wmode_o.value;
|
||||
|
||||
if (wmode == "")
|
||||
wmode = "<%=cfgs.WirelessMode%>";
|
||||
|
||||
getChannelList(wmode, country_region);
|
||||
}
|
||||
|
||||
function Channel_onchange (ch) {
|
||||
getBw(null, ch);
|
||||
}
|
||||
|
||||
function Bw_onchange(bw, ch) {
|
||||
var ch_val;
|
||||
|
||||
if (!ch){
|
||||
var ch_o = document.getElementById('Channel');
|
||||
|
||||
if (ch_o)
|
||||
ch_val = ch_o.value;
|
||||
|
||||
if (ch_val == "")
|
||||
ch_val = "<%=cfgs.Channel%>";
|
||||
} else {
|
||||
ch_val = ch
|
||||
}
|
||||
|
||||
get5G2nd80MhzChannelList(bw, ch_val);
|
||||
getHTExtChannel(bw, ch_val);
|
||||
}
|
||||
|
||||
function initCountryRegionList(list, mode){
|
||||
var select = document.getElementById('__cr');
|
||||
var cr = {};
|
||||
|
||||
if (is_mode_gband(mode))
|
||||
cr = "<%=cfgs.CountryRegion%>";
|
||||
else if (is_mode_aband(mode))
|
||||
cr = "<%=cfgs.CountryRegionABand%>";
|
||||
|
||||
var new_cr = initList(select, list, cr, "region");
|
||||
|
||||
CountryRegion_onchange(new_cr);
|
||||
}
|
||||
|
||||
function getCountryRegionList(mode) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_country_region_list")%>', 'mode='+mode,
|
||||
function(x)
|
||||
{
|
||||
//console.log(x);
|
||||
//console.log(x.response);
|
||||
var json = eval(x.response);
|
||||
initCountryRegionList(json, mode);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function initChannelList(list) {
|
||||
/* choose auto select when no matching item in the lis */
|
||||
var select = document.getElementById('Channel');
|
||||
var ch = {};
|
||||
var new_ch = null;
|
||||
|
||||
ch.cval = select.value;
|
||||
ch.oval = "<%=dev.Channel%>";
|
||||
|
||||
var new_ch = initList(select, list, ch, "channel");
|
||||
Channel_onchange(new_ch);
|
||||
}
|
||||
|
||||
function getChannelList(mode, country_region) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_channel_list")%>', 'mode='+mode+'&country_region='+country_region,
|
||||
function(x)
|
||||
{
|
||||
console.log(x);
|
||||
console.log(x.response);
|
||||
var json = eval(x.response);
|
||||
initChannelList(json);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function GetCountryRegion(mode) {
|
||||
var cr_o = document.getElementById('__cr');
|
||||
var cr = "";
|
||||
|
||||
if (cr_o) {
|
||||
cr = cr_o.value;
|
||||
}
|
||||
|
||||
if (cr == "") {
|
||||
if (is_mode_gband(mode)) {
|
||||
cr = "<%=cfgs.CountryRegion%>";
|
||||
} else if (is_mode_aband(mode)) {
|
||||
cr = "<%=cfgs.CountryRegionABand%>";
|
||||
} else {
|
||||
alert("Cannot get valid CountryRegion from invalid WireleeMode");
|
||||
}
|
||||
}
|
||||
|
||||
return cr;
|
||||
}
|
||||
|
||||
function getBw(mode, ch) {
|
||||
/* choose bw as wide as possible if modification is needed */
|
||||
var bw_sel = document.getElementById('__bw');
|
||||
var wmode;
|
||||
|
||||
if (!mode) {
|
||||
wmode = document.getElementById('WirelessMode');
|
||||
wmode = wmode.value*1;
|
||||
} else {
|
||||
wmode = mode*1;
|
||||
}
|
||||
|
||||
if (is_mode_legacy_only(wmode)) {
|
||||
for (var idx in bw_sel.options) {
|
||||
bw_sel.options[idx].disabled = false;
|
||||
|
||||
if (bw_sel.options[idx].value == 20)
|
||||
bw_sel.options[idx].selected = true;
|
||||
|
||||
if (bw_sel.options[idx].value > 20)
|
||||
bw_sel.options[idx].disabled = true;
|
||||
}
|
||||
} else if (is_ch_gband(ch)) {
|
||||
for (var idx in bw_sel.options) {
|
||||
bw_sel.options[idx].disabled = false;
|
||||
|
||||
if ((bw_sel.options[idx].value == 60) && (bw_sel.selectedIndex > idx))
|
||||
bw_sel.options[idx].selected = true;
|
||||
|
||||
if (bw_sel.options[idx].value > 60)
|
||||
bw_sel.options[idx].disabled = true;
|
||||
}
|
||||
} else if (is_ch_aband(ch)) {
|
||||
var chosen60 = false;
|
||||
var bw160 = "<%=cfgs.VHT_BW%>"*1;
|
||||
|
||||
if (bw_sel.value == 60)
|
||||
chosen60 = 1;
|
||||
|
||||
for (var idx in bw_sel.options) {
|
||||
bw_sel.options[idx].disabled = false;
|
||||
|
||||
if (bw_sel.options[idx].value == 40 && chosen60 && bw160 == 0) {
|
||||
bw_sel.options[idx].selected = true;
|
||||
} else if (bw_sel.options[idx].value == 60) {
|
||||
bw_sel.options[idx].disabled = true;
|
||||
bw_sel.options[idx].selected = false;
|
||||
} else if (bw_sel.options[idx].value == 160 && chosen60 && bw160 == 1) {
|
||||
bw_sel.options[idx].selected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bw_onchange(bw_sel.value, ch);
|
||||
}
|
||||
|
||||
function init5G2nd80MhzChannelList(list) {
|
||||
var select = document.getElementById('VHT_Sec80_Channel');
|
||||
var ch2 = {};
|
||||
var new_ch2 = null;
|
||||
|
||||
ch2.cval = select.value;
|
||||
ch2.oval = "<%=cfgs.VHT_Sec80_Channel%>";
|
||||
|
||||
initList(select, list, ch2, "channel");
|
||||
|
||||
if (select.length > 0)
|
||||
select.disabled = false;
|
||||
else
|
||||
alert("[Warning] 5G 2nd 80Mhz Channel is not available. Please Check CountryRegion.");
|
||||
}
|
||||
|
||||
function get5G2nd80MhzChannelList(bw, ch) {
|
||||
var ch_5g_2nd = document.getElementById('VHT_Sec80_Channel');
|
||||
|
||||
ch_5g_2nd.disabled = true;
|
||||
|
||||
if (ch == "0")
|
||||
return;
|
||||
|
||||
if (bw != "161" || ch == "0")
|
||||
return;
|
||||
|
||||
var mode = document.getElementById('WirelessMode');
|
||||
mode = mode.value*1;
|
||||
|
||||
var cr = GetCountryRegion(mode);
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_5G_2nd_80Mhz_channel_list")%>', 'ch_cur='+ch+'&country_region='+cr,
|
||||
function(x)
|
||||
{
|
||||
//console.log(x);
|
||||
//console.log(x.response);
|
||||
var json = eval(x.response);
|
||||
init5G2nd80MhzChannelList(json);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function initHTExtChannelList(list) {
|
||||
var select = document.getElementById('HT_EXTCHA');
|
||||
var ch2 = {};
|
||||
var new_ch2 = null;
|
||||
|
||||
ch2.cval = select.value;
|
||||
ch2.oval = "<%=cfgs.HT_EXTCHA%>";
|
||||
|
||||
initList(select, list, ch2, "val");
|
||||
|
||||
if (select.length > 0)
|
||||
select.disabled = false;
|
||||
else
|
||||
alert("[Warning] 2G 40Mhz Ext Channel is not avalable. Please Check CountryRegion.");
|
||||
}
|
||||
|
||||
function getHTExtChannel(bw, ch) {
|
||||
var ch_2g_ext = document.getElementById('HT_EXTCHA');
|
||||
|
||||
ch_2g_ext.disabled = true;
|
||||
|
||||
if (ch == "0")
|
||||
return;
|
||||
|
||||
if (bw != "40" && bw != "60")
|
||||
return;
|
||||
|
||||
var mode = document.getElementById('WirelessMode');
|
||||
mode = mode.value*1;
|
||||
|
||||
var cr = GetCountryRegion(mode);
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_HT_ext_channel_list")%>', 'ch_cur='+ch+'&country_region='+cr,
|
||||
function(x)
|
||||
{
|
||||
console.log(x);
|
||||
console.log(x.response);
|
||||
var json = eval(x.response);
|
||||
initHTExtChannelList(json);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function toggle_apcli (show) {
|
||||
if (show) {
|
||||
document.getElementById('apcli_cfg').style.display = "";
|
||||
|
||||
var a = document.getElementById('ApCliAuthMode')
|
||||
var to = a.options[a.options.selectedIndex].value
|
||||
if (to == "WPA2PSK") {
|
||||
document.getElementById("apcli_wpa").style.display="";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
} else if (to == "WEP") {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="";
|
||||
} else {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
}
|
||||
}
|
||||
else {
|
||||
document.getElementById('apcli_cfg').style.display = "none";
|
||||
document.getElementById('apcli_wpa').style.display = "none";
|
||||
document.getElementById('apcli_wep').style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function ApCliAuthMode_onchange (to) {
|
||||
if (to == "WPA2PSK") {
|
||||
document.getElementById("apcli_wpa").style.display="";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
} else if (to == "WEP") {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="";
|
||||
} else {
|
||||
document.getElementById("apcli_wpa").style.display="none";
|
||||
document.getElementById("apcli_wep").style.display="none";
|
||||
}
|
||||
}
|
||||
|
||||
function toggle_atf(o) {
|
||||
if (o.getAttribute("value") == "1") {
|
||||
document.getElementById("VOW_Airtime_Fairness_En").value = "0";
|
||||
o.setAttribute("value", "0");
|
||||
o.className = "cbi-button cbi-button-add";
|
||||
o.innerHTML = "Enable ATC";
|
||||
} else {
|
||||
document.getElementById("VOW_Airtime_Fairness_En").value = "1";
|
||||
o.setAttribute("value", "1");
|
||||
o.className = "cbi-button cbi-button-remove";
|
||||
o.innerHTML = "Disable ATC";
|
||||
}
|
||||
}
|
||||
|
||||
function toggle_atc(o) {
|
||||
if (o.getAttribute("value") == "1") {
|
||||
document.getElementById("VOW_BW_Ctrl").value = "0";
|
||||
o.setAttribute("value", "0");
|
||||
o.className = "cbi-button cbi-button-add";
|
||||
o.innerHTML = "Enable ATC";
|
||||
document.getElementById("atc-table").style.display = "none";
|
||||
} else {
|
||||
document.getElementById("VOW_BW_Ctrl").value = "1";
|
||||
o.setAttribute("value", "1");
|
||||
o.className = "cbi-button cbi-button-remove";
|
||||
o.innerHTML = "Disable ATC";
|
||||
document.getElementById("atc-table").style.display = "";
|
||||
}
|
||||
}
|
||||
|
||||
function is_mode_legacy_only(mode) {
|
||||
var imode = mode*1;
|
||||
|
||||
return ((imode >= 0) && (imode <= 4));
|
||||
}
|
||||
|
||||
function is_mode_gband(mode) {
|
||||
var imode = mode*1;
|
||||
var gband_mode_list = [0,1,4,6,7,9];
|
||||
var i;
|
||||
|
||||
for (i = 0; i < gband_mode_list.length; i++){
|
||||
if( gband_mode_list[i] == imode )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_mode_aband(mode) {
|
||||
var imode = mode*1;
|
||||
var aband_mode_list = [2,8,11,14,15];
|
||||
var i;
|
||||
|
||||
for (i = 0; i < aband_mode_list.length; i++){
|
||||
if( aband_mode_list[i] == imode )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_ch_gband(ch) {
|
||||
ch = ch*1;
|
||||
|
||||
if (ch == 0) {
|
||||
var wmode = document.getElementById('WirelessMode');
|
||||
|
||||
return is_mode_gband(wmode.value);
|
||||
}
|
||||
|
||||
return ((ch > 0) && (ch <= 14));
|
||||
}
|
||||
|
||||
function is_ch_aband(ch) {
|
||||
ch = ch*1;
|
||||
|
||||
if (ch == 0) {
|
||||
var wmode = document.getElementById('WirelessMode');
|
||||
|
||||
return is_mode_aband(wmode.value);
|
||||
}
|
||||
|
||||
return ((ch >= 36 ) && (ch <= 165));
|
||||
}
|
||||
|
||||
function initList(selobj, list, selvals, value, text){
|
||||
var sel = {};
|
||||
var id = selobj.id;
|
||||
|
||||
if (typeof(selvals) != "object")
|
||||
sel[0] = selvals;
|
||||
else
|
||||
sel = selvals;
|
||||
|
||||
selobj.innerHTML = "";
|
||||
for (var i in list) {
|
||||
var opt = document.createElement('option');
|
||||
|
||||
if(value)
|
||||
opt.value = list[i][value];
|
||||
else
|
||||
opt.value = list[i].value;
|
||||
|
||||
if(text)
|
||||
opt.text = list[i][text];
|
||||
else
|
||||
opt.text = list[i].text;
|
||||
|
||||
selobj.appendChild(opt);
|
||||
}
|
||||
|
||||
var selv = null;
|
||||
for (var k in sel) {
|
||||
//console.log("[initList][" + id + "] sel[" + k + "]=" + sel[k]);
|
||||
for (var i in selobj.options){
|
||||
if (selobj.options[i].value == sel[k]){
|
||||
selobj.options[i].selected = true;
|
||||
selv = sel[k];
|
||||
//console.log("[initList][" + id + "] found selv=" + selv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (selv) break;
|
||||
}
|
||||
|
||||
if (!selv) {
|
||||
selv = selobj.value;
|
||||
//console.log("[initList][" + id + "] !selv, selv=" + selv);
|
||||
}
|
||||
|
||||
return selv;
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
WirelessMode_onchange('<%=dev.WirelessMode%>');
|
||||
ApCliAuthMode_onchange('<%=cfgs.ApCliAuthMode%>');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<%+footer%>
|
@ -1,133 +0,0 @@
|
||||
<%+header%>
|
||||
<!--
|
||||
This module is a demo to configure MTK' proprietary WiFi driver.
|
||||
Basic idea is to bypass uci and edit wireless profile (mt76xx.dat) directly.
|
||||
LuCI's WiFi configuration is more logical and elegent, but it's quite tricky to
|
||||
translate uci into MTK's WiFi profile (like we did in "uci2dat").
|
||||
|
||||
Hua Shao <nossiac@163.com>
|
||||
-->
|
||||
<%
|
||||
local mtkwifi = require("mtkwifi")
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
%>
|
||||
<h2><a name="content">无线概况</a></h2>
|
||||
|
||||
<div id="loading" style="margin-top: 1em; display: none;">
|
||||
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:e;" />
|
||||
Please waiting while the page is loading......
|
||||
</div>
|
||||
|
||||
<% if #devs == 0 then %>
|
||||
<fieldset class="cbi-section">
|
||||
<legend>No wireless device found.</legend>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% for _,dev in ipairs(devs) do %>
|
||||
<fieldset class="cbi-section">
|
||||
<table class="cbi-section-table" style="margin:10px; empty-cells:hide">
|
||||
<!-- physical device -->
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:34px">
|
||||
<img src="/luci-static/resources/icons/wifi_big.png" style="float:left; margin-right:10px" />
|
||||
</td>
|
||||
<td colspan="2" style="text-align:left">
|
||||
<big><strong title="<%=dev.profile%>"> Generic Mediatek <%=dev.devname%></strong></big>
|
||||
<%
|
||||
local diff = mtkwifi.diff_profile(dev.profile)
|
||||
if next(diff) ~= nil then
|
||||
%>
|
||||
<span style="color:red;">* need reload to apply changes</span>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
<br/>
|
||||
<span><strong>模式:</strong> <% if dev.ApCliEnable == "1" then %> APCli <% else %> Master AP<% end %> </span>
|
||||
</td>
|
||||
<td style="width:310px;text-align:right">
|
||||
<input class="cbi-button cbi-button-reload" style="width:100px" title="Reload WiFi network" value="重新加载" type="button" onclick='wifi_reload("<%=luci.dispatcher.build_url("admin", "network", "wifi", "reload", dev.devname)%>");' />
|
||||
<input class="cbi-button cbi-button-edit" style="width:100px" title="Configure WiFi device" value="修改" type="button" onclick="location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "dev_cfg_view", dev.devname)%>'" />
|
||||
<input class="cbi-button cbi-button-add" style="width:100px" title="Add WiFi network" value="添加" type="button" onclick="location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "vif_add_view", dev.devname,dev.vifs.__prefix)%>'" />
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /physical device -->
|
||||
<!-- network list -->
|
||||
<% for _,vif in ipairs(dev.vifs) do %>
|
||||
<tr class="cbi-section-table-row cbi-rowstyle-1">
|
||||
<td></td>
|
||||
<td class="cbi-value-field" style="width:16px; padding:3px">
|
||||
<% if vif.state == "up" then %>
|
||||
<img src="/luci-static/resources/icons/signal-75-100.png" />
|
||||
<% else %>
|
||||
<img src="/luci-static/resources/icons/signal-none.png" />
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="cbi-value-field" style="vertical-align:middle; text-align:left; padding:3px"><strong>Interface:</strong> <%=vif.vifname%> | <strong>SSID:</strong> <%=vif.__ssid%> | <strong>信道:</strong> <%=vif.__channel or dev.Channel%>
|
||||
<br/>
|
||||
<% if vif.state == "up" then %>
|
||||
<strong>BSSID:</strong>:<%=vif.__bssid%> | <strong>无线模式:</strong> <%=dev.WirelessModeList[tonumber(vif.__wirelessmode or dev.WirelessMode)]%>
|
||||
<% else %>
|
||||
Wireless is disabled or not associated
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="cbi-value-field" style="text-align:right">
|
||||
<% if not vif.state then %>
|
||||
<input class="cbi-button cbi-button-apply" style="width:100px" title="Enable this network" value="启用" type="button" onclick="alert('Please restart manually to create this interface.')" />
|
||||
<% elseif vif.state == "up" then %>
|
||||
<input class="cbi-button cbi-button-reset" style="width:100px" title="Disable this network" value="停用" type="button" onclick="location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "vif_disable", vif.vifname)%>'" />
|
||||
<% else %>
|
||||
<input class="cbi-button cbi-button-apply" style="width:100px" title="Enable this network" value="启用" type="button" onclick="location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "vif_enable", vif.vifname)%>'" />
|
||||
<% end %>
|
||||
<input class="cbi-button cbi-button-edit" style="width:100px" title="Edit this network" value="修改" type="button" onclick="location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "vif_cfg_view", dev.devname, vif.vifname)%>'" />
|
||||
<input class="cbi-button cbi-button-remove" style="width:100px" title="Delete this network" value="移除" type="button" onclick="location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "vif_del", dev.devname, vif.vifname)%>'" />
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<!-- /network list -->
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<!--
|
||||
<h2><a id="content" name="content"><%:Station List%></a></h2>
|
||||
|
||||
<fieldset class="cbi-section">
|
||||
<table class="cbi-section-table" style="margin:10px" id="iw-assoclist">
|
||||
<tr class="cbi-section-table-titles">
|
||||
<th class="cbi-section-table-cell"></th>
|
||||
<th class="cbi-section-table-cell"><%:SSID%></th>
|
||||
<th class="cbi-section-table-cell"><%:MAC-Address%></th>
|
||||
<th class="cbi-section-table-cell"><%:IPv4-Address%></th>
|
||||
<th class="cbi-section-table-cell"><%:Signal%></th>
|
||||
<th class="cbi-section-table-cell"><%:Noise%></th>
|
||||
<th class="cbi-section-table-cell"><%:RX Rate%></th>
|
||||
<th class="cbi-section-table-cell"><%:TX Rate%></th>
|
||||
</tr>
|
||||
<tr class="cbi-section-table-row cbi-rowstyle-2">
|
||||
<td class="cbi-value-field" colspan="8">
|
||||
<em><%:Collecting data...%></em>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
-->
|
||||
|
||||
<script type="text/javascript">
|
||||
function wifi_reload(url) {
|
||||
window.scrollTo(0, 0);
|
||||
document.getElementById('loading').style.display="";
|
||||
XHR.get(url, null,
|
||||
function(x)
|
||||
{
|
||||
console.log(x);
|
||||
document.getElementById("loading").style.display="none";
|
||||
window.location.reload();
|
||||
}
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<%+footer%>
|
@ -1,590 +0,0 @@
|
||||
|
||||
<%+header%>
|
||||
<!--
|
||||
This module is a demo to configure MTK' proprietary WiFi driver.
|
||||
Basic idea is to bypass uci and edit wireless profile (mt76xx.dat) directly.
|
||||
LuCI's WiFi configuration is more logical and elegent, but it's quite tricky to
|
||||
translate uci into MTK's WiFi profile (like we did in "uci2dat").
|
||||
|
||||
Hua Shao <nossiac@163.com>
|
||||
-->
|
||||
<%
|
||||
function any_wsc_enabled(wsc_conf_mode)
|
||||
if (wsc_conf_mode == "7") then
|
||||
return 1;
|
||||
end
|
||||
if (wsc_conf_mode == "4") then
|
||||
return 1;
|
||||
end
|
||||
if (wsc_conf_mode == "2") then
|
||||
return 1;
|
||||
end
|
||||
if (wsc_conf_mode == "1") then
|
||||
return 1;
|
||||
end
|
||||
return 0;
|
||||
end
|
||||
|
||||
local disp = require "luci.dispatcher"
|
||||
local path = disp.context.path
|
||||
local request = disp.context.request
|
||||
local mtkwifi = require("mtkwifi")
|
||||
local devname
|
||||
local vifname, vifidx
|
||||
local dev = {}
|
||||
local vif = {}
|
||||
|
||||
if request[4] == "vif_add_view" then
|
||||
devname, vifname = request[5], request[6]
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
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]
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
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 WscValue = mtkwifi.token_get(cfgs["WscConfMode"], vifidx, "0") or "0"
|
||||
%>
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-17.250.41546-90ac861"></script>
|
||||
|
||||
<div id="loading" style="margin-top: 1em; display: none;">
|
||||
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:e;" />
|
||||
Please waiting while the page is loading......
|
||||
</div>
|
||||
|
||||
<form method="post" name="cbi" action="<%=luci.dispatcher.build_url("admin", "network", "wifi", "vif_cfg", devname, vifname)%>" enctype="multipart/form-data" onsubmit="return validate_security(<%=vifidx%>,<%=cfgs["HT_DisallowTKIP"]%>)" autocomplete="off">
|
||||
<% if not dev or not vif then%>
|
||||
<fieldset class="cbi-section">
|
||||
<legend>Interface Not Exist - <%=vifname and devname.."@"..vifname or devname%>
|
||||
</legend>
|
||||
</fieldset>
|
||||
<% else %>
|
||||
<fieldset class="cbi-section">
|
||||
<legend>无线配置 - <%=vifname and devname.."@"..vifname or devname%>
|
||||
<%
|
||||
local diff = mtkwifi.diff_profile(dev.profile)
|
||||
if next(diff) ~= nil then
|
||||
%>
|
||||
<span style="color:red;">(<a href="javascript:location.href='<%=luci.dispatcher.build_url("admin", "network", "wifi", "reload", dev.devname)%>'">reload</a> to apply changes)</span>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
</legend>
|
||||
<table id="vif-cfg-basic">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>SSID</td>
|
||||
<td>
|
||||
<input value="<%=vif.__ssid%>" name="<%="SSID"..vifidx%>" required="required" />
|
||||
<input value="<%=request[4]%>" name="__action" type="hidden" />
|
||||
</td>
|
||||
</tr>
|
||||
<% if dev.DBDC_MODE == "0" then %>
|
||||
<tr>
|
||||
<td>Channel</td>
|
||||
<td>
|
||||
<select style="width:auto" name="__channel">
|
||||
<% for i=0,14 do %>
|
||||
<option value="<%=i%>" <% if i==vif.__channel then %> selected="selected"<% end %>>
|
||||
<% if i==0 then %>Auto<% else %><%=i%><% end %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td>加密</td>
|
||||
<td>
|
||||
<select name="__authmode" cfg="AuthMode" id="AuthMode" onchange="AuthMode_onchange(this.options[this.options.selectedIndex].value)">
|
||||
<%
|
||||
local AuthModes
|
||||
if(WscValue == "0") then
|
||||
AuthModes = dev.AuthModeList
|
||||
else
|
||||
AuthModes = dev.WpsEnableAuthModeList
|
||||
end
|
||||
for _, v in ipairs(AuthModes) do
|
||||
if (mtkwifi.token_get(cfgs.IEEE8021X, vifidx, nil) == "1") then
|
||||
if(v == "IEEE8021X") then %>
|
||||
<option value="<%=v%>" selected="selected" ><%=v%>
|
||||
</option>
|
||||
<% else %>
|
||||
<option value="<%=v%>" ><%=v%>
|
||||
</option>
|
||||
<% end
|
||||
elseif (vif.__authmode == "OPEN" and vif.__encrypttype== "NONE") then
|
||||
if(v == "Disable") then %>
|
||||
<option value="<%=v%>" selected="selected" ><%=v%>
|
||||
</option>
|
||||
<% else %>
|
||||
<option value="<%=v%>" ><%=v%>
|
||||
</option>
|
||||
<% end
|
||||
else%>
|
||||
<option value="<%=v%>" <% if vif.__authmode==v then %>selected="selected" <% end %>><%=v%>
|
||||
</option>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="wpacommon" style="display:none;">
|
||||
<tr>
|
||||
<td>算法</td>
|
||||
<td>
|
||||
<select name="__wpa_encrypttype" id="__wpa_encrypttype" cfg="EncrypType">
|
||||
<% for _,v in ipairs(dev.WPA_Enc_List) do %>
|
||||
<option value="<%=v%>" <% if vif.__encrypttype==v then %>selected="selected" <% end %>><%=v%>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>密钥更新时间</td>
|
||||
<td>
|
||||
<input value="<%=vif.__rekeyinterval%>" type="text" name="__rekeyinterval" id="__rekeyinterval" cfg="RekeyInterval" /> (0 ~ 4194303) 秒
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="WPA2PSK" style="display:none;">
|
||||
<tr>
|
||||
<td>密码</td>
|
||||
<td>
|
||||
<input value="<%=vif.__wpapsk%>" type="text" name="<%="WPAPSK"..vifidx%>" id="<%="WPAPSK"..vifidx%>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="WEP" style="display:none;">
|
||||
<tr>
|
||||
<td>Encryption</td>
|
||||
<td>
|
||||
<select name="__wep_encrypttype" cfg="EncrypType">
|
||||
<% for _,v in ipairs(dev.WEP_Enc_List) do %>
|
||||
<option value="<%=v%>" <% if vif.__encrypttype==v then %>selected="selected" <% end %>><%=v%>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Default Key</td>
|
||||
<td>
|
||||
<select name="__DefaultKeyID" id="__DefaultKeyID">
|
||||
<option value="1" <%if tonumber(vif.__wepkey_id) == 1 then%>selected="selected"<%end%>>1</option>
|
||||
<option value="2" <%if tonumber(vif.__wepkey_id) == 2 then%>selected="selected"<%end%>>2</option>
|
||||
<option value="3" <%if tonumber(vif.__wepkey_id) == 3 then%>selected="selected"<%end%>>3</option>
|
||||
<option value="4" <%if tonumber(vif.__wepkey_id) == 4 then%>selected="selected"<%end%>>4</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>WEP Key 1</td>
|
||||
<td>
|
||||
<input value="<%=cfgs["Key1Str"..vifidx]%>" type="text" name="<%="Key1Str"..vifidx%>" id="<%="Key1Str"..vifidx%>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Key Type 1</td>
|
||||
<td>
|
||||
<select id="<%="WEP1Type"..vifidx%>" name="<%="WEP1Type"..vifidx%>">
|
||||
<option value="1" <%if(mtkwifi.token_get(cfgs["Key1Type"], vifidx, 0)) == "1" then %> selected="selected"<%end%>>ASCII</option>
|
||||
<option value="0" <%if(mtkwifi.token_get(cfgs["Key1Type"], vifidx, 0)) == "0" then %> selected="selected"<%end%>>Hex</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>WEP Key 2</td>
|
||||
<td>
|
||||
<input value="<%=cfgs["Key2Str"..vifidx]%>" type="text" name="<%="Key2Str"..vifidx%>" id="<%="Key2Str"..vifidx%>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Key Type 2</td>
|
||||
<td>
|
||||
<select id="<%="WEP2Type"..vifidx%>" name="<%="WEP2Type"..vifidx%>">
|
||||
<option value="1" <%if(mtkwifi.token_get(cfgs["Key2Type"], vifidx, 0)) == "1" then %> selected="selected"<%end%>>ASCII</option>
|
||||
<option value="0" <%if(mtkwifi.token_get(cfgs["Key2Type"], vifidx, 0)) == "0" then %> selected="selected"<%end%>>Hex</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>WEP Key 3</td>
|
||||
<td>
|
||||
<input value="<%=cfgs["Key3Str"..vifidx]%>" type="text" name="<%="Key3Str"..vifidx%>" id="<%="Key3Str"..vifidx%>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Key Type 3</td>
|
||||
<td>
|
||||
<select id="<%="WEP3Type"..vifidx%>" name="<%="WEP3Type"..vifidx%>">
|
||||
<option value="1" <%if(mtkwifi.token_get(cfgs["Key3Type"], vifidx, 0)) == "1" then %> selected="selected"<%end%>>ASCII</option>
|
||||
<option value="0" <%if(mtkwifi.token_get(cfgs["Key3Type"], vifidx, 0)) == "0" then %> selected="selected"<%end%>>Hex</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>WEP Key 4</td>
|
||||
<td>
|
||||
<input value="<%=cfgs["Key4Str"..vifidx]%>" type="text" name="<%="Key4Str"..vifidx%>" id="<%="Key4Str"..vifidx%>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Key Type 4</td>
|
||||
<td>
|
||||
<select id="<%="WEP4Type"..vifidx%>" name="<%="WEP4Type"..vifidx%>">
|
||||
<option value="1" <%if(mtkwifi.token_get(cfgs["Key4Type"], vifidx, 0)) == "1" then %> selected="selected"<%end%>>ASCII</option>
|
||||
<option value="0" <%if(mtkwifi.token_get(cfgs["Key4Type"], vifidx, 0)) == "0" then %> selected="selected"<%end%>>Hex</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="WPA2" style="display:none;">
|
||||
<tr>
|
||||
<td>PMK Cache Period</td>
|
||||
<td>
|
||||
<input value="<%=vif.__pmkcacheperiod%>" type="text" name="__pmkcacheperiod" id="__pmkcacheperiod" cfg="PMKCachePeriod" /> minute(s)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pre-Authentication</td>
|
||||
<td>
|
||||
<input name="__preauth" id="__preauth" value="1"
|
||||
<% if mtkwifi.token_get(cfgs["PreAuth"], vifidx, 0) == "1" then %>
|
||||
checked="checked"
|
||||
<% end %> type="checkbox" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="PMF" style="display:none;">
|
||||
<tr>
|
||||
<td>MFPC </td>
|
||||
<td> <input name="__pmfmfpc" id="__pmfmfpc" value="1"
|
||||
<% if mtkwifi.token_get(cfgs["PMFMFPC"], vifidx, 0) == "1" then %>
|
||||
checked="checked"
|
||||
<% end %> type="checkbox" /> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MFPR </td>
|
||||
<td> <input name="__pmfmfpr" id="__pmfmfpr" value="1"
|
||||
<% if mtkwifi.token_get(cfgs["PMFMFPR"], vifidx, 0) == "1" then %>
|
||||
checked="checked"
|
||||
<% end %> type="checkbox" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MFPSHA256 </td>
|
||||
<td> <input name="__pmfsha256" id="__pmfsha256" value="1"
|
||||
<% if mtkwifi.token_get(cfgs["PMFSHA256"], vifidx, 0) == "1" then %>
|
||||
checked="checked"
|
||||
<% end %> type="checkbox" /> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="IEEE8021X" style="display:none;">
|
||||
<tr>
|
||||
<td>WEP for 8021X</td>
|
||||
<td>
|
||||
<input value="1" type="checkbox" name="__8021x_wep" <% if vif.__encrypttype=="WEP" then %>checked="checked" <% end %> />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="radius" style="display:none">
|
||||
<tr>
|
||||
<td>Radius Server IP</td>
|
||||
<td>
|
||||
<input value="<%=vif.__radius_server%>" type="text" name="__radius_server" id="__radius_server" cfg="RADIUS_Server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Radius Server Port</td>
|
||||
<td>
|
||||
<input value="<%=vif.__radius_port%>" type="text" name="__radius_port" id="__radius_port" cfg="RADIUS_Port" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shared Secret</td>
|
||||
<td>
|
||||
<input value="<%=cfgs["RADIUS_Key"..vifidx]%>" type="text" name="<%="RADIUS_Key"..vifidx%>" id="<%="RADIUS_Key"..vifidx%>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Session Timeout</td>
|
||||
<td>
|
||||
<input value="<%=mtkwifi.token_get(cfgs.session_timeout_interval, vifidx, 0)%>" type="text" name="__session_timeout_interval" id="__session_timeout_interval" /> second(s)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Idle Timeout</td>
|
||||
<td>
|
||||
<input value="<%=cfgs.idle_timeout_interval%>" type="text" name="idle_timeout_interval" id="idle_timeout_interval" /> second(s)
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>隐藏 SSID</td>
|
||||
<td>
|
||||
<input name="__hidessid" cfg="HideSSID" value="1"
|
||||
<% if vif.__hidessid == "1" then %>
|
||||
checked="checked"
|
||||
<% end %> type="checkbox" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>隔离客户端</td>
|
||||
<td>
|
||||
<input name="__noforwarding" cfg="NoForwarding" value="1"
|
||||
<% if vif.__noforwarding == "1" then %>
|
||||
checked="checked"
|
||||
<% end %> type="checkbox" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>WMM 模式</td>
|
||||
<td>
|
||||
<input name="__wmmcapable" cfg="WmmCapable" value="1"
|
||||
<% if vif.__wmmcapable ~= "0" then %>
|
||||
checked="checked"
|
||||
<% end %> type="checkbox" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>强制发射速率 ( 0为自动,建议值 )</td>
|
||||
<td>
|
||||
<input value="<%=vif.__txrate or 0%>" name="__txrate" id="__txrate" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="cbi-page-actions">
|
||||
<input class="cbi-button cbi-button-apply" value="重新加载" type="button" onclick='wifi_reload("<%=luci.dispatcher.build_url("admin", "network", "wifi", "reload", devname)%>");' />
|
||||
<input class="cbi-button cbi-button-apply" value="保存" type="submit" />
|
||||
<input class="cbi-button cbi-button-apply" name="__apply" value="保存&应用" type="submit" />
|
||||
<input class="cbi-button cbi-button-reset" value="重置" type="reset" />
|
||||
</div>
|
||||
<% end %> <!-- if not dev -->
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function wifi_reload(url) {
|
||||
window.scrollTo(0, 0);
|
||||
document.getElementById('loading').style.display="";
|
||||
XHR.get(url, null,
|
||||
function(x)
|
||||
{
|
||||
console.log(x);
|
||||
document.getElementById("loading").style.display="none";
|
||||
window.location.reload();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function AuthMode_onchange(to) {
|
||||
var enc_list = new Array()
|
||||
enc_list[0] = "OPEN";
|
||||
enc_list[1] = "WEP";
|
||||
enc_list[2] = "WPA2PSK";
|
||||
enc_list[3] = "WPA2";
|
||||
enc_list[4] = "IEEE8021X";
|
||||
enc_list[5] = "WPAPSKWPA2PSK";
|
||||
enc_list[6] = "WPA1WPA2";
|
||||
|
||||
//replacing input string to WEP (for the case of OPEN, SHARED, WEPAUTO) so as to enable the control with id wep
|
||||
if ((to == "WEPAUTO") || (to == "SHARED") || (to == "OPEN")) {
|
||||
to = "WEP";
|
||||
}
|
||||
for (enc in enc_list) {
|
||||
var e = document.getElementById(enc_list[enc])
|
||||
if (enc_list[enc] == to) {
|
||||
if (e) e.style.display = "";
|
||||
} else {
|
||||
if (e) e.style.display = "none";
|
||||
}
|
||||
}
|
||||
if (to == "WPA2" || to == "IEEE8021X" || to == "WPA1WPA2") {
|
||||
document.getElementById("radius").style.display = "";
|
||||
} else {
|
||||
document.getElementById("radius").style.display = "none";
|
||||
}
|
||||
if (to == "WPA2" || to == "WPA2PSK" || to == "WPAPSKWPA2PSK" || to == "WPA1WPA2") {
|
||||
document.getElementById("wpacommon").style.display = "";
|
||||
if (to != "WPAPSKWPA2PSK") {
|
||||
document.getElementById("PMF").style.display = "";
|
||||
} else {
|
||||
document.getElementById("PMF").style.display = "none";
|
||||
}
|
||||
} else {
|
||||
document.getElementById("wpacommon").style.display = "none";
|
||||
}
|
||||
if (to == "WPAPSKWPA2PSK") {
|
||||
document.getElementById("WPA2PSK").style.display = "";
|
||||
}
|
||||
}
|
||||
|
||||
function validate_security(vifidx, ht_disallow_tkip) {
|
||||
if (document.getElementById("__activeTab").value != "basic") {
|
||||
return true;
|
||||
}
|
||||
var e = document.getElementById("AuthMode");
|
||||
var AuthMode = e.options[e.selectedIndex].value;
|
||||
|
||||
if (AuthMode == "Disable") {
|
||||
if (isNaN(document.getElementById("__txrate").value) == true || (document.getElementById("__txrate").value == "")) {
|
||||
alert('Please input a valid TX Rate value');
|
||||
return false;
|
||||
}
|
||||
} else if (AuthMode == "OPEN" || AuthMode == "WEPAUTO" || AuthMode == "SHARED") {
|
||||
return check_Wep(AuthMode, vifidx, ht_disallow_tkip);
|
||||
} else if (AuthMode == "WPAPSK" || AuthMode == "WPA2PSK" || AuthMode == "WPAPSKWPA2PSK") {
|
||||
return check_WpaKey(AuthMode, vifidx, ht_disallow_tkip);
|
||||
} else if (AuthMode == "WPA2") {
|
||||
if (check_Wpa2(AuthMode, vifidx) == false)
|
||||
return false;
|
||||
|
||||
if (check_radius(vifidx) == false)
|
||||
return false;
|
||||
} else if (AuthMode == "8021X") {
|
||||
if (check_radius(vifidx) == false)
|
||||
return false;
|
||||
} else if (AuthMode == "WPA" || AuthMode == "WPA1WPA2") // WPA or WPA1WP2 mixed mode
|
||||
{
|
||||
if (check_Wpa(AuthMode, vifidx, ht_disallow_tkip) == false)
|
||||
return false;
|
||||
if (check_radius(vifidx) == false)
|
||||
return false;
|
||||
} else if (AuthMode == "IEEE8021X") // 802.1x
|
||||
{
|
||||
if (check_radius(vifidx) == false)
|
||||
return false;
|
||||
} else {
|
||||
alert("Unknown value " + AuthMode + "for Auth Mode");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function check_Wpa2(AuthMode, vifidx) {
|
||||
if (isNaN(document.getElementById("__rekeyinterval").value) == true) {
|
||||
alert('Please input a valid key renewal interval');
|
||||
return false;
|
||||
}
|
||||
if (document.getElementById("__rekeyinterval").value == 0) {
|
||||
alert('Renew key interval is equal to 0, so the device will not refresh key');
|
||||
}
|
||||
if (!document.getElementById("__pmkcacheperiod").value.length) {
|
||||
alert('Please input the PMK Cache Period.');
|
||||
return false;
|
||||
} else if (isNaN(document.getElementById("__pmkcacheperiod").value)) {
|
||||
alert('Please input a number for PMK Cache Period.');
|
||||
return false;
|
||||
}
|
||||
if (check_radius(vifidx) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
function check_WpaKey(AuthMode, vifidx, ht_disallow_tkip) {
|
||||
var keyvalue = document.getElementById("WPAPSK" + vifidx).value;
|
||||
if (keyvalue.length == 0) {
|
||||
alert('Please input wpapsk key!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keyvalue.length < 8) {
|
||||
alert('Please input at least 8 character of wpapsk key!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keyvalue.length == 64 && checkHex(keyvalue) == false) {
|
||||
alert('Please input 8~63 ASCII or 64 Hexadecimal character!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (checkInjection(keyvalue) == false) {
|
||||
alert('Invalid characters in Pass Phrase.');
|
||||
return false;
|
||||
}
|
||||
return check_Wpa(AuthMode, vifidx, ht_disallow_tkip);
|
||||
}
|
||||
|
||||
function check_Wpa(AuthMode, vifidx, ht_disallow_tkip) {
|
||||
var e = document.getElementById("__wpa_encrypttype");
|
||||
var EncrypType = e.options[e.selectedIndex].value;
|
||||
// there is no tkip-aes mixed mode in WPA-PSK.
|
||||
if ((AuthMode == "WPA" || AuthMode == "WPAPSK") && (EncrypType == "TKIPAES")) {
|
||||
alert("There is no TKIP-AES mode in WPA-PSK");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ht_disallow_tkip == "1" && EncrypType == "TKIP")
|
||||
alert("Disallow TKIP/WEP encryption is enabled, so 11N rate will turn off!");
|
||||
|
||||
if (isNaN(document.getElementById("__rekeyinterval").value) == true) {
|
||||
alert('Please input a valid key renewal interval');
|
||||
return false;
|
||||
}
|
||||
if (document.getElementById("__rekeyinterval").value == 0) {
|
||||
alert('Renew key interval is equal to 0, so the device will not refresh key');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function check_Wep(AuthMode, vifidx, ht_disallow_tkip) {
|
||||
var e = document.getElementById("__DefaultKeyID");
|
||||
var defaultid = e.options[e.selectedIndex].value;
|
||||
var keyvalue = document.getElementById("Key" + defaultid + "Str" + vifidx).value;
|
||||
if (keyvalue.length == 0) {
|
||||
alert('Please input wep key' + defaultid + ' !');
|
||||
return false;
|
||||
}
|
||||
var keylength = keyvalue.length;
|
||||
if (keylength != 0) {
|
||||
if (document.getElementById("WEP" + defaultid + "Type" + vifidx).selectedIndex == 0) {
|
||||
if (keylength != 5 && keylength != 13) {
|
||||
alert('Please input 5 or 13 characters of wep key' + defaultid + ' !');
|
||||
return false;
|
||||
}
|
||||
if (checkInjection(keyvalue) == false) {
|
||||
alert('Wep key' + defaultid + " contains invalid characters.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (document.getElementById("WEP" + defaultid + "Type" + vifidx).selectedIndex == 1) {
|
||||
if (keylength != 10 && keylength != 26) {
|
||||
alert('Please input 10 or 26 characters of wep key' + defaultid + ' !');
|
||||
return false;
|
||||
}
|
||||
if (checkHex(keyvalue) == false) {
|
||||
alert('Invalid Wep key1 format!');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ht_disallow_tkip == "1")
|
||||
alert("Disallow TKIP/WEP encryption is enabled, so 11N rate will turn off!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
window.onload = AuthMode_onchange(document.getElementById("AuthMode").options[document.getElementById("AuthMode").selectedIndex].value)
|
||||
</script>
|
||||
<%+footer%>
|
@ -1,2 +0,0 @@
|
||||
/etc/wireless/mt7615/
|
||||
|
@ -1,199 +0,0 @@
|
||||
#!/usr/bin/env lua
|
||||
-- Alternative for OpenWrt's /sbin/wifi.
|
||||
-- Copyright Not Reserved.
|
||||
-- Hua Shao <nossiac@163.com>
|
||||
|
||||
package.path = '/lib/wifi/?.lua;'..package.path
|
||||
|
||||
local mtkwifi = require("mtkwifi")
|
||||
local nixio = require("nixio")
|
||||
|
||||
function usage()
|
||||
print("wifi <up|down|reset|reload|status> [devname]")
|
||||
end
|
||||
|
||||
|
||||
function wifi_common_up(devname)
|
||||
nixio.syslog("debug", "wifi_common_up "..tostring(devname))
|
||||
|
||||
-- need to find out the vif prefix for this device
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
if string.match(vif, "ra%a-%d+") then
|
||||
os.execute("ifconfig "..vif.." up")
|
||||
end
|
||||
end
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
if string.match(vif, "apcli%a-%d+") then
|
||||
os.execute("ifconfig "..vif.." up")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function wifi_common_down(devname)
|
||||
nixio.syslog("debug", "wifi_common_down "..tostring(devname))
|
||||
|
||||
-- need to find out the vif prefix for this device
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
if string.match(vif, "apcli%d+")
|
||||
or string.match(vif, "apclii%d+") then
|
||||
os.execute("ifconfig "..vif.." down")
|
||||
end
|
||||
end
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
if string.match(vif, "ra%d+")
|
||||
or string.match(vif, "rai%d+")
|
||||
or string.match(vif, "rae%d+")
|
||||
or string.match(vif, "rax%d+") then
|
||||
os.execute("ifconfig "..vif.." down")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function wifi_common_reload(devname)
|
||||
nixio.syslog("debug", "wifi_common_reload "..tostring(devname))
|
||||
wifi_common_up()
|
||||
wifi_common_down()
|
||||
end
|
||||
|
||||
function wifi_common_restart(devname)
|
||||
nixio.syslog("debug", "wifi_common_restart "..tostring(devname))
|
||||
wifi_common_reload()
|
||||
end
|
||||
|
||||
function wifi_common_reset(devname)
|
||||
nixio.syslog("debug", "wifi_common_reset called!")
|
||||
local curpath = "/etc/wireless/"
|
||||
if devname then
|
||||
curpath = curpath..devname.."/"
|
||||
end
|
||||
local defpath = "/rom"..defpath
|
||||
if mtkwifi.exists(defpath) then
|
||||
os.execute("rm -rf "..curpath)
|
||||
os.execute("cp -rf "..defpath.." "..curpath)
|
||||
wifi_common_reload()
|
||||
else
|
||||
nixio.syslog("debug", defpath.." missing, unable to reset!")
|
||||
end
|
||||
end
|
||||
|
||||
function wifi_common_status(devname)
|
||||
nixio.syslog("debug", "wifi_common_status "..tostring(devname))
|
||||
print(mtkwifi.read_pipe("iwconfig"))
|
||||
print(mtkwifi.read_pipe("ifconfig -a"))
|
||||
end
|
||||
|
||||
function wifi_common_detect(devname)
|
||||
nixio.syslog("debug", "wifi_common_detect "..tostring(devname))
|
||||
local devs = mtkwifi.getdevs()
|
||||
for _,dev in ipairs(devs) do
|
||||
print("config wifi-device "..dev.devname..
|
||||
"\n\toption type "..dev.devname..
|
||||
"\n\toption vendor ralink"..
|
||||
"\n\toption channel "..dev.Channel)
|
||||
for _,vif in ipairs(dev.vifs) do
|
||||
print("\nconfig wifi-iface"..
|
||||
"\n\toption device"..dev.devname..
|
||||
"\n\toption ifname"..vif.vifname..
|
||||
"\n\toption network lan"..
|
||||
"\n\toption mode ap")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _,f in ipairs(string.split(mtkwifi.read_pipe("find /lib/wifi/ -name \"*.lua\" 2>/dev/null"), "\n")) do
|
||||
dofile(f)
|
||||
end
|
||||
|
||||
function wifi(cmd, devname)
|
||||
local mtkwifi = require("mtkwifi")
|
||||
local devs, l1parser = mtkwifi.__get_l1dat()
|
||||
if not devs or not l1parser then
|
||||
return wifi_orig(cmd, devname)
|
||||
end
|
||||
|
||||
if devname then
|
||||
local dev = devs.devname_ridx[devname]
|
||||
assert(mtkwifi.exists(dev.init_script))
|
||||
local compatname = dev.init_compatible
|
||||
assert(compatname)
|
||||
|
||||
if _G[compatname.."_"..cmd] then
|
||||
nixio.syslog("info", "call "..compatname.."_"..cmd.."("..devname..")")
|
||||
_G[compatname.."_"..cmd](devname)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- if devname not not specified
|
||||
for devname, dev in pairs(devs.devname_ridx) do
|
||||
local compatname = dev.init_compatible
|
||||
nixio.syslog("info", "call "..compatname.."_"..cmd.."("..devname..")")
|
||||
_G[compatname.."_"..cmd](devname)
|
||||
end
|
||||
end
|
||||
|
||||
function wifi_orig(cmd,devname)
|
||||
local relname = nil
|
||||
if devname then
|
||||
relname = string.split(devname,".")[1]
|
||||
end
|
||||
|
||||
if relname then
|
||||
if _G[relname.."_"..cmd] then
|
||||
nixio.syslog("info", "call "..relname.."_"..cmd.."("..devname..")")
|
||||
_G[relname.."_"..cmd](devname)
|
||||
end
|
||||
else
|
||||
local devinfo = mtkwifi.search_dev_and_profile()
|
||||
local done = {}
|
||||
for __devname in pairs(devinfo) do
|
||||
local __relname = string.split(__devname,".")[1]
|
||||
repeat
|
||||
-- common case
|
||||
if done[__relname] then break else done[__relname] = true end
|
||||
if _G[__relname.."_"..cmd] then
|
||||
nixio.syslog("info", "call "..__relname.."_"..cmd.."("..__devname..")")
|
||||
_G[__relname.."_"..cmd](__devname)
|
||||
break
|
||||
end
|
||||
-- try shell
|
||||
local dev_shell = "/lib/wifi/"..__relname..".sh"
|
||||
if mtkwifi.exists(dev_shell) then
|
||||
local cmd = "source "..dev_shell.."; "..__relname.."_"..cmd.." > /dev/null"
|
||||
nixio.syslog("info", cmd)
|
||||
if os.execute(cmd) ~= 0 then
|
||||
nixio.syslog("err", cmd)
|
||||
end
|
||||
break
|
||||
end
|
||||
-- fall back on common api
|
||||
nixio.syslog("info", "no scripts for "..__relname.." found, fall back on common api!")
|
||||
_G["wifi_common_"..cmd](__devname)
|
||||
until true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
cmd = arg[1]
|
||||
dev = arg[2]
|
||||
|
||||
if cmd == "up"
|
||||
or cmd == "down"
|
||||
or cmd == "status"
|
||||
or cmd == "detect"
|
||||
or cmd == "reload"
|
||||
or cmd == "restart"
|
||||
or cmd == "reset" then
|
||||
wifi(cmd, dev)
|
||||
elseif cmd == "reload_legacy" then
|
||||
nixio.syslog("info", "legacy command "..cmd)
|
||||
wifi("up", dev)
|
||||
else
|
||||
usage()
|
||||
end
|
||||
|
@ -1,953 +0,0 @@
|
||||
#!/usr/bin/env lua
|
||||
|
||||
--[[
|
||||
* A lua library to manipulate mtk's wifi driver. used in luci-app-mtk.
|
||||
*
|
||||
* Hua Shao <nossiac@163.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 2.1
|
||||
* as published by the Free Software Foundation
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
]]
|
||||
|
||||
local mtkwifi = {}
|
||||
local _, nixio = pcall(require, "nixio")
|
||||
|
||||
function mtkwifi.debug(...)
|
||||
local ff = io.open("/tmp/mtkwifi.dbg.log", "a")
|
||||
local vars = {...}
|
||||
for _, v in pairs(vars) do
|
||||
ff:write(v.." ")
|
||||
end
|
||||
ff:write("\n")
|
||||
ff:close()
|
||||
end
|
||||
|
||||
if not nixio then
|
||||
nixio.syslog = mtkwifi.debug
|
||||
end
|
||||
|
||||
function string:split(sep)
|
||||
local sep, fields = sep or ":", {}
|
||||
local pattern = string.format("([^%s]+)", sep)
|
||||
self:gsub(pattern, function(c) fields[#fields+1] = c end)
|
||||
return fields
|
||||
end
|
||||
|
||||
function mtkwifi.__trim(s)
|
||||
if s then return (s:gsub("^%s*(.-)%s*$", "%1")) end
|
||||
end
|
||||
|
||||
function mtkwifi.__handleSpecialChars(s)
|
||||
s = s:gsub("\\", "\\\\")
|
||||
s = s:gsub("\"", "\\\"")
|
||||
s = mtkwifi.__trim(s)
|
||||
return s
|
||||
end
|
||||
|
||||
-- if order function given, sort by it by passing the table and keys a, b,
|
||||
-- otherwise just sort the keys
|
||||
function mtkwifi.__spairs(t, order)
|
||||
-- collect the keys
|
||||
local keys = {}
|
||||
for k in pairs(t) do keys[#keys+1] = k end
|
||||
table.sort(keys, order)
|
||||
-- return the iterator function
|
||||
local i = 0
|
||||
return function()
|
||||
i = i + 1
|
||||
if keys[i] then
|
||||
return keys[i], t[keys[i]]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function mtkwifi.__lines(str)
|
||||
local t = {}
|
||||
local function helper(line) table.insert(t, line) return "" end
|
||||
helper((str:gsub("(.-)\r?\n", helper)))
|
||||
return t
|
||||
end
|
||||
|
||||
function mtkwifi.__get_l1dat()
|
||||
if not pcall(require, "l1dat_parser") then
|
||||
return
|
||||
end
|
||||
|
||||
local parser = require("l1dat_parser")
|
||||
local l1dat = parser.load_l1_profile(parser.L1_DAT_PATH)
|
||||
|
||||
return l1dat, parser
|
||||
end
|
||||
|
||||
function mtkwifi.sleep(s)
|
||||
local ntime = os.clock() + s
|
||||
repeat until os.clock() > ntime
|
||||
end
|
||||
|
||||
function mtkwifi.deepcopy(orig)
|
||||
local orig_type = type(orig)
|
||||
local copy
|
||||
if orig_type == 'table' then
|
||||
copy = {}
|
||||
for orig_key, orig_value in next, orig, nil do
|
||||
copy[mtkwifi.deepcopy(orig_key)] = mtkwifi.deepcopy(orig_value)
|
||||
end
|
||||
setmetatable(copy, mtkwifi.deepcopy(getmetatable(orig)))
|
||||
else -- number, string, boolean, etc
|
||||
copy = orig
|
||||
end
|
||||
return copy
|
||||
end
|
||||
|
||||
function mtkwifi.read_pipe(pipe)
|
||||
local fp = io.popen(pipe)
|
||||
local txt = fp:read("*a")
|
||||
fp:close()
|
||||
return txt
|
||||
end
|
||||
|
||||
function mtkwifi.load_profile(path, raw)
|
||||
local cfgs = {}
|
||||
local content
|
||||
|
||||
if path then
|
||||
local fd = io.open(path, "r")
|
||||
if not fd then return end
|
||||
content = fd:read("*all")
|
||||
fd:close()
|
||||
elseif raw then
|
||||
content = raw
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
-- convert profile into lua table
|
||||
for _,line in ipairs(mtkwifi.__lines(content)) do
|
||||
line = mtkwifi.__trim(line)
|
||||
if string.byte(line) ~= string.byte("#") then
|
||||
local i = string.find(line, "=")
|
||||
if i then
|
||||
local k,v
|
||||
k = string.sub(line, 1, i-1)
|
||||
v = string.sub(line, i+1)
|
||||
if cfgs[mtkwifi.__trim(k)] then
|
||||
mtkwifi.debug("warning", "skip repeated key"..line)
|
||||
end
|
||||
cfgs[mtkwifi.__trim(k)] = mtkwifi.__trim(v) or ""
|
||||
else
|
||||
mtkwifi.debug("warning", "skip line without '=' "..line)
|
||||
end
|
||||
else
|
||||
mtkwifi.debug("warning", "skip comment line "..line)
|
||||
end
|
||||
end
|
||||
return cfgs
|
||||
end
|
||||
|
||||
function mtkwifi.__profile_bak_path(profile)
|
||||
local bak = "/tmp/mtk/wifi/"..string.match(profile, "([^/]+\.dat)")..".last"
|
||||
os.execute("mkdir -p /tmp/mtk/wifi")
|
||||
return bak
|
||||
end
|
||||
|
||||
function mtkwifi.save_profile(cfgs, path)
|
||||
|
||||
if not cfgs then
|
||||
mtkwifi.debug("configuration was empty, nothing saved")
|
||||
return
|
||||
end
|
||||
|
||||
local fd = io.open(path, "w")
|
||||
table.sort(cfgs, function(a,b) return a<b end)
|
||||
if not fd then return end
|
||||
fd:write("# Generated by mtkwifi.lua\n")
|
||||
fd:write("Default\n")
|
||||
for k,v in mtkwifi.__spairs(cfgs, function(a,b) return string.upper(a) < string.upper(b) end) do
|
||||
fd:write(k.."="..v.."\n")
|
||||
end
|
||||
fd:close()
|
||||
|
||||
if pcall(require, "mtknvram") then
|
||||
local nvram = require("mtknvram")
|
||||
local l1dat, l1 = mtkwifi.__get_l1dat()
|
||||
local zone = l1 and l1.l1_path_to_zone(path)
|
||||
|
||||
if not l1dat then
|
||||
mtkwifi.debug("save_profile: no l1dat", path)
|
||||
nvram.nvram_save_profile(path)
|
||||
else
|
||||
if zone then
|
||||
mtkwifi.debug("save_profile:", path, zone)
|
||||
nvram.nvram_save_profile(path, zone)
|
||||
else
|
||||
mtkwifi.debug("save_profile:", path)
|
||||
nvram.nvram_save_profile(path)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- if path2 not give, we use path1's backup.
|
||||
function mtkwifi.diff_profile(path1, path2)
|
||||
assert(path1)
|
||||
if not path2 then
|
||||
path2 = mtkwifi.__profile_bak_path(path1)
|
||||
if not mtkwifi.exists(path2) then
|
||||
return {}
|
||||
end
|
||||
end
|
||||
assert(path2)
|
||||
|
||||
local diff = {}
|
||||
local cfg1 = mtkwifi.load_profile(path1) or {}
|
||||
local cfg2 = mtkwifi.load_profile(path2) or {}
|
||||
|
||||
for k,v in pairs(cfg1) do
|
||||
if cfg2[k] ~= cfg1[k] then
|
||||
diff[k] = {cfg1[k] or "", cfg2[k] or ""}
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(cfg2) do
|
||||
if cfg2[k] ~= cfg1[k] then
|
||||
diff[k] = {cfg1[k] or "", cfg2[k] or ""}
|
||||
end
|
||||
end
|
||||
|
||||
return diff
|
||||
end
|
||||
|
||||
|
||||
-- Mode 12 and 13 are only available for STAs.
|
||||
local WirelessModeList = {
|
||||
[0] = "B/G mixed",
|
||||
[1] = "B only",
|
||||
[2] = "A only",
|
||||
-- [3] = "A/B/G mixed",
|
||||
[4] = "G only",
|
||||
-- [5] = "A/B/G/GN/AN mixed",
|
||||
[6] = "N in 2.4G only",
|
||||
[7] = "G/GN", -- i.e., no CCK mode
|
||||
[8] = "A/N in 5 band",
|
||||
[9] = "B/G/GN mode",
|
||||
-- [10] = "A/AN/G/GN mode", --not support B mode
|
||||
[11] = "only N in 5G band",
|
||||
-- [12] = "B/G/GN/A/AN/AC mixed",
|
||||
-- [13] = "G/GN/A/AN/AC mixed", -- no B mode
|
||||
[14] = "A/AC/AN mixed",
|
||||
[15] = "AC/AN mixed", --but no A mode
|
||||
}
|
||||
|
||||
local DevicePropertyMap = {
|
||||
-- 2.4G
|
||||
{device="MT7603", band={"0", "1", "4", "6", "7", "9"}},
|
||||
{device="MT7620", band={"0", "1", "4", "6", "7", "9"}},
|
||||
{device="MT7622", band={"0", "1", "4", "9"}},
|
||||
{device="MT7628", band={"0", "1", "4", "6", "7", "9"}},
|
||||
-- 5G
|
||||
{device="MT7610", band={"2", "8", "11", "14", "15"}},
|
||||
{device="MT7612", band={"2", "8", "11", "14", "15"}},
|
||||
{device="MT7662", band={"2", "8", "11", "14", "15"}},
|
||||
-- Mix
|
||||
{device="MT7615", band={"0", "1", "4", "9", "2", "8", "14", "15"}}
|
||||
}
|
||||
|
||||
mtkwifi.CountryRegionList_5G_All = {
|
||||
{region=0, text="0: Ch36~64, Ch149~165"},
|
||||
{region=1, text="1: Ch36~64, Ch100~140"},
|
||||
{region=2, text="2: Ch36~64"},
|
||||
{region=3, text="3: Ch52~64, Ch149~161"},
|
||||
{region=4, text="4: Ch149~165"},
|
||||
{region=5, text="5: Ch149~161"},
|
||||
{region=6, text="6: Ch36~48"},
|
||||
{region=7, text="7: Ch36~64, Ch100~140, Ch149~165"},
|
||||
{region=8, text="8: Ch52~64"},
|
||||
{region=9, text="9: Ch36~64, Ch100~116, Ch132~140, Ch149~165"},
|
||||
{region=10, text="10: Ch36~48, Ch149~165"},
|
||||
{region=11, text="11: Ch36~64, Ch100~120, Ch149~161"},
|
||||
{region=12, text="12: Ch36~64, Ch100~144"},
|
||||
{region=13, text="13: Ch36~64, Ch100~144, Ch149~165"},
|
||||
{region=14, text="14: Ch36~64, Ch100~116, Ch132~144, Ch149~165"},
|
||||
{region=15, text="15: Ch149~173"},
|
||||
{region=16, text="16: Ch52~64, Ch149~165"},
|
||||
{region=17, text="17: Ch36~48, Ch149~161"},
|
||||
{region=18, text="18: Ch36~64, Ch100~116, Ch132~140"},
|
||||
{region=19, text="19: Ch56~64, Ch100~140, Ch149~161"},
|
||||
{region=20, text="20: Ch36~64, Ch100~124, Ch149~161"},
|
||||
{region=21, text="21: Ch36~64, Ch100~140, Ch149~161"},
|
||||
{region=22, text="22: Ch100~140"},
|
||||
{region=30, text="30: Ch36~48, Ch52~64, Ch100~140, Ch149~165"},
|
||||
{region=31, text="31: Ch52~64, Ch100~140, Ch149~165"},
|
||||
{region=32, text="32: Ch36~48, Ch52~64, Ch100~140, Ch149~161"},
|
||||
{region=33, text="33: Ch36~48, Ch52~64, Ch100~140"},
|
||||
{region=34, text="34: Ch36~48, Ch52~64, Ch149~165"},
|
||||
{region=35, text="35: Ch36~48, Ch52~64"},
|
||||
{region=36, text="36: Ch36~48, Ch100~140, Ch149~165"},
|
||||
{region=37, text="37: Ch36~48, Ch52~64, Ch149~165, Ch173"},
|
||||
}
|
||||
|
||||
mtkwifi.CountryRegionList_2G_All = {
|
||||
{region=0, text="0: Ch1~11"},
|
||||
{region=1, text="1: Ch1~13"},
|
||||
{region=2, text="2: Ch10~11"},
|
||||
{region=3, text="3: Ch10~13"},
|
||||
{region=4, text="4: Ch14"},
|
||||
{region=5, text="5: Ch1~14"},
|
||||
{region=6, text="6: Ch3~9"},
|
||||
{region=7, text="7: Ch5~13"},
|
||||
{region=31, text="31: Ch1~11, Ch12~14"},
|
||||
{region=32, text="32: Ch1~11, Ch12~13"},
|
||||
{region=33, text="33: Ch1~14"},
|
||||
}
|
||||
|
||||
mtkwifi.ChannelList_5G_All = {
|
||||
{channel=0, text="Channel 0 (Auto )", region={}},
|
||||
{channel= 36, text="Channel 36 (5.180 GHz)", region={[0]=1, [1]=1, [2]=1, [6]=1, [7]=1, [9]=1, [10]=1, [11]=1, [12]=1, [13]=1, [14]=1, [17]=1, [18]=1, [20]=1, [21]=1, [30]=1, [32]=1, [33]=1, [34]=1, [35]=1, [36]=1, [37]=1}},
|
||||
{channel= 40, text="Channel 40 (5.200 GHz)", region={[0]=1, [1]=1, [2]=1, [6]=1, [7]=1, [9]=1, [10]=1, [11]=1, [12]=1, [13]=1, [14]=1, [17]=1, [18]=1, [20]=1, [21]=1, [30]=1, [32]=1, [33]=1, [34]=1, [35]=1, [36]=1, [37]=1}},
|
||||
{channel= 44, text="Channel 44 (5.220 GHz)", region={[0]=1, [1]=1, [2]=1, [6]=1, [7]=1, [9]=1, [10]=1, [11]=1, [12]=1, [13]=1, [14]=1, [17]=1, [18]=1, [20]=1, [21]=1, [30]=1, [32]=1, [33]=1, [34]=1, [35]=1, [36]=1, [37]=1}},
|
||||
{channel= 48, text="Channel 48 (5.240 GHz)", region={[0]=1, [1]=1, [2]=1, [6]=1, [7]=1, [9]=1, [10]=1, [11]=1, [12]=1, [13]=1, [14]=1, [17]=1, [18]=1, [20]=1, [21]=1, [30]=1, [32]=1, [33]=1, [34]=1, [35]=1, [36]=1, [37]=1}},
|
||||
{channel= 52, text="Channel 52 (5.260 GHz)", region={[0]=1, [1]=1, [2]=1, [3]=1, [7]=1, [8]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [16]=1, [18]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [33]=1, [34]=1, [35]=1, [37]=1}},
|
||||
{channel= 56, text="Channel 56 (5.280 GHz)", region={[0]=1, [1]=1, [2]=1, [3]=1, [7]=1, [8]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [16]=1, [18]=1, [19]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [33]=1, [34]=1, [35]=1, [37]=1}},
|
||||
{channel= 60, text="Channel 60 (5.300 GHz)", region={[0]=1, [1]=1, [2]=1, [3]=1, [7]=1, [8]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [16]=1, [18]=1, [19]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [33]=1, [34]=1, [35]=1, [37]=1}},
|
||||
{channel= 64, text="Channel 64 (5.320 GHz)", region={[0]=1, [1]=1, [2]=1, [3]=1, [7]=1, [8]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [16]=1, [18]=1, [19]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [33]=1, [34]=1, [35]=1, [37]=1}},
|
||||
{channel=100, text="Channel 100 (5.500 GHz)", region={[1]=1, [7]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [20]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=104, text="Channel 104 (5.520 GHz)", region={[1]=1, [7]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [20]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=108, text="Channel 108 (5.540 GHz)", region={[1]=1, [7]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [20]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=112, text="Channel 112 (5.560 GHz)", region={[1]=1, [7]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [20]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=116, text="Channel 116 (5.580 GHz)", region={[1]=1, [7]=1, [9]=1, [11]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [20]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=120, text="Channel 120 (5.600 GHz)", region={[1]=1, [7]=1, [11]=1, [12]=1, [13]=1, [19]=1, [20]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=124, text="Channel 124 (5.620 GHz)", region={[1]=1, [7]=1, [12]=1, [13]=1, [19]=1, [20]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=128, text="Channel 128 (5.640 GHz)", region={[1]=1, [7]=1, [12]=1, [13]=1, [19]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=132, text="Channel 132 (5.660 GHz)", region={[1]=1, [7]=1, [9]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=136, text="Channel 136 (5.680 GHz)", region={[1]=1, [7]=1, [9]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=140, text="Channel 140 (5.700 GHz)", region={[1]=1, [7]=1, [9]=1, [12]=1, [13]=1, [14]=1, [18]=1, [19]=1, [21]=1, [22]=1, [30]=1, [31]=1, [32]=1, [33]=1, [36]=1}},
|
||||
{channel=144, text="Channel 144 (5.720 GHz)", region={[12]=1, [13]=1, [14]=1}},
|
||||
{channel=149, text="Channel 149 (5.745 GHz)", region={[0]=1, [3]=1, [4]=1, [5]=1, [7]=1, [9]=1, [10]=1, [11]=1, [13]=1, [14]=1, [15]=1, [16]=1, [17]=1, [19]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [34]=1, [36]=1, [37]=1}},
|
||||
{channel=153, text="Channel 153 (5.765 GHz)", region={[0]=1, [3]=1, [4]=1, [5]=1, [7]=1, [9]=1, [10]=1, [11]=1, [13]=1, [14]=1, [15]=1, [16]=1, [17]=1, [19]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [34]=1, [36]=1, [37]=1}},
|
||||
{channel=157, text="Channel 157 (5.785 GHz)", region={[0]=1, [3]=1, [4]=1, [5]=1, [7]=1, [9]=1, [10]=1, [11]=1, [13]=1, [14]=1, [15]=1, [16]=1, [17]=1, [19]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [34]=1, [36]=1, [37]=1}},
|
||||
{channel=161, text="Channel 161 (5.805 GHz)", region={[0]=1, [3]=1, [4]=1, [5]=1, [7]=1, [9]=1, [10]=1, [11]=1, [13]=1, [14]=1, [15]=1, [16]=1, [17]=1, [19]=1, [20]=1, [21]=1, [30]=1, [31]=1, [32]=1, [34]=1, [36]=1, [37]=1}},
|
||||
{channel=165, text="Channel 165 (5.825 GHz)", region={[0]=1, [4]=1, [7]=1, [9]=1, [10]=1, [13]=1, [14]=1, [15]=1, [16]=1, [30]=1, [31]=1, [34]=1, [36]=1, [37]=1}},
|
||||
{channel=169, text="Channel 169 (5.845 GHz)", region={[15]=1}},
|
||||
{channel=173, text="Channel 173 (5.865 GHz)", region={[15]=1, [37]=1}},
|
||||
}
|
||||
|
||||
mtkwifi.ChannelList_2G_All = {
|
||||
{channel=0, text="Channel 0 (Auto )", region={}},
|
||||
{channel= 1, text="Channel 1 (2412 GHz)", region={[0]=1, [1]=1, [5]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 2, text="Channel 2 (2417 GHz)", region={[0]=1, [1]=1, [5]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 3, text="Channel 3 (2422 GHz)", region={[0]=1, [1]=1, [5]=1, [6]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 4, text="Channel 4 (2427 GHz)", region={[0]=1, [1]=1, [5]=1, [6]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 5, text="Channel 5 (2432 GHz)", region={[0]=1, [1]=1, [5]=1, [6]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 6, text="Channel 6 (2437 GHz)", region={[0]=1, [1]=1, [5]=1, [6]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 7, text="Channel 7 (2442 GHz)", region={[0]=1, [1]=1, [5]=1, [6]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 8, text="Channel 8 (2447 GHz)", region={[0]=1, [1]=1, [5]=1, [6]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel= 9, text="Channel 9 (2452 GHz)", region={[0]=1, [1]=1, [5]=1, [6]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel=10, text="Channel 10 (2457 GHz)", region={[0]=1, [1]=1, [2]=1, [3]=1, [5]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel=11, text="Channel 11 (2462 GHz)", region={[0]=1, [1]=1, [2]=1, [3]=1, [5]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel=12, text="Channel 12 (2467 GHz)", region={[1]=1, [3]=1, [5]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel=13, text="Channel 13 (2472 GHz)", region={[1]=1, [3]=1, [5]=1, [7]=1, [31]=1, [32]=1, [33]=1}},
|
||||
{channel=14, text="Channel 14 (2477 GHz)", region={[4]=1, [5]=1, [31]=1, [33]=1}},
|
||||
}
|
||||
|
||||
mtkwifi.ChannelList_5G_2nd_80MHZ_ALL = {
|
||||
{channel=36, text="Ch36(5.180 GHz) - Ch48(5.240 GHz)", chidx=2},
|
||||
{channel=52, text="Ch52(5.260 GHz) - Ch64(5.320 GHz)", chidx=6},
|
||||
{channel=-1, text="Channel between 64 100", chidx=-1},
|
||||
{channel=100, text="Ch100(5.500 GHz) - Ch112(5.560 GHz)", chidx=10},
|
||||
{channel=112, text="Ch116(5.580 GHz) - Ch128(5.640 GHz)", chidx=14},
|
||||
{channel=-1, text="Channel between 128 132", chidx=-1},
|
||||
{channel=132, text="Ch132(5.660 GHz) - Ch144(5.720 GHz)", chidx=18},
|
||||
{channel=-1, text="Channel between 144 149", chidx=-1},
|
||||
{channel=149, text="Ch149(5.745 GHz) - Ch161(5.805 GHz)", chidx=22},
|
||||
}
|
||||
|
||||
local AuthModeList = {
|
||||
"Disable",
|
||||
"OPEN",--OPENWEP
|
||||
"SHARED",--SHAREDWEP
|
||||
"WEPAUTO",
|
||||
"WPA2",
|
||||
"WPA2PSK",
|
||||
"WPAPSKWPA2PSK",
|
||||
"WPA1WPA2",
|
||||
"IEEE8021X",
|
||||
}
|
||||
|
||||
local WpsEnableAuthModeList = {
|
||||
"Disable",
|
||||
"OPEN",--OPENWEP
|
||||
"WPA2PSK",
|
||||
"WPAPSKWPA2PSK",
|
||||
}
|
||||
|
||||
local ApCliAuthModeList = {
|
||||
"Disable",
|
||||
"OPEN",
|
||||
"SHARED",
|
||||
"WPAPSK",
|
||||
"WPA2PSK",
|
||||
"WPAPSKWPA2PSK",
|
||||
-- "WPA",
|
||||
-- "WPA2",
|
||||
-- "WPAWPA2",
|
||||
-- "8021X",
|
||||
}
|
||||
|
||||
local WPA_Enc_List = {
|
||||
"AES",
|
||||
"TKIP",
|
||||
"TKIPAES",
|
||||
}
|
||||
|
||||
|
||||
local WEP_Enc_List = {
|
||||
"WEP",
|
||||
}
|
||||
|
||||
local dbdc_prefix = {
|
||||
{"ra", "rax"},
|
||||
{"rai", "ray"},
|
||||
{"rae", "raz"},
|
||||
}
|
||||
|
||||
local dbdc_apcli_prefix = {
|
||||
{"apcli", "apclix"},
|
||||
{"apclii", "apcliy"},
|
||||
{"apclie", "apcliz"},
|
||||
}
|
||||
|
||||
function mtkwifi.band(mode)
|
||||
local i = tonumber(mode)
|
||||
if i == 0
|
||||
or i == 1
|
||||
or i == 4
|
||||
or i == 6
|
||||
or i == 7
|
||||
or i == 9 then
|
||||
return "2.4G"
|
||||
else
|
||||
return "5G"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function mtkwifi.__cfg2list(str)
|
||||
-- delimeter == ";"
|
||||
local i = 1
|
||||
local list = {}
|
||||
for k in string.gmatch(str, "([^;]+)") do
|
||||
list[i] = k
|
||||
i = i + 1
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
function mtkwifi.token_set(str, n, v)
|
||||
-- n start from 1
|
||||
-- delimeter == ";"
|
||||
if not str then return end
|
||||
local tmp = mtkwifi.__cfg2list(str)
|
||||
if type(v) ~= type("") and type(v) ~= type(0) then
|
||||
mtkwifi.debug("err", "invalid value type in token_set, "..type(v))
|
||||
return
|
||||
end
|
||||
if #tmp < tonumber(n) then
|
||||
for i=#tmp, tonumber(n) do
|
||||
if not tmp[i] then
|
||||
tmp[i] = v -- pad holes with v !
|
||||
end
|
||||
end
|
||||
else
|
||||
tmp[n] = v
|
||||
end
|
||||
return table.concat(tmp, ";")
|
||||
end
|
||||
|
||||
|
||||
function mtkwifi.token_get(str, n, v)
|
||||
-- n starts from 1
|
||||
-- v is the backup in case token n is nil
|
||||
if not str then return v end
|
||||
local tmp = mtkwifi.__cfg2list(str)
|
||||
return tmp[tonumber(n)] or v
|
||||
end
|
||||
|
||||
function mtkwifi.search_dev_and_profile_orig()
|
||||
local dir = io.popen("ls /etc/wireless/")
|
||||
if not dir then return end
|
||||
local result = {}
|
||||
-- case 1: mt76xx.dat (best)
|
||||
-- case 2: mt76xx.n.dat (multiple card of same dev)
|
||||
-- case 3: mt76xx.n.nG.dat (case 2 plus dbdc and multi-profile, bloody hell....)
|
||||
for line in dir:lines() do
|
||||
-- mtkwifi.debug("debug", "scan "..line)
|
||||
local tmp = io.popen("find /etc/wireless/"..line.." -type f -name \"*.dat\"")
|
||||
for datfile in tmp:lines() do
|
||||
-- mtkwifi.debug("debug", "test "..datfile)
|
||||
|
||||
repeat do
|
||||
-- for case 1
|
||||
local devname = string.match(datfile, "("..line..").dat")
|
||||
if devname then
|
||||
result[devname] = datfile
|
||||
-- mtkwifi.debug("debug", "yes "..devname.."="..datfile)
|
||||
break
|
||||
end
|
||||
-- for case 2
|
||||
local devname = string.match(datfile, "("..line.."%.%d)%.dat")
|
||||
if devname then
|
||||
result[devname] = datfile
|
||||
-- mtkwifi.debug("debug", "yes "..devname.."="..datfile)
|
||||
break
|
||||
end
|
||||
-- for case 3
|
||||
local devname = string.match(datfile, "("..line.."%.%d%.%dG)%.dat")
|
||||
if devname then
|
||||
result[devname] = datfile
|
||||
-- mtkwifi.debug("debug", "yes "..devname.."="..datfile)
|
||||
break
|
||||
end
|
||||
end until true
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(result) do
|
||||
mtkwifi.debug("debug", "search_dev_and_profile_orig: "..k.."="..v)
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
function mtkwifi.search_dev_and_profile_l1()
|
||||
local l1dat = mtkwifi.__get_l1dat()
|
||||
|
||||
if not l1dat then return end
|
||||
|
||||
local result = {}
|
||||
local dbdc_2nd_if = ""
|
||||
|
||||
for k, dev in ipairs(l1dat) do
|
||||
dbdc_2nd_if = mtkwifi.token_get(dev.main_ifname, 2, nil)
|
||||
if dbdc_2nd_if then
|
||||
result[dev["INDEX"].."."..dev["mainidx"]..".1"] = mtkwifi.token_get(dev.profile_path, 1, nil)
|
||||
result[dev["INDEX"].."."..dev["mainidx"]..".2"] = mtkwifi.token_get(dev.profile_path, 2, nil)
|
||||
else
|
||||
result[dev["INDEX"].."."..dev["mainidx"]] = dev.profile_path
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(result) do
|
||||
mtkwifi.debug("debug", "search_dev_and_profile_l1: "..k.."="..v)
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
function mtkwifi.search_dev_and_profile()
|
||||
return mtkwifi.search_dev_and_profile_l1() or mtkwifi.search_dev_and_profile_orig()
|
||||
end
|
||||
|
||||
function mtkwifi.__setup_vifs(cfgs, devname, mainidx, subidx)
|
||||
local l1dat, l1 = mtkwifi.__get_l1dat()
|
||||
local dridx = l1dat and l1.DEV_RINDEX
|
||||
|
||||
local prefix
|
||||
local main_ifname
|
||||
local vifs = {}
|
||||
local dev_idx = ""
|
||||
|
||||
|
||||
prefix = l1dat and l1dat[dridx][devname].ext_ifname or dbdc_prefix[mainidx][subidx]
|
||||
|
||||
dev_idx = string.match(devname, "(%w+)")
|
||||
|
||||
vifs["__prefix"] = prefix
|
||||
if (cfgs.BssidNum == nil) then
|
||||
mtkwifi.debug("BssidNum configuration value not found.")
|
||||
mtkwifi.debug("debug","BssidNum configuration value not found.")
|
||||
return
|
||||
end
|
||||
|
||||
for j=1,tonumber(cfgs.BssidNum) do
|
||||
vifs[j] = {}
|
||||
vifs[j].vifidx = j -- start from 1
|
||||
dev_idx = string.match(devname, "(%w+)")
|
||||
main_ifname = l1dat and l1dat[dridx][devname].main_ifname or dbdc_prefix[mainidx][subidx].."0"
|
||||
|
||||
mtkwifi.debug("setup_vifs", prefix, dev_idx, mainidx, subidx)
|
||||
|
||||
vifs[j].vifname = j == 1 and main_ifname or prefix..(j-1)
|
||||
if mtkwifi.exists("/sys/class/net/"..vifs[j].vifname) then
|
||||
local flags = tonumber(mtkwifi.read_pipe("cat /sys/class/net/"..vifs[j].vifname.."/flags 2>/dev/null")) or 0
|
||||
vifs[j].state = flags%2 == 1 and "up" or "down"
|
||||
end
|
||||
vifs[j].__ssid = cfgs["SSID"..j]
|
||||
vifs[j].__bssid = mtkwifi.read_pipe("cat /sys/class/net/"..prefix..(j-1).."/address 2>/dev/null") or "?"
|
||||
if dbdc then
|
||||
vifs[j].__channel = mtkwifi.token_get(cfgs.Channel, j, 0)
|
||||
vifs[j].__wirelessmode = mtkwifi.token_get(cfgs.WirelessMode, j, 0)
|
||||
end
|
||||
|
||||
vifs[j].__authmode = mtkwifi.token_get(cfgs.AuthMode, j, "OPEN")
|
||||
vifs[j].__encrypttype = mtkwifi.token_get(cfgs.EncrypType, j, "NONE")
|
||||
vifs[j].__hidessid = mtkwifi.token_get(cfgs.HideSSID, j, 0)
|
||||
vifs[j].__noforwarding = mtkwifi.token_get(cfgs.NoForwarding, j, 0)
|
||||
vifs[j].__wmmcapable = mtkwifi.token_get(cfgs.WmmCapable, j, 0)
|
||||
vifs[j].__txrate = mtkwifi.token_get(cfgs.TxRate, j, 0)
|
||||
vifs[j].__ieee8021x = mtkwifi.token_get(cfgs.IEEE8021X, j, 0)
|
||||
vifs[j].__preauth = mtkwifi.token_get(cfgs.PreAuth, j, 0)
|
||||
vifs[j].__rekeymethod = mtkwifi.token_get(cfgs.RekeyMethod, j, 0)
|
||||
vifs[j].__rekeyinterval = mtkwifi.token_get(cfgs.RekeyInterval, j, 0)
|
||||
vifs[j].__pmkcacheperiod = mtkwifi.token_get(cfgs.PMKCachePeriod, j, 0)
|
||||
vifs[j].__ht_extcha = mtkwifi.token_get(cfgs.HT_EXTCHA, j, 0)
|
||||
vifs[j].__radius_server = mtkwifi.token_get(cfgs.RADIUS_Server, j, 0)
|
||||
vifs[j].__radius_port = mtkwifi.token_get(cfgs.RADIUS_Port, j, 0)
|
||||
vifs[j].__wepkey_id = mtkwifi.token_get(cfgs.DefaultKeyID, j, 0)
|
||||
vifs[j].__wscconfmode = mtkwifi.token_get(cfgs.WscConfMode, j, 0)
|
||||
vifs[j].__wepkeys = {
|
||||
cfgs["Key"..j.."Str1"],
|
||||
cfgs["Key"..j.."Str2"],
|
||||
cfgs["Key"..j.."Str3"],
|
||||
cfgs["Key"..j.."Str4"],
|
||||
}
|
||||
vifs[j].__wpapsk = cfgs["WPAPSK"..j]
|
||||
|
||||
-- VoW
|
||||
vifs[j].__atc_tp = mtkwifi.token_get(cfgs.VOW_Rate_Ctrl_En, j, 0)
|
||||
vifs[j].__atc_min_tp = mtkwifi.token_get(cfgs.VOW_Group_Min_Rate, j, "")
|
||||
vifs[j].__atc_max_tp = mtkwifi.token_get(cfgs.VOW_Group_Max_Rate, j, "")
|
||||
vifs[j].__atc_at = mtkwifi.token_get(cfgs.VOW_Airtime_Ctrl_En, j, 0)
|
||||
vifs[j].__atc_min_at = mtkwifi.token_get(cfgs.VOW_Group_Min_Ratio, j, "")
|
||||
vifs[j].__atc_max_at = mtkwifi.token_get(cfgs.VOW_Group_Max_Ratio, j, "")
|
||||
|
||||
-- TODO index by vifname
|
||||
vifs[vifs[j].vifname] = vifs[j]
|
||||
end
|
||||
|
||||
return vifs
|
||||
end
|
||||
|
||||
function mtkwifi.__setup_apcli(cfgs, devname, mainidx, subidx)
|
||||
local l1dat, l1 = mtkwifi.__get_l1dat()
|
||||
local dridx = l1dat and l1.DEV_RINDEX
|
||||
|
||||
local apcli = {}
|
||||
local dev_idx = string.match(devname, "(%w+)")
|
||||
local apcli_prefix = l1dat and l1dat[dridx][devname].apcli_ifname or
|
||||
dbdc_apcli_prefix[mainidx][subidx]
|
||||
|
||||
local apcli_name = apcli_prefix.."0"
|
||||
|
||||
if mtkwifi.exists("/sys/class/net/"..apcli_name) then
|
||||
apcli.vifname = apcli_name
|
||||
apcli.vifidx = "1"
|
||||
local iwapcli = mtkwifi.read_pipe("iwconfig "..apcli_name.." | grep ESSID 2>/dev/null")
|
||||
|
||||
local _,_,ssid = string.find(iwapcli, "ESSID:\"(.*)\"")
|
||||
local flags = tonumber(mtkwifi.read_pipe("cat /sys/class/net/"..apcli_name.."/flags 2>/dev/null")) or 0
|
||||
apcli.state = flags%2 == 1 and "up" or "down"
|
||||
if not ssid or ssid == "" then
|
||||
apcli.status = "Disconnected"
|
||||
else
|
||||
apcli.ssid = ssid
|
||||
apcli.status = "Connected"
|
||||
end
|
||||
apcli.devname = apcli_name
|
||||
apcli.bssid = mtkwifi.read_pipe("cat /sys/class/net/"..apcli_name.."/address 2>/dev/null") or "?"
|
||||
local flags = tonumber(mtkwifi.read_pipe("cat /sys/class/net/"..apcli_name.."/flags 2>/dev/null")) or 0
|
||||
apcli.ifstatus = flags%2 == 1 and "up" or ""
|
||||
return apcli
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
function mtkwifi.get_all_devs()
|
||||
local devs = {}
|
||||
local i = 1 -- dev idx
|
||||
local profiles = mtkwifi.search_dev_and_profile()
|
||||
local wpa_support = 0
|
||||
local wapi_support = 0
|
||||
|
||||
for devname,profile in pairs(profiles) do
|
||||
mtkwifi.debug("debug", "checking "..profile)
|
||||
|
||||
local fd = io.open(profile,"r")
|
||||
if not fd then
|
||||
mtkwifi.debug("debug", "cannot find "..profile)
|
||||
else
|
||||
fd:close()
|
||||
mtkwifi.debug("debug", "load "..profile)
|
||||
mtkwifi.debug("loading profile"..profile)
|
||||
local cfgs = mtkwifi.load_profile(profile)
|
||||
if not cfgs then
|
||||
mtkwifi.debug("error loading profile"..profile)
|
||||
mtkwifi.debug("err", "error loading "..profile)
|
||||
return
|
||||
end
|
||||
devs[i] = {}
|
||||
devs[i].vifs = {}
|
||||
devs[i].apcli = {}
|
||||
devs[i].devname = devname
|
||||
devs[i].profile = profile
|
||||
local tmp = ""
|
||||
tmp = string.split(devname, ".")
|
||||
devs[i].maindev = tmp[1]
|
||||
devs[i].mainidx = tonumber(tmp[2]) or 1
|
||||
devs[i].subdev = devname
|
||||
devs[i].subidx = string.match(tmp[3] or "", "(%d+)")=="2" and 2 or 1
|
||||
devs[i].devband = tonumber(tmp[3])
|
||||
if devs[i].devband then
|
||||
devs[i].multiprofile = true
|
||||
devs[i].dbdc = true
|
||||
end
|
||||
devs[i].version = mtkwifi.read_pipe("cat /etc/wireless/"..devs[i].maindev.."/version 2>/dev/null") or "unknown"
|
||||
devs[i].ApCliEnable = cfgs.ApCliEnable
|
||||
devs[i].WirelessMode = cfgs.WirelessMode
|
||||
devs[i].WirelessModeList = {}
|
||||
for key, value in pairs(DevicePropertyMap) do
|
||||
local found = string.find(string.upper(devname), string.upper(value.device))
|
||||
if found then
|
||||
for k=1,#value.band do
|
||||
devs[i].WirelessModeList[tonumber(value.band[k])] = WirelessModeList[tonumber(value.band[k])]
|
||||
end
|
||||
end
|
||||
end
|
||||
devs[i].WscConfMode = cfgs.WscConfMode
|
||||
devs[i].AuthModeList = AuthModeList
|
||||
devs[i].WpsEnableAuthModeList = WpsEnableAuthModeList
|
||||
|
||||
if wpa_support == 1 then
|
||||
table.insert(devs[i].AuthModeList,"WPAPSK")
|
||||
table.insert(devs[i].AuthModeList,"WPA")
|
||||
end
|
||||
|
||||
if wapi_support == 1 then
|
||||
table.insert(devs[i].AuthModeList,"WAIPSK")
|
||||
table.insert(devs[i].AuthModeList,"WAICERT")
|
||||
end
|
||||
devs[i].ApCliAuthModeList = ApCliAuthModeList
|
||||
devs[i].WPA_Enc_List = WPA_Enc_List
|
||||
devs[i].WEP_Enc_List = WEP_Enc_List
|
||||
devs[i].Channel = tonumber(cfgs.Channel)
|
||||
devs[i].DBDC_MODE = tonumber(cfgs.DBDC_MODE)
|
||||
devs[i].band = devs[i].devband or mtkwifi.band(cfgs.WirelessMode)
|
||||
|
||||
if cfgs.MUTxRxEnable then
|
||||
if tonumber(cfgs.ETxBfEnCond)==1
|
||||
and tonumber(cfgs.MUTxRxEnable)==0
|
||||
and tonumber(cfgs.ITxBfEn)==0
|
||||
then devs[i].__mimo = 0
|
||||
elseif tonumber(cfgs.ETxBfEnCond)==0
|
||||
and tonumber(cfgs.MUTxRxEnable)==0
|
||||
and tonumber(cfgs.ITxBfEn)==1
|
||||
then devs[i].__mimo = 1
|
||||
elseif tonumber(cfgs.ETxBfEnCond)==1
|
||||
and tonumber(cfgs.MUTxRxEnable)==0
|
||||
and tonumber(cfgs.ITxBfEn)==1
|
||||
then devs[i].__mimo = 2
|
||||
elseif tonumber(cfgs.ETxBfEnCond)==1
|
||||
and tonumber(cfgs.MUTxRxEnable)>0
|
||||
and tonumber(cfgs.ITxBfEn)==0
|
||||
then devs[i].__mimo = 3
|
||||
elseif tonumber(cfgs.ETxBfEnCond)==1
|
||||
and tonumber(cfgs.MUTxRxEnable)>0
|
||||
and tonumber(cfgs.ITxBfEn)==1
|
||||
then devs[i].__mimo = 4
|
||||
else devs[i].__mimo = 5
|
||||
end
|
||||
end
|
||||
|
||||
if cfgs.HT_BW == "0" or not cfgs.HT_BW then
|
||||
devs[i].__bw = "20"
|
||||
elseif cfgs.HT_BW == "1" and cfgs.VHT_BW == "0" or not cfgs.VHT_BW then
|
||||
if cfgs.HT_BSSCoexistence == "0" or not cfgs.HT_BSSCoexistence then
|
||||
devs[i].__bw = "40"
|
||||
else
|
||||
devs[i].__bw = "60" -- 20/40 coexist
|
||||
end
|
||||
elseif cfgs.HT_BW == "1" and cfgs.VHT_BW == "1" then
|
||||
devs[i].__bw = "80"
|
||||
elseif cfgs.HT_BW == "1" and cfgs.VHT_BW == "2" then
|
||||
devs[i].__bw = "160"
|
||||
elseif cfgs.HT_BW == "1" and cfgs.VHT_BW == "3" then
|
||||
devs[i].__bw = "161"
|
||||
end
|
||||
|
||||
devs[i].vifs = mtkwifi.__setup_vifs(cfgs, devname, devs[i].mainidx, devs[i].subidx)
|
||||
devs[i].apcli = mtkwifi.__setup_apcli(cfgs, devname, devs[i].mainidx, devs[i].subidx)
|
||||
|
||||
-- Setup reverse indices by devname
|
||||
devs[devname] = devs[i]
|
||||
|
||||
if devs[i].apcli then
|
||||
devs[i][devs[i].apcli.devname] = devs[i].apcli
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
return devs
|
||||
end
|
||||
|
||||
function mtkwifi.exists(path)
|
||||
local fp = io.open(path, "rb")
|
||||
if fp then fp:close() end
|
||||
return fp ~= nil
|
||||
end
|
||||
|
||||
function mtkwifi.parse_mac(str)
|
||||
local macs = {}
|
||||
local pat = "^[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]$"
|
||||
|
||||
local function ismac(str)
|
||||
if str:match(pat) then return str end
|
||||
end
|
||||
|
||||
if not str then return macs end
|
||||
local t = str:split("\n")
|
||||
for _,v in pairs(t) do
|
||||
local mac = ismac(mtkwifi.__trim(v))
|
||||
if mac then
|
||||
table.insert(macs, mac)
|
||||
end
|
||||
end
|
||||
|
||||
return macs
|
||||
-- body
|
||||
end
|
||||
|
||||
|
||||
function mtkwifi.scan_ap(vifname)
|
||||
os.execute("iwpriv "..vifname.." set SiteSurvey=0")
|
||||
os.execute("sleep 10") -- depends on your env
|
||||
local scan_result = mtkwifi.read_pipe("iwpriv "..vifname.." get_site_survey 2>/dev/null")
|
||||
|
||||
local aplist = {}
|
||||
local xx = {}
|
||||
for i, line in ipairs(mtkwifi.__lines(scan_result)) do
|
||||
if #line>40 and string.match(line, " BSSID ") then
|
||||
xx.Ch = {string.find(line, "Ch "),3}
|
||||
xx.SSID = {string.find(line, "SSID "),32}
|
||||
xx.BSSID = {string.find(line, "BSSID "),17}
|
||||
xx.Security = {string.find(line, "Security "),22}
|
||||
xx.Signal = {string.find(line, "Sig%a%al"),4}
|
||||
xx.Mode = {string.find(line, "W-Mode"),5}
|
||||
xx.ExtCh = {string.find(line, "ExtCH"),6}
|
||||
xx.WPS = {string.find(line, "WPS"),3}
|
||||
xx.NT = {string.find(line, "NT"),2}
|
||||
end
|
||||
|
||||
local tmp = {}
|
||||
if #line>40 and not string.match(line, " BSSID ") then
|
||||
tmp = {}
|
||||
tmp.channel = mtkwifi.__trim(string.sub(line, xx.Ch[1], xx.Ch[1]+xx.Ch[2]))
|
||||
tmp.ssid = mtkwifi.__trim(string.sub(line, xx.SSID[1], xx.SSID[1]+xx.SSID[2]))
|
||||
tmp.bssid = string.upper(mtkwifi.__trim(string.sub(line, xx.BSSID[1], xx.BSSID[1]+xx.BSSID[2])))
|
||||
tmp.security = mtkwifi.__trim(string.sub(line, xx.Security[1], xx.Security[1]+xx.Security[2]))
|
||||
tmp.authmode = mtkwifi.__trim(string.split(tmp.security, "/")[1])
|
||||
tmp.encrypttype = mtkwifi.__trim(string.split(tmp.security, "/")[2] or "NONE")
|
||||
tmp.rssi = mtkwifi.__trim(string.sub(line, xx.Signal[1], xx.Signal[1]+xx.Signal[2]))
|
||||
tmp.extch = mtkwifi.__trim(string.sub(line, xx.ExtCh[1], xx.ExtCh[1]+xx.ExtCh[2]))
|
||||
tmp.mode = mtkwifi.__trim(string.sub(line, xx.Mode[1], xx.Mode[1]+xx.Mode[2]))
|
||||
tmp.wps = mtkwifi.__trim(string.sub(line, xx.WPS[1], xx.WPS[1]+xx.WPS[2]))
|
||||
tmp.nt = mtkwifi.__trim(string.sub(line, xx.NT[1], xx.NT[1]+xx.NT[2]))
|
||||
table.insert(aplist, tmp)
|
||||
end
|
||||
end
|
||||
|
||||
return aplist
|
||||
end
|
||||
|
||||
function mtkwifi.__any_wsc_enabled(wsc_conf_mode)
|
||||
if (wsc_conf_mode == "") then
|
||||
return 0;
|
||||
end
|
||||
if (wsc_conf_mode == "7") then
|
||||
return 1;
|
||||
end
|
||||
if (wsc_conf_mode == "4") then
|
||||
return 1;
|
||||
end
|
||||
if (wsc_conf_mode == "2") then
|
||||
return 1;
|
||||
end
|
||||
if (wsc_conf_mode == "1") then
|
||||
return 1;
|
||||
end
|
||||
return 0;
|
||||
end
|
||||
|
||||
function mtkwifi.__restart_if_wps(devname, ifname, cfgs)
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
local ssid_index = devs[devname]["vifs"][ifname].vifidx
|
||||
local wsc_conf_mode = ""
|
||||
|
||||
wsc_conf_mode=mtkwifi.token_get(cfgs["WscConfMode"], ssid_index, "")
|
||||
|
||||
os.execute("iwpriv "..ifname.." set WscConfMode=0")
|
||||
mtkwifi.debug("iwpriv "..ifname.." set WscConfMode=0")
|
||||
os.execute("route delete 239.255.255.250")
|
||||
mtkwifi.debug("route delete 239.255.255.250")
|
||||
if(mtkwifi.__any_wsc_enabled(wsc_conf_mode)) then
|
||||
os.execute("iwpriv "..ifname.." set WscConfMode=7")
|
||||
mtkwifi.debug("iwpriv "..ifname.." set WscConfMode=7")
|
||||
os.execute("route add -host 239.255.255.250 dev br0")
|
||||
mtkwifi.debug("route add -host 239.255.255.250 dev br0")
|
||||
end
|
||||
|
||||
-- execute wps_action.lua file to send signal for current interface
|
||||
os.execute("lua wps_action.lua "..ifname)
|
||||
mtkwifi.debug("lua wps_action.lua "..ifname)
|
||||
return cfgs
|
||||
end
|
||||
|
||||
function mtkwifi.restart_8021x(devname, devices)
|
||||
local l1dat, l1 = mtkwifi.__get_l1dat()
|
||||
local dridx = l1dat and l1.DEV_RINDEX
|
||||
|
||||
local devs = devices or mtkwifi.get_all_devs()
|
||||
local dev = devs[devname]
|
||||
local main_ifname = l1dat and l1dat[dridx][devname].main_ifname or dbdc_prefix[mainidx][subidx].."0"
|
||||
local prefix = l1dat and l1dat[dridx][devname].ext_ifname or dbdc_prefix[mainidx][subidx]
|
||||
|
||||
local ps_cmd = "ps | grep -v grep | grep rt2860apd | grep "..main_ifname.." | awk '{print $1}'"
|
||||
local pid_cmd = "cat /var/run/rt2860apd_"..devs[devname].vifs[1].vifname..".pid"
|
||||
local apd_pid = mtkwifi.read_pipe(pid_cmd) or mtkwifi.read_pipe(ps_cmd)
|
||||
if tonumber(apd_pid) then
|
||||
os.execute("kill "..apd_pid)
|
||||
end
|
||||
|
||||
local cfgs = mtkwifi.load_profile(devs[devname].profile)
|
||||
local auth_mode = cfgs['AuthMode']
|
||||
local ieee8021x = cfgs['IEEE8021X']
|
||||
local pat_auth_mode = {"WPA$", "WPA;", "WPA2$", "WPA2;", "WPA1WPA2$", "WPA1WPA2;"}
|
||||
local pat_ieee8021x = {"1$", "1;"}
|
||||
local apd_en = false
|
||||
|
||||
for _, pat in ipairs(pat_auth_mode) do
|
||||
if string.find(auth_mode, pat) then
|
||||
apd_en = true
|
||||
end
|
||||
end
|
||||
|
||||
for _, pat in ipairs(pat_ieee8021x) do
|
||||
if string.find(ieee8021x, pat) then
|
||||
apd_en = true
|
||||
end
|
||||
end
|
||||
|
||||
if not apd_en then
|
||||
return
|
||||
end
|
||||
|
||||
os.execute("rt2860apd -i "..main_ifname.." -p "..prefix)
|
||||
end
|
||||
|
||||
return mtkwifi
|
@ -1,868 +0,0 @@
|
||||
if PACKAGE_kmod-mt_wifi
|
||||
|
||||
config MTK_SUPPORT_OPENWRT
|
||||
bool
|
||||
default y
|
||||
depends on PACKAGE_kmod-mt_wifi
|
||||
|
||||
config MTK_WIFI_DRIVER
|
||||
bool
|
||||
default y
|
||||
depends on PACKAGE_kmod-mt_wifi
|
||||
select MTK_WIFI_MT_MAC
|
||||
select MTK_MT_MAC
|
||||
select MTK_FIRST_IF_MT7615E
|
||||
#select MTK_CHIP_MT7622
|
||||
#select MTK_CHIP_MT7626
|
||||
#select MTK_SECOND_IF_MT7615E
|
||||
#select MTK_THIRD_IF_MT7615E
|
||||
#select MTK_CHIP_MT7615E
|
||||
|
||||
if MTK_WIFI_DRIVER
|
||||
|
||||
choice
|
||||
prompt "Choose First WiFi Interface"
|
||||
|
||||
config MTK_FIRST_IF_MT7615E
|
||||
bool "MT7615E"
|
||||
select MTK_WIFI_MT_MAC
|
||||
select MTK_MT_MAC
|
||||
select MTK_CHIP_MT7615E
|
||||
|
||||
config MTK_FIRST_IF_MT7622
|
||||
bool "MT7622"
|
||||
select MTK_WIFI_MT_MAC
|
||||
select MTK_MT_MAC
|
||||
select MTK_CHIP_MT7622
|
||||
|
||||
config MTK_FIRST_IF_MT7626
|
||||
bool "MT7626"
|
||||
select MTK_WIFI_MT_MAC
|
||||
select MTK_MT_MAC
|
||||
select MTK_CHIP_MT7626
|
||||
|
||||
config MTK_FIRST_IF_NONE
|
||||
bool "None"
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Choose Second WiFi Interface"
|
||||
config MTK_SECOND_IF_NONE
|
||||
bool "None"
|
||||
|
||||
config MTK_SECOND_IF_MT7615E
|
||||
bool "MT7615E"
|
||||
select MTK_WIFI_MT_MAC
|
||||
select MTK_CHIP_MT7615E
|
||||
select MTK_MULTI_INF_SUPPORT
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Choose Third WiFi Interface"
|
||||
config MTK_THIRD_IF_NONE
|
||||
bool "None"
|
||||
|
||||
config MTK_THIRD_IF_MT7615E
|
||||
bool "MT7615E"
|
||||
select MTK_WIFI_MT_MAC
|
||||
select MTK_CHIP_MT7615E
|
||||
select MTK_MULTI_INF_SUPPORT
|
||||
|
||||
endchoice
|
||||
|
||||
config MTK_RT_FIRST_CARD
|
||||
int
|
||||
depends on ! MTK_FIRST_IF_NONE
|
||||
default 7615 if MTK_FIRST_IF_MT7615E
|
||||
default 7622 if MTK_FIRST_IF_MT7622
|
||||
default 7626 if MTK_FIRST_IF_MT7626
|
||||
|
||||
config MTK_RT_SECOND_CARD
|
||||
int
|
||||
depends on ! MTK_SECOND_IF_NONE
|
||||
default 7615 if MTK_SECOND_IF_MT7615E
|
||||
|
||||
config MTK_RT_THIRD_CARD
|
||||
int
|
||||
depends on ! MTK_THIRD_IF_NONE
|
||||
default 7615 if MTK_THIRD_IF_MT7615E
|
||||
|
||||
config MTK_RT_FIRST_IF_RF_OFFSET
|
||||
hex
|
||||
depends on ! MTK_FIRST_IF_NONE
|
||||
default 0xc0000
|
||||
|
||||
config MTK_RT_SECOND_IF_RF_OFFSET
|
||||
hex
|
||||
depends on ! MTK_SECOND_IF_NONE
|
||||
default 0xc8000
|
||||
|
||||
config MTK_RT_THIRD_IF_RF_OFFSET
|
||||
hex
|
||||
depends on ! MTK_THIRD_IF_NONE
|
||||
default 0xd0000
|
||||
|
||||
config MTK_MT_WIFI
|
||||
tristate "MT WIFI Driver"
|
||||
select MTK_WIFI_BASIC_FUNC if MTK_MT_WIFI
|
||||
default y
|
||||
|
||||
config MTK_MT_WIFI_PATH
|
||||
string
|
||||
depends on MTK_MT_WIFI
|
||||
default "mt_wifi"
|
||||
|
||||
if MTK_MT_WIFI
|
||||
menu "WiFi Generic Feature Options"
|
||||
choice
|
||||
prompt "EEPROM Type of 1st Card"
|
||||
depends on ! MTK_FIRST_IF_NONE
|
||||
|
||||
config MTK_FIRST_IF_EEPROM_FLASH
|
||||
bool "FLASH"
|
||||
|
||||
config MTK_FIRST_IF_EEPROM_PROM
|
||||
bool "EEPROM"
|
||||
|
||||
config MTK_FIRST_IF_EEPROM_EFUSE
|
||||
bool "EFUSE"
|
||||
|
||||
endchoice
|
||||
|
||||
config MTK_RT_FIRST_CARD_EEPROM
|
||||
string
|
||||
depends on ! MTK_FIRST_IF_NONE
|
||||
default "prom" if MTK_FIRST_IF_EEPROM_PROM
|
||||
default "efuse" if MTK_FIRST_IF_EEPROM_EFUSE
|
||||
default "flash" if MTK_FIRST_IF_EEPROM_FLASH
|
||||
|
||||
choice
|
||||
prompt "EEPROM Type of 2nd Card"
|
||||
depends on ! MTK_SECOND_IF_NONE
|
||||
|
||||
config MTK_SECOND_IF_EEPROM_FLASH
|
||||
bool "FLASH"
|
||||
|
||||
config MTK_SECOND_IF_EEPROM_PROM
|
||||
bool "EEPROM"
|
||||
|
||||
config MTK_SECOND_IF_EEPROM_EFUSE
|
||||
bool "EFUSE"
|
||||
|
||||
endchoice
|
||||
|
||||
config MTK_RT_SECOND_CARD_EEPROM
|
||||
string
|
||||
depends on ! MTK_SECOND_IF_NONE
|
||||
default "prom" if MTK_SECOND_IF_EEPROM_PROM
|
||||
default "efuse" if MTK_SECOND_IF_EEPROM_EFUSE
|
||||
default "flash" if MTK_SECOND_IF_EEPROM_FLASH
|
||||
|
||||
choice
|
||||
prompt "EEPROM Type of 3th Card"
|
||||
depends on ! MTK_THIRD_IF_NONE
|
||||
|
||||
config MTK_THIRD_IF_EEPROM_FLASH
|
||||
bool "FLASH"
|
||||
|
||||
config MTK_THIRD_IF_EEPROM_PROM
|
||||
bool "EEPROM"
|
||||
|
||||
config MTK_THIRD_IF_EEPROM_EFUSE
|
||||
bool "EFUSE"
|
||||
|
||||
endchoice
|
||||
|
||||
config MTK_RT_THIRD_CARD_EEPROM
|
||||
string
|
||||
depends on ! MTK_THIRD_IF_NONE
|
||||
default "prom" if MTK_THIRD_IF_EEPROM_PROM
|
||||
default "efuse" if MTK_THIRD_IF_EEPROM_EFUSE
|
||||
default "flash" if MTK_THIRD_IF_EEPROM_FLASH
|
||||
|
||||
config MTK_MULTI_INF_SUPPORT
|
||||
bool
|
||||
default y if !MTK_FIRST_IF_NONE && !MTK_SECOND_IF_NONE
|
||||
|
||||
config MTK_WIFI_BASIC_FUNC
|
||||
bool "Basic Functions"
|
||||
select MTK_WIRELESS_EXT
|
||||
select MTK_WEXT_SPY
|
||||
select MTK_WEXT_PRIV
|
||||
|
||||
config MTK_DOT11_N_SUPPORT
|
||||
bool "802.11n support"
|
||||
default y
|
||||
|
||||
config MTK_DOT11_VHT_AC
|
||||
bool "802.11AC support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_DOT11_N_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_G_BAND_256QAM_SUPPORT
|
||||
bool "2.4G 256QAM support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_DOT11_VHT_AC
|
||||
default y
|
||||
|
||||
config MTK_BRCM_256QAM_SUPPORT
|
||||
bool "BRCM 2.4G 256QAM support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_G_BAND_256QAM_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_VHT_TXBF_2G_EPIGRAM_IE_SUPPORT
|
||||
bool "BRCM 2.4G VHT Sounding support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_TPC_SUPPORT
|
||||
bool "802.11h TPC Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_ICAP_SUPPORT
|
||||
bool "ICAP Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_SPECTRUM_SUPPORT
|
||||
bool "Wifi Spectrum Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_BACKGROUND_SCAN_SUPPORT
|
||||
bool "Background Scan Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_SMART_CARRIER_SENSE_SUPPORT
|
||||
bool "Smart Carrier Sense Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_MT_DFS_SUPPORT
|
||||
bool "Dynamic Frequency Selection Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
#config WFA_VHT_R2_PF
|
||||
# bool "WFA VHT R2 Plugfest"
|
||||
# depends on DOT11_VHT_AC
|
||||
# default n
|
||||
|
||||
config MTK_HDR_TRANS_TX_SUPPORT
|
||||
bool "Tx Header Translation"
|
||||
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626
|
||||
default y
|
||||
|
||||
config MTK_HDR_TRANS_RX_SUPPORT
|
||||
bool "Rx Header Translation"
|
||||
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626
|
||||
default y
|
||||
|
||||
config MTK_DBDC_MODE
|
||||
bool "dbdc mode support"
|
||||
depends on MTK_CHIP_MT7615E || MTK_CHIP_MT7626
|
||||
select MULTI_PROFILE_SUPPORT
|
||||
select DEFAULT_5G_PROFILE
|
||||
default y
|
||||
|
||||
config MTK_MULTI_PROFILE_SUPPORT
|
||||
bool "Multi Profile Support"
|
||||
depends on MTK_DBDC_MODE
|
||||
default y
|
||||
|
||||
config MTK_DEFAULT_5G_PROFILE
|
||||
bool "5G default profile for DBDC"
|
||||
depends on MTK_DBDC_MODE
|
||||
# depends on MTK_MULTI_PROFILE_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_WSC_INCLUDED
|
||||
bool "WSC (WiFi Simple Config)"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_WSC_V2_SUPPORT
|
||||
bool "WSC V2(WiFi Simple Config Version 2.0)"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_DOT11W_PMF_SUPPORT
|
||||
bool "PMF"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_TXBF_SUPPORT
|
||||
bool "Tx Bean Forming Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_FAST_NAT_SUPPORT
|
||||
bool "Fast-NAT support"
|
||||
# depends on RA_HW_NAT_WIFI
|
||||
default n
|
||||
|
||||
config MTK_WHNAT_SUPPORT
|
||||
tristate "Wifi Hardware NAT support"
|
||||
depends on MTK_CHIP_MT7615E
|
||||
depends on MTK_WLAN_HOOK
|
||||
depends on MTK_FAST_NAT_SUPPORT
|
||||
select PACKAGE_kmod-hw_nat
|
||||
default n
|
||||
|
||||
#config LLTD_SUPPORT
|
||||
# bool "LLTD (Link Layer Topology Discovery Protocol)"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
#config QOS_DLS_SUPPORT
|
||||
# bool "802.11e DLS ((Direct-Link Setup) Support"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
#config WAPI_SUPPORT
|
||||
# bool "WAPI Support"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config MTK_FTM_SUPPORT
|
||||
bool "FTM Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
select MTK_PASSPOINT_R2
|
||||
default n
|
||||
|
||||
#config CARRIER_DETECTION_SUPPORT
|
||||
# bool "Carrier Detect"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config MTK_IGMP_SNOOP_SUPPORT
|
||||
bool "IGMP snooping"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
#config BLOCK_NET_IF
|
||||
# bool "NETIF Block"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
# help
|
||||
# Support Net interface block while Tx-Sw queue full
|
||||
|
||||
#config RATE_ADAPTION
|
||||
# bool "New Rate Adaptation support"
|
||||
# depends on WIFI_DRIVER
|
||||
# default y
|
||||
|
||||
#config NEW_RATE_ADAPT_SUPPORT
|
||||
# bool "Intelligent Rate Adaption"
|
||||
# depends on WIFI_DRIVER && RATE_ADAPTION
|
||||
# default y
|
||||
|
||||
#config AGS_SUPPORT
|
||||
# bool "Adaptive Group Switching"
|
||||
# depends on WIFI_DRIVER && RATE_ADAPTION
|
||||
# depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
# default n
|
||||
|
||||
#config RATE_ADAPT_AGBS_SUPPORT
|
||||
# bool "Adaptive AGBS Mode"
|
||||
# depends on WIFI_DRIVER && RATE_ADAPTION
|
||||
# depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
# default y
|
||||
|
||||
#config IDS_SUPPORT
|
||||
# bool "IDS (Intrusion Detection System) Support"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
#config WIFI_WORK_QUEUE
|
||||
# bool "Work Queue"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
#config WIFI_SKB_RECYCLE
|
||||
# bool "SKB Recycle(Linux)"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
config MTK_RTMP_FLASH_SUPPORT
|
||||
bool "Flash Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_PRE_CAL_TRX_SET1_SUPPORT
|
||||
bool "Calibration To Flash/BinFile Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_RLM_CAL_CACHE_SUPPORT
|
||||
bool "RlmCalibrationCache Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_PRE_CAL_TRX_SET2_SUPPORT
|
||||
bool "Pre-calibration to Flash Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MTK_RF_LOCKDOWN_SUPPORT
|
||||
bool "RF Lockdown Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default n
|
||||
|
||||
config MTK_LINK_TEST_SUPPORT
|
||||
bool "Link Test Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default n
|
||||
|
||||
#config MTK_LED_CONTROL_SUPPORT
|
||||
# bool "LED Support"
|
||||
# depends on MTK_WIFI_DRIVER
|
||||
# depends on MTK_MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
config MTK_ATE_SUPPORT
|
||||
bool "ATE/QA Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
#config MTK_MEMORY_OPTIMIZATION
|
||||
# bool "Memory Optimization"
|
||||
# depends on MTK_WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config MTK_PASSPOINT_R2
|
||||
bool "Passpoint Release-2 Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
select MTK_DOT11W_PMF_SUPPORT
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_MBO_SUPPORT
|
||||
bool "MBO Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
select MTK_INTERWORKING
|
||||
select MTK_WNM_SUPPORT
|
||||
select MTK_DOT11K_RRM_SUPPORT
|
||||
select MTK_DOT11R_FT_SUPPORT
|
||||
select MTK_DOT11W_PMF_SUPPORT
|
||||
default n
|
||||
|
||||
#config TRACE_TCP_PKT
|
||||
# bool "TCP DATA/ACK packets trace log"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config MTK_UAPSD
|
||||
bool "UAPSD support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_TCP_RACK_SUPPORT
|
||||
bool "TCP Reduced ACK support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default y
|
||||
|
||||
#### PA_LNA_Type choice
|
||||
|
||||
config MTK_RED_SUPPORT
|
||||
bool "RED(Random Early Drop) support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT || MTK_MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_FQ_SCH_SUPPORT
|
||||
bool "Fair Queueing support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
depends on MTK_MT_AP_SUPPORT && MTK_VOW_SUPPORT
|
||||
depends on MTK_CHIP_MT7622
|
||||
default y
|
||||
|
||||
config MTK_FDB_SUPPORT
|
||||
bool "FW Debug Port"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default n
|
||||
|
||||
choice
|
||||
prompt "PA LNA Type of 1st Card"
|
||||
depends on ! MTK_FIRST_IF_NONE
|
||||
|
||||
config MTK_FIRST_IF_EPAELNA
|
||||
bool "ePAeLNA"
|
||||
config MTK_FIRST_IF_IPAILNA
|
||||
bool "iPAiLNA"
|
||||
config MTK_FIRST_IF_IPAELNA
|
||||
bool "iPAeLNA"
|
||||
# config MTK_FIRST_IF_EPAILNA
|
||||
# bool "ePAiLNA"
|
||||
endchoice
|
||||
choice
|
||||
prompt "PA LNA Type of 2nd Card"
|
||||
depends on ! MTK_SECOND_IF_NONE
|
||||
|
||||
config MTK_SECOND_IF_EPAELNA
|
||||
bool "ePAeLNA"
|
||||
config MTK_SECOND_IF_IPAILNA
|
||||
bool "iPAiLNA"
|
||||
config MTK_SECOND_IF_IPAELNA
|
||||
bool "iPAeLNA"
|
||||
# config MTK_SECOND_IF_EPAILNA
|
||||
# bool "ePAiLNA"
|
||||
endchoice
|
||||
choice
|
||||
prompt "PA LNA Type of 3rd Card"
|
||||
depends on ! MTK_THIRD_IF_NONE
|
||||
|
||||
config MTK_THIRD_IF_EPAELNA
|
||||
bool "ePAeLNA"
|
||||
config MTK_THIRD_IF_IPAILNA
|
||||
bool "iPAiLNA"
|
||||
config MTK_THIRD_IF_IPAELNA
|
||||
bool "iPAeLNA"
|
||||
# config MTK_THIRD_IF_EPAILNA
|
||||
# bool "ePAiLNA"
|
||||
endchoice
|
||||
#### PA_LNA_Type choice END
|
||||
|
||||
#
|
||||
# Section for chip architectures
|
||||
#
|
||||
# "RLT MAC Support"
|
||||
config MTK_RLT_MAC
|
||||
bool
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default n
|
||||
|
||||
config MTK_RLT_BBP
|
||||
bool
|
||||
|
||||
config MTK_RLT_RF
|
||||
bool
|
||||
|
||||
# "RTMP MAC Support"
|
||||
config MTK_RTMP_MAC
|
||||
bool
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default n
|
||||
|
||||
config MTK_RTMP_BBP
|
||||
bool
|
||||
|
||||
config MTK_RTMP_RF
|
||||
bool
|
||||
|
||||
#
|
||||
# Section for interfaces
|
||||
#
|
||||
config MTK_RTMP_PCI_SUPPORT
|
||||
bool
|
||||
|
||||
config MTK_RTMP_USB_SUPPORT
|
||||
bool
|
||||
|
||||
config MTK_RTMP_RBUS_SUPPORT
|
||||
bool
|
||||
|
||||
endmenu
|
||||
|
||||
menu "WiFi Operation Modes"
|
||||
|
||||
config MTK_WIFI_MODE_AP
|
||||
tristate "AP"
|
||||
default y
|
||||
select MTK_MT_AP_SUPPORT
|
||||
|
||||
config MTK_WIFI_MODE_STA
|
||||
tristate "STA"
|
||||
select MTK_MT_STA_SUPPORT
|
||||
|
||||
config MTK_WIFI_MODE_BOTH
|
||||
tristate "APSTA"
|
||||
select MTK_MT_AP_SUPPORT
|
||||
select MTK_MT_STA_SUPPORT
|
||||
|
||||
|
||||
config MTK_MT_AP_SUPPORT
|
||||
tristate "Ralink RT2860 802.11n AP support"
|
||||
# depends on NET_RADIO
|
||||
select MTK_WIRELESS_EXT
|
||||
select MTK_WEXT_SPY
|
||||
select MTK_WEXT_PRIV
|
||||
default y
|
||||
|
||||
config MTK_WDS_SUPPORT
|
||||
bool "WDS"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_MBSS_SUPPORT
|
||||
bool "MBSSID"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
#config NEW_MBSSID_MODE
|
||||
# bool "New MBSSID MODE"
|
||||
# depends on MT_AP_SUPPORT && MBSS_SUPPORT
|
||||
# depends on RALINK_RT3883 || RALINK_RT3352 || RALINK_RT5350 || RALINK_RT6352 || RALINK_MT7620
|
||||
# default y
|
||||
|
||||
#config ENHANCE_NEW_MBSSID_MODE
|
||||
# bool "Enhanced MBSSID mode"
|
||||
# depends on NEW_MBSSID_MODE
|
||||
# default y
|
||||
|
||||
config MTK_APCLI_SUPPORT
|
||||
bool "AP-Client Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_APCLI_CERT_SUPPORT
|
||||
bool "AP-Client TGn Cert Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
depends on MTK_APCLI_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_MAC_REPEATER_SUPPORT
|
||||
bool "MAC Repeater Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
depends on MTK_APCLI_SUPPORT
|
||||
depends on MTK_RALINK_RT6352 || MTK_RALINK_MT7620 || MTK_RALINK_MT7603E || MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_MWDS
|
||||
bool "Mixed WDS(MWDS)"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
select MTK_APCLI_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_MUMIMO_SUPPORT
|
||||
bool "MU-MIMO Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
select MTK_MU_RA_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_MU_RA_SUPPORT
|
||||
bool "MU-RGA Support"
|
||||
depends on MTK_MUMIMO_SUPPORT
|
||||
|
||||
config MTK_DOT11R_FT_SUPPORT
|
||||
bool "802.11r Fast BSS Transition"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_DOT11K_RRM_SUPPORT
|
||||
bool "802.11k Radio Resource Management"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
#config SNIFFER_SUPPORT
|
||||
# bool "SNIFFER"
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
config MTK_CFG80211_SUPPORT
|
||||
bool "CFG80211"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_DSCP_PRI_SUPPORT
|
||||
bool "Dscp Priority Mapping Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_CON_WPS_SUPPORT
|
||||
bool "Concurrent WPS Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
depends on MTK_APCLI_SUPPORT
|
||||
depends on MTK_WSC_INCLUDED
|
||||
depends on MTK_WSC_V2_SUPPORT
|
||||
# depends on MTK_MULTI_INF_SUPPORT
|
||||
default n
|
||||
|
||||
#config LLTD_SUPPORT
|
||||
# bool "LLTD (Link Layer Topology Discovery Protocol)"
|
||||
# depends on MT_AP_SUPPORT
|
||||
|
||||
#config COC_SUPPORT
|
||||
# bool "CoC Support"
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
#config RT2860V2_SNMP
|
||||
# bool "Net-SNMP Support"
|
||||
# depends on MT_AP_SUPPORT
|
||||
|
||||
config MTK_MCAST_RATE_SPECIFIC
|
||||
bool "User specific tx rate of mcast pkt"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
#config EXT_BUILD_CHANNEL_LIST
|
||||
# bool "Extension Channel List"
|
||||
# depends on MT_AP_SUPPORT
|
||||
|
||||
#config AUTO_CH_SELECT_ENHANCE
|
||||
# bool "Auto Channel Selection Enhancement"
|
||||
# depends on MT_AP_SUPPORT
|
||||
|
||||
config MTK_VOW_SUPPORT
|
||||
bool "MediaAir(VOW) support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
#config AIRPLAY_SUPPORT
|
||||
# bool "AIRPLAY Support"
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
config MTK_BAND_STEERING
|
||||
bool "Band Steering"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_LED_CONTROL_SUPPORT
|
||||
bool "LED Control Support"
|
||||
default n
|
||||
|
||||
config MTK_WLAN_HOOK
|
||||
bool "WLAN hook Support"
|
||||
depends on MTK_WIFI_DRIVER
|
||||
default n
|
||||
|
||||
config MTK_RADIUS_ACCOUNTING_SUPPORT
|
||||
bool "Radius Accounting Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_GREENAP_SUPPORT
|
||||
bool "GreenAP Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_PCIE_ASPM_DYM_CTRL_SUPPORT
|
||||
bool "Pcie Aspm Dynamic Control Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config MTK_COEX_SUPPORT
|
||||
bool "Coex Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_EASY_SETUP_SUPPORT
|
||||
bool "Whole Home Coverage - Easy Setup"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_EVENT_NOTIFIER_SUPPORT
|
||||
bool "Whole Home Coverage - Event Notifier"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_AIR_MONITOR
|
||||
bool "Air Monitor"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_WNM_SUPPORT
|
||||
bool "802.11v WNM Support"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
config MTK_INTERWORKING
|
||||
bool "802.11u Interworking"
|
||||
depends on MTK_MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
#config ROAMING_ENHANCE_SUPPORT
|
||||
# bool "Roaming Enhance Support"
|
||||
# depends on MT_AP_SUPPORT
|
||||
# depends on APCLI_SUPPORT
|
||||
# default n
|
||||
|
||||
config MTK_LINUX_NET_TXQ_SUPPORT
|
||||
bool "NET TX Queue Support"
|
||||
default n
|
||||
|
||||
#config WIFI_FWD_SUPPORT
|
||||
# bool "WiFi Forwarding Support"
|
||||
# default n
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
config MTK_WIFI_MT_MAC
|
||||
bool
|
||||
default y
|
||||
depends on MTK_MT_WIFI
|
||||
|
||||
if MTK_WIFI_RLT_MAC
|
||||
config MTK_RLT_MAC
|
||||
bool
|
||||
default y
|
||||
endif
|
||||
|
||||
if MTK_WIFI_RTMP_MAC
|
||||
config MTK_RTMP_MAC
|
||||
bool
|
||||
default y
|
||||
endif
|
||||
|
||||
if MTK_WIFI_MT_MAC
|
||||
config MTK_MT_MAC
|
||||
bool
|
||||
default y
|
||||
|
||||
config MTK_CHIP_MT7603E
|
||||
bool
|
||||
default n
|
||||
|
||||
config MTK_CHIP_MT7615E
|
||||
bool
|
||||
default n
|
||||
|
||||
config MTK_CHIP_MT7622
|
||||
bool
|
||||
default n
|
||||
|
||||
config MTK_CHIP_MT7663E
|
||||
bool
|
||||
default n
|
||||
|
||||
config MTK_CHIP_MT7626
|
||||
bool
|
||||
default n
|
||||
endif
|
||||
|
||||
if MTK_CHIP_MT7615E || MTK_CHIP_MT7622 || MTK_CHIP_MT7626
|
||||
config MTK_MT_MAC
|
||||
bool
|
||||
default y
|
||||
select MTK_RATE_ADAPTION
|
||||
select MTK_RATE_ADAPT_AGBS_SUPPORT
|
||||
select MTK_DOT11_N_SUPPORT
|
||||
select MTK_DOT11_VHT_AC
|
||||
select MTK_HDR_TRANS_TX_SUPPORT
|
||||
select MTK_HDR_TRANS_RX_SUPPORT
|
||||
endif
|
||||
|
||||
endif #MTK_WIFI_DRIVER#
|
||||
endif #PACKAGE_kmod-mt_wifi#
|
||||
|
@ -1,65 +0,0 @@
|
||||
# Single SKU Max Power Table | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 2.4G Channel |CCK | | | |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |Txstream_Delta | | | | | | | | | | | | | | | | | | | | |
|
||||
Band: 2.4G |CCK_1M |CCK_2M |CCK_5.5M |CCK_11M |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | | | | | | | | | | | | | | | | | |
|
||||
Ch1 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |20 |12 |18 |16 |8 | |8 | |8 | |9 |11 |12 |2 |1 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch2 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |19 |19 |10 |12 |8 | |8 | |8 | |9 |16 |12 |5 |4 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch3 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |17 |18 |16 |20 |8 | |8 | |8 | |12 |8 |20 |0 |2 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch4 |8 | |8 | |8 | |8 | |8 | |8 |8 |9 |8 | |8 | |8 | |14 |10 |14 |18 |8 | |8 | |8 | |14 |12 |10 |3 |4 |5 | | | | | | | | | | | | | | | | | | |
|
||||
Ch5 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |10 |13 |11 |8 |8 | |8 | |8 | |12 |8 |9 |4 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch6 |8 | |8 | |8 | |8 | |8 | |8 |8 |13 |8 | |8 | |8 | |11 |9 |12 |16 |8 | |8 | |8 | |9 |17 |11 |5 |2 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch7 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |14 |11 |13 |18 |8 | |8 | |8 | |16 |13 |10 |2 |5 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch8 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |14 |9 |11 |10 |8 | |8 | |8 | |11 |14 |8 |5 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch9 |8 | |8 | |8 | |8 | |8 | |8 |8 |11 |8 | |8 | |8 | |12 |9 |15 |19 |8 | |8 | |8 | |14 |20 |12 |2 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch10 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |17 |14 |17 |15 |8 | |8 | |8 | |9 |17 |8 |2 |4 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch11 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |20 |10 |20 |18 |8 | |8 | |8 | |12 |8 |20 |3 |1 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch12 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |20 |16 |17 |9 |8 | |8 | |8 | |11 |20 |9 |0 |0 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch13 |8 | |8 | |8 | |8 | |8 | |8 |8 |8 |8 | |8 | |8 | |11 |16 |19 |16 |8 | |8 | |8 | |15 |12 |12 |2 |0 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch14 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |15 |17 |16 |14 |8 | |8 | |8 | |12 |14 |20 |4 |1 |5 | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 5G Channel |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |VHT80 | | | | | | | | | |VHT160 | | | | | | | | | |Txstream_Delta | | | | |
|
||||
Band: 5G |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |VHT80_MCS0 |VHT80_MCS1 |VHT80_MCS2 |VHT80_MCS3 |VHT80_MCS4 |VHT80_MCS5 |VHT80_MCS6 |VHT80_MCS7 |VHT80_MCS8 |VHT80_MCS9 |VHT160_MCS0 |VHT160_MCS1 |VHT160_MCS2 |VHT160_MCS3 |VHT160_MCS4 |VHT160_MCS5 |VHT160_MCS6 |VHT160_MCS7 |VHT160_MCS8 |VHT160_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | |
|
||||
Ch184 |18 | |18 | |18 | |18 |18 |15 |18 | |12 | |13 | |11 |14 |16 |16 |12 | |12 | |13 | |20 |17 |16 |17 |18 | |9 | |16 | |17 |20 |18 |16 |19 | |15 | |9 | |17 |8 |17 |0 |4 |4 | | |
|
||||
Ch188 |18 | |18 | |18 | |18 |18 |16 |20 | |9 | |9 | |11 |8 |12 |18 |15 | |11 | |11 | |14 |8 |17 |16 |16 | |16 | |12 | |8 |13 |19 |18 |11 | |9 | |12 | |14 |8 |13 |5 |2 |0 | | |
|
||||
Ch192 |18 | |18 | |18 | |18 |18 |15 |9 | |11 | |9 | |15 |14 |11 |19 |15 | |8 | |18 | |20 |20 |8 |9 |9 | |9 | |11 | |18 |13 |14 |20 |18 | |10 | |14 | |12 |13 |16 |0 |2 |0 | | |
|
||||
Ch196 |18 | |18 | |18 | |18 |18 |10 |11 | |19 | |13 | |12 |11 |10 |13 |11 | |19 | |10 | |16 |20 |15 |15 |8 | |14 | |8 | |18 |20 |15 |17 |17 | |14 | |12 | |12 |8 |16 |4 |3 |2 | | |
|
||||
Ch8 |18 | |18 | |18 | |18 |18 |18 |13 | |19 | |20 | |18 |10 |9 |8 |8 | |17 | |15 | |17 |9 |18 |19 |11 | |12 | |15 | |20 |12 |12 |13 |9 | |9 | |15 | |10 |11 |17 |4 |3 |3 | | |
|
||||
Ch12 |18 | |18 | |18 | |18 |18 |17 |20 | |14 | |10 | |10 |16 |15 |13 |11 | |15 | |16 | |17 |11 |15 |9 |18 | |8 | |20 | |19 |11 |9 |20 |8 | |18 | |8 | |8 |18 |18 |1 |3 |4 | | |
|
||||
Ch16 |18 | |18 | |18 | |18 |18 |10 |18 | |18 | |8 | |19 |8 |12 |19 |16 | |19 | |18 | |16 |19 |12 |18 |18 | |9 | |10 | |18 |20 |20 |20 |9 | |11 | |20 | |17 |14 |16 |2 |2 |2 | | |
|
||||
Ch36 |18 | |18 | |18 | |18 |18 |18 |19 | |8 | |11 | |16 |10 |9 |19 |11 | |19 | |9 | |8 |19 |8 |11 |17 | |20 | |14 | |9 |19 |19 |20 |13 | |12 | |19 | |13 |17 |9 |5 |1 |2 | | |
|
||||
Ch40 |18 | |18 | |18 | |18 |18 |13 |20 | |13 | |19 | |16 |11 |14 |17 |17 | |14 | |8 | |13 |8 |10 |20 |10 | |9 | |14 | |11 |14 |17 |9 |20 | |15 | |19 | |9 |8 |11 |3 |1 |1 | | |
|
||||
Ch44 |18 | |18 | |18 | |18 |18 |10 |14 | |19 | |20 | |17 |16 |12 |18 |8 | |17 | |18 | |15 |19 |14 |11 |13 | |14 | |12 | |16 |16 |19 |13 |14 | |19 | |14 | |20 |20 |11 |5 |1 |0 | | |
|
||||
Ch48 |18 | |18 | |18 | |18 |18 |8 |12 | |12 | |19 | |11 |8 |11 |20 |12 | |12 | |11 | |15 |16 |10 |12 |16 | |11 | |15 | |18 |19 |17 |16 |17 | |11 | |8 | |10 |16 |16 |5 |5 |0 | | |
|
||||
Ch52 |18 | |18 | |18 | |18 |18 |15 |12 | |15 | |20 | |9 |10 |10 |14 |8 | |20 | |10 | |16 |17 |18 |11 |16 | |17 | |10 | |17 |12 |13 |17 |17 | |13 | |18 | |18 |20 |13 |4 |3 |4 | | |
|
||||
Ch56 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |20 |13 |14 |11 | |10 | |20 | |10 |8 |16 |12 |10 | |16 | |11 | |9 |11 |14 |17 |12 | |17 | |13 | |18 |10 |19 |0 |3 |3 | | |
|
||||
Ch60 |18 | |18 | |18 | |18 |18 |14 |11 | |8 | |20 | |13 |16 |13 |11 |20 | |9 | |17 | |16 |11 |8 |12 |17 | |15 | |8 | |16 |10 |20 |19 |15 | |13 | |9 | |17 |18 |11 |4 |1 |2 | | |
|
||||
Ch64 |18 | |18 | |18 | |18 |18 |13 |14 | |8 | |12 | |17 |8 |12 |18 |17 | |17 | |14 | |18 |8 |8 |20 |17 | |16 | |20 | |9 |15 |11 |10 |11 | |18 | |10 | |10 |15 |19 |2 |1 |4 | | |
|
||||
Ch68 |18 | |18 | |18 | |18 |18 |14 |19 | |17 | |9 | |18 |19 |20 |12 |14 | |8 | |14 | |20 |20 |18 |9 |18 | |11 | |19 | |19 |10 |11 |8 |18 | |9 | |8 | |16 |11 |8 |3 |3 |1 | | |
|
||||
Ch72 |18 | |18 | |18 | |18 |18 |19 |13 | |20 | |11 | |16 |9 |19 |20 |19 | |14 | |8 | |9 |17 |13 |19 |15 | |8 | |9 | |19 |14 |19 |15 |18 | |16 | |12 | |13 |15 |10 |4 |3 |1 | | |
|
||||
Ch76 |18 | |18 | |18 | |18 |18 |17 |13 | |16 | |20 | |16 |8 |9 |20 |11 | |17 | |11 | |8 |18 |9 |20 |9 | |17 | |16 | |11 |11 |11 |18 |10 | |13 | |W | |20 |17 |8 |1 |3 |3 | | |
|
||||
Ch80 |18 | |18 | |18 | |18 |18 |14 |20 | |13 | |13 | |17 |8 |10 |16 |8 | |9 | |19 | |16 |17 |17 |19 |15 | |9 | |13 | |16 |13 |14 |12 |9 | |20 | |20 | |14 |18 |18 |0 |4 |2 | | |
|
||||
Ch84 |18 | |18 | |18 | |18 |18 |11 |18 | |20 | |9 | |13 |14 |11 |16 |15 | |12 | |11 | |9 |19 |13 |11 |11 | |9 | |15 | |16 |18 |13 |12 |8 | |8 | |8 | |10 |12 |15 |3 |2 |5 | | |
|
||||
Ch88 |18 | |18 | |18 | |18 |18 |18 |19 | |9 | |17 | |15 |8 |19 |11 |11 | |14 | |9 | |14 |20 |20 |11 |11 | |15 | |12 | |14 |11 |8 |18 |15 | |19 | |18 | |12 |20 |16 |5 |5 |1 | | |
|
||||
Ch92 |18 | |18 | |18 | |18 |18 |11 |8 | |15 | |13 | |13 |13 |13 |16 |14 | |14 | |9 | |9 |15 |20 |11 |17 | |10 | |14 | |13 |17 |11 |8 |18 | |20 | |8 | |10 |19 |18 |1 |4 |4 | | |
|
||||
Ch96 |18 | |18 | |18 | |18 |18 |8 |12 | |16 | |9 | |13 |12 |9 |8 |11 | |8 | |8 | |19 |11 |15 |16 |8 | |11 | |16 | |18 |16 |9 |19 |9 | |10 | |15 | |19 |19 |15 |4 |2 |4 | | |
|
||||
Ch100 |18 | |18 | |18 | |18 |18 |18 |13 | |20 | |20 | |12 |9 |19 |10 |9 | |14 | |8 | |19 |10 |17 |9 |10 | |10 | |8 | |13 |12 |11 |20 |11 | |16 | |18 | |14 |16 |19 |1 |1 |2 | | |
|
||||
Ch104 |18 | |18 | |18 | |18 |18 |19 |12 | |20 | |14 | |16 |15 |9 |19 |11 | |15 | |11 | |12 |18 |15 |11 |15 | |19 | |10 | |14 |15 |19 |9 |13 | |19 | |13 | |11 |11 |17 |2 |2 |0 | | |
|
||||
Ch108 |18 | |18 | |18 | |18 |18 |18 |15 | |13 | |16 | |11 |19 |19 |18 |19 | |12 | |17 | |8 |9 |10 |8 |8 | |18 | |8 | |10 |11 |17 |15 |10 | |19 | |13 | |16 |10 |15 |0 |2 |3 | | |
|
||||
Ch112 |18 | |18 | |18 | |18 |18 |8 |13 | |9 | |17 | |9 |15 |17 |10 |19 | |9 | |19 | |11 |16 |14 |16 |8 | |18 | |13 | |16 |13 |17 |19 |11 | |8 | |8 | |18 |14 |17 |5 |2 |5 | | |
|
||||
Ch116 |18 | |18 | |18 | |18 |18 |8 |20 | |11 | |15 | |8 |11 |8 |18 |15 | |13 | |17 | |14 |13 |9 |8 |14 | |14 | |11 | |9 |19 |17 |11 |11 | |8 | |20 | |8 |10 |20 |5 |2 |1 | | |
|
||||
Ch120 |18 | |18 | |18 | |18 |18 |14 |20 | |8 | |20 | |14 |10 |10 |17 |12 | |16 | |20 | |10 |20 |17 |18 |9 | |15 | |14 | |17 |13 |14 |16 |8 | |18 | |10 | |15 |12 |12 |1 |5 |3 | | |
|
||||
Ch124 |18 | |18 | |18 | |18 |18 |20 |9 | |17 | |12 | |12 |8 |14 |8 |8 | |20 | |17 | |16 |20 |13 |14 |16 | |10 | |14 | |20 |15 |17 |8 |10 | |13 | |13 | |11 |13 |9 |5 |0 |5 | | |
|
||||
Ch128 |18 | |18 | |18 | |18 |18 |9 |19 | |9 | |14 | |8 |14 |11 |9 |14 | |16 | |15 | |14 |10 |15 |14 |14 | |20 | |10 | |16 |15 |11 |12 |13 | |13 | |13 | |12 |15 |20 |1 |4 |3 | | |
|
||||
Ch132 |18 | |18 | |18 | |18 |18 |20 |16 | |13 | |8 | |18 |11 |20 |12 |11 | |11 | |14 | |12 |13 |8 |12 |13 | |10 | |20 | |19 |12 |13 |14 |12 | |11 | |19 | |19 |20 |8 |3 |1 |4 | | |
|
||||
Ch136 |18 | |18 | |18 | |18 |18 |12 |12 | |19 | |10 | |20 |10 |8 |17 |8 | |12 | |10 | |10 |13 |13 |12 |8 | |11 | |18 | |14 |12 |17 |8 |14 | |14 | |9 | |11 |18 |14 |1 |2 |2 | | |
|
||||
Ch140 |18 | |18 | |18 | |18 |18 |12 |10 | |13 | |9 | |16 |8 |20 |10 |17 | |8 | |15 | |13 |20 |15 |10 |18 | |13 | |12 | |12 |16 |18 |12 |17 | |10 | |16 | |11 |15 |14 |3 |2 |5 | | |
|
||||
Ch144 |18 | |18 | |18 | |18 |18 |19 |9 | |15 | |8 | |13 |18 |17 |9 |19 | |16 | |11 | |20 |12 |15 |19 |10 | |17 | |15 | |17 |14 |9 |9 |13 | |17 | |16 | |10 |9 |10 |1 |5 |2 | | |
|
||||
Ch149 |18 | |18 | |18 | |18 |18 |15 |20 | |12 | |19 | |19 |19 |10 |10 |13 | |15 | |19 | |12 |19 |10 |14 |15 | |10 | |15 | |9 |8 |11 |15 |13 | |10 | |16 | |15 |18 |12 |5 |5 |2 | | |
|
||||
Ch153 |18 | |18 | |18 | |18 |18 |20 |17 | |8 | |19 | |16 |20 |13 |16 |18 | |14 | |11 | |10 |16 |16 |19 |15 | |13 | |17 | |19 |18 |19 |20 |8 | |18 | |9 | |17 |11 |11 |1 |2 |1 | | |
|
||||
Ch157 |18 | |18 | |18 | |18 |18 |13 |17 | |12 | |19 | |16 |8 |17 |11 |12 | |15 | |14 | |18 |11 |12 |9 |18 | |20 | |13 | |16 |13 |20 |17 |19 | |10 | |12 | |20 |18 |16 |5 |2 |3 | | |
|
||||
Ch161 |18 | |18 | |18 | |18 |18 |12 |12 | |16 | |12 | |15 |11 |18 |11 |13 | |17 | |19 | |11 |13 |13 |9 |15 | |10 | |10 | |19 |13 |20 |13 |9 | |8 | |8 | |20 |14 |12 |0 |4 |1 | | |
|
||||
Ch165 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |8 |19 |15 |10 | |17 | |13 | |13 |19 |20 |8 |18 | |15 | |20 | |16 |9 |14 |11 |20 | |11 | |19 | |15 |16 |8 |1 |2 |0 | | |
|
||||
Ch169 |18 | |18 | |18 | |18 |18 |8 |17 | |17 | |13 | |16 |8 |14 |18 |11 | |8 | |18 | |20 |14 |8 |17 |8 | |13 | |18 | |19 |20 |19 |20 |17 | |13 | |20 | |9 |15 |18 |0 |3 |4 | | |
|
||||
Ch173 |18 | |18 | |18 | |18 |18 |14 |9 | |13 | |12 | |15 |14 |15 |10 |10 | |18 | |16 | |16 |8 |13 |16 |11 | |11 | |13 | |13 |15 |12 |20 |15 | |14 | |13 | |16 |11 |14 |3 |3 |4 | | |
|
||||
Ch177 |18 | |18 | |18 | |18 |18 |19 |18 | |16 | |10 | |20 |13 |11 |16 |12 | |16 | |18 | |18 |11 |18 |8 |13 | |14 | |11 | |18 |14 |16 |16 |19 | |16 | |13 | |15 |8 |13 |5 |0 |0 | | |
|
||||
Ch181 |18 | |18 | |18 | |18 |18 |20 |11 | |10 | |9 | |8 |9 |15 |15 |8 | |8 | |12 | |11 |9 |18 |20 |11 | |17 | |11 | |8 |15 |8 |18 |12 | |18 | |16 | |19 |9 |14 |4 |1 |4 | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
@ -1,65 +0,0 @@
|
||||
# Single SKU Max Power Table | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 2.4G Channel |CCK | | | |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |Txstream_Delta | | | | | | | | | | | | | | | | | | | | |
|
||||
Band: 2.4G |CCK_1M |CCK_2M |CCK_5.5M |CCK_11M |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | | | | | | | | | | | | | | | | | |
|
||||
Ch1 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |20 |12 |18 |16 |8 | |8 | |8 | |9 |11 |12 |2 |1 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch2 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |19 |19 |10 |12 |8 | |8 | |8 | |9 |16 |12 |5 |4 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch3 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |17 |18 |16 |20 |8 | |8 | |8 | |12 |8 |20 |0 |2 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch4 |8 | |8 | |8 | |8 | |8 | |8 |8 |9 |8 | |8 | |8 | |14 |10 |14 |18 |8 | |8 | |8 | |14 |12 |10 |3 |4 |5 | | | | | | | | | | | | | | | | | | |
|
||||
Ch5 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |10 |13 |11 |8 |8 | |8 | |8 | |12 |8 |9 |4 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch6 |8 | |8 | |8 | |8 | |8 | |8 |8 |13 |8 | |8 | |8 | |11 |9 |12 |16 |8 | |8 | |8 | |9 |17 |11 |5 |2 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch7 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |14 |11 |13 |18 |8 | |8 | |8 | |16 |13 |10 |2 |5 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch8 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |14 |9 |11 |10 |8 | |8 | |8 | |11 |14 |8 |5 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch9 |8 | |8 | |8 | |8 | |8 | |8 |8 |11 |8 | |8 | |8 | |12 |9 |15 |19 |8 | |8 | |8 | |14 |20 |12 |2 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch10 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |17 |14 |17 |15 |8 | |8 | |8 | |9 |17 |8 |2 |4 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch11 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |20 |10 |20 |18 |8 | |8 | |8 | |12 |8 |20 |3 |1 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch12 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |20 |16 |17 |9 |8 | |8 | |8 | |11 |20 |9 |0 |0 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch13 |8 | |8 | |8 | |8 | |8 | |8 |8 |8 |8 | |8 | |8 | |11 |16 |19 |16 |8 | |8 | |8 | |15 |12 |12 |2 |0 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch14 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |15 |17 |16 |14 |8 | |8 | |8 | |12 |14 |20 |4 |1 |5 | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 5G Channel |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |VHT80 | | | | | | | | | |VHT160 | | | | | | | | | |Txstream_Delta | | | | |
|
||||
Band: 5G |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |VHT80_MCS0 |VHT80_MCS1 |VHT80_MCS2 |VHT80_MCS3 |VHT80_MCS4 |VHT80_MCS5 |VHT80_MCS6 |VHT80_MCS7 |VHT80_MCS8 |VHT80_MCS9 |VHT160_MCS0 |VHT160_MCS1 |VHT160_MCS2 |VHT160_MCS3 |VHT160_MCS4 |VHT160_MCS5 |VHT160_MCS6 |VHT160_MCS7 |VHT160_MCS8 |VHT160_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | |
|
||||
Ch184 |18 | |18 | |18 | |18 |18 |15 |18 | |12 | |13 | |11 |14 |16 |16 |12 | |12 | |13 | |20 |17 |16 |17 |18 | |9 | |16 | |17 |20 |18 |16 |19 | |15 | |9 | |17 |8 |17 |0 |4 |4 | | |
|
||||
Ch188 |18 | |18 | |18 | |18 |18 |16 |20 | |9 | |9 | |11 |8 |12 |18 |15 | |11 | |11 | |14 |8 |17 |16 |16 | |16 | |12 | |8 |13 |19 |18 |11 | |9 | |12 | |14 |8 |13 |5 |2 |0 | | |
|
||||
Ch192 |18 | |18 | |18 | |18 |18 |15 |9 | |11 | |9 | |15 |14 |11 |19 |15 | |8 | |18 | |20 |20 |8 |9 |9 | |9 | |11 | |18 |13 |14 |20 |18 | |10 | |14 | |12 |13 |16 |0 |2 |0 | | |
|
||||
Ch196 |18 | |18 | |18 | |18 |18 |10 |11 | |19 | |13 | |12 |11 |10 |13 |11 | |19 | |10 | |16 |20 |15 |15 |8 | |14 | |8 | |18 |20 |15 |17 |17 | |14 | |12 | |12 |8 |16 |4 |3 |2 | | |
|
||||
Ch8 |18 | |18 | |18 | |18 |18 |18 |13 | |19 | |20 | |18 |10 |9 |8 |8 | |17 | |15 | |17 |9 |18 |19 |11 | |12 | |15 | |20 |12 |12 |13 |9 | |9 | |15 | |10 |11 |17 |4 |3 |3 | | |
|
||||
Ch12 |18 | |18 | |18 | |18 |18 |17 |20 | |14 | |10 | |10 |16 |15 |13 |11 | |15 | |16 | |17 |11 |15 |9 |18 | |8 | |20 | |19 |11 |9 |20 |8 | |18 | |8 | |8 |18 |18 |1 |3 |4 | | |
|
||||
Ch16 |18 | |18 | |18 | |18 |18 |10 |18 | |18 | |8 | |19 |8 |12 |19 |16 | |19 | |18 | |16 |19 |12 |18 |18 | |9 | |10 | |18 |20 |20 |20 |9 | |11 | |20 | |17 |14 |16 |2 |2 |2 | | |
|
||||
Ch36 |18 | |18 | |18 | |18 |18 |18 |19 | |8 | |11 | |16 |10 |9 |19 |11 | |19 | |9 | |8 |19 |8 |11 |17 | |20 | |14 | |9 |19 |19 |20 |13 | |12 | |19 | |13 |17 |9 |5 |1 |2 | | |
|
||||
Ch40 |18 | |18 | |18 | |18 |18 |13 |20 | |13 | |19 | |16 |11 |14 |17 |17 | |14 | |8 | |13 |8 |10 |20 |10 | |9 | |14 | |11 |14 |17 |9 |20 | |15 | |19 | |9 |8 |11 |3 |1 |1 | | |
|
||||
Ch44 |18 | |18 | |18 | |18 |18 |10 |14 | |19 | |20 | |17 |16 |12 |18 |8 | |17 | |18 | |15 |19 |14 |11 |13 | |14 | |12 | |16 |16 |19 |13 |14 | |19 | |14 | |20 |20 |11 |5 |1 |0 | | |
|
||||
Ch48 |18 | |18 | |18 | |18 |18 |8 |12 | |12 | |19 | |11 |8 |11 |20 |12 | |12 | |11 | |15 |16 |10 |12 |16 | |11 | |15 | |18 |19 |17 |16 |17 | |11 | |8 | |10 |16 |16 |5 |5 |0 | | |
|
||||
Ch52 |18 | |18 | |18 | |18 |18 |15 |12 | |15 | |20 | |9 |10 |10 |14 |8 | |20 | |10 | |16 |17 |18 |11 |16 | |17 | |10 | |17 |12 |13 |17 |17 | |13 | |18 | |18 |20 |13 |4 |3 |4 | | |
|
||||
Ch56 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |20 |13 |14 |11 | |10 | |20 | |10 |8 |16 |12 |10 | |16 | |11 | |9 |11 |14 |17 |12 | |17 | |13 | |18 |10 |19 |0 |3 |3 | | |
|
||||
Ch60 |18 | |18 | |18 | |18 |18 |14 |11 | |8 | |20 | |13 |16 |13 |11 |20 | |9 | |17 | |16 |11 |8 |12 |17 | |15 | |8 | |16 |10 |20 |19 |15 | |13 | |9 | |17 |18 |11 |4 |1 |2 | | |
|
||||
Ch64 |18 | |18 | |18 | |18 |18 |13 |14 | |8 | |12 | |17 |8 |12 |18 |17 | |17 | |14 | |18 |8 |8 |20 |17 | |16 | |20 | |9 |15 |11 |10 |11 | |18 | |10 | |10 |15 |19 |2 |1 |4 | | |
|
||||
Ch68 |18 | |18 | |18 | |18 |18 |14 |19 | |17 | |9 | |18 |19 |20 |12 |14 | |8 | |14 | |20 |20 |18 |9 |18 | |11 | |19 | |19 |10 |11 |8 |18 | |9 | |8 | |16 |11 |8 |3 |3 |1 | | |
|
||||
Ch72 |18 | |18 | |18 | |18 |18 |19 |13 | |20 | |11 | |16 |9 |19 |20 |19 | |14 | |8 | |9 |17 |13 |19 |15 | |8 | |9 | |19 |14 |19 |15 |18 | |16 | |12 | |13 |15 |10 |4 |3 |1 | | |
|
||||
Ch76 |18 | |18 | |18 | |18 |18 |17 |13 | |16 | |20 | |16 |8 |9 |20 |11 | |17 | |11 | |8 |18 |9 |20 |9 | |17 | |16 | |11 |11 |11 |18 |10 | |13 | |W | |20 |17 |8 |1 |3 |3 | | |
|
||||
Ch80 |18 | |18 | |18 | |18 |18 |14 |20 | |13 | |13 | |17 |8 |10 |16 |8 | |9 | |19 | |16 |17 |17 |19 |15 | |9 | |13 | |16 |13 |14 |12 |9 | |20 | |20 | |14 |18 |18 |0 |4 |2 | | |
|
||||
Ch84 |18 | |18 | |18 | |18 |18 |11 |18 | |20 | |9 | |13 |14 |11 |16 |15 | |12 | |11 | |9 |19 |13 |11 |11 | |9 | |15 | |16 |18 |13 |12 |8 | |8 | |8 | |10 |12 |15 |3 |2 |5 | | |
|
||||
Ch88 |18 | |18 | |18 | |18 |18 |18 |19 | |9 | |17 | |15 |8 |19 |11 |11 | |14 | |9 | |14 |20 |20 |11 |11 | |15 | |12 | |14 |11 |8 |18 |15 | |19 | |18 | |12 |20 |16 |5 |5 |1 | | |
|
||||
Ch92 |18 | |18 | |18 | |18 |18 |11 |8 | |15 | |13 | |13 |13 |13 |16 |14 | |14 | |9 | |9 |15 |20 |11 |17 | |10 | |14 | |13 |17 |11 |8 |18 | |20 | |8 | |10 |19 |18 |1 |4 |4 | | |
|
||||
Ch96 |18 | |18 | |18 | |18 |18 |8 |12 | |16 | |9 | |13 |12 |9 |8 |11 | |8 | |8 | |19 |11 |15 |16 |8 | |11 | |16 | |18 |16 |9 |19 |9 | |10 | |15 | |19 |19 |15 |4 |2 |4 | | |
|
||||
Ch100 |18 | |18 | |18 | |18 |18 |18 |13 | |20 | |20 | |12 |9 |19 |10 |9 | |14 | |8 | |19 |10 |17 |9 |10 | |10 | |8 | |13 |12 |11 |20 |11 | |16 | |18 | |14 |16 |19 |1 |1 |2 | | |
|
||||
Ch104 |18 | |18 | |18 | |18 |18 |19 |12 | |20 | |14 | |16 |15 |9 |19 |11 | |15 | |11 | |12 |18 |15 |11 |15 | |19 | |10 | |14 |15 |19 |9 |13 | |19 | |13 | |11 |11 |17 |2 |2 |0 | | |
|
||||
Ch108 |18 | |18 | |18 | |18 |18 |18 |15 | |13 | |16 | |11 |19 |19 |18 |19 | |12 | |17 | |8 |9 |10 |8 |8 | |18 | |8 | |10 |11 |17 |15 |10 | |19 | |13 | |16 |10 |15 |0 |2 |3 | | |
|
||||
Ch112 |18 | |18 | |18 | |18 |18 |8 |13 | |9 | |17 | |9 |15 |17 |10 |19 | |9 | |19 | |11 |16 |14 |16 |8 | |18 | |13 | |16 |13 |17 |19 |11 | |8 | |8 | |18 |14 |17 |5 |2 |5 | | |
|
||||
Ch116 |18 | |18 | |18 | |18 |18 |8 |20 | |11 | |15 | |8 |11 |8 |18 |15 | |13 | |17 | |14 |13 |9 |8 |14 | |14 | |11 | |9 |19 |17 |11 |11 | |8 | |20 | |8 |10 |20 |5 |2 |1 | | |
|
||||
Ch120 |18 | |18 | |18 | |18 |18 |14 |20 | |8 | |20 | |14 |10 |10 |17 |12 | |16 | |20 | |10 |20 |17 |18 |9 | |15 | |14 | |17 |13 |14 |16 |8 | |18 | |10 | |15 |12 |12 |1 |5 |3 | | |
|
||||
Ch124 |18 | |18 | |18 | |18 |18 |20 |9 | |17 | |12 | |12 |8 |14 |8 |8 | |20 | |17 | |16 |20 |13 |14 |16 | |10 | |14 | |20 |15 |17 |8 |10 | |13 | |13 | |11 |13 |9 |5 |0 |5 | | |
|
||||
Ch128 |18 | |18 | |18 | |18 |18 |9 |19 | |9 | |14 | |8 |14 |11 |9 |14 | |16 | |15 | |14 |10 |15 |14 |14 | |20 | |10 | |16 |15 |11 |12 |13 | |13 | |13 | |12 |15 |20 |1 |4 |3 | | |
|
||||
Ch132 |18 | |18 | |18 | |18 |18 |20 |16 | |13 | |8 | |18 |11 |20 |12 |11 | |11 | |14 | |12 |13 |8 |12 |13 | |10 | |20 | |19 |12 |13 |14 |12 | |11 | |19 | |19 |20 |8 |3 |1 |4 | | |
|
||||
Ch136 |18 | |18 | |18 | |18 |18 |12 |12 | |19 | |10 | |20 |10 |8 |17 |8 | |12 | |10 | |10 |13 |13 |12 |8 | |11 | |18 | |14 |12 |17 |8 |14 | |14 | |9 | |11 |18 |14 |1 |2 |2 | | |
|
||||
Ch140 |18 | |18 | |18 | |18 |18 |12 |10 | |13 | |9 | |16 |8 |20 |10 |17 | |8 | |15 | |13 |20 |15 |10 |18 | |13 | |12 | |12 |16 |18 |12 |17 | |10 | |16 | |11 |15 |14 |3 |2 |5 | | |
|
||||
Ch144 |18 | |18 | |18 | |18 |18 |19 |9 | |15 | |8 | |13 |18 |17 |9 |19 | |16 | |11 | |20 |12 |15 |19 |10 | |17 | |15 | |17 |14 |9 |9 |13 | |17 | |16 | |10 |9 |10 |1 |5 |2 | | |
|
||||
Ch149 |18 | |18 | |18 | |18 |18 |15 |20 | |12 | |19 | |19 |19 |10 |10 |13 | |15 | |19 | |12 |19 |10 |14 |15 | |10 | |15 | |9 |8 |11 |15 |13 | |10 | |16 | |15 |18 |12 |5 |5 |2 | | |
|
||||
Ch153 |18 | |18 | |18 | |18 |18 |20 |17 | |8 | |19 | |16 |20 |13 |16 |18 | |14 | |11 | |10 |16 |16 |19 |15 | |13 | |17 | |19 |18 |19 |20 |8 | |18 | |9 | |17 |11 |11 |1 |2 |1 | | |
|
||||
Ch157 |18 | |18 | |18 | |18 |18 |13 |17 | |12 | |19 | |16 |8 |17 |11 |12 | |15 | |14 | |18 |11 |12 |9 |18 | |20 | |13 | |16 |13 |20 |17 |19 | |10 | |12 | |20 |18 |16 |5 |2 |3 | | |
|
||||
Ch161 |18 | |18 | |18 | |18 |18 |12 |12 | |16 | |12 | |15 |11 |18 |11 |13 | |17 | |19 | |11 |13 |13 |9 |15 | |10 | |10 | |19 |13 |20 |13 |9 | |8 | |8 | |20 |14 |12 |0 |4 |1 | | |
|
||||
Ch165 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |8 |19 |15 |10 | |17 | |13 | |13 |19 |20 |8 |18 | |15 | |20 | |16 |9 |14 |11 |20 | |11 | |19 | |15 |16 |8 |1 |2 |0 | | |
|
||||
Ch169 |18 | |18 | |18 | |18 |18 |8 |17 | |17 | |13 | |16 |8 |14 |18 |11 | |8 | |18 | |20 |14 |8 |17 |8 | |13 | |18 | |19 |20 |19 |20 |17 | |13 | |20 | |9 |15 |18 |0 |3 |4 | | |
|
||||
Ch173 |18 | |18 | |18 | |18 |18 |14 |9 | |13 | |12 | |15 |14 |15 |10 |10 | |18 | |16 | |16 |8 |13 |16 |11 | |11 | |13 | |13 |15 |12 |20 |15 | |14 | |13 | |16 |11 |14 |3 |3 |4 | | |
|
||||
Ch177 |18 | |18 | |18 | |18 |18 |19 |18 | |16 | |10 | |20 |13 |11 |16 |12 | |16 | |18 | |18 |11 |18 |8 |13 | |14 | |11 | |18 |14 |16 |16 |19 | |16 | |13 | |15 |8 |13 |5 |0 |0 | | |
|
||||
Ch181 |18 | |18 | |18 | |18 |18 |20 |11 | |10 | |9 | |8 |9 |15 |15 |8 | |8 | |12 | |11 |9 |18 |20 |11 | |17 | |11 | |8 |15 |8 |18 |12 | |18 | |16 | |19 |9 |14 |4 |1 |4 | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
chmod 777 /sbin/mtkwifi
|
||||
START=15
|
||||
STOP=15
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
[ -f /etc/hotplug.d/firmware/11-mtk-wifi-e2p ] && sh /etc/hotplug.d/firmware/11-mtk-wifi-e2p
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
echo 'do nothing' > /dev/null
|
||||
}
|
||||
|
||||
|
@ -1,375 +0,0 @@
|
||||
Default
|
||||
AccessControlList0=
|
||||
AccessControlList1=
|
||||
AccessControlList10=
|
||||
AccessControlList11=
|
||||
AccessControlList12=
|
||||
AccessControlList13=
|
||||
AccessControlList14=
|
||||
AccessControlList15=
|
||||
AccessControlList2=
|
||||
AccessControlList3=
|
||||
AccessControlList4=
|
||||
AccessControlList5=
|
||||
AccessControlList6=
|
||||
AccessControlList7=
|
||||
AccessControlList8=
|
||||
AccessControlList9=
|
||||
AccessPolicy0=0
|
||||
AccessPolicy1=0
|
||||
AccessPolicy10=0
|
||||
AccessPolicy11=0
|
||||
AccessPolicy12=0
|
||||
AccessPolicy13=0
|
||||
AccessPolicy14=0
|
||||
AccessPolicy15=0
|
||||
AccessPolicy2=0
|
||||
AccessPolicy3=0
|
||||
AccessPolicy4=0
|
||||
AccessPolicy5=0
|
||||
AccessPolicy6=0
|
||||
AccessPolicy7=0
|
||||
AccessPolicy8=0
|
||||
AccessPolicy9=0
|
||||
AckPolicy=0;0;0;0
|
||||
APACM=0;0;0;0
|
||||
APAifsn=3;7;1;1
|
||||
ApCliAuthMode=
|
||||
ApCliBssid=
|
||||
ApCliDefaultKeyID=
|
||||
ApCliEnable=
|
||||
ApCliEncrypType=
|
||||
ApCliKey1Str=
|
||||
ApCliKey1Str1=
|
||||
ApCliKey1Type=
|
||||
ApCliKey2Str=
|
||||
ApCliKey2Str1=
|
||||
ApCliKey2Type=
|
||||
ApCliKey3Str=
|
||||
ApCliKey3Str1=
|
||||
ApCliKey3Type=
|
||||
ApCliKey4Str=
|
||||
ApCliKey4Str1=
|
||||
ApCliKey4Type=
|
||||
ApCliSsid=
|
||||
ApCliWirelessMode=
|
||||
ApCliWPAPSK=
|
||||
ApCliWPAPSK1=
|
||||
APCwmax=6;10;4;3
|
||||
APCwmin=4;4;3;2
|
||||
APSDCapable=1
|
||||
APTxop=0;0;94;47
|
||||
AuthMode=OPEN
|
||||
AutoChannelSelect=0
|
||||
AutoChannelSkipList=
|
||||
AutoProvisionEn=0
|
||||
BandSteering=0
|
||||
BasicRate=15
|
||||
BeaconPeriod=100
|
||||
BFBACKOFFenable=0
|
||||
BgndScanSkipCh=
|
||||
BGProtection=0
|
||||
BndStrgBssIdx=
|
||||
BSSACM=0;0;0;0
|
||||
BSSAifsn=3;7;2;2
|
||||
BSSCwmax=10;10;4;3
|
||||
BSSCwmin=4;4;3;2
|
||||
BssidNum=1
|
||||
BSSTxop=0;0;94;47
|
||||
BW_Enable=0
|
||||
BW_Guarantee_Rate=
|
||||
BW_Maximum_Rate=
|
||||
BW_Priority=
|
||||
BW_Root=0
|
||||
CalCacheApply=0
|
||||
CarrierDetect=0
|
||||
Channel=6
|
||||
ChannelGrp=
|
||||
CountryCode=US
|
||||
CountryRegion=5
|
||||
CountryRegionABand=7
|
||||
CP_SUPPORT=2
|
||||
CSPeriod=6
|
||||
DBDC_MODE=1
|
||||
DebugFlags=0
|
||||
DefaultKeyID=1
|
||||
DfsCalibration=0
|
||||
DfsEnable=0
|
||||
DfsFalseAlarmPrevent=1
|
||||
DfsZeroWait=0
|
||||
DfsZeroWaitCacTime=255
|
||||
DisableOLBC=0
|
||||
DtimPeriod=1
|
||||
E2pAccessMode=2
|
||||
EAPifname=br0
|
||||
EDCCAEnable=1
|
||||
EncrypType=NONE
|
||||
EthConvertMode=dongle
|
||||
EtherTrafficBand=0
|
||||
Ethifname=
|
||||
ETxBfEnCond=1
|
||||
FineAGC=0
|
||||
FixedTxMode=
|
||||
ForceRoamSupport=
|
||||
FragThreshold=2346
|
||||
FreqDelta=0
|
||||
FtSupport=0
|
||||
GreenAP=1
|
||||
G_BAND_256QAM=1
|
||||
HideSSID=0
|
||||
HT_AMSDU=0
|
||||
HT_AutoBA=1
|
||||
HT_BADecline=0
|
||||
HT_BAWinSize=64
|
||||
HT_BSSCoexistence=1
|
||||
HT_BW=1
|
||||
HT_DisallowTKIP=1
|
||||
HT_EXTCHA=1
|
||||
HT_GI=1
|
||||
HT_HTC=1
|
||||
HT_LDPC=1
|
||||
HT_LinkAdapt=0
|
||||
HT_MCS=33
|
||||
HT_MpduDensity=5
|
||||
HT_OpMode=0
|
||||
HT_PROTECT=1
|
||||
HT_RxStream=2
|
||||
HT_STBC=1
|
||||
HT_TxStream=2
|
||||
IcapMode=0
|
||||
idle_timeout_interval=0
|
||||
IEEE80211H=1
|
||||
IEEE8021X=0
|
||||
IgmpSnEnable=0
|
||||
ITxBfEn=1
|
||||
Key1Str=
|
||||
Key1Str1=
|
||||
Key1Str10=
|
||||
Key1Str11=
|
||||
Key1Str12=
|
||||
Key1Str13=
|
||||
Key1Str14=
|
||||
Key1Str15=
|
||||
Key1Str16=
|
||||
Key1Str2=
|
||||
Key1Str3=
|
||||
Key1Str4=
|
||||
Key1Str5=
|
||||
Key1Str6=
|
||||
Key1Str7=
|
||||
Key1Str8=
|
||||
Key1Str9=
|
||||
Key1Type=0
|
||||
Key2Str=
|
||||
Key2Str1=
|
||||
Key2Str10=
|
||||
Key2Str11=
|
||||
Key2Str12=
|
||||
Key2Str13=
|
||||
Key2Str14=
|
||||
Key2Str15=
|
||||
Key2Str16=
|
||||
Key2Str2=
|
||||
Key2Str3=
|
||||
Key2Str4=
|
||||
Key2Str5=
|
||||
Key2Str6=
|
||||
Key2Str7=
|
||||
Key2Str8=
|
||||
Key2Str9=
|
||||
Key2Type=0
|
||||
Key3Str=
|
||||
Key3Str1=
|
||||
Key3Str10=
|
||||
Key3Str11=
|
||||
Key3Str12=
|
||||
Key3Str13=
|
||||
Key3Str14=
|
||||
Key3Str15=
|
||||
Key3Str16=
|
||||
Key3Str2=
|
||||
Key3Str3=
|
||||
Key3Str4=
|
||||
Key3Str5=
|
||||
Key3Str6=
|
||||
Key3Str7=
|
||||
Key3Str8=
|
||||
Key3Str9=
|
||||
Key3Type=0
|
||||
Key4Str=
|
||||
Key4Str1=
|
||||
Key4Str10=
|
||||
Key4Str11=
|
||||
Key4Str12=
|
||||
Key4Str13=
|
||||
Key4Str14=
|
||||
Key4Str15=
|
||||
Key4Str16=
|
||||
Key4Str2=
|
||||
Key4Str3=
|
||||
Key4Str4=
|
||||
Key4Str5=
|
||||
Key4Str6=
|
||||
Key4Str7=
|
||||
Key4Str8=
|
||||
Key4Str9=
|
||||
Key4Type=0
|
||||
LinkTestSupport=0
|
||||
MACRepeaterEn=
|
||||
MACRepeaterOuiMode=2
|
||||
MUTxRxEnable=0
|
||||
NoForwarding=0
|
||||
NoForwardingBTNBSSID=0
|
||||
own_ip_addr=10.10.10.254
|
||||
PcieAspm=0
|
||||
PERCENTAGEenable=0
|
||||
PhyRateLimit=0
|
||||
PMFMFPC=0
|
||||
PMFMFPR=0
|
||||
PMFSHA256=0
|
||||
PMKCachePeriod=10
|
||||
PowerUpCckOfdm=0:0:0:0:0:0:0
|
||||
PowerUpHT20=0:0:0:0:0:0:0
|
||||
PowerUpHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT160=0:0:0:0:0:0:0
|
||||
PowerUpVHT20=0:0:0:0:0:0:0
|
||||
PowerUpVHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT80=0:0:0:0:0:0:0
|
||||
PreAntSwitch=
|
||||
PreAuth=0
|
||||
PreAuthifname=br0
|
||||
RadioLinkSelection=0
|
||||
RadioOn=1
|
||||
RADIUS_Acct_Key=
|
||||
RADIUS_Acct_Port=1813
|
||||
RADIUS_Acct_Server=
|
||||
RADIUS_Key1=
|
||||
RADIUS_Key10=
|
||||
RADIUS_Key11=
|
||||
RADIUS_Key12=
|
||||
RADIUS_Key13=
|
||||
RADIUS_Key14=
|
||||
RADIUS_Key15=
|
||||
RADIUS_Key16=
|
||||
RADIUS_Key2=
|
||||
RADIUS_Key3=
|
||||
RADIUS_Key4=
|
||||
RADIUS_Key5=
|
||||
RADIUS_Key6=
|
||||
RADIUS_Key7=
|
||||
RADIUS_Key8=
|
||||
RADIUS_Key9=
|
||||
RADIUS_Port=1812
|
||||
RADIUS_Server=0
|
||||
RDRegion=
|
||||
RED_Enable=1
|
||||
RekeyInterval=3600
|
||||
RekeyMethod=DISABLE
|
||||
RRMEnable=0
|
||||
RTSThreshold=2347
|
||||
session_timeout_interval=0
|
||||
ShortSlot=1
|
||||
SKUenable=0
|
||||
SSID=
|
||||
SSID1=OpenWrt
|
||||
SSID10=
|
||||
SSID11=
|
||||
SSID12=
|
||||
SSID13=
|
||||
SSID14=
|
||||
SSID15=
|
||||
SSID16=
|
||||
SSID2=
|
||||
SSID3=
|
||||
SSID4=
|
||||
SSID5=
|
||||
SSID6=
|
||||
SSID7=
|
||||
SSID8=
|
||||
SSID9=
|
||||
StationKeepAlive=0
|
||||
StreamMode=0
|
||||
StreamModeMac0=
|
||||
StreamModeMac1=
|
||||
StreamModeMac2=
|
||||
StreamModeMac3=
|
||||
TGnWifiTest=0
|
||||
ThermalRecal=0
|
||||
TxBurst=1
|
||||
TxPower=100
|
||||
TxPreamble=1
|
||||
VHT_BW=1
|
||||
VHT_BW_SIGNAL=0
|
||||
VHT_LDPC=1
|
||||
VHT_Sec80_Channel=0
|
||||
VHT_SGI=1
|
||||
VHT_STBC=1
|
||||
VLANID=0
|
||||
VLANPriority=0
|
||||
VLANTag=0
|
||||
VOW_Airtime_Ctrl_En=
|
||||
VOW_Airtime_Fairness_En=1
|
||||
VOW_BW_Ctrl=0
|
||||
VOW_Group_Backlog=
|
||||
VOW_Group_DWRR_Max_Wait_Time=
|
||||
VOW_Group_DWRR_Quantum=
|
||||
VOW_Group_Max_Airtime_Bucket_Size=
|
||||
VOW_Group_Max_Rate=
|
||||
VOW_Group_Max_Rate_Bucket_Size=
|
||||
VOW_Group_Max_Ratio=
|
||||
VOW_Group_Max_Wait_Time=
|
||||
VOW_Group_Min_Airtime_Bucket_Size=
|
||||
VOW_Group_Min_Rate=
|
||||
VOW_Group_Min_Rate_Bucket_Size=
|
||||
VOW_Group_Min_Ratio=
|
||||
VOW_Rate_Ctrl_En=
|
||||
VOW_Refill_Period=
|
||||
VOW_RX_En=1
|
||||
VOW_Sta_BE_DWRR_Quantum=
|
||||
VOW_Sta_BK_DWRR_Quantum=
|
||||
VOW_Sta_DWRR_Max_Wait_Time=
|
||||
VOW_Sta_VI_DWRR_Quantum=
|
||||
VOW_Sta_VO_DWRR_Quantum=
|
||||
VOW_WATF_Enable=
|
||||
VOW_WATF_MAC_LV0=
|
||||
VOW_WATF_MAC_LV1=
|
||||
VOW_WATF_MAC_LV2=
|
||||
VOW_WATF_MAC_LV3=
|
||||
VOW_WATF_Q_LV0=
|
||||
VOW_WATF_Q_LV1=
|
||||
VOW_WATF_Q_LV2=
|
||||
VOW_WATF_Q_LV3=
|
||||
VOW_WMM_Search_Rule_Band0=
|
||||
VOW_WMM_Search_Rule_Band1=
|
||||
WCNTest=0
|
||||
Wds0Key=
|
||||
Wds1Key=
|
||||
Wds2Key=
|
||||
Wds3Key=
|
||||
WdsEnable=0
|
||||
WdsEncrypType=NONE
|
||||
WdsList=
|
||||
WdsPhyMode=0
|
||||
WHNAT=0
|
||||
WiFiTest=0
|
||||
WirelessMode=9
|
||||
WmmCapable=1
|
||||
WPAPSK=
|
||||
WPAPSK1=12345678
|
||||
WPAPSK10=
|
||||
WPAPSK11=
|
||||
WPAPSK12=
|
||||
WPAPSK13=
|
||||
WPAPSK14=
|
||||
WPAPSK15=
|
||||
WPAPSK16=
|
||||
WPAPSK2=
|
||||
WPAPSK3=
|
||||
WPAPSK4=
|
||||
WPAPSK5=
|
||||
WPAPSK6=
|
||||
WPAPSK7=
|
||||
WPAPSK8=
|
||||
WPAPSK9=
|
||||
WscConfMode=0
|
||||
WscConfStatus=2
|
@ -1,375 +0,0 @@
|
||||
Default
|
||||
AccessControlList0=
|
||||
AccessControlList1=
|
||||
AccessControlList10=
|
||||
AccessControlList11=
|
||||
AccessControlList12=
|
||||
AccessControlList13=
|
||||
AccessControlList14=
|
||||
AccessControlList15=
|
||||
AccessControlList2=
|
||||
AccessControlList3=
|
||||
AccessControlList4=
|
||||
AccessControlList5=
|
||||
AccessControlList6=
|
||||
AccessControlList7=
|
||||
AccessControlList8=
|
||||
AccessControlList9=
|
||||
AccessPolicy0=0
|
||||
AccessPolicy1=0
|
||||
AccessPolicy10=0
|
||||
AccessPolicy11=0
|
||||
AccessPolicy12=0
|
||||
AccessPolicy13=0
|
||||
AccessPolicy14=0
|
||||
AccessPolicy15=0
|
||||
AccessPolicy2=0
|
||||
AccessPolicy3=0
|
||||
AccessPolicy4=0
|
||||
AccessPolicy5=0
|
||||
AccessPolicy6=0
|
||||
AccessPolicy7=0
|
||||
AccessPolicy8=0
|
||||
AccessPolicy9=0
|
||||
AckPolicy=0;0;0;0
|
||||
APACM=0;0;0;0
|
||||
APAifsn=3;7;1;1
|
||||
ApCliAuthMode=
|
||||
ApCliBssid=
|
||||
ApCliDefaultKeyID=
|
||||
ApCliEnable=
|
||||
ApCliEncrypType=
|
||||
ApCliKey1Str=
|
||||
ApCliKey1Str1=
|
||||
ApCliKey1Type=
|
||||
ApCliKey2Str=
|
||||
ApCliKey2Str1=
|
||||
ApCliKey2Type=
|
||||
ApCliKey3Str=
|
||||
ApCliKey3Str1=
|
||||
ApCliKey3Type=
|
||||
ApCliKey4Str=
|
||||
ApCliKey4Str1=
|
||||
ApCliKey4Type=
|
||||
ApCliSsid=
|
||||
ApCliWirelessMode=
|
||||
ApCliWPAPSK=
|
||||
ApCliWPAPSK1=
|
||||
APCwmax=6;10;4;3
|
||||
APCwmin=4;4;3;2
|
||||
APSDCapable=1
|
||||
APTxop=0;0;94;47
|
||||
AuthMode=OPEN
|
||||
AutoChannelSelect=0
|
||||
AutoChannelSkipList=
|
||||
AutoProvisionEn=0
|
||||
BandSteering=0
|
||||
BasicRate=15
|
||||
BeaconPeriod=100
|
||||
BFBACKOFFenable=0
|
||||
BgndScanSkipCh=
|
||||
BGProtection=0
|
||||
BndStrgBssIdx=
|
||||
BSSACM=0;0;0;0
|
||||
BSSAifsn=3;7;2;2
|
||||
BSSCwmax=10;10;4;3
|
||||
BSSCwmin=4;4;3;2
|
||||
BssidNum=1
|
||||
BSSTxop=0;0;94;47
|
||||
BW_Enable=0
|
||||
BW_Guarantee_Rate=
|
||||
BW_Maximum_Rate=
|
||||
BW_Priority=
|
||||
BW_Root=0
|
||||
CalCacheApply=0
|
||||
CarrierDetect=0
|
||||
Channel=36
|
||||
ChannelGrp=
|
||||
CountryCode=US
|
||||
CountryRegion=5
|
||||
CountryRegionABand=7
|
||||
CP_SUPPORT=2
|
||||
CSPeriod=6
|
||||
DBDC_MODE=1
|
||||
DebugFlags=0
|
||||
DefaultKeyID=1
|
||||
DfsCalibration=0
|
||||
DfsEnable=1
|
||||
DfsFalseAlarmPrevent=1
|
||||
DfsZeroWait=0
|
||||
DfsZeroWaitCacTime=255
|
||||
DisableOLBC=0
|
||||
DtimPeriod=1
|
||||
E2pAccessMode=2
|
||||
EAPifname=br0
|
||||
EDCCAEnable=1
|
||||
EncrypType=NONE
|
||||
EthConvertMode=dongle
|
||||
EtherTrafficBand=0
|
||||
Ethifname=
|
||||
ETxBfEnCond=1
|
||||
FineAGC=0
|
||||
FixedTxMode=
|
||||
ForceRoamSupport=
|
||||
FragThreshold=2346
|
||||
FreqDelta=0
|
||||
FtSupport=0
|
||||
GreenAP=1
|
||||
G_BAND_256QAM=1
|
||||
HideSSID=0
|
||||
HT_AMSDU=0
|
||||
HT_AutoBA=1
|
||||
HT_BADecline=0
|
||||
HT_BAWinSize=64
|
||||
HT_BSSCoexistence=1
|
||||
HT_BW=1
|
||||
HT_DisallowTKIP=1
|
||||
HT_EXTCHA=1
|
||||
HT_GI=1
|
||||
HT_HTC=1
|
||||
HT_LDPC=1
|
||||
HT_LinkAdapt=0
|
||||
HT_MCS=33
|
||||
HT_MpduDensity=5
|
||||
HT_OpMode=0
|
||||
HT_PROTECT=1
|
||||
HT_RxStream=2
|
||||
HT_STBC=1
|
||||
HT_TxStream=2
|
||||
IcapMode=0
|
||||
idle_timeout_interval=0
|
||||
IEEE80211H=1
|
||||
IEEE8021X=0
|
||||
IgmpSnEnable=0
|
||||
ITxBfEn=1
|
||||
Key1Str=
|
||||
Key1Str1=
|
||||
Key1Str10=
|
||||
Key1Str11=
|
||||
Key1Str12=
|
||||
Key1Str13=
|
||||
Key1Str14=
|
||||
Key1Str15=
|
||||
Key1Str16=
|
||||
Key1Str2=
|
||||
Key1Str3=
|
||||
Key1Str4=
|
||||
Key1Str5=
|
||||
Key1Str6=
|
||||
Key1Str7=
|
||||
Key1Str8=
|
||||
Key1Str9=
|
||||
Key1Type=0
|
||||
Key2Str=
|
||||
Key2Str1=
|
||||
Key2Str10=
|
||||
Key2Str11=
|
||||
Key2Str12=
|
||||
Key2Str13=
|
||||
Key2Str14=
|
||||
Key2Str15=
|
||||
Key2Str16=
|
||||
Key2Str2=
|
||||
Key2Str3=
|
||||
Key2Str4=
|
||||
Key2Str5=
|
||||
Key2Str6=
|
||||
Key2Str7=
|
||||
Key2Str8=
|
||||
Key2Str9=
|
||||
Key2Type=0
|
||||
Key3Str=
|
||||
Key3Str1=
|
||||
Key3Str10=
|
||||
Key3Str11=
|
||||
Key3Str12=
|
||||
Key3Str13=
|
||||
Key3Str14=
|
||||
Key3Str15=
|
||||
Key3Str16=
|
||||
Key3Str2=
|
||||
Key3Str3=
|
||||
Key3Str4=
|
||||
Key3Str5=
|
||||
Key3Str6=
|
||||
Key3Str7=
|
||||
Key3Str8=
|
||||
Key3Str9=
|
||||
Key3Type=0
|
||||
Key4Str=
|
||||
Key4Str1=
|
||||
Key4Str10=
|
||||
Key4Str11=
|
||||
Key4Str12=
|
||||
Key4Str13=
|
||||
Key4Str14=
|
||||
Key4Str15=
|
||||
Key4Str16=
|
||||
Key4Str2=
|
||||
Key4Str3=
|
||||
Key4Str4=
|
||||
Key4Str5=
|
||||
Key4Str6=
|
||||
Key4Str7=
|
||||
Key4Str8=
|
||||
Key4Str9=
|
||||
Key4Type=0
|
||||
LinkTestSupport=0
|
||||
MACRepeaterEn=
|
||||
MACRepeaterOuiMode=2
|
||||
MUTxRxEnable=1
|
||||
NoForwarding=0
|
||||
NoForwardingBTNBSSID=0
|
||||
own_ip_addr=10.10.10.254
|
||||
PcieAspm=0
|
||||
PERCENTAGEenable=0
|
||||
PhyRateLimit=0
|
||||
PMFMFPC=0
|
||||
PMFMFPR=0
|
||||
PMFSHA256=0
|
||||
PMKCachePeriod=10
|
||||
PowerUpCckOfdm=0:0:0:0:0:0:0
|
||||
PowerUpHT20=0:0:0:0:0:0:0
|
||||
PowerUpHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT160=0:0:0:0:0:0:0
|
||||
PowerUpVHT20=0:0:0:0:0:0:0
|
||||
PowerUpVHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT80=0:0:0:0:0:0:0
|
||||
PreAntSwitch=
|
||||
PreAuth=0
|
||||
PreAuthifname=br0
|
||||
RadioLinkSelection=0
|
||||
RadioOn=1
|
||||
RADIUS_Acct_Key=
|
||||
RADIUS_Acct_Port=1813
|
||||
RADIUS_Acct_Server=
|
||||
RADIUS_Key1=
|
||||
RADIUS_Key10=
|
||||
RADIUS_Key11=
|
||||
RADIUS_Key12=
|
||||
RADIUS_Key13=
|
||||
RADIUS_Key14=
|
||||
RADIUS_Key15=
|
||||
RADIUS_Key16=
|
||||
RADIUS_Key2=
|
||||
RADIUS_Key3=
|
||||
RADIUS_Key4=
|
||||
RADIUS_Key5=
|
||||
RADIUS_Key6=
|
||||
RADIUS_Key7=
|
||||
RADIUS_Key8=
|
||||
RADIUS_Key9=
|
||||
RADIUS_Port=1812
|
||||
RADIUS_Server=0
|
||||
RDRegion=
|
||||
RED_Enable=1
|
||||
RekeyInterval=3600
|
||||
RekeyMethod=DISABLE
|
||||
RRMEnable=0
|
||||
RTSThreshold=2347
|
||||
session_timeout_interval=0
|
||||
ShortSlot=1
|
||||
SKUenable=0
|
||||
SSID=
|
||||
SSID1=OpenWrt
|
||||
SSID10=
|
||||
SSID11=
|
||||
SSID12=
|
||||
SSID13=
|
||||
SSID14=
|
||||
SSID15=
|
||||
SSID16=
|
||||
SSID2=
|
||||
SSID3=
|
||||
SSID4=
|
||||
SSID5=
|
||||
SSID6=
|
||||
SSID7=
|
||||
SSID8=
|
||||
SSID9=
|
||||
StationKeepAlive=0
|
||||
StreamMode=0
|
||||
StreamModeMac0=
|
||||
StreamModeMac1=
|
||||
StreamModeMac2=
|
||||
StreamModeMac3=
|
||||
TGnWifiTest=0
|
||||
ThermalRecal=0
|
||||
TxBurst=1
|
||||
TxPower=100
|
||||
TxPreamble=1
|
||||
VHT_BW=1
|
||||
VHT_BW_SIGNAL=0
|
||||
VHT_LDPC=1
|
||||
VHT_Sec80_Channel=0
|
||||
VHT_SGI=1
|
||||
VHT_STBC=1
|
||||
VLANID=0
|
||||
VLANPriority=0
|
||||
VLANTag=0
|
||||
VOW_Airtime_Ctrl_En=
|
||||
VOW_Airtime_Fairness_En=1
|
||||
VOW_BW_Ctrl=0
|
||||
VOW_Group_Backlog=
|
||||
VOW_Group_DWRR_Max_Wait_Time=
|
||||
VOW_Group_DWRR_Quantum=
|
||||
VOW_Group_Max_Airtime_Bucket_Size=
|
||||
VOW_Group_Max_Rate=
|
||||
VOW_Group_Max_Rate_Bucket_Size=
|
||||
VOW_Group_Max_Ratio=
|
||||
VOW_Group_Max_Wait_Time=
|
||||
VOW_Group_Min_Airtime_Bucket_Size=
|
||||
VOW_Group_Min_Rate=
|
||||
VOW_Group_Min_Rate_Bucket_Size=
|
||||
VOW_Group_Min_Ratio=
|
||||
VOW_Rate_Ctrl_En=
|
||||
VOW_Refill_Period=
|
||||
VOW_RX_En=1
|
||||
VOW_Sta_BE_DWRR_Quantum=
|
||||
VOW_Sta_BK_DWRR_Quantum=
|
||||
VOW_Sta_DWRR_Max_Wait_Time=
|
||||
VOW_Sta_VI_DWRR_Quantum=
|
||||
VOW_Sta_VO_DWRR_Quantum=
|
||||
VOW_WATF_Enable=
|
||||
VOW_WATF_MAC_LV0=
|
||||
VOW_WATF_MAC_LV1=
|
||||
VOW_WATF_MAC_LV2=
|
||||
VOW_WATF_MAC_LV3=
|
||||
VOW_WATF_Q_LV0=
|
||||
VOW_WATF_Q_LV1=
|
||||
VOW_WATF_Q_LV2=
|
||||
VOW_WATF_Q_LV3=
|
||||
VOW_WMM_Search_Rule_Band0=
|
||||
VOW_WMM_Search_Rule_Band1=
|
||||
WCNTest=0
|
||||
Wds0Key=
|
||||
Wds1Key=
|
||||
Wds2Key=
|
||||
Wds3Key=
|
||||
WdsEnable=0
|
||||
WdsEncrypType=NONE
|
||||
WdsList=
|
||||
WdsPhyMode=0
|
||||
WHNAT=0
|
||||
WiFiTest=0
|
||||
WirelessMode=14
|
||||
WmmCapable=1
|
||||
WPAPSK=
|
||||
WPAPSK1=12345678
|
||||
WPAPSK10=
|
||||
WPAPSK11=
|
||||
WPAPSK12=
|
||||
WPAPSK13=
|
||||
WPAPSK14=
|
||||
WPAPSK15=
|
||||
WPAPSK16=
|
||||
WPAPSK2=
|
||||
WPAPSK3=
|
||||
WPAPSK4=
|
||||
WPAPSK5=
|
||||
WPAPSK6=
|
||||
WPAPSK7=
|
||||
WPAPSK8=
|
||||
WPAPSK9=
|
||||
WscConfMode=0
|
||||
WscConfStatus=2
|
@ -1,219 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
-- Alternative for OpenWrt's /sbin/wifi.
|
||||
-- Copyright Not Reserved.
|
||||
-- Hua Shao <nossiac@163.com>
|
||||
|
||||
package.path = '/lib/wifi/?.lua;'..package.path
|
||||
|
||||
local vif_prefix = {"ra", "rai", "rae", "rax", "ray", "raz",
|
||||
"apcli", "apclix", "apclii", "apcliy", "apclie", "apcliz", }
|
||||
|
||||
local function esc(x)
|
||||
return (x:gsub('%%', '%%%%')
|
||||
:gsub('^%^', '%%^')
|
||||
:gsub('%$$', '%%$')
|
||||
:gsub('%(', '%%(')
|
||||
:gsub('%)', '%%)')
|
||||
:gsub('%.', '%%.')
|
||||
:gsub('%[', '%%[')
|
||||
:gsub('%]', '%%]')
|
||||
:gsub('%*', '%%*')
|
||||
:gsub('%+', '%%+')
|
||||
:gsub('%-', '%%-')
|
||||
:gsub('%?', '%%?'))
|
||||
end
|
||||
|
||||
function add_vif_into_lan(vif)
|
||||
local mtkwifi = require("mtkwifi")
|
||||
local brvifs = mtkwifi.__trim(
|
||||
mtkwifi.read_pipe("uci get network.lan.ifname"))
|
||||
if not string.match(brvifs, esc(vif)) then
|
||||
nixio.syslog("debug", "mt7615_up: add "..vif.." into lan")
|
||||
brvifs = brvifs.." "..vif
|
||||
os.execute("uci set network.lan.ifname=\""..brvifs.."\"")
|
||||
os.execute("uci commit")
|
||||
-- os.execute("brctl addif br-lan "..vif)
|
||||
os.execute("ubus call network.interface.lan add_device \"{\\\"name\\\":\\\""..vif.."\\\"}\"")
|
||||
end
|
||||
end
|
||||
|
||||
function mt7615_up(devname)
|
||||
local nixio = require("nixio")
|
||||
local mtkwifi = require("mtkwifi")
|
||||
|
||||
nixio.syslog("debug", "mt7615_up called!")
|
||||
|
||||
local devs, l1parser = mtkwifi.__get_l1dat()
|
||||
-- l1 profile present, good!
|
||||
if l1parser and devs then
|
||||
dev = devs.devname_ridx[devname]
|
||||
if not dev then
|
||||
nixio.syslog("err", "mt7615_up: dev "..devname.." not found!")
|
||||
return
|
||||
end
|
||||
-- we have to bring up main_ifname first, main_ifname will create all other vifs.
|
||||
if mtkwifi.exists("/sys/class/net/"..dev.main_ifname) then
|
||||
nixio.syslog("debug", "mt7615_up: ifconfig "..dev.main_ifname.." up")
|
||||
os.execute("ifconfig "..dev.main_ifname.." up")
|
||||
add_vif_into_lan(dev.main_ifname)
|
||||
else
|
||||
nixio.syslog("err", "mt7615_up: main_ifname "..dev.main_ifname.." missing, quit!")
|
||||
return
|
||||
end
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
if vif ~= dev.main_ifname and
|
||||
( string.match(vif, esc(dev.ext_ifname).."[0-9]+")
|
||||
or string.match(vif, esc(dev.apcli_ifname).."[0-9]+")
|
||||
or string.match(vif, esc(dev.wds_ifname).."[0-9]+")
|
||||
or string.match(vif, esc(dev.mesh_ifname).."[0-9]+"))
|
||||
then
|
||||
nixio.syslog("debug", "mt7615_up: ifconfig "..vif.."0 up")
|
||||
os.execute("ifconfig "..vif.." up")
|
||||
add_vif_into_lan(vif)
|
||||
-- else nixio.syslog("debug", "mt7615_up: skip "..vif..", prefix not match "..pre)
|
||||
end
|
||||
end
|
||||
elseif mtkwifi.exists("/etc/wireless/mt7615/"..devname..".dat") then
|
||||
for _, pre in ipairs(vif_prefix) do
|
||||
-- we have to bring up root vif first, root vif will create all other vifs.
|
||||
if mtkwifi.exists("/sys/class/net/"..pre.."0") then
|
||||
nixio.syslog("debug", "mt7615_up: ifconfig "..pre.."0 up")
|
||||
os.execute("ifconfig "..pre.."0 up")
|
||||
add_vif_into_lan(pre.."0")
|
||||
end
|
||||
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
-- nixio.syslog("debug", "mt7615_up: navigate "..pre)
|
||||
if string.match(vif, pre.."[1-9]+") then
|
||||
nixio.syslog("debug", "mt7615_up: ifconfig "..vif.." up")
|
||||
os.execute("ifconfig "..vif.." up")
|
||||
add_vif_into_lan(vif)
|
||||
-- else nixio.syslog("debug", "mt7615_up: skip "..vif..", prefix not match "..pre)
|
||||
end
|
||||
end
|
||||
end
|
||||
else nixio.syslog("debug", "mt7615_up: skip "..devname..", config not exist")
|
||||
end
|
||||
|
||||
os.execute(" rm -rf /tmp/mtk/wifi/mt7615*.need_reload")
|
||||
end
|
||||
|
||||
function mt7615_down(devname)
|
||||
local nixio = require("nixio")
|
||||
local mtkwifi = require("mtkwifi")
|
||||
nixio.syslog("debug", "mt7615_down called!")
|
||||
|
||||
local devs, l1parser = mtkwifi.__get_l1dat()
|
||||
-- l1 profile present, good!
|
||||
if l1parser and devs then
|
||||
dev = devs.devname_ridx[devname]
|
||||
if not dev then
|
||||
nixio.syslog("err", "mt7615_down: dev "..devname.." not found!")
|
||||
return
|
||||
end
|
||||
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
if vif == dev.main_ifname
|
||||
or string.match(vif, esc(dev.ext_ifname).."[0-9]+")
|
||||
or string.match(vif, esc(dev.apcli_ifname).."[0-9]+")
|
||||
or string.match(vif, esc(dev.wds_ifname).."[0-9]+")
|
||||
or string.match(vif, esc(dev.mesh_ifname).."[0-9]+")
|
||||
then
|
||||
nixio.syslog("debug", "mt7615_down: ifconfig "..vif.." down")
|
||||
os.execute("ifconfig "..vif.." down")
|
||||
local brvifs = mtkwifi.__trim(mtkwifi.read_pipe("uci get network.lan.ifname"))
|
||||
if string.match(brvifs, esc(vif)) then
|
||||
brvifs = mtkwifi.__trim(string.gsub(brvifs, esc(vif), ""))
|
||||
nixio.syslog("debug", "mt7615_down: remove "..vif.." from lan")
|
||||
os.execute("uci set network.lan.ifname=\""..brvifs.."\"")
|
||||
os.execute("uci commit")
|
||||
os.execute("ubus call network.interface.lan remove_device \"{\\\"name\\\":\\\""..vif.."\\\"}\"")
|
||||
end
|
||||
-- else nixio.syslog("debug", "mt7615_down: skip "..vif..", prefix not match "..pre)
|
||||
end
|
||||
end
|
||||
elseif mtkwifi.exists("/etc/wireless/mt7615/"..devname..".dat") then
|
||||
for _, pre in ipairs(vif_prefix) do
|
||||
for _,vif in ipairs(string.split(mtkwifi.read_pipe("ls /sys/class/net"), "\n"))
|
||||
do
|
||||
if string.match(vif, pre.."[0-9]+") then
|
||||
nixio.syslog("debug", "mt7615_down: ifconfig "..vif.."down")
|
||||
os.execute("ifconfig "..vif.." down")
|
||||
local brvifs = mtkwifi.read_pipe("uci get network.lan.ifname")
|
||||
if string.match(brvifs, vif) then
|
||||
brvifs = mtkwifi.__trim(string.gsub(brvifs, vif, ""))
|
||||
nixio.syslog("debug", "mt7615_down: remove "..vif.." from lan")
|
||||
os.execute("uci set network.lan.ifname=\""..brvifs.."\"")
|
||||
os.execute("uci commit")
|
||||
os.execute("ubus call network.interface.lan remove_device \"{\\\"name\\\":\\\""..vif.."\\\"}\"")
|
||||
end
|
||||
-- else nixio.syslog("debug", "mt7615_down: skip "..vif..", prefix not match "..pre)
|
||||
end
|
||||
end
|
||||
end
|
||||
else nixio.syslog("debug", "mt7615_down: skip "..devname..", config not exist")
|
||||
end
|
||||
|
||||
os.execute(" rm -rf /tmp/mtk/wifi/mt7615*.need_reload")
|
||||
end
|
||||
|
||||
function mt7615_reload(devname)
|
||||
local nixio = require("nixio")
|
||||
nixio.syslog("debug", "mt7615_reload called!")
|
||||
mt7615_down(devname)
|
||||
mt7615_up(devname)
|
||||
end
|
||||
|
||||
function mt7615_restart(devname)
|
||||
local nixio = require("nixio")
|
||||
nixio.syslog("debug", "mt7615_restart called!")
|
||||
mt7615_down(devname)
|
||||
os.execute("rmmod mt7615")
|
||||
os.execute("modprobe mt7615")
|
||||
mt7615_up(devname)
|
||||
end
|
||||
|
||||
function mt7615_reset(devname)
|
||||
local nixio = require("nixio")
|
||||
local mtkwifi = require("mtkwifi")
|
||||
nixio.syslog("debug", "mt7615_reset called!")
|
||||
if mtkwifi.exists("/rom/etc/wireless/mt7615/") then
|
||||
os.execute("rm -rf /etc/wireless/mt7615/")
|
||||
os.execute("cp -rf /rom/etc/wireless/mt7615/ /etc/wireless/")
|
||||
mt7615_reload(devname)
|
||||
else
|
||||
nixio.syslog("debug", "mt7615_reset: /rom"..profile.." missing, unable to reset!")
|
||||
end
|
||||
end
|
||||
|
||||
function mt7615_status(devname)
|
||||
return wifi_common_status()
|
||||
end
|
||||
|
||||
function mt7615_detect(devname)
|
||||
local nixio = require("nixio")
|
||||
local mtkwifi = require("mtkwifi")
|
||||
nixio.syslog("debug", "mt7615_detect called!")
|
||||
|
||||
for _,dev in ipairs(mtkwifi.get_all_devs()) do
|
||||
local relname = string.format("%s%d%d",dev.maindev,dev.mainidx,dev.subidx)
|
||||
print([[
|
||||
config wifi-device ]]..relname.."\n"..[[
|
||||
option type mt7615
|
||||
option vendor ralink
|
||||
]])
|
||||
for _,vif in ipairs(dev.vifs) do
|
||||
print([[
|
||||
config wifi-iface
|
||||
option device ]]..relname.."\n"..[[
|
||||
option ifname ]]..vif.vifname.."\n"..[[
|
||||
option network lan
|
||||
option mode ap
|
||||
option ssid ]]..vif.__ssid.."\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,65 +0,0 @@
|
||||
# Single SKU Max Power Table | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 2.4G Channel |CCK | | | |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |Txstream_Delta | | | | | | | | | | | | | | | | | | | | |
|
||||
Band: 2.4G |CCK_1M |CCK_2M |CCK_5.5M |CCK_11M |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | | | | | | | | | | | | | | | | | |
|
||||
Ch1 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |20 |12 |18 |16 |8 | |8 | |8 | |9 |11 |12 |2 |1 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch2 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |19 |19 |10 |12 |8 | |8 | |8 | |9 |16 |12 |5 |4 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch3 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |17 |18 |16 |20 |8 | |8 | |8 | |12 |8 |20 |0 |2 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch4 |8 | |8 | |8 | |8 | |8 | |8 |8 |9 |8 | |8 | |8 | |14 |10 |14 |18 |8 | |8 | |8 | |14 |12 |10 |3 |4 |5 | | | | | | | | | | | | | | | | | | |
|
||||
Ch5 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |10 |13 |11 |8 |8 | |8 | |8 | |12 |8 |9 |4 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch6 |8 | |8 | |8 | |8 | |8 | |8 |8 |13 |8 | |8 | |8 | |11 |9 |12 |16 |8 | |8 | |8 | |9 |17 |11 |5 |2 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch7 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |14 |11 |13 |18 |8 | |8 | |8 | |16 |13 |10 |2 |5 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch8 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |14 |9 |11 |10 |8 | |8 | |8 | |11 |14 |8 |5 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch9 |8 | |8 | |8 | |8 | |8 | |8 |8 |11 |8 | |8 | |8 | |12 |9 |15 |19 |8 | |8 | |8 | |14 |20 |12 |2 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch10 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |17 |14 |17 |15 |8 | |8 | |8 | |9 |17 |8 |2 |4 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch11 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |20 |10 |20 |18 |8 | |8 | |8 | |12 |8 |20 |3 |1 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch12 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |20 |16 |17 |9 |8 | |8 | |8 | |11 |20 |9 |0 |0 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch13 |8 | |8 | |8 | |8 | |8 | |8 |8 |8 |8 | |8 | |8 | |11 |16 |19 |16 |8 | |8 | |8 | |15 |12 |12 |2 |0 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch14 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |15 |17 |16 |14 |8 | |8 | |8 | |12 |14 |20 |4 |1 |5 | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 5G Channel |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |VHT80 | | | | | | | | | |VHT160 | | | | | | | | | |Txstream_Delta | | | | |
|
||||
Band: 5G |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |VHT80_MCS0 |VHT80_MCS1 |VHT80_MCS2 |VHT80_MCS3 |VHT80_MCS4 |VHT80_MCS5 |VHT80_MCS6 |VHT80_MCS7 |VHT80_MCS8 |VHT80_MCS9 |VHT160_MCS0 |VHT160_MCS1 |VHT160_MCS2 |VHT160_MCS3 |VHT160_MCS4 |VHT160_MCS5 |VHT160_MCS6 |VHT160_MCS7 |VHT160_MCS8 |VHT160_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | |
|
||||
Ch184 |18 | |18 | |18 | |18 |18 |15 |18 | |12 | |13 | |11 |14 |16 |16 |12 | |12 | |13 | |20 |17 |16 |17 |18 | |9 | |16 | |17 |20 |18 |16 |19 | |15 | |9 | |17 |8 |17 |0 |4 |4 | | |
|
||||
Ch188 |18 | |18 | |18 | |18 |18 |16 |20 | |9 | |9 | |11 |8 |12 |18 |15 | |11 | |11 | |14 |8 |17 |16 |16 | |16 | |12 | |8 |13 |19 |18 |11 | |9 | |12 | |14 |8 |13 |5 |2 |0 | | |
|
||||
Ch192 |18 | |18 | |18 | |18 |18 |15 |9 | |11 | |9 | |15 |14 |11 |19 |15 | |8 | |18 | |20 |20 |8 |9 |9 | |9 | |11 | |18 |13 |14 |20 |18 | |10 | |14 | |12 |13 |16 |0 |2 |0 | | |
|
||||
Ch196 |18 | |18 | |18 | |18 |18 |10 |11 | |19 | |13 | |12 |11 |10 |13 |11 | |19 | |10 | |16 |20 |15 |15 |8 | |14 | |8 | |18 |20 |15 |17 |17 | |14 | |12 | |12 |8 |16 |4 |3 |2 | | |
|
||||
Ch8 |18 | |18 | |18 | |18 |18 |18 |13 | |19 | |20 | |18 |10 |9 |8 |8 | |17 | |15 | |17 |9 |18 |19 |11 | |12 | |15 | |20 |12 |12 |13 |9 | |9 | |15 | |10 |11 |17 |4 |3 |3 | | |
|
||||
Ch12 |18 | |18 | |18 | |18 |18 |17 |20 | |14 | |10 | |10 |16 |15 |13 |11 | |15 | |16 | |17 |11 |15 |9 |18 | |8 | |20 | |19 |11 |9 |20 |8 | |18 | |8 | |8 |18 |18 |1 |3 |4 | | |
|
||||
Ch16 |18 | |18 | |18 | |18 |18 |10 |18 | |18 | |8 | |19 |8 |12 |19 |16 | |19 | |18 | |16 |19 |12 |18 |18 | |9 | |10 | |18 |20 |20 |20 |9 | |11 | |20 | |17 |14 |16 |2 |2 |2 | | |
|
||||
Ch36 |18 | |18 | |18 | |18 |18 |18 |19 | |8 | |11 | |16 |10 |9 |19 |11 | |19 | |9 | |8 |19 |8 |11 |17 | |20 | |14 | |9 |19 |19 |20 |13 | |12 | |19 | |13 |17 |9 |5 |1 |2 | | |
|
||||
Ch40 |18 | |18 | |18 | |18 |18 |13 |20 | |13 | |19 | |16 |11 |14 |17 |17 | |14 | |8 | |13 |8 |10 |20 |10 | |9 | |14 | |11 |14 |17 |9 |20 | |15 | |19 | |9 |8 |11 |3 |1 |1 | | |
|
||||
Ch44 |18 | |18 | |18 | |18 |18 |10 |14 | |19 | |20 | |17 |16 |12 |18 |8 | |17 | |18 | |15 |19 |14 |11 |13 | |14 | |12 | |16 |16 |19 |13 |14 | |19 | |14 | |20 |20 |11 |5 |1 |0 | | |
|
||||
Ch48 |18 | |18 | |18 | |18 |18 |8 |12 | |12 | |19 | |11 |8 |11 |20 |12 | |12 | |11 | |15 |16 |10 |12 |16 | |11 | |15 | |18 |19 |17 |16 |17 | |11 | |8 | |10 |16 |16 |5 |5 |0 | | |
|
||||
Ch52 |18 | |18 | |18 | |18 |18 |15 |12 | |15 | |20 | |9 |10 |10 |14 |8 | |20 | |10 | |16 |17 |18 |11 |16 | |17 | |10 | |17 |12 |13 |17 |17 | |13 | |18 | |18 |20 |13 |4 |3 |4 | | |
|
||||
Ch56 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |20 |13 |14 |11 | |10 | |20 | |10 |8 |16 |12 |10 | |16 | |11 | |9 |11 |14 |17 |12 | |17 | |13 | |18 |10 |19 |0 |3 |3 | | |
|
||||
Ch60 |18 | |18 | |18 | |18 |18 |14 |11 | |8 | |20 | |13 |16 |13 |11 |20 | |9 | |17 | |16 |11 |8 |12 |17 | |15 | |8 | |16 |10 |20 |19 |15 | |13 | |9 | |17 |18 |11 |4 |1 |2 | | |
|
||||
Ch64 |18 | |18 | |18 | |18 |18 |13 |14 | |8 | |12 | |17 |8 |12 |18 |17 | |17 | |14 | |18 |8 |8 |20 |17 | |16 | |20 | |9 |15 |11 |10 |11 | |18 | |10 | |10 |15 |19 |2 |1 |4 | | |
|
||||
Ch68 |18 | |18 | |18 | |18 |18 |14 |19 | |17 | |9 | |18 |19 |20 |12 |14 | |8 | |14 | |20 |20 |18 |9 |18 | |11 | |19 | |19 |10 |11 |8 |18 | |9 | |8 | |16 |11 |8 |3 |3 |1 | | |
|
||||
Ch72 |18 | |18 | |18 | |18 |18 |19 |13 | |20 | |11 | |16 |9 |19 |20 |19 | |14 | |8 | |9 |17 |13 |19 |15 | |8 | |9 | |19 |14 |19 |15 |18 | |16 | |12 | |13 |15 |10 |4 |3 |1 | | |
|
||||
Ch76 |18 | |18 | |18 | |18 |18 |17 |13 | |16 | |20 | |16 |8 |9 |20 |11 | |17 | |11 | |8 |18 |9 |20 |9 | |17 | |16 | |11 |11 |11 |18 |10 | |13 | |W | |20 |17 |8 |1 |3 |3 | | |
|
||||
Ch80 |18 | |18 | |18 | |18 |18 |14 |20 | |13 | |13 | |17 |8 |10 |16 |8 | |9 | |19 | |16 |17 |17 |19 |15 | |9 | |13 | |16 |13 |14 |12 |9 | |20 | |20 | |14 |18 |18 |0 |4 |2 | | |
|
||||
Ch84 |18 | |18 | |18 | |18 |18 |11 |18 | |20 | |9 | |13 |14 |11 |16 |15 | |12 | |11 | |9 |19 |13 |11 |11 | |9 | |15 | |16 |18 |13 |12 |8 | |8 | |8 | |10 |12 |15 |3 |2 |5 | | |
|
||||
Ch88 |18 | |18 | |18 | |18 |18 |18 |19 | |9 | |17 | |15 |8 |19 |11 |11 | |14 | |9 | |14 |20 |20 |11 |11 | |15 | |12 | |14 |11 |8 |18 |15 | |19 | |18 | |12 |20 |16 |5 |5 |1 | | |
|
||||
Ch92 |18 | |18 | |18 | |18 |18 |11 |8 | |15 | |13 | |13 |13 |13 |16 |14 | |14 | |9 | |9 |15 |20 |11 |17 | |10 | |14 | |13 |17 |11 |8 |18 | |20 | |8 | |10 |19 |18 |1 |4 |4 | | |
|
||||
Ch96 |18 | |18 | |18 | |18 |18 |8 |12 | |16 | |9 | |13 |12 |9 |8 |11 | |8 | |8 | |19 |11 |15 |16 |8 | |11 | |16 | |18 |16 |9 |19 |9 | |10 | |15 | |19 |19 |15 |4 |2 |4 | | |
|
||||
Ch100 |18 | |18 | |18 | |18 |18 |18 |13 | |20 | |20 | |12 |9 |19 |10 |9 | |14 | |8 | |19 |10 |17 |9 |10 | |10 | |8 | |13 |12 |11 |20 |11 | |16 | |18 | |14 |16 |19 |1 |1 |2 | | |
|
||||
Ch104 |18 | |18 | |18 | |18 |18 |19 |12 | |20 | |14 | |16 |15 |9 |19 |11 | |15 | |11 | |12 |18 |15 |11 |15 | |19 | |10 | |14 |15 |19 |9 |13 | |19 | |13 | |11 |11 |17 |2 |2 |0 | | |
|
||||
Ch108 |18 | |18 | |18 | |18 |18 |18 |15 | |13 | |16 | |11 |19 |19 |18 |19 | |12 | |17 | |8 |9 |10 |8 |8 | |18 | |8 | |10 |11 |17 |15 |10 | |19 | |13 | |16 |10 |15 |0 |2 |3 | | |
|
||||
Ch112 |18 | |18 | |18 | |18 |18 |8 |13 | |9 | |17 | |9 |15 |17 |10 |19 | |9 | |19 | |11 |16 |14 |16 |8 | |18 | |13 | |16 |13 |17 |19 |11 | |8 | |8 | |18 |14 |17 |5 |2 |5 | | |
|
||||
Ch116 |18 | |18 | |18 | |18 |18 |8 |20 | |11 | |15 | |8 |11 |8 |18 |15 | |13 | |17 | |14 |13 |9 |8 |14 | |14 | |11 | |9 |19 |17 |11 |11 | |8 | |20 | |8 |10 |20 |5 |2 |1 | | |
|
||||
Ch120 |18 | |18 | |18 | |18 |18 |14 |20 | |8 | |20 | |14 |10 |10 |17 |12 | |16 | |20 | |10 |20 |17 |18 |9 | |15 | |14 | |17 |13 |14 |16 |8 | |18 | |10 | |15 |12 |12 |1 |5 |3 | | |
|
||||
Ch124 |18 | |18 | |18 | |18 |18 |20 |9 | |17 | |12 | |12 |8 |14 |8 |8 | |20 | |17 | |16 |20 |13 |14 |16 | |10 | |14 | |20 |15 |17 |8 |10 | |13 | |13 | |11 |13 |9 |5 |0 |5 | | |
|
||||
Ch128 |18 | |18 | |18 | |18 |18 |9 |19 | |9 | |14 | |8 |14 |11 |9 |14 | |16 | |15 | |14 |10 |15 |14 |14 | |20 | |10 | |16 |15 |11 |12 |13 | |13 | |13 | |12 |15 |20 |1 |4 |3 | | |
|
||||
Ch132 |18 | |18 | |18 | |18 |18 |20 |16 | |13 | |8 | |18 |11 |20 |12 |11 | |11 | |14 | |12 |13 |8 |12 |13 | |10 | |20 | |19 |12 |13 |14 |12 | |11 | |19 | |19 |20 |8 |3 |1 |4 | | |
|
||||
Ch136 |18 | |18 | |18 | |18 |18 |12 |12 | |19 | |10 | |20 |10 |8 |17 |8 | |12 | |10 | |10 |13 |13 |12 |8 | |11 | |18 | |14 |12 |17 |8 |14 | |14 | |9 | |11 |18 |14 |1 |2 |2 | | |
|
||||
Ch140 |18 | |18 | |18 | |18 |18 |12 |10 | |13 | |9 | |16 |8 |20 |10 |17 | |8 | |15 | |13 |20 |15 |10 |18 | |13 | |12 | |12 |16 |18 |12 |17 | |10 | |16 | |11 |15 |14 |3 |2 |5 | | |
|
||||
Ch144 |18 | |18 | |18 | |18 |18 |19 |9 | |15 | |8 | |13 |18 |17 |9 |19 | |16 | |11 | |20 |12 |15 |19 |10 | |17 | |15 | |17 |14 |9 |9 |13 | |17 | |16 | |10 |9 |10 |1 |5 |2 | | |
|
||||
Ch149 |18 | |18 | |18 | |18 |18 |15 |20 | |12 | |19 | |19 |19 |10 |10 |13 | |15 | |19 | |12 |19 |10 |14 |15 | |10 | |15 | |9 |8 |11 |15 |13 | |10 | |16 | |15 |18 |12 |5 |5 |2 | | |
|
||||
Ch153 |18 | |18 | |18 | |18 |18 |20 |17 | |8 | |19 | |16 |20 |13 |16 |18 | |14 | |11 | |10 |16 |16 |19 |15 | |13 | |17 | |19 |18 |19 |20 |8 | |18 | |9 | |17 |11 |11 |1 |2 |1 | | |
|
||||
Ch157 |18 | |18 | |18 | |18 |18 |13 |17 | |12 | |19 | |16 |8 |17 |11 |12 | |15 | |14 | |18 |11 |12 |9 |18 | |20 | |13 | |16 |13 |20 |17 |19 | |10 | |12 | |20 |18 |16 |5 |2 |3 | | |
|
||||
Ch161 |18 | |18 | |18 | |18 |18 |12 |12 | |16 | |12 | |15 |11 |18 |11 |13 | |17 | |19 | |11 |13 |13 |9 |15 | |10 | |10 | |19 |13 |20 |13 |9 | |8 | |8 | |20 |14 |12 |0 |4 |1 | | |
|
||||
Ch165 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |8 |19 |15 |10 | |17 | |13 | |13 |19 |20 |8 |18 | |15 | |20 | |16 |9 |14 |11 |20 | |11 | |19 | |15 |16 |8 |1 |2 |0 | | |
|
||||
Ch169 |18 | |18 | |18 | |18 |18 |8 |17 | |17 | |13 | |16 |8 |14 |18 |11 | |8 | |18 | |20 |14 |8 |17 |8 | |13 | |18 | |19 |20 |19 |20 |17 | |13 | |20 | |9 |15 |18 |0 |3 |4 | | |
|
||||
Ch173 |18 | |18 | |18 | |18 |18 |14 |9 | |13 | |12 | |15 |14 |15 |10 |10 | |18 | |16 | |16 |8 |13 |16 |11 | |11 | |13 | |13 |15 |12 |20 |15 | |14 | |13 | |16 |11 |14 |3 |3 |4 | | |
|
||||
Ch177 |18 | |18 | |18 | |18 |18 |19 |18 | |16 | |10 | |20 |13 |11 |16 |12 | |16 | |18 | |18 |11 |18 |8 |13 | |14 | |11 | |18 |14 |16 |16 |19 | |16 | |13 | |15 |8 |13 |5 |0 |0 | | |
|
||||
Ch181 |18 | |18 | |18 | |18 |18 |20 |11 | |10 | |9 | |8 |9 |15 |15 |8 | |8 | |12 | |11 |9 |18 |20 |11 | |17 | |11 | |8 |15 |8 |18 |12 | |18 | |16 | |19 |9 |14 |4 |1 |4 | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
@ -1,65 +0,0 @@
|
||||
# Single SKU Max Power Table | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 2.4G Channel |CCK | | | |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |Txstream_Delta | | | | | | | | | | | | | | | | | | | | |
|
||||
Band: 2.4G |CCK_1M |CCK_2M |CCK_5.5M |CCK_11M |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | | | | | | | | | | | | | | | | | |
|
||||
Ch1 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |20 |12 |18 |16 |8 | |8 | |8 | |9 |11 |12 |2 |1 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch2 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |19 |19 |10 |12 |8 | |8 | |8 | |9 |16 |12 |5 |4 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch3 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |17 |18 |16 |20 |8 | |8 | |8 | |12 |8 |20 |0 |2 |0 | | | | | | | | | | | | | | | | | | |
|
||||
Ch4 |8 | |8 | |8 | |8 | |8 | |8 |8 |9 |8 | |8 | |8 | |14 |10 |14 |18 |8 | |8 | |8 | |14 |12 |10 |3 |4 |5 | | | | | | | | | | | | | | | | | | |
|
||||
Ch5 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |10 |13 |11 |8 |8 | |8 | |8 | |12 |8 |9 |4 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch6 |8 | |8 | |8 | |8 | |8 | |8 |8 |13 |8 | |8 | |8 | |11 |9 |12 |16 |8 | |8 | |8 | |9 |17 |11 |5 |2 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch7 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |14 |11 |13 |18 |8 | |8 | |8 | |16 |13 |10 |2 |5 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch8 |8 | |8 | |8 | |8 | |8 | |8 |8 |15 |8 | |8 | |8 | |14 |9 |11 |10 |8 | |8 | |8 | |11 |14 |8 |5 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch9 |8 | |8 | |8 | |8 | |8 | |8 |8 |11 |8 | |8 | |8 | |12 |9 |15 |19 |8 | |8 | |8 | |14 |20 |12 |2 |5 |3 | | | | | | | | | | | | | | | | | | |
|
||||
Ch10 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |17 |14 |17 |15 |8 | |8 | |8 | |9 |17 |8 |2 |4 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch11 |8 | |8 | |8 | |8 | |8 | |8 |8 |14 |8 | |8 | |8 | |20 |10 |20 |18 |8 | |8 | |8 | |12 |8 |20 |3 |1 |4 | | | | | | | | | | | | | | | | | | |
|
||||
Ch12 |8 | |8 | |8 | |8 | |8 | |8 |8 |18 |8 | |8 | |8 | |20 |16 |17 |9 |8 | |8 | |8 | |11 |20 |9 |0 |0 |1 | | | | | | | | | | | | | | | | | | |
|
||||
Ch13 |8 | |8 | |8 | |8 | |8 | |8 |8 |8 |8 | |8 | |8 | |11 |16 |19 |16 |8 | |8 | |8 | |15 |12 |12 |2 |0 |2 | | | | | | | | | | | | | | | | | | |
|
||||
Ch14 |8 | |8 | |8 | |8 | |8 | |8 |8 |10 |8 | |8 | |8 | |15 |17 |16 |14 |8 | |8 | |8 | |12 |14 |20 |4 |1 |5 | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
# 5G Channel |OFDM | | | | | | | |VHT20 | | | | | | | | | |VHT40 | | | | | | | | | |VHT80 | | | | | | | | | |VHT160 | | | | | | | | | |Txstream_Delta | | | | |
|
||||
Band: 5G |OFDM_6M |OFDM_9M |OFDM_12M |OFDM_18M |OFDM_24M |OFDM_36M |OFDM_48M |OFDM_54M |VHT20_MCS0 |VHT20_MCS1 |VHT20_MCS2 |VHT20_MCS3 |VHT20_MCS4 |VHT20_MCS5 |VHT20_MCS6 |VHT20_MCS7 |VHT20_MCS8 |VHT20_MCS9 |VHT40_MCS0 |VHT40_MCS1 |VHT40_MCS2 |VHT40_MCS3 |VHT40_MCS4 |VHT40_MCS5 |VHT40_MCS6 |VHT40_MCS7 |VHT40_MCS8 |VHT40_MCS9 |VHT80_MCS0 |VHT80_MCS1 |VHT80_MCS2 |VHT80_MCS3 |VHT80_MCS4 |VHT80_MCS5 |VHT80_MCS6 |VHT80_MCS7 |VHT80_MCS8 |VHT80_MCS9 |VHT160_MCS0 |VHT160_MCS1 |VHT160_MCS2 |VHT160_MCS3 |VHT160_MCS4 |VHT160_MCS5 |VHT160_MCS6 |VHT160_MCS7 |VHT160_MCS8 |VHT160_MCS9 |Txstream_3T |Txstream_2T |Txstream_1T | | |
|
||||
Ch184 |18 | |18 | |18 | |18 |18 |15 |18 | |12 | |13 | |11 |14 |16 |16 |12 | |12 | |13 | |20 |17 |16 |17 |18 | |9 | |16 | |17 |20 |18 |16 |19 | |15 | |9 | |17 |8 |17 |0 |4 |4 | | |
|
||||
Ch188 |18 | |18 | |18 | |18 |18 |16 |20 | |9 | |9 | |11 |8 |12 |18 |15 | |11 | |11 | |14 |8 |17 |16 |16 | |16 | |12 | |8 |13 |19 |18 |11 | |9 | |12 | |14 |8 |13 |5 |2 |0 | | |
|
||||
Ch192 |18 | |18 | |18 | |18 |18 |15 |9 | |11 | |9 | |15 |14 |11 |19 |15 | |8 | |18 | |20 |20 |8 |9 |9 | |9 | |11 | |18 |13 |14 |20 |18 | |10 | |14 | |12 |13 |16 |0 |2 |0 | | |
|
||||
Ch196 |18 | |18 | |18 | |18 |18 |10 |11 | |19 | |13 | |12 |11 |10 |13 |11 | |19 | |10 | |16 |20 |15 |15 |8 | |14 | |8 | |18 |20 |15 |17 |17 | |14 | |12 | |12 |8 |16 |4 |3 |2 | | |
|
||||
Ch8 |18 | |18 | |18 | |18 |18 |18 |13 | |19 | |20 | |18 |10 |9 |8 |8 | |17 | |15 | |17 |9 |18 |19 |11 | |12 | |15 | |20 |12 |12 |13 |9 | |9 | |15 | |10 |11 |17 |4 |3 |3 | | |
|
||||
Ch12 |18 | |18 | |18 | |18 |18 |17 |20 | |14 | |10 | |10 |16 |15 |13 |11 | |15 | |16 | |17 |11 |15 |9 |18 | |8 | |20 | |19 |11 |9 |20 |8 | |18 | |8 | |8 |18 |18 |1 |3 |4 | | |
|
||||
Ch16 |18 | |18 | |18 | |18 |18 |10 |18 | |18 | |8 | |19 |8 |12 |19 |16 | |19 | |18 | |16 |19 |12 |18 |18 | |9 | |10 | |18 |20 |20 |20 |9 | |11 | |20 | |17 |14 |16 |2 |2 |2 | | |
|
||||
Ch36 |18 | |18 | |18 | |18 |18 |18 |19 | |8 | |11 | |16 |10 |9 |19 |11 | |19 | |9 | |8 |19 |8 |11 |17 | |20 | |14 | |9 |19 |19 |20 |13 | |12 | |19 | |13 |17 |9 |5 |1 |2 | | |
|
||||
Ch40 |18 | |18 | |18 | |18 |18 |13 |20 | |13 | |19 | |16 |11 |14 |17 |17 | |14 | |8 | |13 |8 |10 |20 |10 | |9 | |14 | |11 |14 |17 |9 |20 | |15 | |19 | |9 |8 |11 |3 |1 |1 | | |
|
||||
Ch44 |18 | |18 | |18 | |18 |18 |10 |14 | |19 | |20 | |17 |16 |12 |18 |8 | |17 | |18 | |15 |19 |14 |11 |13 | |14 | |12 | |16 |16 |19 |13 |14 | |19 | |14 | |20 |20 |11 |5 |1 |0 | | |
|
||||
Ch48 |18 | |18 | |18 | |18 |18 |8 |12 | |12 | |19 | |11 |8 |11 |20 |12 | |12 | |11 | |15 |16 |10 |12 |16 | |11 | |15 | |18 |19 |17 |16 |17 | |11 | |8 | |10 |16 |16 |5 |5 |0 | | |
|
||||
Ch52 |18 | |18 | |18 | |18 |18 |15 |12 | |15 | |20 | |9 |10 |10 |14 |8 | |20 | |10 | |16 |17 |18 |11 |16 | |17 | |10 | |17 |12 |13 |17 |17 | |13 | |18 | |18 |20 |13 |4 |3 |4 | | |
|
||||
Ch56 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |20 |13 |14 |11 | |10 | |20 | |10 |8 |16 |12 |10 | |16 | |11 | |9 |11 |14 |17 |12 | |17 | |13 | |18 |10 |19 |0 |3 |3 | | |
|
||||
Ch60 |18 | |18 | |18 | |18 |18 |14 |11 | |8 | |20 | |13 |16 |13 |11 |20 | |9 | |17 | |16 |11 |8 |12 |17 | |15 | |8 | |16 |10 |20 |19 |15 | |13 | |9 | |17 |18 |11 |4 |1 |2 | | |
|
||||
Ch64 |18 | |18 | |18 | |18 |18 |13 |14 | |8 | |12 | |17 |8 |12 |18 |17 | |17 | |14 | |18 |8 |8 |20 |17 | |16 | |20 | |9 |15 |11 |10 |11 | |18 | |10 | |10 |15 |19 |2 |1 |4 | | |
|
||||
Ch68 |18 | |18 | |18 | |18 |18 |14 |19 | |17 | |9 | |18 |19 |20 |12 |14 | |8 | |14 | |20 |20 |18 |9 |18 | |11 | |19 | |19 |10 |11 |8 |18 | |9 | |8 | |16 |11 |8 |3 |3 |1 | | |
|
||||
Ch72 |18 | |18 | |18 | |18 |18 |19 |13 | |20 | |11 | |16 |9 |19 |20 |19 | |14 | |8 | |9 |17 |13 |19 |15 | |8 | |9 | |19 |14 |19 |15 |18 | |16 | |12 | |13 |15 |10 |4 |3 |1 | | |
|
||||
Ch76 |18 | |18 | |18 | |18 |18 |17 |13 | |16 | |20 | |16 |8 |9 |20 |11 | |17 | |11 | |8 |18 |9 |20 |9 | |17 | |16 | |11 |11 |11 |18 |10 | |13 | |W | |20 |17 |8 |1 |3 |3 | | |
|
||||
Ch80 |18 | |18 | |18 | |18 |18 |14 |20 | |13 | |13 | |17 |8 |10 |16 |8 | |9 | |19 | |16 |17 |17 |19 |15 | |9 | |13 | |16 |13 |14 |12 |9 | |20 | |20 | |14 |18 |18 |0 |4 |2 | | |
|
||||
Ch84 |18 | |18 | |18 | |18 |18 |11 |18 | |20 | |9 | |13 |14 |11 |16 |15 | |12 | |11 | |9 |19 |13 |11 |11 | |9 | |15 | |16 |18 |13 |12 |8 | |8 | |8 | |10 |12 |15 |3 |2 |5 | | |
|
||||
Ch88 |18 | |18 | |18 | |18 |18 |18 |19 | |9 | |17 | |15 |8 |19 |11 |11 | |14 | |9 | |14 |20 |20 |11 |11 | |15 | |12 | |14 |11 |8 |18 |15 | |19 | |18 | |12 |20 |16 |5 |5 |1 | | |
|
||||
Ch92 |18 | |18 | |18 | |18 |18 |11 |8 | |15 | |13 | |13 |13 |13 |16 |14 | |14 | |9 | |9 |15 |20 |11 |17 | |10 | |14 | |13 |17 |11 |8 |18 | |20 | |8 | |10 |19 |18 |1 |4 |4 | | |
|
||||
Ch96 |18 | |18 | |18 | |18 |18 |8 |12 | |16 | |9 | |13 |12 |9 |8 |11 | |8 | |8 | |19 |11 |15 |16 |8 | |11 | |16 | |18 |16 |9 |19 |9 | |10 | |15 | |19 |19 |15 |4 |2 |4 | | |
|
||||
Ch100 |18 | |18 | |18 | |18 |18 |18 |13 | |20 | |20 | |12 |9 |19 |10 |9 | |14 | |8 | |19 |10 |17 |9 |10 | |10 | |8 | |13 |12 |11 |20 |11 | |16 | |18 | |14 |16 |19 |1 |1 |2 | | |
|
||||
Ch104 |18 | |18 | |18 | |18 |18 |19 |12 | |20 | |14 | |16 |15 |9 |19 |11 | |15 | |11 | |12 |18 |15 |11 |15 | |19 | |10 | |14 |15 |19 |9 |13 | |19 | |13 | |11 |11 |17 |2 |2 |0 | | |
|
||||
Ch108 |18 | |18 | |18 | |18 |18 |18 |15 | |13 | |16 | |11 |19 |19 |18 |19 | |12 | |17 | |8 |9 |10 |8 |8 | |18 | |8 | |10 |11 |17 |15 |10 | |19 | |13 | |16 |10 |15 |0 |2 |3 | | |
|
||||
Ch112 |18 | |18 | |18 | |18 |18 |8 |13 | |9 | |17 | |9 |15 |17 |10 |19 | |9 | |19 | |11 |16 |14 |16 |8 | |18 | |13 | |16 |13 |17 |19 |11 | |8 | |8 | |18 |14 |17 |5 |2 |5 | | |
|
||||
Ch116 |18 | |18 | |18 | |18 |18 |8 |20 | |11 | |15 | |8 |11 |8 |18 |15 | |13 | |17 | |14 |13 |9 |8 |14 | |14 | |11 | |9 |19 |17 |11 |11 | |8 | |20 | |8 |10 |20 |5 |2 |1 | | |
|
||||
Ch120 |18 | |18 | |18 | |18 |18 |14 |20 | |8 | |20 | |14 |10 |10 |17 |12 | |16 | |20 | |10 |20 |17 |18 |9 | |15 | |14 | |17 |13 |14 |16 |8 | |18 | |10 | |15 |12 |12 |1 |5 |3 | | |
|
||||
Ch124 |18 | |18 | |18 | |18 |18 |20 |9 | |17 | |12 | |12 |8 |14 |8 |8 | |20 | |17 | |16 |20 |13 |14 |16 | |10 | |14 | |20 |15 |17 |8 |10 | |13 | |13 | |11 |13 |9 |5 |0 |5 | | |
|
||||
Ch128 |18 | |18 | |18 | |18 |18 |9 |19 | |9 | |14 | |8 |14 |11 |9 |14 | |16 | |15 | |14 |10 |15 |14 |14 | |20 | |10 | |16 |15 |11 |12 |13 | |13 | |13 | |12 |15 |20 |1 |4 |3 | | |
|
||||
Ch132 |18 | |18 | |18 | |18 |18 |20 |16 | |13 | |8 | |18 |11 |20 |12 |11 | |11 | |14 | |12 |13 |8 |12 |13 | |10 | |20 | |19 |12 |13 |14 |12 | |11 | |19 | |19 |20 |8 |3 |1 |4 | | |
|
||||
Ch136 |18 | |18 | |18 | |18 |18 |12 |12 | |19 | |10 | |20 |10 |8 |17 |8 | |12 | |10 | |10 |13 |13 |12 |8 | |11 | |18 | |14 |12 |17 |8 |14 | |14 | |9 | |11 |18 |14 |1 |2 |2 | | |
|
||||
Ch140 |18 | |18 | |18 | |18 |18 |12 |10 | |13 | |9 | |16 |8 |20 |10 |17 | |8 | |15 | |13 |20 |15 |10 |18 | |13 | |12 | |12 |16 |18 |12 |17 | |10 | |16 | |11 |15 |14 |3 |2 |5 | | |
|
||||
Ch144 |18 | |18 | |18 | |18 |18 |19 |9 | |15 | |8 | |13 |18 |17 |9 |19 | |16 | |11 | |20 |12 |15 |19 |10 | |17 | |15 | |17 |14 |9 |9 |13 | |17 | |16 | |10 |9 |10 |1 |5 |2 | | |
|
||||
Ch149 |18 | |18 | |18 | |18 |18 |15 |20 | |12 | |19 | |19 |19 |10 |10 |13 | |15 | |19 | |12 |19 |10 |14 |15 | |10 | |15 | |9 |8 |11 |15 |13 | |10 | |16 | |15 |18 |12 |5 |5 |2 | | |
|
||||
Ch153 |18 | |18 | |18 | |18 |18 |20 |17 | |8 | |19 | |16 |20 |13 |16 |18 | |14 | |11 | |10 |16 |16 |19 |15 | |13 | |17 | |19 |18 |19 |20 |8 | |18 | |9 | |17 |11 |11 |1 |2 |1 | | |
|
||||
Ch157 |18 | |18 | |18 | |18 |18 |13 |17 | |12 | |19 | |16 |8 |17 |11 |12 | |15 | |14 | |18 |11 |12 |9 |18 | |20 | |13 | |16 |13 |20 |17 |19 | |10 | |12 | |20 |18 |16 |5 |2 |3 | | |
|
||||
Ch161 |18 | |18 | |18 | |18 |18 |12 |12 | |16 | |12 | |15 |11 |18 |11 |13 | |17 | |19 | |11 |13 |13 |9 |15 | |10 | |10 | |19 |13 |20 |13 |9 | |8 | |8 | |20 |14 |12 |0 |4 |1 | | |
|
||||
Ch165 |18 | |18 | |18 | |18 |18 |13 |16 | |15 | |13 | |15 |8 |19 |15 |10 | |17 | |13 | |13 |19 |20 |8 |18 | |15 | |20 | |16 |9 |14 |11 |20 | |11 | |19 | |15 |16 |8 |1 |2 |0 | | |
|
||||
Ch169 |18 | |18 | |18 | |18 |18 |8 |17 | |17 | |13 | |16 |8 |14 |18 |11 | |8 | |18 | |20 |14 |8 |17 |8 | |13 | |18 | |19 |20 |19 |20 |17 | |13 | |20 | |9 |15 |18 |0 |3 |4 | | |
|
||||
Ch173 |18 | |18 | |18 | |18 |18 |14 |9 | |13 | |12 | |15 |14 |15 |10 |10 | |18 | |16 | |16 |8 |13 |16 |11 | |11 | |13 | |13 |15 |12 |20 |15 | |14 | |13 | |16 |11 |14 |3 |3 |4 | | |
|
||||
Ch177 |18 | |18 | |18 | |18 |18 |19 |18 | |16 | |10 | |20 |13 |11 |16 |12 | |16 | |18 | |18 |11 |18 |8 |13 | |14 | |11 | |18 |14 |16 |16 |19 | |16 | |13 | |15 |8 |13 |5 |0 |0 | | |
|
||||
Ch181 |18 | |18 | |18 | |18 |18 |20 |11 | |10 | |9 | |8 |9 |15 |15 |8 | |8 | |12 | |11 |9 |18 |20 |11 | |17 | |11 | |8 |15 |8 |18 |12 | |18 | |16 | |19 |9 |14 |4 |1 |4 | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
@ -1,410 +0,0 @@
|
||||
#The word of "Default" must not be removed
|
||||
Default
|
||||
AccessControlList0=
|
||||
AccessControlList1=
|
||||
AccessControlList10=
|
||||
AccessControlList11=
|
||||
AccessControlList12=
|
||||
AccessControlList13=
|
||||
AccessControlList14=
|
||||
AccessControlList15=
|
||||
AccessControlList2=
|
||||
AccessControlList3=
|
||||
AccessControlList4=
|
||||
AccessControlList5=
|
||||
AccessControlList6=
|
||||
AccessControlList7=
|
||||
AccessControlList8=
|
||||
AccessControlList9=
|
||||
AccessPolicy0=0
|
||||
AccessPolicy1=0
|
||||
AccessPolicy10=0
|
||||
AccessPolicy11=0
|
||||
AccessPolicy12=0
|
||||
AccessPolicy13=0
|
||||
AccessPolicy14=0
|
||||
AccessPolicy15=0
|
||||
AccessPolicy2=0
|
||||
AccessPolicy3=0
|
||||
AccessPolicy4=0
|
||||
AccessPolicy5=0
|
||||
AccessPolicy6=0
|
||||
AccessPolicy7=0
|
||||
AccessPolicy8=0
|
||||
AccessPolicy9=0
|
||||
AckPolicy=0;0;0;0
|
||||
APACM=0;0;0;0
|
||||
APAifsn=3;7;1;1
|
||||
ApCliAuthMode=
|
||||
ApCliBssid=
|
||||
ApCliDefaultKeyID=
|
||||
ApCliEnable=
|
||||
ApCliKey1Str=
|
||||
ApCliKey1Str1=
|
||||
ApCliKey1Type=
|
||||
ApCliKey2Str=
|
||||
ApCliKey2Str1=
|
||||
ApCliKey2Type=
|
||||
ApCliKey3Str=
|
||||
ApCliKey3Str1=
|
||||
ApCliKey3Type=
|
||||
ApCliKey4Str=
|
||||
ApCliKey4Str1=
|
||||
ApCliKey4Type=
|
||||
ApCliSsid=
|
||||
ApCliWirelessMode=
|
||||
ApCliWPAPSK=
|
||||
ApCliWPAPSK1=
|
||||
APCwmax=6;10;4;3
|
||||
APCwmin=4;4;3;2
|
||||
APSDCapable=1
|
||||
APTxop=0;0;94;47
|
||||
AuthMode=OPEN
|
||||
AutoChannelSelect=3
|
||||
AutoChannelSkipList=
|
||||
AutoProvisionEn=0
|
||||
BandSteering=0
|
||||
BasicRate=15
|
||||
BeaconPeriod=100
|
||||
BFBACKOFFenable=0
|
||||
BgndScanSkipCh=
|
||||
BGProtection=0
|
||||
BndStrgBssIdx=
|
||||
BSSACM=0;0;0;0
|
||||
BSSAifsn=3;7;2;2
|
||||
BSSCwmax=10;10;4;3
|
||||
BSSCwmin=4;4;3;2
|
||||
BssidNum=1
|
||||
BSSTxop=0;0;94;47
|
||||
BW_Enable=0
|
||||
BW_Guarantee_Rate=
|
||||
BW_Maximum_Rate=
|
||||
BW_Priority=
|
||||
BW_Root=0
|
||||
CalCacheApply=0
|
||||
CarrierDetect=0
|
||||
Channel=0
|
||||
ChannelGrp=
|
||||
CountryCode=US
|
||||
CountryRegion=5
|
||||
CountryRegionABand=7
|
||||
CP_SUPPORT=2
|
||||
CSPeriod=6
|
||||
DBDC_MODE=0
|
||||
DebugFlags=0
|
||||
DefaultKeyID=1
|
||||
DfsCalibration=0
|
||||
DfsEnable=0
|
||||
DfsFalseAlarmPrevent=1
|
||||
DfsZeroWait=0
|
||||
DfsZeroWaitCacTime=255
|
||||
DisableOLBC=0
|
||||
DtimPeriod=1
|
||||
E2pAccessMode=2
|
||||
EAPifname=br-lan
|
||||
EDCCAEnable=1
|
||||
EncrypType=NONE
|
||||
EthConvertMode=dongle
|
||||
EtherTrafficBand=0
|
||||
Ethifname=
|
||||
ETxBfEnCond=1
|
||||
FineAGC=0
|
||||
FixedTxMode=
|
||||
ForceRoamSupport=
|
||||
FragThreshold=2346
|
||||
FreqDelta=0
|
||||
FtSupport=0
|
||||
GreenAP=1
|
||||
G_BAND_256QAM=1
|
||||
HideSSID=0
|
||||
HT_AMSDU=1
|
||||
HT_AutoBA=1
|
||||
HT_BADecline=0
|
||||
HT_BAWinSize=64
|
||||
HT_BSSCoexistence=1
|
||||
HT_BW=1
|
||||
HT_DisallowTKIP=1
|
||||
HT_EXTCHA=1
|
||||
HT_GI=1
|
||||
HT_HTC=1
|
||||
HT_LDPC=1
|
||||
HT_LinkAdapt=0
|
||||
HT_MCS=33
|
||||
HT_MpduDensity=5
|
||||
HT_OpMode=0
|
||||
HT_PROTECT=1
|
||||
HT_RDG=0
|
||||
HT_RxStream=4
|
||||
HT_STBC=1
|
||||
HT_TxStream=4
|
||||
IcapMode=0
|
||||
idle_timeout_interval=0
|
||||
IEEE80211H=1
|
||||
IEEE8021X=0
|
||||
IgmpSnEnable=0
|
||||
ITxBfEn=1
|
||||
Key1Str=
|
||||
Key1Str1=
|
||||
Key1Str10=
|
||||
Key1Str11=
|
||||
Key1Str12=
|
||||
Key1Str13=
|
||||
Key1Str14=
|
||||
Key1Str15=
|
||||
Key1Str16=
|
||||
Key1Str2=
|
||||
Key1Str3=
|
||||
Key1Str4=
|
||||
Key1Str5=
|
||||
Key1Str6=
|
||||
Key1Str7=
|
||||
Key1Str8=
|
||||
Key1Str9=
|
||||
Key1Type=0
|
||||
Key2Str=
|
||||
Key2Str1=
|
||||
Key2Str10=
|
||||
Key2Str11=
|
||||
Key2Str12=
|
||||
Key2Str13=
|
||||
Key2Str14=
|
||||
Key2Str15=
|
||||
Key2Str16=
|
||||
Key2Str2=
|
||||
Key2Str3=
|
||||
Key2Str4=
|
||||
Key2Str5=
|
||||
Key2Str6=
|
||||
Key2Str7=
|
||||
Key2Str8=
|
||||
Key2Str9=
|
||||
Key2Type=0
|
||||
Key3Str=
|
||||
Key3Str1=
|
||||
Key3Str10=
|
||||
Key3Str11=
|
||||
Key3Str12=
|
||||
Key3Str13=
|
||||
Key3Str14=
|
||||
Key3Str15=
|
||||
Key3Str16=
|
||||
Key3Str2=
|
||||
Key3Str3=
|
||||
Key3Str4=
|
||||
Key3Str5=
|
||||
Key3Str6=
|
||||
Key3Str7=
|
||||
Key3Str8=
|
||||
Key3Str9=
|
||||
Key3Type=0
|
||||
Key4Str=
|
||||
Key4Str1=
|
||||
Key4Str10=
|
||||
Key4Str11=
|
||||
Key4Str12=
|
||||
Key4Str13=
|
||||
Key4Str14=
|
||||
Key4Str15=
|
||||
Key4Str16=
|
||||
Key4Str2=
|
||||
Key4Str3=
|
||||
Key4Str4=
|
||||
Key4Str5=
|
||||
Key4Str6=
|
||||
Key4Str7=
|
||||
Key4Str8=
|
||||
Key4Str9=
|
||||
Key4Type=0
|
||||
LinkTestSupport=0
|
||||
MACRepeaterEn=
|
||||
MACRepeaterOuiMode=2
|
||||
MeshAuthMode=
|
||||
MeshAutoLink=0
|
||||
MeshDefaultkey=0
|
||||
MeshEncrypType=
|
||||
MeshId=
|
||||
MeshWEPKEY=
|
||||
MeshWPAKEY=
|
||||
MUTxRxEnable=0
|
||||
NoForwarding=0
|
||||
NoForwardingBTNBSSID=0
|
||||
own_ip_addr=192.168.1.1
|
||||
PcieAspm=0
|
||||
PERCENTAGEenable=0
|
||||
PhyRateLimit=0
|
||||
PMFMFPC=1
|
||||
PMFMFPR=0
|
||||
PMFSHA256=0
|
||||
PMKCachePeriod=10
|
||||
PowerUpCckOfdm=0:0:0:0:0:0:0
|
||||
PowerUpHT20=0:0:0:0:0:0:0
|
||||
PowerUpHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT160=0:0:0:0:0:0:0
|
||||
PowerUpVHT20=0:0:0:0:0:0:0
|
||||
PowerUpVHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT80=0:0:0:0:0:0:0
|
||||
PreAntSwitch=
|
||||
PreAuth=0
|
||||
PreAuthifname=br-lan
|
||||
RadioLinkSelection=0
|
||||
RadioOn=1
|
||||
RADIUS_Acct_Key=
|
||||
RADIUS_Acct_Port=1813
|
||||
RADIUS_Acct_Server=
|
||||
RADIUS_Key1=
|
||||
RADIUS_Key10=
|
||||
RADIUS_Key11=
|
||||
RADIUS_Key12=
|
||||
RADIUS_Key13=
|
||||
RADIUS_Key14=
|
||||
RADIUS_Key15=
|
||||
RADIUS_Key16=
|
||||
RADIUS_Key2=
|
||||
RADIUS_Key3=
|
||||
RADIUS_Key4=
|
||||
RADIUS_Key5=
|
||||
RADIUS_Key6=
|
||||
RADIUS_Key7=
|
||||
RADIUS_Key8=
|
||||
RADIUS_Key9=
|
||||
RADIUS_Port=1812
|
||||
RADIUS_Server=0
|
||||
RDRegion=
|
||||
RED_Enable=1
|
||||
RekeyInterval=3600
|
||||
RekeyMethod=DISABLE
|
||||
RRMEnable=0
|
||||
RTSThreshold=2347
|
||||
session_timeout_interval=0
|
||||
ShortSlot=1
|
||||
SKUenable=0
|
||||
SSID=
|
||||
SSID1=WITHUSP-5.0
|
||||
SSID10=
|
||||
SSID11=
|
||||
SSID12=
|
||||
SSID13=
|
||||
SSID14=
|
||||
SSID15=
|
||||
SSID16=
|
||||
SSID2=
|
||||
SSID3=
|
||||
SSID4=
|
||||
SSID5=
|
||||
SSID6=
|
||||
SSID7=
|
||||
SSID8=
|
||||
SSID9=
|
||||
StationKeepAlive=0
|
||||
StreamMode=0
|
||||
StreamModeMac0=
|
||||
StreamModeMac1=
|
||||
StreamModeMac2=
|
||||
StreamModeMac3=
|
||||
TGnWifiTest=0
|
||||
ThermalRecal=0
|
||||
TxBurst=1
|
||||
TxPower=100
|
||||
TxPreamble=1
|
||||
VHT_BW=1
|
||||
VHT_BW_SIGNAL=0
|
||||
VHT_LDPC=1
|
||||
VHT_Sec80_Channel=0
|
||||
VHT_SGI=1
|
||||
VHT_STBC=1
|
||||
VLANID=0
|
||||
VLANPriority=0
|
||||
VLANTag=0
|
||||
VOW_Airtime_Ctrl_En=0
|
||||
VOW_Airtime_Fairness_En=1
|
||||
VOW_BW_Ctrl=0
|
||||
VOW_Group_Backlog=
|
||||
VOW_Group_DWRR_Max_Wait_Time=
|
||||
VOW_Group_DWRR_Quantum=
|
||||
VOW_Group_Max_Airtime_Bucket_Size=
|
||||
VOW_Group_Max_Rate=
|
||||
VOW_Group_Max_Rate_Bucket_Size=
|
||||
VOW_Group_Max_Ratio=
|
||||
VOW_Group_Max_Wait_Time=
|
||||
VOW_Group_Min_Airtime_Bucket_Size=
|
||||
VOW_Group_Min_Rate=
|
||||
VOW_Group_Min_Rate_Bucket_Size=
|
||||
VOW_Group_Min_Ratio=
|
||||
VOW_Rate_Ctrl_En=0
|
||||
VOW_Refill_Period=
|
||||
VOW_RX_En=1
|
||||
VOW_Sta_BE_DWRR_Quantum=
|
||||
VOW_Sta_BK_DWRR_Quantum=
|
||||
VOW_Sta_DWRR_Max_Wait_Time=
|
||||
VOW_Sta_VI_DWRR_Quantum=
|
||||
VOW_Sta_VO_DWRR_Quantum=
|
||||
VOW_WATF_Enable=
|
||||
VOW_WATF_MAC_LV0=
|
||||
VOW_WATF_MAC_LV1=
|
||||
VOW_WATF_MAC_LV2=
|
||||
VOW_WATF_MAC_LV3=
|
||||
VOW_WATF_Q_LV0=
|
||||
VOW_WATF_Q_LV1=
|
||||
VOW_WATF_Q_LV2=
|
||||
VOW_WATF_Q_LV3=
|
||||
VOW_WMM_Search_Rule_Band0=
|
||||
VOW_WMM_Search_Rule_Band1=
|
||||
WapiAsCertPath=
|
||||
WapiAsIpAddr=
|
||||
WapiAsPort=
|
||||
Wapiifname=
|
||||
WapiPsk1=
|
||||
WapiPsk10=
|
||||
WapiPsk11=
|
||||
WapiPsk12=
|
||||
WapiPsk13=
|
||||
WapiPsk14=
|
||||
WapiPsk15=
|
||||
WapiPsk16=
|
||||
WapiPsk2=
|
||||
WapiPsk3=
|
||||
WapiPsk4=
|
||||
WapiPsk5=
|
||||
WapiPsk6=
|
||||
WapiPsk7=
|
||||
WapiPsk8=
|
||||
WapiPsk9=
|
||||
WapiPskType=
|
||||
WapiUserCertPath=
|
||||
WCNTest=0
|
||||
Wds0Key=
|
||||
Wds1Key=
|
||||
Wds2Key=
|
||||
Wds3Key=
|
||||
WdsEnable=0
|
||||
WdsEncrypType=NONE
|
||||
WdsList=
|
||||
WdsPhyMode=0
|
||||
WHNAT=1
|
||||
WiFiTest=0
|
||||
WirelessMode=14
|
||||
WmmCapable=1
|
||||
WPAPSK=
|
||||
WPAPSK1=12345678
|
||||
WPAPSK10=
|
||||
WPAPSK11=
|
||||
WPAPSK12=
|
||||
WPAPSK13=
|
||||
WPAPSK14=
|
||||
WPAPSK15=
|
||||
WPAPSK16=
|
||||
WPAPSK2=
|
||||
WPAPSK3=
|
||||
WPAPSK4=
|
||||
WPAPSK5=
|
||||
WPAPSK6=
|
||||
WPAPSK7=
|
||||
WPAPSK8=
|
||||
WPAPSK9=
|
||||
WscConfMode=0
|
||||
WscConfStatus=2
|
||||
WEP1Type1=0
|
||||
WEP2Type1=0
|
||||
WEP3Type1=0
|
||||
WEP4Type1=0
|
||||
WPSRadio=0
|
@ -1,412 +0,0 @@
|
||||
#The word of "Default" must not be removed
|
||||
Default
|
||||
AccessControlList0=
|
||||
AccessControlList1=
|
||||
AccessControlList10=
|
||||
AccessControlList11=
|
||||
AccessControlList12=
|
||||
AccessControlList13=
|
||||
AccessControlList14=
|
||||
AccessControlList15=
|
||||
AccessControlList2=
|
||||
AccessControlList3=
|
||||
AccessControlList4=
|
||||
AccessControlList5=
|
||||
AccessControlList6=
|
||||
AccessControlList7=
|
||||
AccessControlList8=
|
||||
AccessControlList9=
|
||||
AccessPolicy0=0
|
||||
AccessPolicy1=0
|
||||
AccessPolicy10=0
|
||||
AccessPolicy11=0
|
||||
AccessPolicy12=0
|
||||
AccessPolicy13=0
|
||||
AccessPolicy14=0
|
||||
AccessPolicy15=0
|
||||
AccessPolicy2=0
|
||||
AccessPolicy3=0
|
||||
AccessPolicy4=0
|
||||
AccessPolicy5=0
|
||||
AccessPolicy6=0
|
||||
AccessPolicy7=0
|
||||
AccessPolicy8=0
|
||||
AccessPolicy9=0
|
||||
AckPolicy=0;0;0;0
|
||||
APACM=0;0;0;0
|
||||
APAifsn=3;7;1;1
|
||||
ApCliAuthMode=
|
||||
ApCliBssid=
|
||||
ApCliDefaultKeyID=
|
||||
ApCliEnable=
|
||||
ApCliEncrypType=
|
||||
ApCliKey1Str=
|
||||
ApCliKey1Str1=
|
||||
ApCliKey1Type=
|
||||
ApCliKey2Str=
|
||||
ApCliKey2Str1=
|
||||
ApCliKey2Type=
|
||||
ApCliKey3Str=
|
||||
ApCliKey3Str1=
|
||||
ApCliKey3Type=
|
||||
ApCliKey4Str=
|
||||
ApCliKey4Str1=
|
||||
ApCliKey4Type=
|
||||
ApCliSsid=
|
||||
ApCliWirelessMode=
|
||||
ApCliWPAPSK=
|
||||
ApCliWPAPSK1=
|
||||
APCwmax=6;10;4;3
|
||||
APCwmin=4;4;3;2
|
||||
APSDCapable=1
|
||||
APTxop=0;0;94;47
|
||||
AuthMode=OPEN
|
||||
AutoChannelSelect=3
|
||||
AutoChannelSkipList=
|
||||
AutoProvisionEn=0
|
||||
BandSteering=0
|
||||
BasicRate=15
|
||||
BeaconPeriod=100
|
||||
BFBACKOFFenable=0
|
||||
BgndScanSkipCh=
|
||||
BGProtection=0
|
||||
BndStrgBssIdx=
|
||||
BSSACM=0;0;0;0
|
||||
BSSAifsn=3;7;2;2
|
||||
BSSCwmax=10;10;4;3
|
||||
BSSCwmin=4;4;3;2
|
||||
BssidNum=1
|
||||
BSSTxop=0;0;94;47
|
||||
BW_Enable=0
|
||||
BW_Guarantee_Rate=
|
||||
BW_Maximum_Rate=
|
||||
BW_Priority=
|
||||
BW_Root=0
|
||||
CalCacheApply=0
|
||||
CarrierDetect=0
|
||||
Channel=0
|
||||
ChannelGrp=
|
||||
CountryCode=US
|
||||
CountryRegion=5
|
||||
CountryRegionABand=7
|
||||
CP_SUPPORT=2
|
||||
CSPeriod=6
|
||||
DBDC_MODE=0
|
||||
DebugFlags=0
|
||||
DefaultKeyID=1
|
||||
DfsCalibration=0
|
||||
DfsEnable=0
|
||||
DfsFalseAlarmPrevent=1
|
||||
DfsZeroWait=0
|
||||
DfsZeroWaitCacTime=255
|
||||
DisableOLBC=0
|
||||
DtimPeriod=1
|
||||
E2pAccessMode=1
|
||||
EAPifname=br-lan
|
||||
EDCCAEnable=1
|
||||
EncrypType=NONE
|
||||
EthConvertMode=dongle
|
||||
EtherTrafficBand=0
|
||||
Ethifname=
|
||||
ETxBfEnCond=1
|
||||
FineAGC=0
|
||||
FixedTxMode=
|
||||
ForceRoamSupport=
|
||||
FragThreshold=2346
|
||||
FreqDelta=0
|
||||
FtSupport=0
|
||||
GreenAP=1
|
||||
G_BAND_256QAM=1
|
||||
HideSSID=0
|
||||
HT_AMSDU=1
|
||||
HT_AutoBA=1
|
||||
HT_BADecline=0
|
||||
HT_BAWinSize=64
|
||||
HT_BSSCoexistence=1
|
||||
HT_BW=1
|
||||
HT_DisallowTKIP=1
|
||||
HT_EXTCHA=1
|
||||
HT_GI=1
|
||||
HT_HTC=1
|
||||
HT_LDPC=1
|
||||
HT_LinkAdapt=0
|
||||
HT_MCS=33
|
||||
HT_MpduDensity=5
|
||||
HT_OpMode=0
|
||||
HT_PROTECT=1
|
||||
HT_RDG=0
|
||||
HT_RxStream=4
|
||||
HT_STBC=1
|
||||
HT_TxStream=4
|
||||
IcapMode=0
|
||||
idle_timeout_interval=0
|
||||
IEEE80211H=1
|
||||
IEEE8021X=0
|
||||
IgmpSnEnable=0
|
||||
ITxBfEn=1
|
||||
Key1Str=
|
||||
Key1Str1=
|
||||
Key1Str10=
|
||||
Key1Str11=
|
||||
Key1Str12=
|
||||
Key1Str13=
|
||||
Key1Str14=
|
||||
Key1Str15=
|
||||
Key1Str16=
|
||||
Key1Str2=
|
||||
Key1Str3=
|
||||
Key1Str4=
|
||||
Key1Str5=
|
||||
Key1Str6=
|
||||
Key1Str7=
|
||||
Key1Str8=
|
||||
Key1Str9=
|
||||
Key1Type=0
|
||||
Key2Str=
|
||||
Key2Str1=
|
||||
Key2Str10=
|
||||
Key2Str11=
|
||||
Key2Str12=
|
||||
Key2Str13=
|
||||
Key2Str14=
|
||||
Key2Str15=
|
||||
Key2Str16=
|
||||
Key2Str2=
|
||||
Key2Str3=
|
||||
Key2Str4=
|
||||
Key2Str5=
|
||||
Key2Str6=
|
||||
Key2Str7=
|
||||
Key2Str8=
|
||||
Key2Str9=
|
||||
Key2Type=0
|
||||
Key3Str=
|
||||
Key3Str1=
|
||||
Key3Str10=
|
||||
Key3Str11=
|
||||
Key3Str12=
|
||||
Key3Str13=
|
||||
Key3Str14=
|
||||
Key3Str15=
|
||||
Key3Str16=
|
||||
Key3Str2=
|
||||
Key3Str3=
|
||||
Key3Str4=
|
||||
Key3Str5=
|
||||
Key3Str6=
|
||||
Key3Str7=
|
||||
Key3Str8=
|
||||
Key3Str9=
|
||||
Key3Type=0
|
||||
Key4Str=
|
||||
Key4Str1=
|
||||
Key4Str10=
|
||||
Key4Str11=
|
||||
Key4Str12=
|
||||
Key4Str13=
|
||||
Key4Str14=
|
||||
Key4Str15=
|
||||
Key4Str16=
|
||||
Key4Str2=
|
||||
Key4Str3=
|
||||
Key4Str4=
|
||||
Key4Str5=
|
||||
Key4Str6=
|
||||
Key4Str7=
|
||||
Key4Str8=
|
||||
Key4Str9=
|
||||
Key4Type=0
|
||||
LinkTestSupport=0
|
||||
MACRepeaterEn=
|
||||
MACRepeaterOuiMode=2
|
||||
MeshAuthMode=
|
||||
MeshAutoLink=0
|
||||
MeshDefaultkey=0
|
||||
MeshEncrypType=
|
||||
MeshId=
|
||||
MeshWEPKEY=
|
||||
MeshWPAKEY=
|
||||
MUTxRxEnable=0
|
||||
NoForwarding=0
|
||||
NoForwardingBTNBSSID=0
|
||||
own_ip_addr=192.168.1.1
|
||||
|
||||
PcieAspm=0
|
||||
PERCENTAGEenable=0
|
||||
PhyRateLimit=0
|
||||
PMFMFPC=1
|
||||
PMFMFPR=0
|
||||
PMFSHA256=0
|
||||
PMKCachePeriod=10
|
||||
PowerUpCckOfdm=0:0:0:0:0:0:0
|
||||
PowerUpHT20=0:0:0:0:0:0:0
|
||||
PowerUpHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT160=0:0:0:0:0:0:0
|
||||
PowerUpVHT20=0:0:0:0:0:0:0
|
||||
PowerUpVHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT80=0:0:0:0:0:0:0
|
||||
PreAntSwitch=
|
||||
PreAuth=0
|
||||
PreAuthifname=br-lan
|
||||
RadioLinkSelection=0
|
||||
RadioOn=1
|
||||
RADIUS_Acct_Key=
|
||||
RADIUS_Acct_Port=1813
|
||||
RADIUS_Acct_Server=
|
||||
RADIUS_Key1=
|
||||
RADIUS_Key10=
|
||||
RADIUS_Key11=
|
||||
RADIUS_Key12=
|
||||
RADIUS_Key13=
|
||||
RADIUS_Key14=
|
||||
RADIUS_Key15=
|
||||
RADIUS_Key16=
|
||||
RADIUS_Key2=
|
||||
RADIUS_Key3=
|
||||
RADIUS_Key4=
|
||||
RADIUS_Key5=
|
||||
RADIUS_Key6=
|
||||
RADIUS_Key7=
|
||||
RADIUS_Key8=
|
||||
RADIUS_Key9=
|
||||
RADIUS_Port=1812
|
||||
RADIUS_Server=0
|
||||
RDRegion=
|
||||
RED_Enable=1
|
||||
RekeyInterval=3600
|
||||
RekeyMethod=DISABLE
|
||||
RRMEnable=0
|
||||
RTSThreshold=2347
|
||||
session_timeout_interval=0
|
||||
ShortSlot=1
|
||||
SKUenable=0
|
||||
SSID=
|
||||
SSID1=MTK_AP3
|
||||
SSID10=
|
||||
SSID11=
|
||||
SSID12=
|
||||
SSID13=
|
||||
SSID14=
|
||||
SSID15=
|
||||
SSID16=
|
||||
SSID2=
|
||||
SSID3=
|
||||
SSID4=
|
||||
SSID5=
|
||||
SSID6=
|
||||
SSID7=
|
||||
SSID8=
|
||||
SSID9=
|
||||
StationKeepAlive=0
|
||||
StreamMode=0
|
||||
StreamModeMac0=
|
||||
StreamModeMac1=
|
||||
StreamModeMac2=
|
||||
StreamModeMac3=
|
||||
TGnWifiTest=0
|
||||
ThermalRecal=0
|
||||
TxBurst=1
|
||||
TxPower=100
|
||||
TxPreamble=1
|
||||
VHT_BW=1
|
||||
VHT_BW_SIGNAL=0
|
||||
VHT_LDPC=1
|
||||
VHT_Sec80_Channel=0
|
||||
VHT_SGI=1
|
||||
VHT_STBC=1
|
||||
VLANID=0
|
||||
VLANPriority=0
|
||||
VLANTag=0
|
||||
VOW_Airtime_Ctrl_En=
|
||||
VOW_Airtime_Fairness_En=1
|
||||
VOW_BW_Ctrl=0
|
||||
VOW_Group_Backlog=
|
||||
VOW_Group_DWRR_Max_Wait_Time=
|
||||
VOW_Group_DWRR_Quantum=
|
||||
VOW_Group_Max_Airtime_Bucket_Size=
|
||||
VOW_Group_Max_Rate=
|
||||
VOW_Group_Max_Rate_Bucket_Size=
|
||||
VOW_Group_Max_Ratio=
|
||||
VOW_Group_Max_Wait_Time=
|
||||
VOW_Group_Min_Airtime_Bucket_Size=
|
||||
VOW_Group_Min_Rate=
|
||||
VOW_Group_Min_Rate_Bucket_Size=
|
||||
VOW_Group_Min_Ratio=
|
||||
VOW_Rate_Ctrl_En=
|
||||
VOW_Refill_Period=
|
||||
VOW_RX_En=1
|
||||
VOW_Sta_BE_DWRR_Quantum=
|
||||
VOW_Sta_BK_DWRR_Quantum=
|
||||
VOW_Sta_DWRR_Max_Wait_Time=
|
||||
VOW_Sta_VI_DWRR_Quantum=
|
||||
VOW_Sta_VO_DWRR_Quantum=
|
||||
VOW_WATF_Enable=
|
||||
VOW_WATF_MAC_LV0=
|
||||
VOW_WATF_MAC_LV1=
|
||||
VOW_WATF_MAC_LV2=
|
||||
VOW_WATF_MAC_LV3=
|
||||
VOW_WATF_Q_LV0=
|
||||
VOW_WATF_Q_LV1=
|
||||
VOW_WATF_Q_LV2=
|
||||
VOW_WATF_Q_LV3=
|
||||
VOW_WMM_Search_Rule_Band0=
|
||||
VOW_WMM_Search_Rule_Band1=
|
||||
WapiAsCertPath=
|
||||
WapiAsIpAddr=
|
||||
WapiAsPort=
|
||||
Wapiifname=
|
||||
WapiPsk1=
|
||||
WapiPsk10=
|
||||
WapiPsk11=
|
||||
WapiPsk12=
|
||||
WapiPsk13=
|
||||
WapiPsk14=
|
||||
WapiPsk15=
|
||||
WapiPsk16=
|
||||
WapiPsk2=
|
||||
WapiPsk3=
|
||||
WapiPsk4=
|
||||
WapiPsk5=
|
||||
WapiPsk6=
|
||||
WapiPsk7=
|
||||
WapiPsk8=
|
||||
WapiPsk9=
|
||||
WapiPskType=
|
||||
WapiUserCertPath=
|
||||
WCNTest=0
|
||||
Wds0Key=
|
||||
Wds1Key=
|
||||
Wds2Key=
|
||||
Wds3Key=
|
||||
WdsEnable=0
|
||||
WdsEncrypType=NONE
|
||||
WdsList=
|
||||
WdsPhyMode=0
|
||||
WHNAT=1
|
||||
WiFiTest=0
|
||||
WirelessMode=14
|
||||
WmmCapable=1
|
||||
WPAPSK=
|
||||
WPAPSK1=12345678
|
||||
WPAPSK10=
|
||||
WPAPSK11=
|
||||
WPAPSK12=
|
||||
WPAPSK13=
|
||||
WPAPSK14=
|
||||
WPAPSK15=
|
||||
WPAPSK16=
|
||||
WPAPSK2=
|
||||
WPAPSK3=
|
||||
WPAPSK4=
|
||||
WPAPSK5=
|
||||
WPAPSK6=
|
||||
WPAPSK7=
|
||||
WPAPSK8=
|
||||
WPAPSK9=
|
||||
WscConfMode=0
|
||||
WscConfStatus=2
|
||||
WEP1Type1=0
|
||||
WEP2Type1=0
|
||||
WEP3Type1=0
|
||||
WEP4Type1=0
|
||||
WPSRadio=0
|
Binary file not shown.
@ -1,412 +0,0 @@
|
||||
#The word of "Default" must not be removed
|
||||
Default
|
||||
AccessControlList0=
|
||||
AccessControlList1=
|
||||
AccessControlList10=
|
||||
AccessControlList11=
|
||||
AccessControlList12=
|
||||
AccessControlList13=
|
||||
AccessControlList14=
|
||||
AccessControlList15=
|
||||
AccessControlList2=
|
||||
AccessControlList3=
|
||||
AccessControlList4=
|
||||
AccessControlList5=
|
||||
AccessControlList6=
|
||||
AccessControlList7=
|
||||
AccessControlList8=
|
||||
AccessControlList9=
|
||||
AccessPolicy0=0
|
||||
AccessPolicy1=0
|
||||
AccessPolicy10=0
|
||||
AccessPolicy11=0
|
||||
AccessPolicy12=0
|
||||
AccessPolicy13=0
|
||||
AccessPolicy14=0
|
||||
AccessPolicy15=0
|
||||
AccessPolicy2=0
|
||||
AccessPolicy3=0
|
||||
AccessPolicy4=0
|
||||
AccessPolicy5=0
|
||||
AccessPolicy6=0
|
||||
AccessPolicy7=0
|
||||
AccessPolicy8=0
|
||||
AccessPolicy9=0
|
||||
AckPolicy=0;0;0;0
|
||||
APACM=0;0;0;0
|
||||
APAifsn=3;7;1;1
|
||||
ApCliAuthMode=
|
||||
ApCliBssid=
|
||||
ApCliDefaultKeyID=
|
||||
ApCliEnable=
|
||||
ApCliEncrypType=
|
||||
ApCliKey1Str=
|
||||
ApCliKey1Str1=
|
||||
ApCliKey1Type=
|
||||
ApCliKey2Str=
|
||||
ApCliKey2Str1=
|
||||
ApCliKey2Type=
|
||||
ApCliKey3Str=
|
||||
ApCliKey3Str1=
|
||||
ApCliKey3Type=
|
||||
ApCliKey4Str=
|
||||
ApCliKey4Str1=
|
||||
ApCliKey4Type=
|
||||
ApCliSsid=
|
||||
ApCliWirelessMode=
|
||||
ApCliWPAPSK=
|
||||
ApCliWPAPSK1=
|
||||
APCwmax=6;10;4;3
|
||||
APCwmin=4;4;3;2
|
||||
APSDCapable=1
|
||||
APTxop=0;0;94;47
|
||||
AuthMode=OPEN
|
||||
AutoChannelSelect=3
|
||||
AutoChannelSkipList=
|
||||
AutoProvisionEn=0
|
||||
BandSteering=0
|
||||
BasicRate=15
|
||||
BeaconPeriod=100
|
||||
BFBACKOFFenable=0
|
||||
BgndScanSkipCh=
|
||||
BGProtection=0
|
||||
BndStrgBssIdx=
|
||||
BSSACM=0;0;0;0
|
||||
BSSAifsn=3;7;2;2
|
||||
BSSCwmax=10;10;4;3
|
||||
BSSCwmin=4;4;3;2
|
||||
BssidNum=1
|
||||
BSSTxop=0;0;94;47
|
||||
BW_Enable=0
|
||||
BW_Guarantee_Rate=
|
||||
BW_Maximum_Rate=
|
||||
BW_Priority=
|
||||
BW_Root=0
|
||||
CalCacheApply=0
|
||||
CarrierDetect=0
|
||||
Channel=0
|
||||
ChannelGrp=
|
||||
CountryCode=US
|
||||
CountryRegion=5
|
||||
CountryRegionABand=7
|
||||
CP_SUPPORT=2
|
||||
CSPeriod=6
|
||||
DBDC_MODE=0
|
||||
DebugFlags=0
|
||||
DefaultKeyID=1
|
||||
DfsCalibration=0
|
||||
DfsEnable=0
|
||||
DfsFalseAlarmPrevent=1
|
||||
DfsZeroWait=0
|
||||
DfsZeroWaitCacTime=255
|
||||
DisableOLBC=0
|
||||
DtimPeriod=1
|
||||
E2pAccessMode=2
|
||||
EAPifname=br-lan
|
||||
EDCCAEnable=1
|
||||
EncrypType=NONE
|
||||
EthConvertMode=dongle
|
||||
EtherTrafficBand=0
|
||||
Ethifname=
|
||||
ETxBfEnCond=1
|
||||
FineAGC=0
|
||||
FixedTxMode=
|
||||
ForceRoamSupport=
|
||||
FragThreshold=2346
|
||||
FreqDelta=0
|
||||
FtSupport=0
|
||||
GreenAP=1
|
||||
G_BAND_256QAM=1
|
||||
HideSSID=0
|
||||
HT_AMSDU=1
|
||||
HT_AutoBA=1
|
||||
HT_BADecline=0
|
||||
HT_BAWinSize=64
|
||||
HT_BSSCoexistence=1
|
||||
HT_BW=1
|
||||
HT_DisallowTKIP=1
|
||||
HT_EXTCHA=1
|
||||
HT_GI=1
|
||||
HT_HTC=1
|
||||
HT_LDPC=1
|
||||
HT_LinkAdapt=0
|
||||
HT_MCS=33
|
||||
HT_MpduDensity=5
|
||||
HT_OpMode=0
|
||||
HT_PROTECT=1
|
||||
HT_RDG=0
|
||||
HT_RxStream=4
|
||||
HT_STBC=1
|
||||
HT_TxStream=4
|
||||
IcapMode=0
|
||||
idle_timeout_interval=0
|
||||
IEEE80211H=1
|
||||
IEEE8021X=0
|
||||
IgmpSnEnable=0
|
||||
ITxBfEn=1
|
||||
Key1Str=
|
||||
Key1Str1=
|
||||
Key1Str10=
|
||||
Key1Str11=
|
||||
Key1Str12=
|
||||
Key1Str13=
|
||||
Key1Str14=
|
||||
Key1Str15=
|
||||
Key1Str16=
|
||||
Key1Str2=
|
||||
Key1Str3=
|
||||
Key1Str4=
|
||||
Key1Str5=
|
||||
Key1Str6=
|
||||
Key1Str7=
|
||||
Key1Str8=
|
||||
Key1Str9=
|
||||
Key1Type=0
|
||||
Key2Str=
|
||||
Key2Str1=
|
||||
Key2Str10=
|
||||
Key2Str11=
|
||||
Key2Str12=
|
||||
Key2Str13=
|
||||
Key2Str14=
|
||||
Key2Str15=
|
||||
Key2Str16=
|
||||
Key2Str2=
|
||||
Key2Str3=
|
||||
Key2Str4=
|
||||
Key2Str5=
|
||||
Key2Str6=
|
||||
Key2Str7=
|
||||
Key2Str8=
|
||||
Key2Str9=
|
||||
Key2Type=0
|
||||
Key3Str=
|
||||
Key3Str1=
|
||||
Key3Str10=
|
||||
Key3Str11=
|
||||
Key3Str12=
|
||||
Key3Str13=
|
||||
Key3Str14=
|
||||
Key3Str15=
|
||||
Key3Str16=
|
||||
Key3Str2=
|
||||
Key3Str3=
|
||||
Key3Str4=
|
||||
Key3Str5=
|
||||
Key3Str6=
|
||||
Key3Str7=
|
||||
Key3Str8=
|
||||
Key3Str9=
|
||||
Key3Type=0
|
||||
Key4Str=
|
||||
Key4Str1=
|
||||
Key4Str10=
|
||||
Key4Str11=
|
||||
Key4Str12=
|
||||
Key4Str13=
|
||||
Key4Str14=
|
||||
Key4Str15=
|
||||
Key4Str16=
|
||||
Key4Str2=
|
||||
Key4Str3=
|
||||
Key4Str4=
|
||||
Key4Str5=
|
||||
Key4Str6=
|
||||
Key4Str7=
|
||||
Key4Str8=
|
||||
Key4Str9=
|
||||
Key4Type=0
|
||||
LinkTestSupport=0
|
||||
MACRepeaterEn=
|
||||
MACRepeaterOuiMode=2
|
||||
MeshAuthMode=
|
||||
MeshAutoLink=0
|
||||
MeshDefaultkey=0
|
||||
MeshEncrypType=
|
||||
MeshId=
|
||||
MeshWEPKEY=
|
||||
MeshWPAKEY=
|
||||
MUTxRxEnable=0
|
||||
NoForwarding=0
|
||||
NoForwardingBTNBSSID=0
|
||||
own_ip_addr=192.168.1.1
|
||||
PcieAspm=0
|
||||
PERCENTAGEenable=0
|
||||
PhyRateLimit=0
|
||||
PMFMFPC=1
|
||||
PMFMFPR=0
|
||||
PMFSHA256=0
|
||||
PMKCachePeriod=10
|
||||
PowerUpCckOfdm=0:0:0:0:0:0:0
|
||||
PowerUpHT20=0:0:0:0:0:0:0
|
||||
PowerUpHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT160=0:0:0:0:0:0:0
|
||||
PowerUpVHT20=0:0:0:0:0:0:0
|
||||
PowerUpVHT40=0:0:0:0:0:0:0
|
||||
PowerUpVHT80=0:0:0:0:0:0:0
|
||||
PreAntSwitch=
|
||||
PreAuth=0
|
||||
PreAuthifname=br-lan
|
||||
RadioLinkSelection=0
|
||||
RadioOn=1
|
||||
RADIUS_Acct_Key=
|
||||
RADIUS_Acct_Port=1813
|
||||
RADIUS_Acct_Server=
|
||||
RADIUS_Key1=
|
||||
RADIUS_Key10=
|
||||
RADIUS_Key11=
|
||||
RADIUS_Key12=
|
||||
RADIUS_Key13=
|
||||
RADIUS_Key14=
|
||||
RADIUS_Key15=
|
||||
RADIUS_Key16=
|
||||
RADIUS_Key2=
|
||||
RADIUS_Key3=
|
||||
RADIUS_Key4=
|
||||
RADIUS_Key5=
|
||||
RADIUS_Key6=
|
||||
RADIUS_Key7=
|
||||
RADIUS_Key8=
|
||||
RADIUS_Key9=
|
||||
RADIUS_Port=1812
|
||||
RADIUS_Server=0
|
||||
RDRegion=
|
||||
RED_Enable=1
|
||||
RekeyInterval=3600
|
||||
RekeyMethod=DISABLE
|
||||
RRMEnable=0
|
||||
RTSThreshold=2347
|
||||
session_timeout_interval=0
|
||||
ShortSlot=1
|
||||
SKUenable=0
|
||||
SSID=
|
||||
SSID1=WITHUSP-2.4
|
||||
SSID10=
|
||||
SSID11=
|
||||
SSID12=
|
||||
SSID13=
|
||||
SSID14=
|
||||
SSID15=
|
||||
SSID16=
|
||||
SSID2=
|
||||
SSID3=
|
||||
SSID4=
|
||||
SSID5=
|
||||
SSID6=
|
||||
SSID7=
|
||||
SSID8=
|
||||
SSID9=
|
||||
StationKeepAlive=0
|
||||
StreamMode=0
|
||||
StreamModeMac0=
|
||||
StreamModeMac1=
|
||||
StreamModeMac2=
|
||||
StreamModeMac3=
|
||||
TGnWifiTest=0
|
||||
ThermalRecal=0
|
||||
CCKTxStream=4
|
||||
TxBurst=1
|
||||
TxPower=100
|
||||
TxPreamble=1
|
||||
VHT_BW=0
|
||||
VHT_BW_SIGNAL=0
|
||||
VHT_LDPC=1
|
||||
VHT_Sec80_Channel=0
|
||||
VHT_SGI=1
|
||||
VHT_STBC=1
|
||||
VLANID=0
|
||||
VLANPriority=0
|
||||
VLANTag=0
|
||||
VOW_Airtime_Ctrl_En=0
|
||||
VOW_Airtime_Fairness_En=1
|
||||
VOW_BW_Ctrl=0
|
||||
VOW_Group_Backlog=
|
||||
VOW_Group_DWRR_Max_Wait_Time=
|
||||
VOW_Group_DWRR_Quantum=
|
||||
VOW_Group_Max_Airtime_Bucket_Size=
|
||||
VOW_Group_Max_Rate=
|
||||
VOW_Group_Max_Rate_Bucket_Size=
|
||||
VOW_Group_Max_Ratio=
|
||||
VOW_Group_Max_Wait_Time=
|
||||
VOW_Group_Min_Airtime_Bucket_Size=
|
||||
VOW_Group_Min_Rate=
|
||||
VOW_Group_Min_Rate_Bucket_Size=
|
||||
VOW_Group_Min_Ratio=
|
||||
VOW_Rate_Ctrl_En=0
|
||||
VOW_Refill_Period=
|
||||
VOW_RX_En=1
|
||||
VOW_Sta_BE_DWRR_Quantum=
|
||||
VOW_Sta_BK_DWRR_Quantum=
|
||||
VOW_Sta_DWRR_Max_Wait_Time=
|
||||
VOW_Sta_VI_DWRR_Quantum=
|
||||
VOW_Sta_VO_DWRR_Quantum=
|
||||
VOW_WATF_Enable=
|
||||
VOW_WATF_MAC_LV0=
|
||||
VOW_WATF_MAC_LV1=
|
||||
VOW_WATF_MAC_LV2=
|
||||
VOW_WATF_MAC_LV3=
|
||||
VOW_WATF_Q_LV0=
|
||||
VOW_WATF_Q_LV1=
|
||||
VOW_WATF_Q_LV2=
|
||||
VOW_WATF_Q_LV3=
|
||||
VOW_WMM_Search_Rule_Band0=
|
||||
VOW_WMM_Search_Rule_Band1=
|
||||
WapiAsCertPath=
|
||||
WapiAsIpAddr=
|
||||
WapiAsPort=
|
||||
Wapiifname=
|
||||
WapiPsk1=
|
||||
WapiPsk10=
|
||||
WapiPsk11=
|
||||
WapiPsk12=
|
||||
WapiPsk13=
|
||||
WapiPsk14=
|
||||
WapiPsk15=
|
||||
WapiPsk16=
|
||||
WapiPsk2=
|
||||
WapiPsk3=
|
||||
WapiPsk4=
|
||||
WapiPsk5=
|
||||
WapiPsk6=
|
||||
WapiPsk7=
|
||||
WapiPsk8=
|
||||
WapiPsk9=
|
||||
WapiPskType=
|
||||
WapiUserCertPath=
|
||||
WCNTest=0
|
||||
Wds0Key=
|
||||
Wds1Key=
|
||||
Wds2Key=
|
||||
Wds3Key=
|
||||
WdsEnable=0
|
||||
WdsEncrypType=NONE
|
||||
WdsList=
|
||||
WdsPhyMode=0
|
||||
WHNAT=0
|
||||
WiFiTest=0
|
||||
WirelessMode=9
|
||||
WmmCapable=1
|
||||
WPAPSK=
|
||||
WPAPSK1=12345678
|
||||
WPAPSK10=
|
||||
WPAPSK11=
|
||||
WPAPSK12=
|
||||
WPAPSK13=
|
||||
WPAPSK14=
|
||||
WPAPSK15=
|
||||
WPAPSK16=
|
||||
WPAPSK2=
|
||||
WPAPSK3=
|
||||
WPAPSK4=
|
||||
WPAPSK5=
|
||||
WPAPSK6=
|
||||
WPAPSK7=
|
||||
WPAPSK8=
|
||||
WPAPSK9=
|
||||
WscConfMode=0
|
||||
WscConfStatus=2
|
||||
WEP1Type1=0
|
||||
WEP2Type1=0
|
||||
WEP3Type1=0
|
||||
WEP4Type1=0
|
||||
WPSRadio=0
|
@ -1,98 +0,0 @@
|
||||
--This file is created for check some deamons like miniupnpd,8021xd...
|
||||
|
||||
local mtkwifi = require("mtkwifi")
|
||||
local devs = mtkwifi.get_all_devs()
|
||||
local nixio = require("nixio")
|
||||
|
||||
function miniupnpd_chk(devname,vif,enable)
|
||||
local WAN_IF=mtkwifi.__trim(mtkwifi.read_pipe("uci -q get network.wan.ifname"))
|
||||
|
||||
os.execute("rm -rf /etc/miniupnpd.conf")
|
||||
os.execute("iptables -t nat -F MINIUPNPD 1>/dev/null 2>&1")
|
||||
--rmeoving the rule to MINIUPNPD
|
||||
os.execute("iptables-t nat -D PREROUTING -i "..WAN_IF.." -j MINIUPNPD 1>/dev/null 2>&1")
|
||||
os.execute("iptables-t nat -X MINIUPNPD 1>/dev/null 2>&1")
|
||||
|
||||
--removing the MINIUPNPD chain for filter
|
||||
os.execute("iptables -t filter -F MINIUPNPD 1>/dev/null 2>&1")
|
||||
--adding the rule to MINIUPNPD
|
||||
|
||||
os.execute("iptables -t filter -D FORWARD -i "..WAN_IF.." ! -o "..WAN_IF.." -j MINIUPNPD 1>/dev/null 2>&1")
|
||||
os.execute("iptables -t filter -X MINIUPNPD 1>/dev/null 2>&1")
|
||||
|
||||
os.execute("iptables -t nat -N MINIUPNPD")
|
||||
os.execute("iptables -t nat -A PREROUTING -i "..WAN_IF.." -j MINIUPNPD")
|
||||
os.execute("iptables -t filter -N MINIUPNPD")
|
||||
os.execute("iptables -t filter -A FORWARD -i "..WAN_IF.." ! -o "..WAN_IF.." -j MINIUPNPD")
|
||||
|
||||
if mtkwifi.exists("/tmp/run/miniupnpd."..vif) then
|
||||
os.execute("cat /tmp/run/miniupnpd."..vif.." | xargs kill -9")
|
||||
end
|
||||
|
||||
if enable then
|
||||
local profile = mtkwifi.search_dev_and_profile()[devname]
|
||||
local cfgs = mtkwifi.load_profile(profile)
|
||||
local ssid_index = devs[devname]["vifs"][vif].vifidx
|
||||
local wsc_conf_mode = ""
|
||||
local PORT_NUM = 7777+(string.byte(vif, -1)+string.byte(vif, -2))
|
||||
local LAN_IPADDR = mtkwifi.__trim(mtkwifi.read_pipe("uci -q get network.lan.ipaddr"))
|
||||
local LAN_MASK = mtkwifi.__trim(mtkwifi.read_pipe("uci -q get network.lan.netmask"))
|
||||
local port = 6352 + (string.byte(vif, -1)+string.byte(vif, -2))
|
||||
LAN_IPADDR = LAN_IPADDR.."/"..LAN_MASK
|
||||
wsc_conf_mode = mtkwifi.token_get(cfgs["WscConfMode"], ssid_index, "")
|
||||
|
||||
local file = io.open("/etc/miniupnpd.conf", "w")
|
||||
if nil == file then
|
||||
nixio.syslog("debug","open file /etc/miniupnpd.conf fail")
|
||||
end
|
||||
|
||||
file:write("ext_ifname=",WAN_IF,'\n','\n',
|
||||
"listening_ip=",LAN_IPADDR,'\n','\n',
|
||||
"port=",port,'\n','\n',
|
||||
"bitrate_up=800000000",'\n',
|
||||
"bitrate_down=800000000",'\n','\n',
|
||||
"secure_mode=no",'\n','\n',
|
||||
"system_uptime=yes",'\n','\n',
|
||||
"notify_interval=30",'\n','\n',
|
||||
"uuid=68555350-3352-3883-2883-335030522880",'\n','\n',
|
||||
"serial=12345678",'\n','\n',
|
||||
"model_number=1",'\n','\n',
|
||||
"enable_upnp=no",'\n','\n')
|
||||
file:close()
|
||||
|
||||
if wsc_conf_mode ~= "" and wsc_conf_mode ~= "0" then
|
||||
os.execute("miniupnpd -m 1 -I "..vif.." -P /var/run/miniupnpd."..vif.." -G -i "..WAN_IF.." -a "..LAN_IPADDR.." -n "..PORT_NUM)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function d8021xd_chk(devname,prefix,main_ifname,enable)
|
||||
local profile = mtkwifi.search_dev_and_profile()[devname]
|
||||
local cfgs = mtkwifi.load_profile(profile)
|
||||
local auth_mode = cfgs.AuthMode
|
||||
local ieee8021x = cfgs.IEEE8021X
|
||||
local pat_auth_mode = {"WPA$", "WPA;", "WPA2$", "WPA2;", "WPA1WPA2$", "WPA1WPA2;"}
|
||||
local pat_ieee8021x = {"1$", "1;"}
|
||||
local apd_en = false
|
||||
if mtkwifi.exists("/tmp/run/8021xd_"..main_ifname..".pid") then
|
||||
os.execute("cat /tmp/run/8021xd_"..main_ifname..".pid | xargs kill -9")
|
||||
os.execute("rm /tmp/run/8021xd_"..main_ifname..".pid")
|
||||
end
|
||||
if enable then
|
||||
for _, pat in ipairs(pat_auth_mode) do
|
||||
if string.find(auth_mode, pat) then
|
||||
apd_en = true
|
||||
end
|
||||
end
|
||||
|
||||
for _, pat in ipairs(pat_ieee8021x) do
|
||||
if string.find(ieee8021x, pat) then
|
||||
apd_en = true
|
||||
end
|
||||
end
|
||||
|
||||
if apd_en then
|
||||
os.execute("8021xd -p "..prefix.. " -i "..main_ifname)
|
||||
end
|
||||
end
|
||||
end
|
@ -1,19 +0,0 @@
|
||||
diff -urN a/mt_wifi/mt_wifi/embedded/common/cmm_info.c b/mt_wifi/mt_wifi/embedded/common/cmm_info.c
|
||||
--- a/mt_wifi/embedded/common/cmm_info.c 2018-11-01 10:03:25.663408611 +0000
|
||||
+++ b/mt_wifi/embedded/common/cmm_info.c 2018-11-01 10:09:14.991395503 +0000
|
||||
@@ -3200,6 +3200,15 @@
|
||||
else
|
||||
need_send = FALSE;
|
||||
}
|
||||
+#if 1
|
||||
+ /* [2018.11.01 hepark] To fill 5G information */
|
||||
+ else if (!strcmp(wrq->ifr_ifrn.ifrn_name, "rai0")) {
|
||||
+ if (!memcmp(pEntry->wdev->if_dev->name, "rax", 3))
|
||||
+ need_send = FALSE;
|
||||
+ else
|
||||
+ need_send = TRUE;
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
if (IS_ENTRY_CLIENT(pEntry) && (pEntry->Sst == SST_ASSOC) && (need_send == TRUE)) {
|
||||
pDst = &pMacTab->Entry[pMacTab->Num];
|
@ -1,167 +0,0 @@
|
||||
diff -urN a/mt_wifi/embedded/common/ee_flash.c b/mt_wifi/embedded/common/ee_flash.c
|
||||
--- a/mt_wifi/embedded/common/ee_flash.c 2018-04-30 15:57:54.000000000 +0800
|
||||
+++ b/mt_wifi/embedded/common/ee_flash.c 2019-01-14 21:28:38.163721571 +0800
|
||||
@@ -111,8 +111,8 @@
|
||||
int mt_mtd_write_nm_wifi(char *name, loff_t to, size_t len, const u_char *buf);
|
||||
int mt_mtd_read_nm_wifi(char *name, loff_t from, size_t len, u_char *buf);
|
||||
|
||||
-#define flash_read(_ctrl, _ptr, _offset, _len) mt_mtd_read_nm_wifi("Factory", _offset, (size_t)_len, _ptr)
|
||||
-#define flash_write(_ctrl, _ptr, _offset, _len) mt_mtd_write_nm_wifi("Factory", _offset, (size_t)_len, _ptr)
|
||||
+#define flash_read(_ctrl, _ptr, _offset, _len) mt_mtd_read_nm_wifi("factory", _offset&0xFFFF, (size_t)_len, _ptr)
|
||||
+#define flash_write(_ctrl, _ptr, _offset, _len) mt_mtd_write_nm_wifi("factory", _offset&0xFFFF, (size_t)_len, _ptr)
|
||||
|
||||
#else
|
||||
/*
|
||||
@@ -122,8 +122,8 @@
|
||||
extern int ra_mtd_write_nm(char *name, loff_t to, size_t len, const u_char *buf);
|
||||
extern int ra_mtd_read_nm(char *name, loff_t from, size_t len, u_char *buf);
|
||||
|
||||
-#define flash_read(_ctrl, _ptr, _offset, _len) ra_mtd_read_nm("Factory", _offset, (size_t)_len, _ptr)
|
||||
-#define flash_write(_ctrl, _ptr, _offset, _len) ra_mtd_write_nm("Factory", _offset, (size_t)_len, _ptr)
|
||||
+#define flash_read(_ctrl, _ptr, _offset, _len) ra_mtd_read_nm("factory", _offset&0xFFFF, (size_t)_len, _ptr)
|
||||
+#define flash_write(_ctrl, _ptr, _offset, _len) ra_mtd_write_nm("factory", _offset&0xFFFF, (size_t)_len, _ptr)
|
||||
|
||||
#endif /*CONFIG_WIFI_MTD*/
|
||||
#endif /*RA_MTD_RW_BY_NUM*/
|
||||
diff -urN a/mt_wifi/embedded/common/eeprom.c b/mt_wifi/embedded/common/eeprom.c
|
||||
--- a/mt_wifi/embedded/common/eeprom.c 2018-04-30 15:57:54.000000000 +0800
|
||||
+++ b/mt_wifi/embedded/common/eeprom.c 2019-04-19 17:05:48.336239756 +0800
|
||||
@@ -646,7 +646,7 @@
|
||||
efuse_probe(pAd);
|
||||
#endif /* RTMP_EFUSE_SUPPORT */
|
||||
|
||||
- /* rtmp_eeprom_of_platform(pAd); //for MT7615, only use E2pAccessMode parameter to get eeprom type */
|
||||
+ rtmp_eeprom_of_platform(pAd); //for MT7615, only use E2pAccessMode parameter to get eeprom type */
|
||||
|
||||
if (forceMode != E2P_NONE && forceMode < NUM_OF_E2P_MODE) {
|
||||
e2p_type = forceMode;
|
||||
diff -urN a/mt_wifi/os/linux/mt_wifi_mtd.c b/mt_wifi/os/linux/mt_wifi_mtd.c
|
||||
--- a/mt_wifi/os/linux/mt_wifi_mtd.c 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ b/mt_wifi/os/linux/mt_wifi_mtd.c 2019-01-06 17:17:32.771446000 +0800
|
||||
@@ -0,0 +1,113 @@
|
||||
+/*
|
||||
+ ***************************************************************************
|
||||
+ * MediaTek Inc.
|
||||
+ *
|
||||
+ * All rights reserved. source code is an unpublished work and the
|
||||
+ * use of a copyright notice does not imply otherwise. This source code
|
||||
+ * contains confidential trade secret material of MediaTek. Any attemp
|
||||
+ * or participation in deciphering, decoding, reverse engineering or in any
|
||||
+ * way altering the source code is stricitly prohibited, unless the prior
|
||||
+ * written consent of MediaTek, Inc. is obtained.
|
||||
+ ***************************************************************************
|
||||
+ Module Name:
|
||||
+ mt_wifi_mtd.c
|
||||
+
|
||||
+*/
|
||||
+
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#include <linux/mtd/map.h>
|
||||
+#include <linux/mtd/concat.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#if defined (CONFIG_MIPS)
|
||||
+#include <asm/addrspace.h>
|
||||
+#endif
|
||||
+
|
||||
+int mt_mtd_write_nm_wifi(char *name, loff_t to, size_t len, const u_char *buf)
|
||||
+{
|
||||
+ int ret = -1;
|
||||
+ size_t rdlen, wrlen;
|
||||
+ struct mtd_info *mtd;
|
||||
+ struct erase_info ei;
|
||||
+ u_char *bak = NULL;
|
||||
+
|
||||
+ mtd = get_mtd_device_nm(name);
|
||||
+ if (IS_ERR(mtd))
|
||||
+ return -1;
|
||||
+
|
||||
+ if (len > mtd->erasesize) {
|
||||
+ put_mtd_device(mtd);
|
||||
+ return -E2BIG;
|
||||
+ }
|
||||
+
|
||||
+ bak = kmalloc(mtd->erasesize, GFP_KERNEL);
|
||||
+ if (bak == NULL) {
|
||||
+ put_mtd_device(mtd);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ ret = mtd_read(mtd, 0, mtd->erasesize, &rdlen, bak);
|
||||
+
|
||||
+ if (ret != 0) {
|
||||
+ put_mtd_device(mtd);
|
||||
+ kfree(bak);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (rdlen != mtd->erasesize)
|
||||
+ printk("warning: ra_mtd_write: rdlen is not equal to erasesize\n");
|
||||
+
|
||||
+ memcpy(bak + to, buf, len);
|
||||
+
|
||||
+ ei.mtd = mtd;
|
||||
+ ei.callback = NULL;
|
||||
+ ei.addr = 0;
|
||||
+ ei.len = mtd->erasesize;
|
||||
+ ei.priv = 0;
|
||||
+
|
||||
+ ret = mtd_erase(mtd, &ei);
|
||||
+
|
||||
+ if (ret != 0) {
|
||||
+ put_mtd_device(mtd);
|
||||
+ kfree(bak);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = mtd_write(mtd, 0, mtd->erasesize, &wrlen, bak);
|
||||
+
|
||||
+
|
||||
+
|
||||
+ put_mtd_device(mtd);
|
||||
+ kfree(bak);
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(mt_mtd_write_nm_wifi);
|
||||
+
|
||||
+
|
||||
+int mt_mtd_read_nm_wifi(char *name, loff_t from, size_t len, u_char *buf)
|
||||
+{
|
||||
+ int ret;
|
||||
+ size_t rdlen;
|
||||
+ struct mtd_info *mtd;
|
||||
+
|
||||
+ mtd = get_mtd_device_nm(name);
|
||||
+ if (IS_ERR(mtd))
|
||||
+ return -1;
|
||||
+
|
||||
+ ret = mtd_read(mtd, from, len, &rdlen, buf);
|
||||
+
|
||||
+ if (rdlen != len)
|
||||
+ printk("warning: ra_mtd_read_nm: rdlen is not equal to len\n");
|
||||
+
|
||||
+ put_mtd_device(mtd);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(mt_mtd_read_nm_wifi);
|
||||
diff -urN a/mt_wifi_ap/Makefile b/mt_wifi_ap/Makefile
|
||||
--- a/mt_wifi_ap/Makefile 2018-04-30 15:57:57.000000000 +0800
|
||||
+++ b/mt_wifi_ap/Makefile 2019-04-20 21:16:22.510780934 +0800
|
||||
@@ -678,7 +678,8 @@
|
||||
os_objs := $(SRC_DIR)/os/linux/rt_proc.o\
|
||||
$(SRC_DIR)/os/linux/rt_linux.o\
|
||||
$(SRC_DIR)/os/linux/rt_profile.o\
|
||||
- $(SRC_DIR)/os/linux/rt_main_dev.o
|
||||
+ $(SRC_DIR)/os/linux/rt_main_dev.o\
|
||||
+ $(SRC_DIR)/os/linux/mt_wifi_mtd.o
|
||||
|
||||
ifeq ($(CONFIG_WLAN_HOOK),y)
|
||||
EXTRA_CFLAGS +=-DRTMP_WLAN_HOOK_SUPPORT
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,51 +0,0 @@
|
||||
[v5.0.2.0]
|
||||
- Support MT7622D and MT7615A chip
|
||||
- Support Passpoint R2
|
||||
- Support MBO
|
||||
- Fix background scan fail
|
||||
- Fix for False Cmd timeout
|
||||
- Fix ACS busytime issue after boot up
|
||||
- Fix memory leakage after interface down/up repeatedly
|
||||
- Fix dead lock issue when hw_ctrl task is busy.
|
||||
|
||||
[v5.0.1.1]
|
||||
- Support WPS1 feature on OpenWRT OS
|
||||
- Fix DFS issue of selecting NOP channel after interface down/up
|
||||
- Avoid DFS resetting NOP list after interface is down and up
|
||||
- Fix driver and wifi_forward sync structure not sync
|
||||
- Fix MT7622 + MT7615 iPA RXSELFTEST fail (Disable RMAC before performing RXSELFTEST)
|
||||
- Fix for Aplci connection and channel setting is AP interface is down
|
||||
|
||||
[v5.0.1.0]
|
||||
- AC4300 (MT7622 + MT7615 + MT7615) AP and Repeater support
|
||||
- MT7622 2.4g 4T4R ePA/eLNA support
|
||||
- OpenWRT AC2600 support
|
||||
- MT7622 and MT7615 pre-calibration on flash mode
|
||||
- Fine tune rx delay interrupt threshold to reduce cpu loading
|
||||
- Wifi boot time improvement
|
||||
- Rate algorithm refine
|
||||
- Thermal compensation improvement
|
||||
- Fix Eapol retry for 1st connection with broadcom AP
|
||||
- 11R: Direct Intra-AP roaming Fix for Single Chip DBDC scenario
|
||||
- Fix when MACRepeaterOuiMode is 2. The OUI parsing logic is incorrect
|
||||
- Fix audio play issue on iPA mode
|
||||
|
||||
[v5.0.0.0]
|
||||
- AC2600 (MT7622 + MT7615) AP and Repeater support
|
||||
- MT7622 2.4g 4T4R 802.11n iPA/iLNA support
|
||||
- MT7615 5g 4T4R 802.11ac support
|
||||
- MT7622 Wi-Fi Warp Accelerator support for MT7615
|
||||
- Max clients for MT7622:125, MT7615:125
|
||||
- Max MBSS for MT7622:16, MT7615:16
|
||||
- Security (OPEN/WEP/WPA/WPA2/PMF)
|
||||
- 256 QAM support on 2.4g n mode
|
||||
- 802.11 k/v/r
|
||||
- UAPSD
|
||||
- WDS
|
||||
- WPS2.0
|
||||
- TxBF support
|
||||
- MU-MIMO (5G)
|
||||
- AirTime/bandwidth Fairness (ATM/VoW) support
|
||||
- Auto channel selection
|
||||
- Green AP
|
||||
|
@ -1,624 +0,0 @@
|
||||
#if defined(COMPOS_TESTMODE_WIN)
|
||||
#include "config.h"
|
||||
#else
|
||||
#include "rt_config.h"
|
||||
#endif
|
||||
|
||||
#if defined(RTMP_USB_SUPPORT) || defined(RTMP_PCI_SUPPORT) || defined(MTK_UART_SUPPORT)
|
||||
INT32 ATECheckFWROMWiFiSysOn(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
INT32 ntStatus = STATUS_SUCCESS;
|
||||
UINT32 loop = 0;
|
||||
UINT32 value = 0;
|
||||
/* Step 1 polling 0x81021250 to 0 */
|
||||
/* poll SW_SYN0 == 0 */
|
||||
loop = 0;
|
||||
|
||||
do {
|
||||
value = MtAsicGetFwSyncValue(pAd);
|
||||
|
||||
if (value == 0x0)
|
||||
break;
|
||||
|
||||
os_msec_delay(1);
|
||||
loop++;
|
||||
} while (loop <= 500);
|
||||
|
||||
if (loop > 500) {
|
||||
MTWF_LOG(DBG_CAT_FW, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s: 2. SW_SYN0 is not at init. state (SW_SYN0 = %d)\n", __func__, value));
|
||||
ntStatus = STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
/* power on WiFi SYS*/
|
||||
MTWF_LOG(DBG_CAT_FW, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s: 2. power on WiFi SYS\n", __func__));
|
||||
ntStatus = MtCmdPowerOnWiFiSys(pAd);
|
||||
|
||||
if (ntStatus)
|
||||
ntStatus = STATUS_UNSUCCESSFUL;
|
||||
|
||||
/* poll SW_SYN0 == 1*/
|
||||
loop = 0;
|
||||
|
||||
do {
|
||||
value = MtAsicGetFwSyncValue(pAd);
|
||||
|
||||
if (value == 0x1)
|
||||
break;
|
||||
|
||||
os_msec_delay(1);
|
||||
loop++;
|
||||
} while (loop <= 500);
|
||||
|
||||
if (loop > 500) {
|
||||
MTWF_LOG(DBG_CAT_FW, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s: SW_SYN0 is not at init. state (SW_SYN0 = %d)\n", __func__, value));
|
||||
ntStatus = STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
return ntStatus;
|
||||
}
|
||||
#endif
|
||||
|
||||
INT32 CheckFWROMWiFiSysOn(IN RTMP_ADAPTER *pAd)
|
||||
{
|
||||
INT32 ntStatus = STATUS_SUCCESS;
|
||||
#if defined(RTMP_USB_SUPPORT) || defined(RTMP_PCI_SUPPORT) || defined(MTK_UART_SUPPORT)
|
||||
ntStatus = ATECheckFWROMWiFiSysOn(pAd);
|
||||
#endif
|
||||
return ntStatus;
|
||||
}
|
||||
INT32 FWSwitchToROM(
|
||||
IN RTMP_ADAPTER *pAd
|
||||
)
|
||||
{
|
||||
INT32 ntStatus = STATUS_SUCCESS;
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s\n", __func__));
|
||||
#ifdef COMPOS_TESTMODE_WIN /* Linux ready in FWRAM */
|
||||
|
||||
if (pAd->FWMode == FWROM)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s: FWMode is already ROM\n", __func__));
|
||||
else if (pAd->FWMode == FWRAM)
|
||||
#endif
|
||||
{
|
||||
/* Step 1 set firmware to ROM mode */
|
||||
/* ntStatus = FirmwareCommnadRestartDownloadFW(pAd); */
|
||||
/* if(ntStatus != STATUS_SUCCESS) */
|
||||
/* { */
|
||||
/* MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR,("%s, RestartDownloadFW cmd failed\n",__FUNCTION__)); */
|
||||
/* } */
|
||||
NICRestartFirmware(pAd);
|
||||
ntStatus = CheckFWROMWiFiSysOn(pAd);
|
||||
|
||||
if (ntStatus != STATUS_SUCCESS)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, CheckFWROMWiFiSysOn failed\n", __func__));
|
||||
}
|
||||
|
||||
return ntStatus;
|
||||
}
|
||||
void LoopBack_Start(RTMP_ADAPTER *pAd, struct _LOOPBACK_SETTING *pSetting)
|
||||
{
|
||||
NTSTATUS ntStatus = STATUS_SUCCESS;
|
||||
/* UINT16 BreakCount = 0; */
|
||||
#ifdef COMPOS_TESTMODE_WIN /* TODO::Fix the strcture */
|
||||
#endif
|
||||
/* UINT32 Length = 0; */
|
||||
/* UINT32 RepeatIdx = 0; */
|
||||
UINT32 RxQ = 1;
|
||||
/* RtlCopyMemory(&pAd->LoopBackSetting, pSetting,sizeof(struct _LOOPBACK_SETTING)); */
|
||||
os_move_mem(&pAd->LbCtrl.LoopBackSetting, pSetting, sizeof(struct _LOOPBACK_SETTING));
|
||||
/* RtlZeroMemory(&pAd->LoopBackTxRaw, LOOPBACK_SIZE); */
|
||||
os_zero_mem(&pAd->LbCtrl.LoopBackTxRaw, LOOPBACK_SIZE);
|
||||
/* RtlZeroMemory(&pAd->LoopBackRxRaw, LOOPBACK_SIZE); */
|
||||
os_zero_mem(&pAd->LbCtrl.LoopBackRxRaw, LOOPBACK_SIZE);
|
||||
/* RtlZeroMemory(&pAd->LoopBackResult, sizeof(struct _LOOPBACK_RESULT)); */
|
||||
os_zero_mem(&pAd->LbCtrl.LoopBackResult, sizeof(struct _LOOPBACK_RESULT));
|
||||
|
||||
if (pSetting->StartLen < sizeof(TMAC_TXD_L)) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_WARN, ("%s startLength(0x%x) is shorter than sizeof(TMAC_TXD_L) (0x%lx)\n", __func__, pSetting->StartLen, (ULONG)sizeof(TMAC_TXD_L)));
|
||||
return;
|
||||
}
|
||||
|
||||
OS_SPIN_LOCK(&pAd->LbCtrl.LoopBackLock);
|
||||
pAd->LbCtrl.LoopBackWaitRx = FALSE;
|
||||
OS_SPIN_UNLOCK(&pAd->LbCtrl.LoopBackLock);
|
||||
pAd->LbCtrl.LoopBackRunning = TRUE;
|
||||
pAd->LbCtrl.LoopBackResult.Status = RUNNING;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s\n", __func__));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("IsDefaultPattern %d\n", pSetting->IsDefaultPattern));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RepeatTimes %u, %u\n", pSetting->RepeatTimes, pAd->LbCtrl.LoopBackSetting.RepeatTimes));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("StartLen %d\n", pSetting->StartLen));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("StopLen %d\n", pSetting->StopLen));
|
||||
pAd->LbCtrl.LoopBackDefaultPattern = (BOOLEAN)pSetting->IsDefaultPattern;
|
||||
|
||||
if (pAd->LbCtrl.DebugMode) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("In LoopBack Debug Mode\n"));
|
||||
goto ATE_LPBK_DEBUG;
|
||||
}
|
||||
|
||||
if (!pAd->LbCtrl.LoopBackUDMA) {
|
||||
ntStatus = FWSwitchToROM(pAd);
|
||||
|
||||
if (ntStatus != STATUS_SUCCESS)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, Switch to ROM failed (0x%x)\n", __func__, ntStatus));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s FWSwitchToROM\n", __func__));
|
||||
}
|
||||
|
||||
|
||||
if (!pAd->LbCtrl.LoopBackUDMA)
|
||||
MtCmdHIFLoopBackTest(pAd, 1, (UINT8)RxQ);
|
||||
|
||||
ATE_LPBK_DEBUG:
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("***************************************%s @#@# Rx[%d]***************************************\n", __func__, RxQ));
|
||||
/* pAd->LbCtrl.LoopBackTxThread = NULL; */
|
||||
/*
|
||||
* ntStatus = PsCreateSystemThread(&pAd->LbCtrl.LoopBackTxTask.hThread,
|
||||
* (ACCESS_MASK) 0L,
|
||||
* NULL,
|
||||
* NULL,
|
||||
* NULL,
|
||||
* LoopBack_TxThread,
|
||||
* pAd);
|
||||
*/
|
||||
ntStatus = RtmpOSTaskAttach(&pAd->LbCtrl.LoopBackTxTask, LoopBack_TxThread, (ULONG)&pAd->LbCtrl.LoopBackTxTask);
|
||||
|
||||
if (ntStatus != STATUS_SUCCESS)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, thread create fail\n", __func__));
|
||||
}
|
||||
void LoopBack_Stop(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
UINT32 BreakCount = 0;
|
||||
|
||||
while (pAd->LbCtrl.LoopBackWaitRx == TRUE) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, @#@#BreakCount = %d\n", __func__, BreakCount));
|
||||
|
||||
if (BreakCount > 100)
|
||||
break;
|
||||
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
RTMPusecDelay(300);
|
||||
#else
|
||||
RtmpusecDelay(300);
|
||||
#endif
|
||||
BreakCount++;
|
||||
}
|
||||
|
||||
if (RtmpOSTaskKill(&pAd->LbCtrl.LoopBackTxTask) == NDIS_STATUS_FAILURE)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("kill LoopBackTxTask task failed!\n"));
|
||||
|
||||
if (pAd->LbCtrl.LoopBackResult.Status == RUNNING) {
|
||||
pAd->LbCtrl.LoopBackResult.Status = PASS;
|
||||
pAd->LbCtrl.LoopBackResult.FailReason = NO_ERROR;
|
||||
}
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("***************************************%s @#@#***************************************\n", __func__));
|
||||
pAd->LbCtrl.LoopBackRunning = FALSE;
|
||||
|
||||
if (pAd->LbCtrl.DebugMode)
|
||||
goto ATE_LB_DEBUG_STOP;
|
||||
|
||||
|
||||
if (!pAd->LbCtrl.LoopBackUDMA)
|
||||
MtCmdHIFLoopBackTest(pAd, 0, 0);
|
||||
|
||||
ATE_LB_DEBUG_STOP:
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s,\n", __func__));
|
||||
}
|
||||
void LoopBack_Status(RTMP_ADAPTER *pAd, struct _LOOPBACK_RESULT *pResult)
|
||||
{
|
||||
os_move_mem(pResult, &pAd->LbCtrl.LoopBackResult, sizeof(struct _LOOPBACK_RESULT));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s\n", __func__));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, Status: %d\n", __func__, pAd->LbCtrl.LoopBackResult.Status));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, FailReason: %d\n", __func__, pAd->LbCtrl.LoopBackResult.FailReason));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, RxByteCount: %d\n", __func__, pAd->LbCtrl.LoopBackResult.RxByteCount));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, RxPktCount: %d\n", __func__, pAd->LbCtrl.LoopBackResult.RxPktCount));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, TxByteCount: %d\n", __func__, pAd->LbCtrl.LoopBackResult.TxByteCount));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, TxPktCount: %d\n", __func__, pAd->LbCtrl.LoopBackResult.TxPktCount));
|
||||
}
|
||||
void LoopBack_RawData(RTMP_ADAPTER *pAd, UINT32 *pLength, BOOLEAN IsTx, UCHAR *RawData)
|
||||
{
|
||||
if (*pLength > LOOPBACK_SIZE) {
|
||||
*pLength = LOOPBACK_SIZE;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, max length is %d\n", __func__, LOOPBACK_SIZE));
|
||||
}
|
||||
|
||||
if (IsTx) {
|
||||
*pLength = pAd->LbCtrl.LoopBackTxRawLen;
|
||||
/* RtlCopyMemory(RawData, &pAd->LoopBackTxRaw,*pLength); */
|
||||
os_move_mem(RawData, &pAd->LbCtrl.LoopBackTxRaw, *pLength);
|
||||
} else {
|
||||
*pLength = pAd->LbCtrl.LoopBackRxRawLen;
|
||||
/* RtlCopyMemory(RawData, &pAd->LoopBackRxRaw,*pLength); */
|
||||
os_move_mem(RawData, &pAd->LbCtrl.LoopBackRxRaw, *pLength);
|
||||
}
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, Length = 0x%x\n", __func__, *pLength));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, LoopBackRxRawLen = 0x%x\n", __func__, pAd->LbCtrl.LoopBackRxRawLen));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, LoopBackTxRawLen = 0x%x\n", __func__, pAd->LbCtrl.LoopBackTxRawLen));
|
||||
}
|
||||
void LoopBack_ExpectRx(RTMP_ADAPTER *pAd, UINT32 Length, UINT8 *pRawData)
|
||||
{
|
||||
PULONG ptr;
|
||||
UINT8 i = 0;
|
||||
|
||||
if (Length > LOOPBACK_SIZE) {
|
||||
Length = LOOPBACK_SIZE;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, max length is %d\n", __func__, LOOPBACK_SIZE));
|
||||
}
|
||||
|
||||
/* (&pAd->LbCtrl.LoopBackExpectRx, pRawData, Length); */
|
||||
os_move_mem(&pAd->LbCtrl.LoopBackExpectRx, pRawData, Length);
|
||||
ptr = (PULONG)(&pAd->LbCtrl.LoopBackExpectRx);
|
||||
/* Length = ptr[0] & 0xffff; */
|
||||
pAd->LbCtrl.LoopBackExpectRxLen = Length;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, Length = %d\n", __func__, Length));
|
||||
|
||||
for (i = 0; i < 20; i++)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("TXD(TXWI) %d 0x%08lX\n", i, *(ptr + i)));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s,\n", __func__));
|
||||
}
|
||||
|
||||
void LoopBack_ExpectTx(RTMP_ADAPTER *pAd, UINT32 Length, UINT8 *pRawData)
|
||||
{
|
||||
PULONG ptr;
|
||||
UINT8 i = 0;
|
||||
|
||||
if (Length > LOOPBACK_SIZE) {
|
||||
Length = LOOPBACK_SIZE;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, max length is %d\n", __func__, LOOPBACK_SIZE));
|
||||
}
|
||||
|
||||
/* RtlCopyMemory(&pAd->LoopBackExpectTx, pRawData, Length); */
|
||||
os_move_mem(&pAd->LbCtrl.LoopBackExpectTx, pRawData, Length);
|
||||
ptr = (PULONG)(&pAd->LbCtrl.LoopBackExpectTx);
|
||||
/* Length = ptr[0] & 0xffff; */
|
||||
pAd->LbCtrl.LoopBackExpectTxLen = Length;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, Length = %d\n", __func__, Length));
|
||||
|
||||
for (i = 0; i < 20; i++)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("TXD(TXWI) %d 0x%08lX\n", i, *(ptr + i)));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s,\n", __func__));
|
||||
}
|
||||
|
||||
void LoopBack_Run(RTMP_ADAPTER *pAd, struct _LOOPBACK_SETTING *pSetting, UINT32 Length)
|
||||
{
|
||||
if (Length > LOOPBACK_SIZE) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, LOOPBACK length too long\n", __func__));
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef _RTMP_PCI_SUPPORT
|
||||
PCILoopBack_Run(pAd, pSetting, Length);
|
||||
#endif
|
||||
}
|
||||
void LoopBack_BitTrueCheck(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
if (!pAd->LbCtrl.LoopBackDefaultPattern) { /* Rx compare expect Rx */
|
||||
if (pAd->LbCtrl.LoopBackExpectRxLen != pAd->LbCtrl.LoopBackRxRawLen) {
|
||||
LoopBack_Fail(pAd, BIT_TRUE_FAIL);
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, ####################### TX/RX Length not equal ####################\n", __func__));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, ExpectRxLen = %d, RxRawLen = %d\n", __func__, pAd->LbCtrl.LoopBackExpectRxLen, pAd->LbCtrl.LoopBackRxRawLen));
|
||||
} else if (RTMPEqualMemory((PVOID)&pAd->LbCtrl.LoopBackExpectRx, (PVOID)&pAd->LbCtrl.LoopBackRxRaw, pAd->LbCtrl.LoopBackRxRawLen) == 0) {
|
||||
if (pAd->LbCtrl.DebugMode) {
|
||||
UINT32 j = 0;
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("RxExpect Dump(%u): ", pAd->LbCtrl.LoopBackRxRawLen));
|
||||
|
||||
for (j = 0; j < pAd->LbCtrl.LoopBackRxRawLen; j++)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%02x", pAd->LbCtrl.LoopBackExpectRx[j]));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("\n"));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("RxBackRaw Dump: "));
|
||||
|
||||
for (j = 0; j < pAd->LbCtrl.LoopBackRxRawLen; j++)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%02x", pAd->LbCtrl.LoopBackRxRaw[j]));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("\n"));
|
||||
}
|
||||
|
||||
LoopBack_Fail(pAd, BIT_TRUE_FAIL);
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, ####################### BIT_TRUE_FAIL ####################\n", __func__));
|
||||
} else
|
||||
pAd->LbCtrl.LoopBackResult.FailReason = NO_ERROR;
|
||||
} else { /* Rx compare Tx */
|
||||
if (pAd->LbCtrl.LoopBackTxRawLen != pAd->LbCtrl.LoopBackRxRawLen) {
|
||||
LoopBack_Fail(pAd, BIT_TRUE_FAIL);
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, ####################### TX/RX Length not equal ####################\n", __func__));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, TxRawLen = %d, RxRawLen = %d\n", __func__, pAd->LbCtrl.LoopBackTxRawLen, pAd->LbCtrl.LoopBackRxRawLen));
|
||||
} else if (RTMPEqualMemory((PVOID)&pAd->LbCtrl.LoopBackTxRaw, (PVOID)&pAd->LbCtrl.LoopBackRxRaw, pAd->LbCtrl.LoopBackTxRawLen) == 0) {
|
||||
if (pAd->LbCtrl.DebugMode) {
|
||||
UINT32 j = 0;
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("TxExpect Dump(%u): ", pAd->LbCtrl.LoopBackTxRawLen));
|
||||
|
||||
for (j = 0; j < pAd->LbCtrl.LoopBackRxRawLen; j++)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%02x", pAd->LbCtrl.LoopBackTxRaw[j]));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("\n"));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RxBackRaw Dump: "));
|
||||
|
||||
for (j = 0; j < pAd->LbCtrl.LoopBackRxRawLen; j++)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%02x", pAd->LbCtrl.LoopBackRxRaw[j]));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("\n"));
|
||||
}
|
||||
|
||||
LoopBack_Fail(pAd, BIT_TRUE_FAIL);
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, ####################### BIT_TRUE_FAIL ####################\n", __func__));
|
||||
} else {
|
||||
pAd->LbCtrl.LoopBackResult.FailReason = NO_ERROR;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, ####################### BIT_TRUE OK ####################\n", __func__));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LoopBack_Fail(RTMP_ADAPTER *pAd, enum _LOOPBACK_FAIL FailNum)
|
||||
{
|
||||
if (pAd->LbCtrl.LoopBackResult.Status == RUNNING) {
|
||||
pAd->LbCtrl.LoopBackResult.FailReason = FailNum;
|
||||
pAd->LbCtrl.LoopBackResult.Status = FAIL;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, FailReason = %d\n", __func__, FailNum));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
INT LoopBack_TxThread(IN OUT PVOID Context)
|
||||
#else
|
||||
INT LoopBack_TxThread(ULONG Context)
|
||||
#endif
|
||||
{
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)Context;
|
||||
#else
|
||||
RTMP_OS_TASK *pTask = (RTMP_OS_TASK *)Context;
|
||||
RTMP_ADAPTER *pAd = (PRTMP_ADAPTER)RTMP_OS_TASK_DATA_GET(pTask);
|
||||
#endif
|
||||
struct _LOOPBACK_SETTING *pSetting = &pAd->LbCtrl.LoopBackSetting;
|
||||
UINT32 RepeatIdx = 0;
|
||||
UINT32 Length = 0;
|
||||
UINT32 BreakCount = 0;
|
||||
UINT32 DbgCount = 0;
|
||||
/* KIRQL Irql; */
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, Repeat:%u\n", __func__, pSetting->RepeatTimes));
|
||||
|
||||
if (pSetting->RepeatTimes == 0)
|
||||
pSetting->RepeatTimes = 0xffffffff;
|
||||
|
||||
for (RepeatIdx = 0; RepeatIdx < pSetting->RepeatTimes ; RepeatIdx++) {
|
||||
if (pSetting->RepeatTimes == 0xffffffff)
|
||||
RepeatIdx = 0;
|
||||
|
||||
for (Length = pSetting->StartLen; Length <= pSetting->StopLen; Length++) {
|
||||
while (pAd->LbCtrl.LoopBackWaitRx) {
|
||||
BreakCount++;
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
RTMPusecDelay(50);
|
||||
#else
|
||||
RtmpusecDelay(50);
|
||||
#endif
|
||||
|
||||
if (BreakCount > 2000) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, no Rx come back Stop1!!!\n", __func__));
|
||||
break;
|
||||
}
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, no Rx BreakCount = %d\n", __func__, BreakCount));
|
||||
}
|
||||
|
||||
if (BreakCount > 2000) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, no Rx come back Stop2!!!\n", __func__));
|
||||
LoopBack_Fail(pAd, RX_TIMEOUT);
|
||||
break;
|
||||
}
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, Length = %d\n", __func__, Length));
|
||||
BreakCount = 0;
|
||||
|
||||
if (pAd->LbCtrl.LoopBackRunning == FALSE || pAd->LbCtrl.LoopBackResult.Status != RUNNING)
|
||||
break;
|
||||
|
||||
if (!pSetting->IsDefaultPattern)
|
||||
Length = pAd->LbCtrl.LoopBackExpectTxLen;
|
||||
|
||||
if (pAd->LbCtrl.LoopBackResult.Status == RUNNING) {
|
||||
/* KeAcquireSpinLock(&pAd->LoopBackLock, &Irql); */
|
||||
OS_SPIN_LOCK(&pAd->LbCtrl.LoopBackLock);
|
||||
pAd->LbCtrl.LoopBackWaitRx = TRUE;
|
||||
/* KeReleaseSpinLock(&pAd->LoopBackLock, Irql); */
|
||||
OS_SPIN_UNLOCK(&pAd->LbCtrl.LoopBackLock);
|
||||
LoopBack_Run(pAd, pSetting, Length);
|
||||
|
||||
if (pAd->LbCtrl.LoopBackRunning == FALSE || pAd->LbCtrl.LoopBackResult.Status != RUNNING)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
RTMPusecDelay(200);
|
||||
#else
|
||||
RtmpusecDelay(200);
|
||||
#endif
|
||||
DbgCount++;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s, DbgCount = %d\n", __func__, DbgCount));
|
||||
|
||||
if (!pSetting->IsDefaultPattern) {
|
||||
/* use script file does not need to auto increase length */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pAd->LbCtrl.LoopBackRunning == FALSE || pAd->LbCtrl.LoopBackResult.Status != RUNNING)
|
||||
break;
|
||||
}
|
||||
|
||||
if (pAd->LbCtrl.LoopBackRunning)
|
||||
LoopBack_Stop(pAd);
|
||||
|
||||
/* pAd->LbCtrl.LoopBackTxThread = NULL; */
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_INFO, ("+ + + + Control Thread Terminated + + + +\n"));
|
||||
/* DecrementIoCount(pAd); */
|
||||
/* PsTerminateSystemThread(STATUS_SUCCESS); */
|
||||
RtmpOSTaskNotifyToExit(&pAd->LbCtrl.LoopBackTxTask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
VOID LoopBack_Rx(RTMP_ADAPTER *pAd, UINT32 pktlen, UINT8 *pData)
|
||||
{
|
||||
if (!pAd->LbCtrl.LoopBackRunning && !pAd->LbCtrl.LoopBackWaitRx)
|
||||
return;
|
||||
|
||||
{
|
||||
UINT32 LPLength = 0;
|
||||
INT32 TotalLength = (INT32)pktlen;
|
||||
UINT8 *ptr = pData;
|
||||
EVENT_RXD EvnRxD;
|
||||
|
||||
/* FwCMDRspTxD_STRUC FwCMDRspTxD; */
|
||||
if (pAd->LbCtrl.DebugMode) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, Debug Mode, Total Len:%d\n", __func__, TotalLength));
|
||||
LPLength = pktlen;
|
||||
} else {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Driver Rx LoopBackRunning\n"));
|
||||
/* os_move_mem(&FwCMDRspTxD,ptr,sizeof(FwCMDRspTxD)); */
|
||||
os_move_mem(&EvnRxD, ptr, sizeof(EvnRxD));
|
||||
/* LPLength = FwCMDRspTxD.FwEventTxD.u2RxByteCount; */
|
||||
LPLength = EvnRxD.fw_rxd_0.field.length;
|
||||
|
||||
if (LPLength > LOOPBACK_SIZE) {
|
||||
LPLength = LOOPBACK_SIZE;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, max length is %d\n", __func__, LOOPBACK_SIZE));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
#ifdef COMPOS_TESTMODE_WIN /* Windows First -4 for padding bits and then add back here,Linux(?) */
|
||||
|
||||
if (!pAd->LbCtrl.LoopBackSetting.IsDefaultPattern)
|
||||
LPLength = TotalLength + 4;
|
||||
|
||||
#endif
|
||||
/* RtlCopyMemory(&FwCMDRspTxD,ptr,sizeof(FwCMDRspTxD)); */
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, Total Length = %d, LPLength is %d, bytecount = %d\n",
|
||||
__func__, TotalLength, LPLength, EvnRxD.fw_rxd_0.field.length));
|
||||
/* LPLength = FwCMDRspTxD.FwEventTxD.u2RxByteCount; */
|
||||
pAd->LbCtrl.LoopBackResult.RxByteCount += LPLength;
|
||||
pAd->LbCtrl.LoopBackResult.RxPktCount++;
|
||||
os_move_mem(&pAd->LbCtrl.LoopBackRxRaw, ptr, LPLength);
|
||||
pAd->LbCtrl.LoopBackRxRawLen = LPLength;
|
||||
}
|
||||
|
||||
if (pAd->LbCtrl.LoopBackUDMA == FALSE)
|
||||
LoopBack_BitTrueCheck(pAd);
|
||||
|
||||
/* KeAcquireSpinLock(&pAdapter->LoopBackLock, &Irql); */
|
||||
OS_SPIN_LOCK(&pAd->LbCtrl.LoopBackLock);
|
||||
pAd->LbCtrl.LoopBackWaitRx = FALSE;
|
||||
/* KeReleaseSpinLock(&pAdapter->LoopBackLock, Irql); */
|
||||
OS_SPIN_UNLOCK(&pAd->LbCtrl.LoopBackLock);
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, RxPktCount = %d\n", __func__, pAd->LbCtrl.LoopBackResult.RxPktCount));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* currently not implement PCIE loopback */
|
||||
#ifdef _RTMP_PCI_SUPPORT
|
||||
void PCILoopBack_Run(RTMP_ADAPTER *pAd, struct _LOOPBACK_SETTING *pSetting, UINT32 length)
|
||||
{
|
||||
UINT32 count = 0;
|
||||
TMAC_TXD_L TxD;
|
||||
PUCHAR ptr;
|
||||
UINT8 alignment = 0;
|
||||
/* UINT32 TimeOut1Second = 100; */
|
||||
UCHAR *TxDataBuffer = NULL;
|
||||
UINT32 *TxDataBufferLength;
|
||||
UINT32 BUF_SIZE = 0;
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
TxDataBuffer = pAd->TxDataBuffer;
|
||||
BUF_SIZE = BUFFER_SIZE;
|
||||
TxDataBufferLength = &pAd->TxDataBufferLength;
|
||||
#else
|
||||
struct _ATE_CTRL *ate_ctrl = &(pAd->ATECtrl);
|
||||
|
||||
TxDataBuffer = pAd->ATECtrl.pate_pkt;
|
||||
BUF_SIZE = ATE_TESTPKT_LEN;
|
||||
TxDataBufferLength = &pAd->ATECtrl.TxLength;
|
||||
#endif
|
||||
|
||||
/* length = 1024; */
|
||||
if (pSetting->IsDefaultPattern) {
|
||||
os_zero_mem(TxDataBuffer, BUF_SIZE);
|
||||
os_zero_mem(&TxD, sizeof(TxD));
|
||||
ptr = TxDataBuffer + sizeof(TxD);
|
||||
|
||||
for (count = 0; count < length - sizeof(TxD); count++)
|
||||
ptr[count] = count % 16;
|
||||
|
||||
/* set pkt content */
|
||||
TxD.TxD0.TxByteCount = length;
|
||||
#ifndef MT7615
|
||||
TxD.TxD0.PIdx = 1;
|
||||
TxD.TxD0.QIdx = 0;
|
||||
TxD.TxD1.TxDFmt = 1;
|
||||
TxD.TxD1.HdrFmt = 1;
|
||||
#endif
|
||||
os_move_mem(TxDataBuffer, &TxD, sizeof(TxD));
|
||||
os_move_mem(&pAd->LbCtrl.LoopBackTxRaw, TxDataBuffer, LOOPBACK_SIZE);
|
||||
pAd->LbCtrl.LoopBackTxRawLen = length;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, length = %d\n", __func__, length));
|
||||
|
||||
if (length > 32) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("===buffer===\n"));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("0x%x 0x%x 0x%x 0x%x\n", TxDataBuffer[3], TxDataBuffer[2], TxDataBuffer[1], TxDataBuffer[0]));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("0x%x 0x%x 0x%x 0x%x\n", TxDataBuffer[7], TxDataBuffer[6], TxDataBuffer[5], TxDataBuffer[4]));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("0x%x 0x%x 0x%x 0x%x\n", TxDataBuffer[11], TxDataBuffer[10], TxDataBuffer[9], TxDataBuffer[8]));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("0x%x 0x%x 0x%x 0x%x\n", TxDataBuffer[15], TxDataBuffer[14], TxDataBuffer[13], TxDataBuffer[12]));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("0x%x 0x%x 0x%x 0x%x\n", TxDataBuffer[19], TxDataBuffer[18], TxDataBuffer[17], TxDataBuffer[16]));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("0x%x 0x%x 0x%x 0x%x\n", TxDataBuffer[23], TxDataBuffer[22], TxDataBuffer[21], TxDataBuffer[20]));
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("0x%x 0x%x 0x%x 0x%x\n", TxDataBuffer[27], TxDataBuffer[26], TxDataBuffer[25], TxDataBuffer[24]));
|
||||
}
|
||||
|
||||
if (length % 4 != 0)
|
||||
alignment = 4 - (length % 4);
|
||||
|
||||
if (pAd->LbCtrl.DebugMode) {
|
||||
int j = 0;
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Tx Dump: "));
|
||||
|
||||
for (j = 0; j < length; j++)
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%02x", TxDataBuffer[j]));
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("\n"));
|
||||
}
|
||||
|
||||
/* pAd->TxDataBufferLength = length + alignment + 4 ; */
|
||||
*TxDataBufferLength = length + alignment + 4;
|
||||
} else {
|
||||
os_move_mem(TxDataBuffer, &pAd->LbCtrl.LoopBackExpectTx, pAd->LbCtrl.LoopBackExpectTxLen);
|
||||
os_zero_mem(TxDataBuffer + length, pAd->LbCtrl.LoopBackExpectTxLen - length);
|
||||
os_move_mem(&pAd->LbCtrl.LoopBackTxRaw, TxDataBuffer, length);
|
||||
pAd->LbCtrl.LoopBackTxRawLen = pAd->LbCtrl.LoopBackExpectTxLen;
|
||||
/* pAd->LoopBackExpectRxLen = length; */
|
||||
}
|
||||
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, LP length = %d, alignment = %d\n", __func__, length, alignment));
|
||||
pAd->LbCtrl.LoopBackResult.TxByteCount += length;
|
||||
pAd->LbCtrl.LoopBackResult.TxPktCount++;
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, RxPktCount = %d\n", __func__, pAd->LbCtrl.LoopBackResult.RxPktCount));
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
StartTx(pAd, 1, 0);
|
||||
#else
|
||||
ate_ctrl->TxLength = length;
|
||||
MT_ATETxPkt(pAd, TESTMODE_BAND0);
|
||||
#endif
|
||||
|
||||
/* cannot pass UINT32 TimeOut1Second = 100; to wait_event, it will not wait.. workaround use 0 (1second instead of TimeOut1Second) */
|
||||
if (!pAd->LbCtrl.DebugMode)
|
||||
if (RTMP_OS_WAIT_FOR_COMPLETION_TIMEOUT(&pAd->LbCtrl.LoopBackPCITxEvent, 0) != STATUS_SUCCESS) {
|
||||
LoopBack_Fail(pAd, TX_TIMEOUT);
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("%s, ####################### TX_TIMEOUT ####################3\n", __func__));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,99 +0,0 @@
|
||||
|
||||
#ifndef _LOOPBACK_H_
|
||||
#define _LOOPBACK_H_
|
||||
|
||||
#define LOOPBACK_SIZE (10240*6)
|
||||
|
||||
|
||||
enum _LOOPBACK_STATUS {
|
||||
RUNNING = 0,
|
||||
PASS,
|
||||
FAIL
|
||||
};
|
||||
|
||||
enum _LOOPBACK_FAIL {
|
||||
NO_ERROR = 0,
|
||||
TX_TIMEOUT,
|
||||
RX_TIMEOUT,
|
||||
BIT_TRUE_FAIL
|
||||
};
|
||||
|
||||
struct _LOOPBACK_SETTING {
|
||||
UINT32 StartLen;
|
||||
UINT32 StopLen;
|
||||
UINT32 RepeatTimes; /* 0 = infinite */
|
||||
UINT32 IsDefaultPattern;
|
||||
/* #ifdef RTMP_USB_SUPPORT */
|
||||
UINT32 BulkOutNumber;
|
||||
UINT32 BulkInNumber;
|
||||
UINT32 TxAggNumber;
|
||||
UINT32 RxAggPktLmt;/* pkt numbers */
|
||||
UINT32 RxAggLmt;/* pkt size */
|
||||
UINT32 RxAggTO;/* timeout (us) */
|
||||
UINT32 RxAggEnable;
|
||||
/* #endif */
|
||||
};
|
||||
/* TODO:Unify */
|
||||
#if !defined(COMPOS_TESTMODE_WIN)
|
||||
#define MAX_TX_BULK_PIPE_NUM 6
|
||||
#define MAX_RX_BULK_PIPE_NUM 2
|
||||
#endif
|
||||
struct _LOOPBACK_RESULT {
|
||||
UINT32 Status; /* 0 running, 1 pass , 2 fail */
|
||||
UINT32 FailReason; /* 0 no error, 1 TX timeout, 2 RX timeout, 3 bit true fail */
|
||||
UINT32 TxPktCount;
|
||||
UINT32 RxPktCount;
|
||||
UINT32 TxByteCount; /* 0 = infinite */
|
||||
UINT32 RxByteCount;
|
||||
/* #ifdef RTMP_USB_SUPPORT */
|
||||
UINT32 LastBulkOut;
|
||||
/* #endif */
|
||||
};
|
||||
struct _LOOPBACK_CTRL {
|
||||
BOOLEAN DebugMode;
|
||||
BOOLEAN LoopBackRunning;
|
||||
BOOLEAN LoopBackWaitRx;
|
||||
struct _LOOPBACK_RESULT LoopBackResult;
|
||||
struct _LOOPBACK_SETTING LoopBackSetting;
|
||||
UINT8 LoopBackBulkoutNumber;
|
||||
UCHAR LoopBackTxRaw[LOOPBACK_SIZE];
|
||||
UCHAR LoopBackRxRaw[LOOPBACK_SIZE];
|
||||
UINT32 LoopBackTxRawLen;
|
||||
UINT32 LoopBackRxRawLen;
|
||||
UINT32 LoopBackExpectTxLen;
|
||||
UINT32 LoopBackExpectRxLen;
|
||||
UCHAR LoopBackExpectTx[LOOPBACK_SIZE];
|
||||
UCHAR LoopBackExpectRx[LOOPBACK_SIZE];
|
||||
NDIS_SPIN_LOCK LoopBackLock;
|
||||
BOOLEAN LoopBackDefaultPattern;
|
||||
RTMP_OS_TASK LoopBackTxTask;
|
||||
RTMP_OS_COMPLETION LoopBackEvent;
|
||||
BOOLEAN LoopBackUDMA;
|
||||
#ifdef RTMP_PCI_SUPPORT
|
||||
RTMP_OS_COMPLETION LoopBackPCITxEvent;
|
||||
#endif
|
||||
};
|
||||
|
||||
INT32 CheckFWROMWiFiSysOn(struct _RTMP_ADAPTER *pAd);
|
||||
|
||||
void LoopBack_Start(struct _RTMP_ADAPTER *pAd, struct _LOOPBACK_SETTING *pSetting);
|
||||
void LoopBack_Stop(struct _RTMP_ADAPTER *pAd);
|
||||
void LoopBack_Status(struct _RTMP_ADAPTER *pAd, struct _LOOPBACK_RESULT *pResult);
|
||||
void LoopBack_RawData(struct _RTMP_ADAPTER *pAd, UINT32 *pLength, BOOLEAN IsTx, UINT8 *pRawData);
|
||||
void LoopBack_ExpectRx(struct _RTMP_ADAPTER *pAd, UINT32 Length, UINT8 *pRawData);
|
||||
void LoopBack_ExpectTx(struct _RTMP_ADAPTER *pAd, UINT32 Length, UINT8 *pRawData);
|
||||
void LoopBack_Run(struct _RTMP_ADAPTER *pAd, struct _LOOPBACK_SETTING *pSetting, UINT32 length);
|
||||
void LoopBack_BitTrueCheck(struct _RTMP_ADAPTER *pAd);
|
||||
void LoopBack_Fail(struct _RTMP_ADAPTER *pAd, enum _LOOPBACK_FAIL FailNum);
|
||||
#ifdef COMPOS_TESTMODE_WIN /* TODO::Unify thread parameter */
|
||||
INT LoopBack_TxThread(IN OUT PVOID Context);
|
||||
#else
|
||||
INT LoopBack_TxThread(ULONG Context);
|
||||
#endif
|
||||
void LoopBack_Rx(struct _RTMP_ADAPTER *pAd, UINT32 pktlen, UINT8 *pData);
|
||||
#ifdef RTMP_PCI_SUPPORT
|
||||
void PCILoopBack_Run(struct _RTMP_ADAPTER *pAd, struct _LOOPBACK_SETTING *pSetting, UINT32 length);
|
||||
INT32 ATECheckFWROMWiFiSysOn(struct _RTMP_ADAPTER *pAd);
|
||||
#endif
|
||||
|
||||
#endif /* _LOOPBACK_H_ */
|
@ -1,678 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
ate.h
|
||||
*/
|
||||
|
||||
#ifndef __ATE_H__
|
||||
#define __ATE_H__
|
||||
#include "LoopBack.h"
|
||||
|
||||
#ifdef MT7615
|
||||
#define ARBITRARY_CCK_OFDM_TX 1
|
||||
#endif
|
||||
#ifndef COMPOS_TESTMODE_WIN
|
||||
/* #define LOGDUMP_TO_FILE 1 */
|
||||
#define ATE_TXTHREAD 1
|
||||
#endif
|
||||
#define IOCTLBUFF 2048
|
||||
#define ATE_ON(_p) ((((_p)->ATECtrl.Mode) & ATE_START) == ATE_START)
|
||||
INT32 ATEInit(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 ATEExit(struct _RTMP_ADAPTER *pAd);
|
||||
|
||||
#define FREQ_OFFSET_MANUAL_ENABLE 0x81021238
|
||||
#define FREQ_OFFSET_MANUAL_VALUE 0x81021234
|
||||
|
||||
/* For CA53 GPIO CR remap usage */
|
||||
#define CA53_GPIO_REMAP_SIZE 0x10
|
||||
|
||||
#ifdef ARBITRARY_CCK_OFDM_TX
|
||||
/* MCU PTA CR */
|
||||
#define ANT_SWITCH_CON2 0x810600CC
|
||||
#define ANT_SWITCH_CON3 0x810600D0
|
||||
#define ANT_SWITCH_CON4 0x810600D4
|
||||
#define ANT_SWITCH_CON6 0x810600DC
|
||||
#define ANT_SWITCH_CON7 0x810600E0
|
||||
#define ANT_SWITCH_CON8 0x810600E4
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use bitmap to allow coexist of ATE_TXFRAME
|
||||
* and ATE_RXFRAME(i.e.,to support LoopBack mode).
|
||||
*/
|
||||
#define fATE_IDLE (1 << 0)
|
||||
#define fATE_TX_ENABLE (1 << 1)
|
||||
#define fATE_RX_ENABLE (1 << 2)
|
||||
#define fATE_TXCONT_ENABLE (1 << 3)
|
||||
#define fATE_TXCARR_ENABLE (1 << 4)
|
||||
#define fATE_TXCARRSUPP_ENABLE (1 << 5)
|
||||
#define fATE_MPS (1 << 6)
|
||||
#define fATE_FFT_ENABLE (1 << 7)
|
||||
#define fATE_EXIT (1 << 8)
|
||||
#define fATE_IN_RFTEST (1 << 9)
|
||||
#define fATE_IN_BF (1 << 10)
|
||||
#define fATE_IN_ICAPOVERLAP (1 << 11)
|
||||
/* Stop Transmission */
|
||||
#define ATE_TXSTOP ((~(fATE_TX_ENABLE))&(~(fATE_TXCONT_ENABLE))&(~(fATE_TXCARR_ENABLE))&(~(fATE_TXCARRSUPP_ENABLE))&(~(fATE_MPS)))
|
||||
/* Stop Receiving Frames */
|
||||
#define ATE_RXSTOP (~(fATE_RX_ENABLE))
|
||||
|
||||
/* Enter/Reset ATE */
|
||||
#define ATE_START (fATE_IDLE)
|
||||
/* Stop/Exit ATE */
|
||||
#define ATE_STOP (fATE_EXIT)
|
||||
/* Continuous Transmit Frames (without time gap) */
|
||||
#define ATE_TXCONT ((fATE_TX_ENABLE)|(fATE_TXCONT_ENABLE))
|
||||
/* Transmit Carrier */
|
||||
#define ATE_TXCARR ((fATE_TX_ENABLE)|(fATE_TXCARR_ENABLE))
|
||||
/* Transmit Carrier Suppression (information without carrier) */
|
||||
#define ATE_TXCARRSUPP ((fATE_TX_ENABLE)|(fATE_TXCARRSUPP_ENABLE))
|
||||
/* Transmit Frames */
|
||||
#define ATE_TXFRAME (fATE_TX_ENABLE)
|
||||
/* Receive Frames */
|
||||
#define ATE_RXFRAME (fATE_RX_ENABLE)
|
||||
/* MPS */
|
||||
#define ATE_MPS ((fATE_TX_ENABLE)|(fATE_MPS))
|
||||
|
||||
#define ATE_FFT ((fATE_FFT_ENABLE)|(fATE_IN_RFTEST))
|
||||
|
||||
#define BULK_OUT_LOCK(pLock, IrqFlags) \
|
||||
RTMP_IRQ_LOCK((pLock), IrqFlags)
|
||||
|
||||
#define BULK_OUT_UNLOCK(pLock, IrqFlags) \
|
||||
RTMP_IRQ_UNLOCK((pLock), IrqFlags)
|
||||
|
||||
/* WiFi PHY mode capability */
|
||||
#define PHYMODE_CAP_24G (WMODE_B | WMODE_G | WMODE_GN)
|
||||
#define PHYMODE_CAP_5G (WMODE_A | WMODE_AN | WMODE_AC)
|
||||
#define PHYMODE_CAP_DUAL_BAND (PHYMODE_CAP_24G | PHYMODE_CAP_5G)
|
||||
|
||||
/* ContiTxTone */
|
||||
#define WF0_TX_ONE_TONE_5M 0x0
|
||||
#define WF0_TX_TWO_TONE_5M 0x1
|
||||
#define WF1_TX_ONE_TONE_5M 0x2
|
||||
#define WF1_TX_TWO_TONE_5M 0x3
|
||||
#define WF0_TX_ONE_TONE_10M 0x4
|
||||
#define WF1_TX_ONE_TONE_10M 0x5
|
||||
#define WF0_TX_ONE_TONE_DC 0x6
|
||||
#define WF1_TX_ONE_TONE_DC 0x7
|
||||
|
||||
#define MAX_TEST_PKT_LEN 1496
|
||||
#define MIN_TEST_PKT_LEN 25
|
||||
#define MAX_TEST_BKCR_NUM 30
|
||||
|
||||
/* For packet tx time, in unit of byte */
|
||||
#define MAX_HT_AMPDU_LEN 65000
|
||||
#define MAX_VHT_MPDU_LEN 6700 /* 11454 */
|
||||
#define DEFAULT_MPDU_LEN 4096
|
||||
#define MAX_MSDU_LEN 2304
|
||||
#define MIN_MSDU_LEN 22
|
||||
#define DEFAULT_MAC_HDR_LEN 24
|
||||
#define QOS_MAC_HDR_LEN 26
|
||||
|
||||
/* For ipg and duty cycle, in unit of us */
|
||||
#define SIG_EXTENSION 6
|
||||
#define DEFAULT_SLOT_TIME 9
|
||||
#define DEFAULT_SIFS_TIME 10
|
||||
#define MAX_SIFS_TIME 127 /* ICR has 7-bit only */ /* For the ATCR/TRCR limitation 8-bit/9-bit only*/
|
||||
#define MAX_AIFSN 0xF
|
||||
#define MIN_AIFSN 0x1
|
||||
#define MAX_CW 0x10
|
||||
#define MIN_CW 0x0
|
||||
#define NORMAL_CLOCK_TIME 50 /* in uint of ns */
|
||||
#define BBP_PROCESSING_TIME 1500 /* in uint of ns */
|
||||
|
||||
/* The expected enqueue packet number in one time RX event trigger */
|
||||
#define ATE_ENQUEUE_PACKET_NUM 100
|
||||
|
||||
#if defined(MT7615) || defined(MT7622)
|
||||
#define ATE_TESTPKT_LEN 13311 /* Setting max packet length to 13311 on MT7615 */
|
||||
#else
|
||||
#define ATE_TESTPKT_LEN 4095 /* AMPDU delimiter 12 bit, maximum 4095 */
|
||||
#endif
|
||||
#define ATE_MAX_PATTERN_SIZE 128
|
||||
#define TESTMODE_BAND0 0
|
||||
#define TESTMODE_BAND1 1
|
||||
#define ATE_BF_WCID 1
|
||||
#define ATE_BFMU_NUM 4
|
||||
struct _RTMP_ADAPTER;
|
||||
struct _RX_BLK;
|
||||
|
||||
#ifdef DBDC_MODE
|
||||
#define IS_ATE_DBDC(_pAd) _pAd->CommonCfg.dbdc_mode
|
||||
#define TESTMODE_BAND_NUM 2
|
||||
#else
|
||||
#define IS_ATE_DBDC(_pAd) FALSE
|
||||
#define TESTMODE_BAND_NUM 1
|
||||
#endif
|
||||
|
||||
/* Antenna mode */
|
||||
#define ANT_MODE_DEFAULT 0
|
||||
#define ANT_MODE_SPE_IDX 1
|
||||
|
||||
#if !defined(COMPOS_TESTMODE_WIN)
|
||||
/* Allow Sleep */
|
||||
#define TESTMODE_SEM struct semaphore
|
||||
#define TESTMODE_SEM_INIT(_psem, _val) sema_init(_psem, _val)
|
||||
#define TESTMODE_SEM_DOWN(_psem) down(_psem)
|
||||
#define TESTMODE_SEM_DOWN_INTERRUPTIBLE(_psem) down_interruptible(_psem)
|
||||
#define TESTMODE_SEM_DOWN_TRYLOCK(_psem) down_trylock(_psem)
|
||||
#define TESTMODE_SEM_UP(_psem) up(_psem)
|
||||
#endif
|
||||
|
||||
enum _TESTMODE_MODE {
|
||||
HQA_VERIFY,
|
||||
ATE_LOOPBACK,
|
||||
MODE_NUM
|
||||
};
|
||||
|
||||
enum _MPS_PARAM_TYPE {
|
||||
MPS_SEQDATA,
|
||||
MPS_PHYMODE,
|
||||
MPS_PATH,
|
||||
MPS_RATE,
|
||||
MPS_PAYLOAD_LEN,
|
||||
MPS_TX_COUNT,
|
||||
MPS_PWR_GAIN,
|
||||
MPS_PARAM_NUM,
|
||||
MPS_NSS,
|
||||
MPS_PKT_BW,
|
||||
};
|
||||
|
||||
struct _ATE_OPERATION {
|
||||
INT32 (*ATEStart)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*ATEStop)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*StartTx)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*StartRx)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*StopTx)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*StopRx)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*SetTxPath)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*SetRxPath)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*SetTxPower0)(struct _RTMP_ADAPTER *pAd, struct _ATE_TXPOWER TxPower);
|
||||
INT32 (*SetTxPower1)(struct _RTMP_ADAPTER *pAd, struct _ATE_TXPOWER TxPower);
|
||||
INT32 (*SetTxPower2)(struct _RTMP_ADAPTER *pAd, struct _ATE_TXPOWER TxPower);
|
||||
INT32 (*SetTxPower3)(struct _RTMP_ADAPTER *pAd, struct _ATE_TXPOWER TxPower);
|
||||
INT32 (*SetTxForceTxPower)(struct _RTMP_ADAPTER *pAd, INT8 cTxPower, UINT8 ucPhyMode, UINT8 ucTxRate, UINT8 ucBW);
|
||||
INT32 (*SetTxPowerX)(struct _RTMP_ADAPTER *pAd, struct _ATE_TXPOWER TxPower);
|
||||
INT32 (*SetTxAntenna)(struct _RTMP_ADAPTER *pAd, UINT32 Ant);
|
||||
INT32 (*SetRxAntenna)(struct _RTMP_ADAPTER *pAd, UINT32 Ant);
|
||||
INT32 (*SetTxFreqOffset)(struct _RTMP_ADAPTER *pAd, UINT32 FreqOffset);
|
||||
INT32 (*GetTxFreqOffset)(struct _RTMP_ADAPTER *pAd, UINT32 *FreqOffset);
|
||||
INT32 (*SetChannel)(struct _RTMP_ADAPTER *pAd, INT16 Value, UINT32 pri_sel, UINT32 reason, UINT32 Ch_Band);
|
||||
INT32 (*SetBW)(struct _RTMP_ADAPTER *pAd, UINT16 system_bw, UINT16 per_pkt_bw);
|
||||
INT32 (*SetDutyCycle)(struct _RTMP_ADAPTER *pAd, UINT32 value);
|
||||
INT32 (*SetPktTxTime)(struct _RTMP_ADAPTER *pAd, UINT32 value);
|
||||
INT32 (*SampleRssi)(struct _RTMP_ADAPTER *pAd, struct _RX_BLK *pRxBlk);
|
||||
INT32 (*SetIPG)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*SetSlotTime)(struct _RTMP_ADAPTER *pAd, UINT32 SlotTime, UINT32 SifsTime);
|
||||
INT32 (*SetAIFS)(struct _RTMP_ADAPTER *pAd, CHAR Value);
|
||||
INT32 (*SetPowerDropLevel)(struct _RTMP_ADAPTER *pAd, UINT32 PowerDropLevel);
|
||||
INT32 (*SetTSSI)(struct _RTMP_ADAPTER *pAd, CHAR WFSel, CHAR Setting);
|
||||
INT32 (*LowPower)(struct _RTMP_ADAPTER *pAd, UINT32 Control);
|
||||
INT32 (*SetDPD)(struct _RTMP_ADAPTER *pAd, CHAR WFSel, CHAR Setting);
|
||||
INT32 (*StartTxTone)(struct _RTMP_ADAPTER *pAd, UINT32 Mode);
|
||||
INT32 (*SetTxTonePower)(struct _RTMP_ADAPTER *pAd, INT32 pwr1, INT pwr2);
|
||||
INT32 (*SetDBDCTxTonePower)(struct _RTMP_ADAPTER *pAd, INT32 pwr1, INT pwr2, UINT32 AntIdx);
|
||||
INT32 (*StopTxTone)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*StartContinousTx)(struct _RTMP_ADAPTER *pAd, CHAR WFSel, UINT32 TxfdMode);
|
||||
INT32 (*StopContinousTx)(struct _RTMP_ADAPTER *pAd, UINT32 TxfdMode);
|
||||
INT32 (*EfuseGetFreeBlock)(struct _RTMP_ADAPTER *pAd, UINT32 GetFreeBlock, UINT32 *Value);
|
||||
INT32 (*EfuseAccessCheck)(struct _RTMP_ADAPTER *pAd, UINT32 offset, PUCHAR pData);
|
||||
INT32 (*RfRegWrite)(struct _RTMP_ADAPTER *pAd, UINT32 WFSel, UINT32 Offset, UINT32 Value);
|
||||
INT32 (*RfRegRead)(struct _RTMP_ADAPTER *pAd, UINT32 WFSel, UINT32 Offset, UINT32 *Value);
|
||||
INT32 (*GetFWInfo)(struct _RTMP_ADAPTER *pAd, UCHAR *FWInfo);
|
||||
#ifdef PRE_CAL_MT7622_SUPPORT
|
||||
INT32 (*TxDPDTest7622)(struct _RTMP_ADAPTER *pAd, RTMP_STRING * arg);
|
||||
#endif /*PRE_CAL_MT7622_SUPPORT*/
|
||||
#ifdef PRE_CAL_TRX_SET1_SUPPORT
|
||||
INT32 (*RxSelfTest)(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 (*TxDPDTest)(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
#endif /* PRE_CAL_TRX_SET1_SUPPORT */
|
||||
#ifdef PRE_CAL_TRX_SET2_SUPPORT
|
||||
INT32 (*PreCalTest)(struct _RTMP_ADAPTER *pAd, UINT8 CalId, UINT32 ChGrpId);
|
||||
#endif /* PRE_CAL_TRX_SET2_SUPPORT */
|
||||
#if defined(TXBF_SUPPORT) && defined(MT_MAC)
|
||||
INT32 (*SetATETxSoundingProc)(struct _RTMP_ADAPTER *pAd, UCHAR SoundingMode);
|
||||
INT32 (*StartTxSKB)(struct _RTMP_ADAPTER *pAd);
|
||||
#endif /* TXBF_SUPPORT && MT_MAC */
|
||||
INT32 (*MPSSetParm)(struct _RTMP_ADAPTER *pAd, enum _MPS_PARAM_TYPE data_type, INT32 items, UINT32 *data);
|
||||
INT32 (*MPSTxStart)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*MPSTxStop)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*SetAutoResp)(struct _RTMP_ADAPTER *pAd, UCHAR *mac, UCHAR mode);
|
||||
INT32 (*SetFFTMode)(struct _RTMP_ADAPTER *pAd, UINT32 mode);
|
||||
INT32 (*onOffRDD)(struct _RTMP_ADAPTER *pAd, UINT32 rdd_num, UINT32 rdd_in_sel, UINT32 is_start);
|
||||
INT32 (*SetCfgOnOff)(struct _RTMP_ADAPTER *pAd, UINT32 Type, UINT32 Enable);
|
||||
INT32 (*GetCfgOnOff)(struct _RTMP_ADAPTER *pAd, UINT32 Type, UINT32 *Result);
|
||||
INT32 (*SetRXFilterPktLen)(struct _RTMP_ADAPTER *pAd, UINT32 Enable, UINT32 RxPktLen);
|
||||
#ifdef TXPWRMANUAL
|
||||
INT32 (*SetTxPwrManual)(struct _RTMP_ADAPTER *pAd, BOOLEAN fgPwrManCtrl, UINT8 u1TxPwrModeManual, UINT8 u1TxPwrBwManual, UINT8 u1TxPwrRateManual, INT8 i1TxPwrValueManual, UCHAR Band);
|
||||
#endif
|
||||
INT32 (*DBDCTxTone)(struct _RTMP_ADAPTER *pAd, UINT32 Control, UINT32 AntIndex, UINT32 ToneType, UINT32 ToneFreq, INT32 DcOffset_I, INT32 DcOffset_Q, UINT32 Band);
|
||||
INT32 (*TxCWTone)(struct _RTMP_ADAPTER *pAd, UINT32 Control);
|
||||
INT32 (*GetTxPower)(struct _RTMP_ADAPTER *pAd, UINT32 Enable, UINT32 Ch_Band, UINT32 *EfuseAddr, UINT32 *Power);
|
||||
INT32 (*BssInfoUpdate)(struct _RTMP_ADAPTER *pAd, UINT32 OwnMacIdx, UINT32 BssIdx, UCHAR *Bssid);
|
||||
INT32 (*DevInfoUpdate)(struct _RTMP_ADAPTER *pAd, UINT32 OwnMacIdx, UCHAR *Bssid);
|
||||
INT32 (*LogOnOff)(struct _RTMP_ADAPTER *pAd, UINT32 type, UINT32 on_off, UINT32 num_log);
|
||||
INT32 (*SetICapStart)(struct _RTMP_ADAPTER *pAd, BOOLEAN Trigger, BOOLEAN RingCapEn, UINT32 Event, UINT32 Node, UINT32 Len, UINT32 StopCycle, UINT32 BW, UINT32 MACTriggerEvent, UINT32 SourceAddrLSB, UINT32 SourceAddrMSB, UINT32 Band);
|
||||
INT32 (*GetICapStatus)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*GetICapIQData)(struct _RTMP_ADAPTER *pAd, PINT32 pData, PINT32 pDataLen, UINT32 IQ_Type, UINT32 WF_Num);
|
||||
INT32 (*SetAntennaPort)(struct _RTMP_ADAPTER *pAd, UINT32 RfModeMask, UINT32 RfPortMask, UINT32 AntPortMask);
|
||||
INT32 (*ClockSwitchDisable)(struct _RTMP_ADAPTER *pAd, UINT8 isDisable);
|
||||
};
|
||||
|
||||
struct _ATE_IF_OPERATION {
|
||||
INT32 (*init)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*clean_trx_q)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*setup_frame)(struct _RTMP_ADAPTER *pAd, UINT32 q_idx);
|
||||
INT32 (*test_frame_tx)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*test_frame_rx)(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 (*ate_leave)(struct _RTMP_ADAPTER *pAd);
|
||||
};
|
||||
|
||||
struct _HQA_MPS_SETTING {
|
||||
UINT32 phy;
|
||||
UINT32 pkt_len;
|
||||
UINT32 pkt_cnt;
|
||||
UINT32 pwr;
|
||||
UINT32 nss;
|
||||
UINT32 pkt_bw;
|
||||
};
|
||||
|
||||
enum _TEST_BK_CR_TYPE {
|
||||
TEST_EMPTY_BKCR = 0,
|
||||
TEST_MAC_BKCR,
|
||||
TEST_HIF_BKCR,
|
||||
TEST_PHY_BKCR,
|
||||
TEST_HW_BKCR,
|
||||
TEST_MCU_BKCR,
|
||||
TEST_BKCR_TYPE_NUM,
|
||||
};
|
||||
|
||||
struct _TESTMODE_BK_CR {
|
||||
ULONG offset;
|
||||
UINT32 val;
|
||||
enum _TEST_BK_CR_TYPE type;
|
||||
};
|
||||
|
||||
struct _ATE_RXV_LOG {
|
||||
RX_VECTOR1_1ST_CYCLE rxv1_1st;
|
||||
RX_VECTOR1_2ND_CYCLE rxv1_2nd;
|
||||
RX_VECTOR1_3TH_CYCLE rxv1_3rd;
|
||||
RX_VECTOR1_4TH_CYCLE rxv1_4th;
|
||||
RX_VECTOR1_5TH_CYCLE rxv1_5th;
|
||||
RX_VECTOR1_6TH_CYCLE rxv1_6th;
|
||||
RX_VECTOR2_1ST_CYCLE rxv2_1st;
|
||||
RX_VECTOR2_2ND_CYCLE rxv2_2nd;
|
||||
RX_VECTOR2_3TH_CYCLE rxv2_3rd;
|
||||
};
|
||||
|
||||
#define ATE_RDD_LOG_SIZE 8 /* Pulse size * num of pulse = 8 * 32 for one event*/
|
||||
struct _ATE_RDD_LOG {
|
||||
UINT32 u4Prefix;
|
||||
UINT32 u4Count;
|
||||
UINT8 byPass;
|
||||
UINT8 aucBuffer[ATE_RDD_LOG_SIZE];
|
||||
};
|
||||
|
||||
#define ATE_RECAL_LOG_SIZE (CAL_ALL_LEN >> 3)
|
||||
struct _ATE_LOG_RECAL {
|
||||
UINT32 cal_idx;
|
||||
UINT32 cal_type;
|
||||
UINT32 cr_addr;
|
||||
UINT32 cr_val;
|
||||
};
|
||||
|
||||
enum {
|
||||
ATE_LOG_RXV = 1,
|
||||
ATE_LOG_RDD,
|
||||
ATE_LOG_RE_CAL,
|
||||
ATE_LOG_TYPE_NUM,
|
||||
ATE_LOG_RXINFO,
|
||||
ATE_LOG_TXDUMP,
|
||||
ATE_LOG_TEST,
|
||||
};
|
||||
|
||||
enum {
|
||||
ATE_LOG_OFF,
|
||||
ATE_LOG_ON,
|
||||
ATE_LOG_DUMP,
|
||||
ATE_LOG_CTRL_NUM,
|
||||
};
|
||||
|
||||
#define fATE_LOG_RXV (1 << ATE_LOG_RXV)
|
||||
#define fATE_LOG_RDD (1 << ATE_LOG_RDD)
|
||||
#define fATE_LOG_RE_CAL (1 << ATE_LOG_RE_CAL)
|
||||
#define fATE_LOG_RXINFO (1 << ATE_LOG_RXINFO)
|
||||
#define fATE_LOG_TXDUMP (1 << ATE_LOG_TXDUMP)
|
||||
#define fATE_LOG_TEST (1 << ATE_LOG_TEST)
|
||||
|
||||
struct _ATE_LOG_DUMP_ENTRY {
|
||||
UINT32 log_type;
|
||||
UINT8 un_dumped;
|
||||
union {
|
||||
struct _ATE_RXV_LOG rxv;
|
||||
struct _ATE_RDD_LOG rdd;
|
||||
struct _ATE_LOG_RECAL re_cal;
|
||||
} log;
|
||||
};
|
||||
|
||||
struct _ATE_LOG_DUMP_CB {
|
||||
NDIS_SPIN_LOCK lock;
|
||||
UINT8 overwritable;
|
||||
UINT8 is_dumping;
|
||||
UINT8 is_overwritten;
|
||||
INT32 idx;
|
||||
INT32 len;
|
||||
UINT32 recal_curr_type;
|
||||
#ifdef LOGDUMP_TO_FILE
|
||||
INT32 file_idx;
|
||||
RTMP_OS_FD_EXT fd;
|
||||
#endif
|
||||
struct _ATE_LOG_DUMP_ENTRY *entry;
|
||||
};
|
||||
|
||||
#define ATE_MPS_ITEM_RUNNING (1<<0)
|
||||
struct _HQA_MPS_CB {
|
||||
NDIS_SPIN_LOCK lock;
|
||||
UINT32 mps_cnt;
|
||||
UINT32 band_idx;
|
||||
UINT32 stat;
|
||||
BOOLEAN setting_inuse;
|
||||
UINT32 ref_idx;
|
||||
struct _HQA_MPS_SETTING *mps_setting;
|
||||
};
|
||||
|
||||
struct _ATE_PFMU_INFO {
|
||||
UCHAR wcid;
|
||||
UCHAR bss_idx;
|
||||
UCHAR up;
|
||||
UCHAR addr[MAC_ADDR_LEN];
|
||||
};
|
||||
|
||||
#define ATE_RXV_SIZE 9
|
||||
#define ATE_ANT_NUM 4
|
||||
|
||||
struct _ATE_RX_STATISTIC {
|
||||
INT32 FreqOffsetFromRx;
|
||||
UINT32 RxTotalCnt[TESTMODE_BAND_NUM];
|
||||
UINT32 NumOfAvgRssiSample;
|
||||
UINT32 RxMacFCSErrCount;
|
||||
UINT32 RxMacMdrdyCount;
|
||||
UINT32 RxMacFCSErrCount_band1;
|
||||
UINT32 RxMacMdrdyCount_band1;
|
||||
CHAR LastSNR[ATE_ANT_NUM]; /* last received SNR */
|
||||
CHAR LastRssi[ATE_ANT_NUM]; /* last received RSSI */
|
||||
CHAR AvgRssi[ATE_ANT_NUM]; /* last 8 frames' average RSSI */
|
||||
CHAR MaxRssi[ATE_ANT_NUM];
|
||||
CHAR MinRssi[ATE_ANT_NUM];
|
||||
SHORT AvgRssiX8[ATE_ANT_NUM]; /* sum of last 8 frames' RSSI */
|
||||
UINT32 RSSI[ATE_ANT_NUM];
|
||||
UINT32 SNR[ATE_ANT_NUM];
|
||||
UINT32 RCPI[ATE_ANT_NUM];
|
||||
UINT32 FAGC_RSSI_IB[ATE_ANT_NUM];
|
||||
UINT32 FAGC_RSSI_WB[ATE_ANT_NUM];
|
||||
#ifdef CFG_SUPPORT_MU_MIMO
|
||||
UINT32 RxMacMuPktCount;
|
||||
#endif
|
||||
UINT32 SIG_MCS;
|
||||
UINT32 SINR;
|
||||
UINT32 RXVRSSI;
|
||||
};
|
||||
|
||||
struct _ATE_TX_TIME_PARAM {
|
||||
BOOLEAN pkt_tx_time_en; /* The packet transmission time feature enable or disable */
|
||||
UINT32 pkt_tx_time; /* The target packet transmission time */
|
||||
UINT32 pkt_tx_len;
|
||||
UINT32 pkt_msdu_len;
|
||||
UINT32 pkt_hdr_len;
|
||||
UINT32 pkt_ampdu_cnt;
|
||||
UINT8 pkt_need_qos;
|
||||
UINT8 pkt_need_amsdu;
|
||||
UINT8 pkt_need_ampdu;
|
||||
};
|
||||
|
||||
struct _ATE_IPG_PARAM {
|
||||
UINT32 ipg; /* The target idle time */
|
||||
UINT8 sig_ext; /* Only OFDM/HT/VHT need to consider sig_ext */
|
||||
UINT16 slot_time;
|
||||
UINT16 sifs_time;
|
||||
UINT8 ac_num; /* 0: AC_BK, 1: AC_BE, 2: AC_VI, 3: AC_VO */
|
||||
UINT8 aifsn;
|
||||
UINT16 cw;
|
||||
UINT16 txop;
|
||||
};
|
||||
|
||||
#ifdef DBDC_MODE
|
||||
struct _BAND_INFO {
|
||||
UCHAR *pate_pkt; /* Buffer for TestPkt */
|
||||
PNDIS_PACKET pkt_skb;
|
||||
UINT32 is_alloc_skb;
|
||||
RTMP_OS_COMPLETION tx_wait;
|
||||
UCHAR TxStatus; /* TxStatus : 0 --> task is idle, 1 --> task is running */
|
||||
UINT32 Mode;
|
||||
UINT32 TxAntennaSel;
|
||||
UINT32 RxAntennaSel;
|
||||
UCHAR backup_channel;
|
||||
UCHAR backup_phymode;
|
||||
UCHAR wdev_idx;
|
||||
UCHAR wmm_idx;
|
||||
USHORT QID;
|
||||
UCHAR Channel;
|
||||
UCHAR Ch_Band;
|
||||
UCHAR ControlChl;
|
||||
UCHAR PriSel;
|
||||
UINT32 OutBandFreq;
|
||||
UCHAR Nss;
|
||||
UCHAR BW;
|
||||
UCHAR PerPktBW;
|
||||
UCHAR PrimaryBWSel;
|
||||
UCHAR PhyMode;
|
||||
UCHAR Stbc;
|
||||
UCHAR Ldpc; /* 0:BCC 1:LDPC */
|
||||
UCHAR Sgi;
|
||||
UCHAR Mcs;
|
||||
UCHAR Preamble;
|
||||
UINT32 FixedPayload; /* Normal:0,Repeat:1,Random:2 */
|
||||
UINT32 TxLength;
|
||||
UINT32 TxCount;
|
||||
UINT32 TxDoneCount; /* Tx DMA Done */
|
||||
UINT32 TxedCount;
|
||||
UINT32 RFFreqOffset;
|
||||
UINT32 thermal_val;
|
||||
UINT32 duty_cycle;
|
||||
struct _ATE_TX_TIME_PARAM tx_time_param;
|
||||
struct _ATE_IPG_PARAM ipg_param;
|
||||
#ifdef TXBF_SUPPORT
|
||||
UCHAR eTxBf;
|
||||
UCHAR iTxBf;
|
||||
#endif
|
||||
#ifdef DOT11_VHT_AC
|
||||
UCHAR Channel_2nd;
|
||||
#endif
|
||||
UCHAR FAGC_Path;
|
||||
/* Tx frame */
|
||||
UCHAR TemplateFrame[32];
|
||||
UCHAR Addr1[MAC_ADDR_LEN];
|
||||
UCHAR Addr2[MAC_ADDR_LEN];
|
||||
UCHAR Addr3[MAC_ADDR_LEN];
|
||||
UCHAR payload[ATE_MAX_PATTERN_SIZE];
|
||||
UINT32 pl_len;
|
||||
USHORT HLen; /* Header Length */
|
||||
USHORT seq;
|
||||
struct _HQA_MPS_CB mps_cb;
|
||||
BOOLEAN fgTxPowerSKUEn; /* SKU On/Off status */
|
||||
BOOLEAN fgTxPowerPercentageEn; /* Power Percentage On/Off status */
|
||||
BOOLEAN fgTxPowerBFBackoffEn; /* BF Backoff On/Off status */
|
||||
UINT32 PercentageLevel; /* TxPower Percentage Level */
|
||||
INT32 RF_Power;
|
||||
INT32 Digital_Power;
|
||||
INT32 DcOffset_I;
|
||||
INT32 DcOffset_Q;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ATE_TXTHREAD
|
||||
#define ATE_THREAD_NUM 1
|
||||
struct _ATE_TXTHREAD_CB {
|
||||
BOOLEAN is_init;
|
||||
RTMP_OS_TASK task;
|
||||
NDIS_SPIN_LOCK lock;
|
||||
UINT32 tx_cnt;
|
||||
UINT32 txed_cnt;
|
||||
UCHAR service_stat;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct _ATE_CTRL {
|
||||
struct _ATE_OPERATION *ATEOp;
|
||||
struct _ATE_IF_OPERATION *ATEIfOps;
|
||||
enum _TESTMODE_MODE verify_mode;
|
||||
struct _HQA_MPS_CB mps_cb;
|
||||
UINT32 en_log;
|
||||
#ifdef ATE_TXTHREAD
|
||||
struct _ATE_TXTHREAD_CB tx_thread[1];
|
||||
UINT32 current_init_thread;
|
||||
INT32 deq_cnt;
|
||||
#endif
|
||||
#ifdef DBDC_MODE
|
||||
struct _BAND_INFO band_ext[1];
|
||||
#endif
|
||||
UCHAR *pate_pkt; /* Buffer for TestPkt */
|
||||
PNDIS_PACKET pkt_skb;
|
||||
UINT32 is_alloc_skb;
|
||||
UINT32 Mode;
|
||||
CHAR TxPower0;
|
||||
CHAR TxPower1;
|
||||
CHAR TxPower2;
|
||||
CHAR TxPower3;
|
||||
UINT32 TxAntennaSel; /* band0 => TX0/TX1 , band1 => TX2/TX3 */
|
||||
UINT32 RxAntennaSel;
|
||||
UCHAR backup_channel; /* Backup normal driver's channel for recovering */
|
||||
UCHAR backup_phymode; /* Backup normal driver's phymode for recovering */
|
||||
UCHAR wdev_idx;
|
||||
UCHAR wmm_idx;
|
||||
USHORT QID;
|
||||
UCHAR Channel;
|
||||
UCHAR Ch_Band;
|
||||
UCHAR ControlChl;
|
||||
UCHAR PriSel;
|
||||
UINT32 OutBandFreq;
|
||||
UCHAR Nss;
|
||||
UCHAR BW;
|
||||
UCHAR PerPktBW;
|
||||
UCHAR PrimaryBWSel;
|
||||
UCHAR PhyMode;
|
||||
UCHAR Stbc;
|
||||
UCHAR Ldpc; /* 0:BCC 1:LDPC */
|
||||
UCHAR Sgi;
|
||||
UCHAR Mcs;
|
||||
UCHAR Preamble;
|
||||
UCHAR Payload; /* Payload pattern */
|
||||
UINT32 FixedPayload;
|
||||
UINT32 TxLength;
|
||||
UINT32 TxCount;
|
||||
UINT32 TxDoneCount; /* Tx DMA Done */
|
||||
UINT32 TxedCount;
|
||||
UINT32 RFFreqOffset;
|
||||
UINT32 thermal_val;
|
||||
UINT32 duty_cycle;
|
||||
struct _ATE_TX_TIME_PARAM tx_time_param;
|
||||
struct _ATE_IPG_PARAM ipg_param;
|
||||
#ifdef TXBF_SUPPORT
|
||||
BOOLEAN fgEBfEverEnabled;
|
||||
BOOLEAN fgBw160;
|
||||
UCHAR eTxBf;
|
||||
UCHAR iTxBf;
|
||||
UCHAR *txbf_info;
|
||||
UINT32 txbf_info_len;
|
||||
UCHAR iBFCalStatus;
|
||||
#endif
|
||||
#ifdef INTERNAL_CAPTURE_SUPPORT
|
||||
EXT_EVENT_RBIST_ADDR_T icap_info;
|
||||
#endif /* INTERNAL_CAPTURE_SUPPORT */
|
||||
#ifdef DOT11_VHT_AC
|
||||
UCHAR Channel_2nd;
|
||||
#endif
|
||||
/* Common part */
|
||||
UCHAR control_band_idx; /* The band_idx which user wants to control currently */
|
||||
/* Tx frame */
|
||||
UCHAR *TemplateFrame;
|
||||
UCHAR Addr1[MAC_ADDR_LEN];
|
||||
UCHAR Addr2[MAC_ADDR_LEN];
|
||||
UCHAR Addr3[MAC_ADDR_LEN];
|
||||
UCHAR payload[ATE_MAX_PATTERN_SIZE];
|
||||
UINT32 pl_len;
|
||||
USHORT HLen; /* Header Length */
|
||||
USHORT seq;
|
||||
/* MU Related */
|
||||
BOOLEAN mu_enable;
|
||||
UINT32 mu_usrs;
|
||||
UINT8 wcid_ref;
|
||||
struct _ATE_PFMU_INFO pfmu_info[ATE_BFMU_NUM];
|
||||
/* counters */
|
||||
UINT32 num_rxv;
|
||||
UINT32 num_rxdata;
|
||||
UINT32 num_rxv_fcs;
|
||||
UINT32 num_rxdata_fcs;
|
||||
struct _ATE_RX_STATISTIC rx_stat;
|
||||
struct _ATE_LOG_DUMP_CB log_dump[ATE_LOG_TYPE_NUM];
|
||||
UCHAR FAGC_Path;
|
||||
/* Flag */
|
||||
BOOLEAN txs_enable;
|
||||
BOOLEAN bQAEnabled; /* QA is used. */
|
||||
BOOLEAN bQATxStart; /* Have compiled QA in and use it to ATE tx. */
|
||||
BOOLEAN bQARxStart; /* Have compiled QA in and use it to ATE rx. */
|
||||
BOOLEAN need_set_pwr; /* For MPS switch power in right context */
|
||||
UCHAR TxStatus; /* TxStatus : 0 --> task is idle, 1 --> task is running */
|
||||
UCHAR did_tx;
|
||||
UCHAR did_rx;
|
||||
UCHAR en_man_set_freq;
|
||||
/* Restore CR */
|
||||
struct _TESTMODE_BK_CR bk_cr[MAX_TEST_BKCR_NUM];
|
||||
/* OS related */
|
||||
RTMP_OS_COMPLETION tx_wait;
|
||||
RTMP_OS_COMPLETION cmd_done;
|
||||
ULONG cmd_expire;
|
||||
#if !defined(COMPOS_TESTMODE_WIN)
|
||||
RALINK_TIMER_STRUCT PeriodicTimer;
|
||||
ULONG OneSecPeriodicRound;
|
||||
ULONG PeriodicRound;
|
||||
OS_NDIS_SPIN_LOCK TssiSemLock;
|
||||
#endif
|
||||
BOOLEAN fgTxPowerSKUEn; /* SKU On/Off status */
|
||||
BOOLEAN fgTxPowerPercentageEn; /* Power Percentage On/Off status */
|
||||
BOOLEAN fgTxPowerBFBackoffEn; /* BF Backoff On/Off status */
|
||||
UINT32 PercentageLevel; /* TxPower Percentage Level */
|
||||
INT32 RF_Power;
|
||||
INT32 Digital_Power;
|
||||
INT32 DcOffset_I;
|
||||
INT32 DcOffset_Q;
|
||||
};
|
||||
|
||||
#if !defined(COMPOS_TESTMODE_WIN)
|
||||
VOID RtmpDmaEnable(RTMP_ADAPTER *pAd, INT Enable);
|
||||
|
||||
VOID ATE_RTUSBBulkOutDataPacket(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN UCHAR BulkOutPipeId);
|
||||
|
||||
VOID ATE_RTUSBCancelPendingBulkInIRP(
|
||||
IN PRTMP_ADAPTER pAd);
|
||||
#endif
|
||||
INT MtATESetMacTxRx(struct _RTMP_ADAPTER *pAd, INT32 TxRx, BOOLEAN Enable, UCHAR BandIdx);
|
||||
#if defined(TXBF_SUPPORT) && defined(MT_MAC)
|
||||
INT SetATEApplyStaToMacTblEntry(RTMP_ADAPTER *pAd);
|
||||
INT SetATEApplyStaToAsic(RTMP_ADAPTER *pAd);
|
||||
#endif
|
||||
|
||||
#endif /* __ATE_H__ */
|
@ -1,161 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
ate_agent.h
|
||||
*/
|
||||
|
||||
#ifndef __ATE_AGENT_H__
|
||||
#define __ATE_AGENT_H__
|
||||
|
||||
struct _RTMP_ADAPTER;
|
||||
|
||||
INT32 SetTxStop(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetRxStop(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
#ifdef DBG
|
||||
VOID ATE_QA_Statistics(struct _RTMP_ADAPTER *pAd, RXWI_STRUC *pRxWI, RXINFO_STRUC *pRxInfo, PHEADER_802_11 pHeader);
|
||||
#ifdef CONFIG_QA
|
||||
INT32 RtmpDoAte(struct _RTMP_ADAPTER *pAd, RTMP_IOCTL_INPUT_STRUCT *wrq, RTMP_STRING *wrq_name);
|
||||
#endif
|
||||
#ifdef WCX_SUPPORT
|
||||
INT32 do_meta_cmd(int ioctl_cmd, PRTMP_ADAPTER pAd, RTMP_IOCTL_INPUT_STRUCT *WRQ, RTMP_STRING *wrq_name);
|
||||
#endif
|
||||
INT32 SetEERead(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetEEWrite(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetBBPRead(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetBBPWrite(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetRFWrite(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
#endif /* DBG */
|
||||
VOID rt_ee_read_all(struct _RTMP_ADAPTER *pAd, UINT16 *Data);
|
||||
VOID rt_ee_write_all(struct _RTMP_ADAPTER pAd, UINT16 *Data);
|
||||
VOID rt_ee_write_bulk(struct _RTMP_ADAPTER pAd, UINT16 *Data, UINT16 offset, UINT16 length);
|
||||
INT32 SetATEQid(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEDeqCnt(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEMPSDump(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSPhyMode(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSRate(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSPath(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSPayloadLen(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSPktCnt(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSPwr(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSNss(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSPktBw(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATEMPSStart(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 SetATELOGEnable(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATELOGDump(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxSEnable(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATERxFilter(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATERxStream(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxStream(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEMACTRx(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATELOGDisable(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEDa(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATESa(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEBssid(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEInitChan(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetADCDump(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxPower0(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxPower1(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxPower2(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxPower3(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEForceTxPower(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxPowerEvaluation(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxAntenna(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATERxAntenna(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATERFPower(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEDigitalPower(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEDCOffset_I(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEDCOffset_Q(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 Default_Set_ATE_TX_FREQ_OFFSET_Proc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxFreqOffset(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 Default_Set_ATE_TX_BW_Proc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxLength(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxCount(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxMcs(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEVhtNss(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxLdpc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxStbc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxMode(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxGi(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATERxFer(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEReadRF(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATELoadE2p(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
#ifdef RTMP_EFUSE_SUPPORT
|
||||
INT32 SetATELoadE2pFromBuf(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
#endif /* RTMP_EFUSE_SUPPORT */
|
||||
INT32 SetATEReadE2p(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEAutoAlc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxGi(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETempSensor(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEIpg(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEPayload(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEFixedPayload(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEAssocProc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
#if defined(TXBF_SUPPORT) && defined(MT_MAC)
|
||||
INT32 SetATETxBfDutInitProc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxBfGdInitProc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxPacketWithBf(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxBfChanProfileUpdate(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxBfProfileRead(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETXBFProc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxSoundingProc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEIBfGdCal(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEIBfInstCal(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEIBfProfileUpdate(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEEBfProfileConfig(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEIBfPhaseComp(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEIBfPhaseVerify(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxBfLnaGain(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxBfPhaseE2pUpdate(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEConTxETxBfGdProc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEConTxETxBfInitProc(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATESpeIdx(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEEBfTx(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEEBFCE(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEEBFCEInfo(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEEBFCEHelp(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 MT_ATEGenPkt(struct _RTMP_ADAPTER *pAd, UCHAR *buf, UINT32 band_idx);
|
||||
#endif /* TXBF_SUPPORT && MT_MAC */
|
||||
INT32 SetATETtr(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEShow(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEHelp(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 ATESampleRssi(struct _RTMP_ADAPTER *pAd, RXWI_STRUC *pRxWI);
|
||||
VOID ATEPeriodicExec(PVOID SystemSpecific1, PVOID FunctionContext, PVOID SystemSpecific2, PVOID SystemSpecific3);
|
||||
INT32 SetATE(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEChannel(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 set_ate_duty_cycle(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 set_ate_pkt_tx_time(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 set_ate_control_band_idx(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
#ifdef MT7615
|
||||
INT32 set_ate_channel_ext(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT32 set_ate_start_tx_ext(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
#endif /* MT7615 */
|
||||
INT32 SetATETxBw(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 MT_ATEInit(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 MT_ATEExit(struct _RTMP_ADAPTER *pAd);
|
||||
PNDIS_PACKET ATEPayloadInit(struct _RTMP_ADAPTER *pAd, UINT32 TxIdx);
|
||||
INT32 ATEPayloadAlloc(struct _RTMP_ADAPTER *pAd, UINT32 Index);
|
||||
VOID EEReadAll(struct _RTMP_ADAPTER *pAd, UINT16 *Data, UINT16 size);
|
||||
VOID rtmp_ate_init(struct _RTMP_ADAPTER *pAd);
|
||||
VOID RTMPCfgTssiGainFromEEPROM(struct _RTMP_ADAPTER *pAd);
|
||||
#ifdef SINGLE_SKU_V2
|
||||
INT32 SetATESingleSKUEn(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
#endif /* SINGLE_SKU_V2 */
|
||||
INT32 SetATEBFBackoffMode(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETempCompEn(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEPowerPercentEn(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEPowerPercentCtrl(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATEBFBackoffEn(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETSSIEn(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
INT32 SetATETxPowerCtrlEn(struct _RTMP_ADAPTER *pAd, RTMP_STRING *Arg);
|
||||
|
||||
#endif
|
@ -1,93 +0,0 @@
|
||||
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
qa_agent.h
|
||||
*/
|
||||
|
||||
#ifndef __META_AGENT_H__
|
||||
#define __META_AGENT_H__
|
||||
|
||||
extern CH_FREQ_MAP CH_HZ_ID_MAP[];
|
||||
extern int CH_HZ_ID_MAP_NUM;
|
||||
/*
|
||||
* struct for command formats
|
||||
*/
|
||||
struct GNU_PACKED _META_CMD_HDR {
|
||||
UINT32 oid;
|
||||
UINT32 len_in; /* For set */
|
||||
UINT32 len_out; /* For query */
|
||||
UCHAR data[2048];
|
||||
};
|
||||
|
||||
struct GNU_PACKED _PARAM_MTK_WIFI_TEST {
|
||||
UINT32 idx;
|
||||
UINT32 data;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _PARAM_CUSTOM_EFUSE_RW {
|
||||
UINT32 offset;
|
||||
UINT32 data;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _PARAM_CUSTOM_EEPROM_RW {
|
||||
UINT8 method;
|
||||
UINT8 idx;
|
||||
UINT8 reserved;
|
||||
UINT16 data;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _PARAM_CUSTOM_MCR_RW {
|
||||
UINT32 offset;
|
||||
UINT32 data;
|
||||
};
|
||||
|
||||
typedef INT32 (*META_CMD_HANDLER)(int ioctl_cmd, struct _RTMP_ADAPTER *pAd, RTMP_IOCTL_INPUT_STRUCT * wrq, META_CMD_HDR * cmd_hdr);
|
||||
|
||||
INT Set_Sdio_Bist_Write(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT Set_Sdio_Bist_Read(struct _RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
/*
|
||||
* define for command oid
|
||||
*/
|
||||
#define MT_META_WIFI_TEST_TABLE_VER 0x01180000
|
||||
|
||||
#define OID_CUSTOM_IF_VER 0xFFA0C000
|
||||
#define OID_CUSTOM_MCR_RW 0xFFA0C801
|
||||
#define OID_CUSTOM_EEPROM_RW 0xFFA0C803
|
||||
#define OID_CUSTOM_EFUSE_RW 0xFFA0C805
|
||||
#define OID_CUSTOM_TEST_MODE 0xFFA0C901
|
||||
#define OID_CUSTOM_ABORT_TEST_MODE 0xFFA0C906
|
||||
#define OID_CUSTOM_MTK_WIFI_TEST 0xFFA0C911
|
||||
/* NVRAM */
|
||||
#define OID_CUSTOM_MTK_NVRAM_RW 0xFFA0C941
|
||||
#define OID_CUSTOM_CFG_SRC_TYPE 0xFFA0C942
|
||||
#define OID_CUSTOM_EEPROM_TYPE 0xFFA0C943
|
||||
|
||||
#define MT_META_WIFI_TEST_CMD_MASK 0x0000001F /* 32 cmd for 1 set, 0x1F=31*/
|
||||
#define MT_META_WIFI_TEST_SET_MASK 0x0EFFFFFF /* 32 bits width, rest 27 bits*/
|
||||
|
||||
#define SLOT_TIME_SHORT 9
|
||||
#define PARAM_EEPROM_READ_METHOD_READ 1
|
||||
#define PARAM_EEPROM_READ_METHOD_GETSIZE 0
|
||||
|
||||
/*
|
||||
* MACRO
|
||||
*/
|
||||
#define FUNC_IDX_GET_IDX(__idx, __func_idx) \
|
||||
(__func_idx = __idx & 0x000000FF)
|
||||
#define FUNC_IDX_GET_SUBFIELD(__idx, __sub) \
|
||||
(__sub = ((__idx & 0xff000000)>>24)&0x000000ff)
|
||||
/* TODO: Need to put into include/rt_os.h when merge the file */
|
||||
#define MTPRIV_IOCTL_META_SET (SIOCIWFIRSTPRIV + 0x08)
|
||||
#define MTPRIV_IOCTL_META_QUERY (SIOCIWFIRSTPRIV + 0x09)
|
||||
#endif /* __META_AGENT_H__ */
|
@ -1,205 +0,0 @@
|
||||
|
||||
#ifndef _MT_TESTMODE_H
|
||||
#define _MT_TESTMODE_H
|
||||
|
||||
#include "mt_testmode_dmac.h"
|
||||
|
||||
|
||||
#define TESTMODE_WCID_BAND0 2
|
||||
#define TESTMODE_WCID_BAND1 3
|
||||
|
||||
#define ATE_SINGLE_BAND 1
|
||||
#define ATE_DUAL_BAND 2
|
||||
#define ATE_GBAND_TYPE 1
|
||||
#define ATE_ABAND_TYPE 2
|
||||
|
||||
#define ATE_BAND_WIDTH_20 0
|
||||
#define ATE_BAND_WIDTH_40 1
|
||||
#define ATE_BAND_WIDTH_80 2
|
||||
#define ATE_BAND_WIDTH_10 3
|
||||
#define ATE_BAND_WIDTH_5 4
|
||||
#define ATE_BAND_WIDTH_160 5
|
||||
#define ATE_BAND_WIDTH_8080 6
|
||||
|
||||
enum {
|
||||
ATE_USER_PAYLOAD,
|
||||
ATE_FIXED_PAYLOAD,
|
||||
ATE_RANDOM_PAYLOAD,
|
||||
};
|
||||
|
||||
struct _ATE_DATA_RATE_MAP {
|
||||
UCHAR mcs; /* MCS index */
|
||||
UINT32 tx_data_rate; /* Data rate in K Bit */
|
||||
};
|
||||
|
||||
struct _ATE_ANT_MAP {
|
||||
UINT32 ant_sel;
|
||||
UINT32 spe_idx;
|
||||
};
|
||||
|
||||
struct _ATE_TXPWR_GROUP_MAP {
|
||||
UINT32 start;
|
||||
UINT32 end;
|
||||
UINT32 group[4];
|
||||
};
|
||||
|
||||
struct _ATE_CH_KHZ_MAP {
|
||||
UINT32 Channel;
|
||||
UINT32 Freq;
|
||||
};
|
||||
|
||||
#if defined(COMPOS_TESTMODE_WIN)/* for MT_testmode.c */
|
||||
|
||||
#define INC_RING_INDEX(_idx, _RingSize) \
|
||||
do {\
|
||||
(_idx)++; \
|
||||
if ((_idx) >= (_RingSize)) \
|
||||
_idx = 0; \
|
||||
} while (0)
|
||||
|
||||
#define BAND_WIDTH_20 0
|
||||
#define BAND_WIDTH_40 1
|
||||
#define BAND_WIDTH_80 2
|
||||
#define BAND_WIDTH_160 3
|
||||
#define BAND_WIDTH_10 4 /* 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field. */
|
||||
#define BAND_WIDTH_BOTH 5 /* BW20 + BW40 */
|
||||
#define BAND_WIDTH_5 6
|
||||
#define BAND_WIDTH_8080 7
|
||||
|
||||
#define TX1_G_BAND_TARGET_PWR 0x5E
|
||||
#define TX0_G_BAND_TARGET_PWR 0x58
|
||||
enum {
|
||||
PDMA_TX,
|
||||
PDMA_RX,
|
||||
PDMA_TX_RX,
|
||||
};
|
||||
#define TESTMODE_GET_PADDR(_pstruct, _band, _member) (&_pstruct->_member)
|
||||
#define TESTMODE_GET_PARAM(_pstruct, _band, _member) (_pstruct->_member)
|
||||
#define TESTMODE_SET_PARAM(_pstruct, _band, _member, _val) (_pstruct->_member = _val)
|
||||
#ifndef COMPOS_TESTMODE_WIN/* NDIS only */
|
||||
#define MAC_ADDR_LEN 6
|
||||
/* 2-byte Frame control field */
|
||||
struct _QAFRAME_CONTROL {
|
||||
UINT16 Ver : 2;
|
||||
UINT16 Type : 2;
|
||||
UINT16 SubType : 4;
|
||||
UINT16 ToDs : 1;
|
||||
UINT16 FrDs : 1;
|
||||
UINT16 MoreFrag : 1;
|
||||
UINT16 Retry : 1;
|
||||
UINT16 PwrMgmt : 1;
|
||||
UINT16 MoreData : 1;
|
||||
UINT16 Wep : 1;
|
||||
UINT16 Order : 1;
|
||||
};
|
||||
|
||||
struct _QAHEADER_802_11 {
|
||||
struct _QAFRAME_CONTROL FC;
|
||||
UINT16 Duration;
|
||||
UCHAR Addr1[MAC_ADDR_LEN];
|
||||
UCHAR Addr2[MAC_ADDR_LEN];
|
||||
UCHAR Addr3[MAC_ADDR_LEN];
|
||||
UINT16 Frag: 4;
|
||||
UINT16 Sequence: 12;
|
||||
};
|
||||
#endif /* NOT COMPOS_TESTMODE_WIN */
|
||||
#else
|
||||
#ifdef DBDC_MODE
|
||||
#define TESTMODE_GET_PARAM(_pstruct, _band, _member) ((_band)?_pstruct->band_ext[_band-1]._member:_pstruct->_member)
|
||||
#define TESTMODE_GET_PADDR(_pstruct, _band, _member) ((_band) ? &_pstruct->band_ext[_band-1]._member : &_pstruct->_member)
|
||||
#define TESTMODE_SET_PARAM(_pstruct, _band, _member, _val) ({ \
|
||||
UINT32 _ret = _val; \
|
||||
if (_band) { \
|
||||
struct _BAND_INFO *_info = &(_pstruct->band_ext[_band-1]); \
|
||||
_info->_member = _val; \
|
||||
} else \
|
||||
_pstruct->_member = _val; \
|
||||
_ret; \
|
||||
})
|
||||
#else
|
||||
#define TESTMODE_GET_PADDR(_pstruct, _band, _member) (&_pstruct->_member)
|
||||
#define TESTMODE_GET_PARAM(_pstruct, _band, _member) (_pstruct->_member)
|
||||
#define TESTMODE_SET_PARAM(_pstruct, _band, _member, _val) ({ \
|
||||
UINT32 _ret = _val; \
|
||||
_pstruct->_member = _val; \
|
||||
_ret; \
|
||||
})
|
||||
#endif /* DBDC_MODE */
|
||||
#endif /* defined(COMPOS_TESTMODE_WIN) */
|
||||
|
||||
enum _TESTMODE_STAT_TYPE {
|
||||
TESTMODE_RXV,
|
||||
TESTMODE_PER_PKT,
|
||||
TESTMODE_RESET_CNT,
|
||||
TESTMODE_COUNTER_802_11,
|
||||
TESTMODE_STAT_TYPE_NUM,
|
||||
};
|
||||
|
||||
struct _RATE_TO_BE_FIX {
|
||||
UINT32 TXRate: 6;
|
||||
UINT32 TXMode: 3;
|
||||
UINT32 Nsts: 2;
|
||||
UINT32 STBC: 1;
|
||||
UINT32 Reserved: 20;
|
||||
};
|
||||
|
||||
struct rssi_offset_eeprom {
|
||||
UINT32 **rssi_eeprom_band_offset;
|
||||
UINT32 *n_band_offset;
|
||||
UINT32 n_band;
|
||||
};
|
||||
|
||||
INT32 MT_ATERFTestCB(struct _RTMP_ADAPTER *pAd, UINT8 *Data, UINT32 Length);
|
||||
INT32 MT_SetATEMPSDump(struct _RTMP_ADAPTER *pAd, UINT32 band_idx);
|
||||
INT32 MtTestModeInit(struct _RTMP_ADAPTER *pAd);
|
||||
INT32 MtTestModeExit(struct _RTMP_ADAPTER *pAd);
|
||||
INT MtTestModeBkCr(struct _RTMP_ADAPTER *pAd, ULONG offset, enum _TEST_BK_CR_TYPE type);
|
||||
INT MtTestModeRestoreCr(struct _RTMP_ADAPTER *pAd, ULONG offset);
|
||||
INT32 MT_ATETxControl(struct _RTMP_ADAPTER *pAd, UINT32 band_idx, PNDIS_PACKET pkt);
|
||||
VOID MT_ATEUpdateRxStatistic(struct _RTMP_ADAPTER *pAd, enum _TESTMODE_STAT_TYPE type, VOID *data);
|
||||
INT Mt_TestModeInsertPeer(struct _RTMP_ADAPTER *pAd, UINT32 band_ext, CHAR *da, CHAR *sa, CHAR *bss);
|
||||
INT32 MT_ATETxPkt(struct _RTMP_ADAPTER *pAd, UINT32 band_idx); /* Export for Loopback */
|
||||
INT MtATESetMacTxRx(struct _RTMP_ADAPTER *pAd, INT32 TxRx, BOOLEAN Enable, UCHAR BandIdx);
|
||||
INT MtATESetTxStream(struct _RTMP_ADAPTER *pAd, UINT32 StreamNums, UCHAR BandIdx);
|
||||
INT MtATESetRxPath(struct _RTMP_ADAPTER *pAd, UINT32 RxPathSel, UCHAR BandIdx);
|
||||
INT MtATESetRxFilter(struct _RTMP_ADAPTER *pAd, MT_RX_FILTER_CTRL_T filter);
|
||||
INT MtATESetCleanPerStaTxQueue(struct _RTMP_ADAPTER *pAd, BOOLEAN sta_pause_enable);
|
||||
INT32 MT_ATEDumpLog(struct _RTMP_ADAPTER *pAd, struct _ATE_LOG_DUMP_CB *log_cb, UINT32 log_type);
|
||||
VOID MtCmdATETestResp(struct cmd_msg *msg, char *data, UINT16 len);
|
||||
INT32 MtATECh2Freq(UINT32 Channel, UINT32 band_idx);
|
||||
INT32 MtATEGetTxPwrGroup(UINT32 Channel, UINT32 band_idx, UINT32 Ant_idx);
|
||||
INT32 MT_ATEInsertLog(struct _RTMP_ADAPTER *pAd, UCHAR *log, UINT32 log_type, UINT32 len);
|
||||
#if !defined(COMPOS_TESTMODE_WIN)/* for MT_testmode.c */
|
||||
INT MT_ATERxDoneHandle(struct _RTMP_ADAPTER *pAd, RX_BLK *pRxBlk);
|
||||
#endif
|
||||
INT32 MtATERSSIOffset(struct _RTMP_ADAPTER *pAd, INT32 RSSI_org, UINT32 RSSI_idx, INT32 Ch_Band);
|
||||
INT32 MtATETssiTrainingProc(struct _RTMP_ADAPTER *pAd, UCHAR ucBW, UCHAR ucBandIdx);
|
||||
#ifdef PRE_CAL_MT7622_SUPPORT
|
||||
INT MtATE_DPD_Cal_Store_Proc_7622(RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
#endif /*PRE_CAL_MT7622_SUPPORT*/
|
||||
#ifdef PRE_CAL_TRX_SET1_SUPPORT
|
||||
INT MtATE_DPD_Cal_Store_Proc(RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
INT MtATE_DCOC_Cal_Store_Proc(RTMP_ADAPTER *pAd, RTMP_STRING *arg);
|
||||
#endif /* PRE_CAL_TRX_SET1_SUPPORT */
|
||||
|
||||
#ifdef PRE_CAL_TRX_SET2_SUPPORT
|
||||
INT MtATE_Pre_Cal_Proc(RTMP_ADAPTER *pAd, UINT8 CalId, UINT32 ChGrpId);
|
||||
#endif /* PRE_CAL_TRX_SET2_SUPPORT */
|
||||
|
||||
INT32 mt_ate_tx(RTMP_ADAPTER *pAd, struct wifi_dev *wdev, struct _TX_BLK *tx_blk);
|
||||
INT TxPowerManualCtrl(PRTMP_ADAPTER pAd, BOOLEAN fgPwrManCtrl, UINT8 u1TxPwrModeManual, UINT8 u1TxPwrBwManual, UINT8 u1TxPwrRateManual, INT8 i1TxPwrValueManual, UCHAR ucBandIdx);
|
||||
|
||||
#if defined(COMPOS_TESTMODE_WIN)
|
||||
#endif
|
||||
#define MT_ATEInit(_pAd) ({ \
|
||||
UINT32 _ret; \
|
||||
_ret = MtTestModeInit(_pAd); \
|
||||
_ret; \
|
||||
})
|
||||
|
||||
#define MT_ATEExit(_pAd) ({ \
|
||||
UINT32 _ret; \
|
||||
_ret = MtTestModeExit(_pAd); \
|
||||
_ret; \
|
||||
})
|
||||
#endif /* _MT_TESTMODE_H */
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
mt_testmode_dmac.h
|
||||
*/
|
||||
|
||||
#ifndef __MT_TESTMODE_DMAC_H__
|
||||
#define __MT_TESTMODE_DMAC_H__
|
||||
|
||||
|
||||
INT mt_ate_mac_cr_restore(struct _RTMP_ADAPTER *pAd);
|
||||
INT mt_ate_mac_cr_backup_and_set(struct _RTMP_ADAPTER *pAd);
|
||||
INT mt_ate_ampdu_ba_limit(struct _RTMP_ADAPTER *pAd, UINT32 band_idx, UINT8 agg_limit);
|
||||
INT mt_ate_set_sta_pause_cr(struct _RTMP_ADAPTER *pAd, UINT32 band_idx);
|
||||
|
||||
|
||||
#endif /* __MT_TESTMODE_DMAC_H__ */
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
mt_testmode_smac.h
|
||||
*/
|
||||
|
||||
#ifndef __MT_TESTMODE_SMAC_H__
|
||||
#define __MT_TESTMODE_SMAC_H__
|
||||
|
||||
|
||||
INT mt_ate_mac_cr_restore(struct _RTMP_ADAPTER *pAd);
|
||||
INT mt_ate_mac_cr_backup_and_set(struct _RTMP_ADAPTER *pAd);
|
||||
|
||||
|
||||
#endif /* __MT_TESTMODE_SMAC_H__ */
|
@ -1,83 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
qa_agent.h
|
||||
*/
|
||||
|
||||
#ifndef __QA_AGENT_H__
|
||||
#define __QA_AGENT_H__
|
||||
|
||||
#define HQA_CMD_MAGIC_NO 0x18142880
|
||||
|
||||
/* RX STAT */
|
||||
#define HQA_RX_STAT_MACFCSERRCNT 0x1
|
||||
#define HQA_RX_STAT_MAC_MDRDYCNT 0x2
|
||||
#define HQA_RX_STAT_PHY_MDRDYCNT 0x3
|
||||
#define HQA_RX_STAT_PHY_FCSERRCNT 0x4
|
||||
#define HQA_RX_STAT_PD 0x5
|
||||
#define HQA_RX_STAT_CCK_SIG_SFD 0x6
|
||||
#define HQA_RX_STAT_OFDM_SIG_TAG 0x7
|
||||
#define HQA_RX_STAT_RSSI 0x8
|
||||
#define HQA_RX_RESET_PHY_COUNT 0x9
|
||||
#define HQA_RX_RESET_MAC_COUNT 0xa
|
||||
|
||||
/* FW Event Callback */
|
||||
VOID HQA_GetThermalValue_CB(struct cmd_msg *msg, char *Data, UINT16 Len);
|
||||
|
||||
|
||||
struct GNU_PACKED _HQA_CMD_FRAME {
|
||||
UINT32 MagicNo;
|
||||
UINT16 Type;
|
||||
UINT16 Id;
|
||||
UINT16 Length;
|
||||
UINT16 Sequence;
|
||||
UCHAR Data[2048];
|
||||
};
|
||||
|
||||
typedef INT32(*HQA_CMD_HANDLER)(
|
||||
struct _RTMP_ADAPTER *pAd,
|
||||
RTMP_IOCTL_INPUT_STRUCT * wrq,
|
||||
struct GNU_PACKED _HQA_CMD_FRAME * HqaCmdFrame);
|
||||
|
||||
struct _HQA_CMD_TABLE {
|
||||
HQA_CMD_HANDLER *CmdSet;
|
||||
UINT32 CmdSetSize;
|
||||
UINT32 CmdOffset;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_RX_STAT {
|
||||
UINT32 mac_rx_fcs_err_cnt;
|
||||
UINT32 mac_rx_mdrdy_cnt;
|
||||
UINT32 phy_rx_fcs_err_cnt_cck;
|
||||
UINT32 phy_rx_fcs_err_cnt_ofdm;
|
||||
UINT32 phy_rx_pd_cck;
|
||||
UINT32 phy_rx_pd_ofdm;
|
||||
UINT32 phy_rx_sig_err_cck;
|
||||
UINT32 phy_rx_sfd_err_cck;
|
||||
UINT32 phy_rx_sig_err_ofdm;
|
||||
UINT32 phy_rx_tag_err_ofdm;
|
||||
UINT32 WB_RSSSI0;
|
||||
UINT32 IB_RSSSI0;
|
||||
UINT32 WB_RSSSI1;
|
||||
UINT32 IB_RSSSI1;
|
||||
UINT32 phy_rx_mdrdy_cnt_cck;
|
||||
UINT32 phy_rx_mdrdy_cnt_ofdm;
|
||||
UINT32 DriverRxCount;
|
||||
UINT32 RCPI0;
|
||||
UINT32 RCPI1;
|
||||
UINT32 FreqOffsetFromRX;
|
||||
UINT32 RSSI0;
|
||||
UINT32 RSSI1;
|
||||
};
|
||||
|
||||
#endif /* __QA_AGENT_H__ */
|
@ -1,47 +0,0 @@
|
||||
|
||||
#ifndef _TESTMODE_COMMON_H
|
||||
#define _TESTMODE_COMMON_H
|
||||
|
||||
#ifndef COMPOS_TESTMODE_WIN
|
||||
enum _EPQID {
|
||||
EP4QID = 0,
|
||||
EP5QID,
|
||||
EP6QID,
|
||||
EP7QID,
|
||||
EP8QID = 8,
|
||||
EP9QID,
|
||||
EPALLQID
|
||||
};
|
||||
#endif
|
||||
/*test mode common*/
|
||||
/* */
|
||||
/* Scheduler Register 4 (offset: 0x0594, default: 0x0000_0000) */
|
||||
/* Note: */
|
||||
/* 1. DW : double word */
|
||||
/* */
|
||||
union _SCHEDULER_REGISTER4 {
|
||||
struct {
|
||||
/* DW0 */
|
||||
ULONG ForceQid : 4;
|
||||
ULONG ForceMode : 1;
|
||||
ULONG BypassMode : 1;
|
||||
ULONG HybridMode : 1;
|
||||
ULONG RgPredictNoMask : 1;
|
||||
ULONG RgResetScheduler : 1;
|
||||
ULONG RgDoneClearHeader : 1;
|
||||
ULONG SwMode : 1;
|
||||
ULONG Reserves0 : 5;
|
||||
ULONG RgRateMap : 14;
|
||||
ULONG Reserves1 : 2;
|
||||
} Default;
|
||||
ULONG word;
|
||||
};
|
||||
|
||||
/* MT7637 for Band display */
|
||||
#define MT7367_RO_AGC_DEBUG_2 (WF_PHY_BASE + 0x0584)
|
||||
#define CR_ACI_HIT (WF_PHY_BASE + 0x0594)
|
||||
/* MT7637 for Band display end */
|
||||
|
||||
/*~test mode common*/
|
||||
|
||||
#endif /* _TESTMODE_COMMON_H */
|
@ -1,524 +0,0 @@
|
||||
|
||||
#ifndef _TESTMODE_IOCTL_H
|
||||
#define _TESTMODE_IOCTL_H
|
||||
|
||||
#define TM_STATUS_NOTSUPPORT 0x01
|
||||
|
||||
#if defined(COMPOS_TESTMODE_WIN)
|
||||
#define PKTL_TRAN_TO_NET(_Val) _Val
|
||||
#define PKTL_TRAN_TO_HOST(_Val) _Val
|
||||
#define PKTS_TRAN_TO_NET(_Val) _Val
|
||||
#define PKTS_TRAN_TO_HOST(_Val) _Val
|
||||
#define PKTLA_TRAN_TO_HOST(_len, _byte_array) _byte_array
|
||||
#define PKTLA_TRAN_TO_NET(_len, _byte_array) _byte_array
|
||||
#define PKTLA_DUMP(_lvl, _len, _byte_arrary) _byte_array
|
||||
#define PKTUC_DUMP(_lvl, _len, _byte_arrary) _byte_array
|
||||
#else
|
||||
#define PKTL_TRAN_TO_NET(_Val) OS_HTONL(_Val)
|
||||
#define PKTL_TRAN_TO_HOST(_Val) OS_NTOHL(_Val)
|
||||
#define PKTS_TRAN_TO_NET(_Val) OS_HTONS(_Val)
|
||||
#define PKTS_TRAN_TO_HOST(_Val) OS_NTOHS(_Val)
|
||||
#define PKTLA_TRAN_TO_HOST(_len, _byte_array) ({ \
|
||||
INT _cnt = 0; \
|
||||
UINT32 *_arr = (UINT32 *)_byte_array; \
|
||||
for (_cnt = 0; _cnt < _len; _cnt++) \
|
||||
_arr[_cnt] = OS_NTOHL(_arr[_cnt]); \
|
||||
_byte_array; \
|
||||
});
|
||||
#define PKTLA_TRAN_TO_NET(_len, _byte_array) ({ \
|
||||
INT _cnt = 0; \
|
||||
UINT32 *_arr = (UINT32 *)_byte_array; \
|
||||
for (_cnt = 0; _cnt < _len; _cnt++) \
|
||||
_arr[_cnt] = OS_HTONL(_arr[_cnt]); \
|
||||
_byte_array; \
|
||||
});
|
||||
#define PKTLA_DUMP(_lvl, _len, _byte_array)({ \
|
||||
INT _cnt = 0; \
|
||||
UINT32 *_arr = (UINT32 *)_byte_array; \
|
||||
for (_cnt = 0; _cnt < _len; _cnt++) \
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, _lvl, ("DWORD%d:%08x\n", _cnt, _arr[_cnt])); \
|
||||
_len; \
|
||||
});
|
||||
#define PKTUC_DUMP(_lvl, _len, _byte_array)({ \
|
||||
INT _cnt = 0; \
|
||||
UCHAR *_arr = (UCHAR *)_byte_array; \
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, _lvl, ("PKTUC_DUMP(%x): ", _len)); \
|
||||
for (_cnt = 0; _cnt < _len; _cnt++) \
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, _lvl, ("%02x", _arr[_cnt])); \
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, _lvl, ("\n")); \
|
||||
_len; \
|
||||
});
|
||||
#endif
|
||||
|
||||
#if defined(COMPOS_TESTMODE_WIN)
|
||||
/***********************************************************************************
|
||||
* IOCTL related definitions and data structures.
|
||||
**********************************************************************************/
|
||||
typedef struct __RTMP_IOCTL_INPUT_STRUCT {
|
||||
UINT32 InBufLen;
|
||||
PVOID InBuf;
|
||||
UINT32 OutBufLen;
|
||||
PVOID OutBuf;
|
||||
UINT32 *BytesRet;
|
||||
} RTMP_IOCTL_INPUT_STRUCT;
|
||||
|
||||
BOOLEAN mt_mac_cr_range_mapping(struct _RTMP_ADAPTER *pAd, UINT32 *mac_addr);
|
||||
UINT32 mt_physical_addr_map(UINT32 addr);
|
||||
|
||||
#define RTMP_IO_EFAULT 30002
|
||||
#define EFAULT (-RTMP_IO_EFAULT)
|
||||
#endif /* TODO: Add lack of structure for Linux temporarily, fix during merge */
|
||||
VOID HQA_GetThermalValue_CB(struct cmd_msg *msg, char *Data, UINT16 Len);
|
||||
#ifdef TXBF_SUPPORT
|
||||
VOID HQA_BF_INFO_CB(RTMP_ADAPTER *pAd, unsigned char *data, UINT32 len);
|
||||
#endif
|
||||
/*
|
||||
* #if defined(COMPOS_TESTMODE_WIN)
|
||||
* #define OS_ENDIANSWAP(_Val) _Val;
|
||||
* #else
|
||||
* //#define OS_ENDIANSWAP(_Val) PKTL_TRAN_TO_HOST(_Val);
|
||||
* #endif
|
||||
*/
|
||||
/* Common Part, TODO: Only common part after merge */
|
||||
/* Structure for TxBF*/
|
||||
#define HQA_BF_STR_SIZE 512
|
||||
#pragma pack(1)
|
||||
struct GNU_PACKED _HQA_HIFTestParam {
|
||||
UINT32 start_len;
|
||||
UINT32 stop_len;
|
||||
UINT32 repeat_time;
|
||||
UINT32 is_def_pattern;
|
||||
UINT32 bulkout_num;
|
||||
UINT32 bulkin_num;
|
||||
UINT32 txagg_num;
|
||||
UINT32 rxagg_limit;
|
||||
UINT32 rxagg_lm;
|
||||
UINT32 rxagg_to;
|
||||
UINT32 enable_rxagg;
|
||||
};
|
||||
|
||||
#ifdef TXBF_SUPPORT
|
||||
struct GNU_PACKED _HQA_BF_TAG_ALLOC {
|
||||
UINT32 col_idx0;
|
||||
UINT32 row_idx0;
|
||||
UINT32 col_idx1;
|
||||
UINT32 row_idx1;
|
||||
UINT32 col_idx2;
|
||||
UINT32 row_idx2;
|
||||
UINT32 col_idx3;
|
||||
UINT32 row_idx3;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_TAG_MATRIX {
|
||||
UINT32 nrow;
|
||||
UINT32 ncol;
|
||||
UINT32 ngroup;
|
||||
UINT32 LM;
|
||||
UINT32 code_book;
|
||||
UINT32 htc_exist;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_TAG_SNR {
|
||||
UINT32 snr_sts0;
|
||||
UINT32 snr_sts1;
|
||||
UINT32 snr_sts2;
|
||||
UINT32 snr_sts3;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_TAG_MCS_THRD {
|
||||
UINT32 mcs_lss0;
|
||||
UINT32 mcs_sss0;
|
||||
UINT32 mcs_lss1;
|
||||
UINT32 mcs_sss1;
|
||||
UINT32 mcs_lss2;
|
||||
UINT32 mcs_sss2;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_TAG_INFO {
|
||||
/* Tag 1 */
|
||||
UINT32 profile; /* [6:0] : 0 ~ 63 */
|
||||
UINT32 tx_bf; /* [7] : 0: iBF, 1: eBF */
|
||||
UINT32 dbw; /* [9:8] : 0/1/2/3: DW20/40/80/160NC */
|
||||
UINT32 su_mu; /* [10] : 0:SU, 1: MU */
|
||||
UINT32 invalid; /* [11] : 0:default, 1: This profile number is invalid by SW */
|
||||
UINT32 rmsd; /* [14:12] : RMSD value from CE */
|
||||
UINT32 addr1_col_idx; /* [17 : 15] : column index : 0 ~ 5 */
|
||||
UINT32 addr1_row_idx; /* [23 : 18] : row index : 0 ~ 63 */
|
||||
UINT32 addr2_col_idx; /* [26 : 24] : column index : 0 ~ 5 */
|
||||
UINT32 addr2_row_idx; /* [31 : 27] : row index : 0 ~ 63, [32]: MSB of row index */
|
||||
UINT32 addr3_col_idx; /* [35 : 33] : column index : 0 ~ 5 */
|
||||
UINT32 addr3_row_idx; /* [41 : 36] : row index : 0 ~ 63 */
|
||||
UINT32 addr4_col_idx; /* [44 : 42] : column index : 0 ~ 5 */
|
||||
UINT32 addr4_row_idx; /* [50 : 45] : row index : 0 ~ 63 */
|
||||
UINT32 reserved1; /* [51] : Reserved */
|
||||
UINT32 nrow; /* [53 : 52] : Nrow */
|
||||
UINT32 ncol; /* [55 : 54] : Ncol */
|
||||
UINT32 ngroup; /* [57 : 56] : Ngroup */
|
||||
UINT32 LM; /* [59 : 58] : 0/1/2 */
|
||||
UINT32 code_book; /* [61:60] : Code book */
|
||||
UINT32 htc_exist; /* [62] : HtcExist */
|
||||
UINT32 reserved2; /* [63] : Reserved */
|
||||
UINT32 snr_sts0; /* [71:64] : SNR_STS0 */
|
||||
UINT32 snr_sts1; /* [79:72] : SNR_STS1 */
|
||||
UINT32 snr_sts2; /* [87:80] : SNR_STS2 */
|
||||
UINT32 snr_sts3; /* [95:88] : SNR_STS3 */
|
||||
UINT32 ibf_lanidx; /* [103:96] : iBF LNA index */
|
||||
/* Tag 2 */
|
||||
UINT32 smt_ant; /* [11:0] : Smart Ant config */
|
||||
UINT32 reserved3; /* [14:12] : Reserved */
|
||||
UINT32 se_idx; /* [19:15] : SE index */
|
||||
UINT32 rmsd_thrd; /* [22:20] : RMSD Threshold */
|
||||
UINT32 reserved4; /* [23] : Reserved */
|
||||
UINT32 mcs_thrd_l1ss; /* [27:24] : MCS TH long 1SS */
|
||||
UINT32 mcs_thrd_s1ss; /* [31:28] : MCS TH short 1SS */
|
||||
UINT32 mcs_thrd_l2ss; /* [35:32] : MCS TH long 2SS */
|
||||
UINT32 mcs_thrd_s2ss; /* [39:36] : MCS TH short 2SS */
|
||||
UINT32 mcs_thrd_l3ss; /* [43:40] : MCS TH long 3SS */
|
||||
UINT32 mcs_thrd_s3ss; /* [47:44] : MCS TH short 3SS */
|
||||
UINT32 bf_tout; /* [55:48] : iBF timeout limit */
|
||||
UINT32 reserved5; /* [63:56] : Reserved */
|
||||
UINT32 reserved6; /* [71:64] : Reserved */
|
||||
UINT32 reserved7; /* [79:72] : Reserved */
|
||||
UINT32 ibf_dbw; /* [81:80] : iBF desired DBW 0/1/2/3 : BW20/40/80/160NC */
|
||||
UINT32 ibf_ncol; /* [83:82] : iBF desired Ncol = 1 ~ 3 */
|
||||
UINT32 ibf_nrow; /* [85:84] : iBF desired Nrow = 1 ~ 4 */
|
||||
UINT32 reserved8; /* [95:86] : Reserved */
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_STA_CMM_REC {
|
||||
UINT32 wlan_idx;
|
||||
UINT32 bss_idx;
|
||||
UINT32 aid;
|
||||
UCHAR mac[MAC_ADDR_LEN];
|
||||
};
|
||||
|
||||
enum _HQA_BF_CMD_ID {
|
||||
ATE_TXBF_INIT = 1,
|
||||
ATE_CHANNEL,
|
||||
ATE_TX_MCS,
|
||||
ATE_TX_POW0,
|
||||
ATE_TX_ANT,
|
||||
ATE_RX_FRAME,
|
||||
ATE_RX_ANT,
|
||||
ATE_TXBF_LNA_GAIN,
|
||||
ATE_IBF_PHASE_COMP,
|
||||
ATE_IBF_TX,
|
||||
ATE_IBF_PROF_UPDATE,
|
||||
ATE_EBF_PROF_UPDATE,
|
||||
ATE_IBF_INST_CAL,
|
||||
ATE_IBF_INST_VERIFY,
|
||||
ATE_TXBF_GD_INIT,
|
||||
ATE_IBF_PHASE_E2P_UPDATE
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_STA_REC {
|
||||
UINT32 wlan_idx;
|
||||
UINT32 bss_idx;
|
||||
UINT32 PfmuId;
|
||||
UINT32 su_mu;
|
||||
UINT32 etxbf_cap;
|
||||
UINT32 ndpa_rate;
|
||||
UINT32 ndp_rate;
|
||||
UINT32 report_poll_rate;
|
||||
UINT32 tx_mode;
|
||||
UINT32 nc;
|
||||
UINT32 nr;
|
||||
UINT32 cbw;
|
||||
UINT32 spe_idx;
|
||||
UINT32 tot_mem_req;
|
||||
UINT32 mem_req_20m;
|
||||
UINT32 mem_row0;
|
||||
UINT32 mem_col0;
|
||||
UINT32 mem_row1;
|
||||
UINT32 mem_col1;
|
||||
UINT32 mem_row2;
|
||||
UINT32 mem_col2;
|
||||
UINT32 mem_row3;
|
||||
UINT32 mem_col3;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_STA_PROFILE {
|
||||
UINT32 pfmuid;
|
||||
UINT32 subcarrier;
|
||||
UINT32 phi11;
|
||||
UINT32 psi21;
|
||||
UINT32 phi21;
|
||||
UINT32 psi31;
|
||||
UINT32 phi31;
|
||||
UINT32 psi41;
|
||||
UINT32 phi22;
|
||||
UINT32 psi32;
|
||||
UINT32 phi32;
|
||||
UINT32 psi42;
|
||||
UINT32 phi33;
|
||||
UINT32 psi43;
|
||||
UINT32 snr00;
|
||||
UINT32 snr01;
|
||||
UINT32 snr02;
|
||||
UINT32 snr03;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_SOUNDING {
|
||||
UINT32 su_mu;
|
||||
UINT32 mu_num;
|
||||
UINT32 snd_interval;
|
||||
UINT32 wlan_id0;
|
||||
UINT32 wlan_id1;
|
||||
UINT32 wlan_id2;
|
||||
UINT32 wlan_id3;
|
||||
UINT32 band_idx;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_BF_MANUAL_CONN {
|
||||
UCHAR mac[MAC_ADDR_LEN];
|
||||
UINT32 type;
|
||||
UINT32 wtbl_idx;
|
||||
UINT32 ownmac_idx;
|
||||
UINT32 phymode;
|
||||
UINT32 bw;
|
||||
UINT32 pfmuid;
|
||||
UINT32 marate_mode;
|
||||
UINT32 marate_mcs;
|
||||
UINT32 nss;
|
||||
UINT32 spe_idx;
|
||||
UINT32 rca2;
|
||||
UINT32 rv;
|
||||
UINT32 aid;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_PWR_MANUAL {
|
||||
UINT32 u4PwrManCtrl;
|
||||
UINT32 u4TxPwrModeManual;
|
||||
UINT32 u4TxPwrBwManual;
|
||||
UINT32 u4TxPwrRateManual;
|
||||
UINT32 i4TxPwrValueManual;
|
||||
UINT32 u4Band;
|
||||
};
|
||||
|
||||
#ifdef CFG_SUPPORT_MU_MIMO
|
||||
/* Structure for MU-MIMO */
|
||||
struct _HQA_MU_STA_PARAM {
|
||||
UINT32 gid[2];
|
||||
UINT32 up[4];
|
||||
};
|
||||
|
||||
struct _HQA_MU_TBL {
|
||||
UINT32 su_mu;
|
||||
UCHAR tbl[0];
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_MU_USR_INIT_MCS {
|
||||
UINT32 user0;
|
||||
UINT32 user1;
|
||||
UINT32 user2;
|
||||
UINT32 user3;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_MU_USR_LQ {
|
||||
UINT32 usr0_bpsk;
|
||||
UINT32 usr0_qpsk;
|
||||
UINT32 usr0_16qam;
|
||||
UINT32 usr0_64qam;
|
||||
UINT32 usr0_256qam;
|
||||
UINT32 usr1_bpsk;
|
||||
UINT32 usr1_qpsk;
|
||||
UINT32 usr1_16qam;
|
||||
UINT32 usr1_64qam;
|
||||
UINT32 usr1_256qam;
|
||||
UINT32 usr2_bpsk;
|
||||
UINT32 usr2_qpsk;
|
||||
UINT32 usr2_16qam;
|
||||
UINT32 usr2_64qam;
|
||||
UINT32 usr2_256qam;
|
||||
UINT32 usr3_bpsk;
|
||||
UINT32 usr3_qpsk;
|
||||
UINT32 usr3_16qam;
|
||||
UINT32 usr3_64qam;
|
||||
UINT32 usr3_256qam;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_MU_GRP_INFO {
|
||||
UINT32 grp_idx;
|
||||
UINT32 num_usr;
|
||||
UINT32 usr0_ldpc;
|
||||
UINT32 usr1_ldpc;
|
||||
UINT32 usr2_ldpc;
|
||||
UINT32 usr3_ldpc;
|
||||
UINT32 usr0_nss;
|
||||
UINT32 usr1_nss;
|
||||
UINT32 usr2_nss;
|
||||
UINT32 usr3_nss;
|
||||
UINT32 gid;
|
||||
UINT32 usr0_up;
|
||||
UINT32 usr1_up;
|
||||
UINT32 usr2_up;
|
||||
UINT32 usr3_up;
|
||||
UINT32 usr0_pfmu_id;
|
||||
UINT32 usr1_pfmu_id;
|
||||
UINT32 usr2_pfmu_id;
|
||||
UINT32 usr3_pfmu_id;
|
||||
UINT32 initMCS0;
|
||||
UINT32 initMCS1;
|
||||
UINT32 initMCS2;
|
||||
UINT32 initMCS3;
|
||||
UCHAR usr0_mac[MAC_ADDR_LEN];
|
||||
UCHAR usr1_mac[MAC_ADDR_LEN];
|
||||
UCHAR usr2_mac[MAC_ADDR_LEN];
|
||||
UCHAR usr3_mac[MAC_ADDR_LEN];
|
||||
};
|
||||
#endif/* CFG_SUPPORT_MU_MIMO */
|
||||
#endif /* TXBF_SUPPORT */
|
||||
#pragma pack()
|
||||
|
||||
/* DBDC Tx Ext */
|
||||
#pragma pack(1)
|
||||
struct GNU_PACKED _HQA_EXT_SET_CH {
|
||||
UINT32 ext_id;
|
||||
UINT32 num_param;
|
||||
UINT32 band_idx;
|
||||
UINT32 central_ch0;
|
||||
UINT32 central_ch1;
|
||||
UINT32 sys_bw;
|
||||
UINT32 perpkt_bw;
|
||||
UINT32 pri_sel;
|
||||
UINT32 reason;
|
||||
UINT32 ch_band;
|
||||
UINT32 out_band_freq;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_EXT_TX_CONTENT {
|
||||
UINT32 ext_id;
|
||||
UINT32 num_param;
|
||||
UINT32 band_idx;
|
||||
UINT32 FC;
|
||||
UINT32 dur;
|
||||
UINT32 seq;
|
||||
UINT32 gen_payload_rule; /* Normal:0,Repeat:1,Random:2 */
|
||||
UINT32 txlen;
|
||||
UINT32 payload_len;
|
||||
UCHAR addr1[MAC_ADDR_LEN];
|
||||
UCHAR addr2[MAC_ADDR_LEN];
|
||||
UCHAR addr3[MAC_ADDR_LEN];
|
||||
UCHAR payload[0];
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_EXT_TXV {
|
||||
UINT32 ext_id;
|
||||
UINT32 num_param;
|
||||
UINT32 band_idx;
|
||||
UINT32 pkt_cnt;
|
||||
UINT32 phymode;
|
||||
UINT32 rate;
|
||||
UINT32 pwr;
|
||||
UINT32 stbc;
|
||||
UINT32 ldpc;
|
||||
UINT32 ibf;
|
||||
UINT32 ebf;
|
||||
UINT32 wlan_id;
|
||||
UINT32 aifs;
|
||||
UINT32 gi;
|
||||
UINT32 tx_path;
|
||||
UINT32 nss;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_CMD_FRAME {
|
||||
UINT32 MagicNo;
|
||||
UINT16 Type;
|
||||
UINT16 Id;
|
||||
UINT16 Length;
|
||||
UINT16 Sequence;
|
||||
UINT8 Data[IOCTLBUFF];
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
typedef INT32(*HQA_CMD_HANDLER)(
|
||||
struct _RTMP_ADAPTER *pAd,
|
||||
struct __RTMP_IOCTL_INPUT_STRUCT *wrq,
|
||||
struct _HQA_CMD_FRAME *HqaCmdFrame);
|
||||
|
||||
struct _HQA_CMD_TABLE {
|
||||
HQA_CMD_HANDLER *CmdSet;
|
||||
UINT32 CmdSetSize;
|
||||
UINT32 CmdOffset;
|
||||
};
|
||||
|
||||
struct GNU_PACKED _HQA_RX_STAT {
|
||||
UINT32 mac_rx_fcs_err_cnt;
|
||||
UINT32 mac_rx_mdrdy_cnt;
|
||||
UINT32 phy_rx_fcs_err_cnt_cck;
|
||||
UINT32 phy_rx_fcs_err_cnt_ofdm;
|
||||
UINT32 phy_rx_pd_cck;
|
||||
UINT32 phy_rx_pd_ofdm;
|
||||
UINT32 phy_rx_sig_err_cck;
|
||||
UINT32 phy_rx_sfd_err_cck;
|
||||
UINT32 phy_rx_sig_err_ofdm;
|
||||
UINT32 phy_rx_tag_err_ofdm;
|
||||
UINT32 WB_RSSSI0;
|
||||
UINT32 IB_RSSSI0;
|
||||
UINT32 WB_RSSSI1;
|
||||
UINT32 IB_RSSSI1;
|
||||
UINT32 phy_rx_mdrdy_cnt_cck;
|
||||
UINT32 phy_rx_mdrdy_cnt_ofdm;
|
||||
UINT32 DriverRxCount;
|
||||
UINT32 RCPI0;
|
||||
UINT32 RCPI1;
|
||||
INT32 FreqOffsetFromRX;
|
||||
UINT32 RSSI0;
|
||||
UINT32 RSSI1;
|
||||
UINT32 rx_fifo_full;
|
||||
/* #ifdef MT7615 */
|
||||
UINT32 mac_rx_len_mismatch;
|
||||
UINT32 mac_rx_fcs_err_cnt_band1;
|
||||
UINT32 mac_rx_mdrdy_cnt_band1;
|
||||
UINT32 FAGC_IB_RSSSI[4];
|
||||
UINT32 FAGC_WB_RSSSI[4];
|
||||
UINT32 Inst_IB_RSSSI[4];
|
||||
UINT32 Inst_WB_RSSSI[4];
|
||||
UINT32 ACIHitLow;
|
||||
UINT32 ACIHitHigh;
|
||||
UINT32 DriverRxCount1;
|
||||
UINT32 RCPI2;
|
||||
UINT32 RCPI3;
|
||||
UINT32 RSSI2;
|
||||
UINT32 RSSI3;
|
||||
UINT32 SNR0;
|
||||
UINT32 SNR1;
|
||||
UINT32 SNR2;
|
||||
UINT32 SNR3;
|
||||
UINT32 rx_fifo_full_band1;
|
||||
UINT32 mac_rx_len_mismatch_band1;
|
||||
UINT32 phy_rx_pd_cck_band1;
|
||||
UINT32 phy_rx_pd_ofdm_band1;
|
||||
UINT32 phy_rx_sig_err_cck_band1;
|
||||
UINT32 phy_rx_sfd_err_cck_band1;
|
||||
UINT32 phy_rx_sig_err_ofdm_band1;
|
||||
UINT32 phy_rx_tag_err_ofdm_band1;
|
||||
UINT32 phy_rx_mdrdy_cnt_cck_band1;
|
||||
UINT32 phy_rx_mdrdy_cnt_ofdm_band1;
|
||||
UINT32 phy_rx_fcs_err_cnt_cck_band1;
|
||||
UINT32 phy_rx_fcs_err_cnt_ofdm_band1;
|
||||
UINT32 MuPktCount;
|
||||
UINT32 SIG_MCS;
|
||||
UINT32 SINR;
|
||||
UINT32 RXVRSSI;
|
||||
/* #endif */
|
||||
UINT32 mac_rx_fcs_ok_cnt; /* MT7622 only */
|
||||
};
|
||||
|
||||
UINT32 HQA_CMDHandler(struct _RTMP_ADAPTER *pAd, struct __RTMP_IOCTL_INPUT_STRUCT *Wrq, struct _HQA_CMD_FRAME *HqaCmdFrame);
|
||||
|
||||
#define TM_CMDREQ 0x0008
|
||||
#define TM_CMDRSP 0x8008
|
||||
#define HQA_CMD_MAGIC_NO 0x18142880
|
||||
|
||||
#define HQA_CMD_REQ 0x0005
|
||||
#define HQA_CMD_RSP 0x8005
|
||||
#define TMR_HW_VER_100 100
|
||||
#define TMR_HW_VER_150 150
|
||||
#define TMR_HW_VER_200 200
|
||||
|
||||
|
||||
#define HQA_CMD_MAGIC_NO 0x18142880
|
||||
#define EFUSE_ADDR_FREQUENCY_OFFSET_MT7637 0xF4/* MT7637 */
|
||||
|
||||
#endif /* _TESTMODE_IOCTL_H */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,214 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
Module Name:
|
||||
mt_testmode_dmac.c
|
||||
|
||||
*/
|
||||
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
#include "config.h"
|
||||
#else
|
||||
#include "rt_config.h"
|
||||
#endif
|
||||
|
||||
|
||||
INT mt_ate_mac_cr_restore(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
#if defined(MT7615) || defined(MT7622)
|
||||
if (IS_MT7615(pAd) || IS_MT7622(pAd)) {
|
||||
/* Data frame protection CR recover */
|
||||
MtTestModeRestoreCr(pAd, AGG_PCR);
|
||||
/* RTS threshold CR recover */
|
||||
MtTestModeRestoreCr(pAd, AGG_PCR1);
|
||||
#ifdef DBDC_MODE
|
||||
if (IS_ATE_DBDC(pAd)) {
|
||||
MtTestModeRestoreCr(pAd, AGG_PCR2);
|
||||
}
|
||||
#endif /* DBDC_MODE */
|
||||
/* BA related CR recover */
|
||||
MtTestModeRestoreCr(pAd, AGG_AALCR0);
|
||||
MtTestModeRestoreCr(pAd, AGG_AALCR1);
|
||||
MtTestModeRestoreCr(pAd, AGG_AALCR2);
|
||||
MtTestModeRestoreCr(pAd, AGG_AALCR3);
|
||||
MtTestModeRestoreCr(pAd, AGG_AWSCR0);
|
||||
MtTestModeRestoreCr(pAd, AGG_AWSCR1);
|
||||
/* Station pause CR recover */
|
||||
MtTestModeRestoreCr(pAd, STATION_PAUSE0);
|
||||
MtTestModeRestoreCr(pAd, STATION_PAUSE1);
|
||||
MtTestModeRestoreCr(pAd, STATION_PAUSE2);
|
||||
MtTestModeRestoreCr(pAd, STATION_PAUSE3);
|
||||
/* Enable HW BAR feature */
|
||||
MtTestModeRestoreCr(pAd, AGG_MRCR);
|
||||
/* IPG related CR recover */
|
||||
MtTestModeRestoreCr(pAd, TMAC_TRCR0);
|
||||
MtTestModeRestoreCr(pAd, TMAC_ICR_BAND_0);
|
||||
MtTestModeRestoreCr(pAd, ARB_DRNGR0);
|
||||
MtTestModeRestoreCr(pAd, ARB_DRNGR1);
|
||||
MtTestModeRestoreCr(pAd, ARB_WMMAC01);
|
||||
MtTestModeRestoreCr(pAd, ARB_WMMAC11);
|
||||
MtTestModeRestoreCr(pAd, ARB_WMMAC21);
|
||||
MtTestModeRestoreCr(pAd, ARB_WMMAC31);
|
||||
MtTestModeRestoreCr(pAd, ARB_WMMALTX0);
|
||||
#ifdef DBDC_MODE
|
||||
if (IS_ATE_DBDC(pAd)) {
|
||||
MtTestModeRestoreCr(pAd, TMAC_TRCR1);
|
||||
MtTestModeRestoreCr(pAd, TMAC_ICR_BAND_1);
|
||||
MtTestModeRestoreCr(pAd, ARB_WMMALTX1);
|
||||
}
|
||||
#endif /* DBDC_MODE */
|
||||
}
|
||||
#endif /* defined(MT7615) || defined(MT7622) */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT mt_ate_mac_cr_backup_and_set(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
struct _ATE_CTRL *ATECtrl = &pAd->ATECtrl;
|
||||
|
||||
NdisZeroMemory(&ATECtrl->bk_cr, sizeof(struct _TESTMODE_BK_CR)*MAX_TEST_BKCR_NUM);
|
||||
#if defined(MT7615) || defined(MT7622)
|
||||
/* TODO: check if following operation also need to do for other chips */
|
||||
if (IS_MT7615(pAd) || IS_MT7622(pAd)) {
|
||||
UINT32 val = 0;
|
||||
/* Enable data frame protection for test mode */
|
||||
MtTestModeBkCr(pAd, AGG_PCR, TEST_MAC_BKCR);
|
||||
MAC_IO_READ32(pAd, AGG_PCR, &val);
|
||||
val = 0x80008;
|
||||
MAC_IO_WRITE32(pAd, AGG_PCR, val);
|
||||
/* RTS threshold need to change to 1 for test mode */
|
||||
MtTestModeBkCr(pAd, AGG_PCR1, TEST_MAC_BKCR);
|
||||
MAC_IO_READ32(pAd, AGG_PCR1, &val);
|
||||
/* val &= 0x0FFFFFFF; */
|
||||
/* val |= 0x10000000; */
|
||||
/* Setting RTS threshold to max value to aviod send RTS in test mode */
|
||||
val = 0xFE0FFFFF;
|
||||
MAC_IO_WRITE32(pAd, AGG_PCR1, val);
|
||||
#ifdef DBDC_MODE
|
||||
/* RTS threshold disable for band1 */
|
||||
if (IS_ATE_DBDC(pAd)) {
|
||||
MtTestModeBkCr(pAd, AGG_PCR2, TEST_MAC_BKCR);
|
||||
MAC_IO_READ32(pAd, AGG_PCR2, &val);
|
||||
val = 0xFE0FFFFF;
|
||||
MAC_IO_WRITE32(pAd, AGG_PCR2, val);
|
||||
}
|
||||
#endif /* DBDC_MODE */
|
||||
/* BA related CR backup */
|
||||
MtTestModeBkCr(pAd, AGG_AALCR0, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, AGG_AALCR1, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, AGG_AALCR2, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, AGG_AALCR3, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, AGG_AWSCR0, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, AGG_AWSCR1, TEST_MAC_BKCR);
|
||||
/* Station pause CR backup for TX after reset WTBL */
|
||||
MtTestModeBkCr(pAd, STATION_PAUSE0, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, STATION_PAUSE1, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, STATION_PAUSE2, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, STATION_PAUSE3, TEST_MAC_BKCR);
|
||||
/* HW BAR feature */
|
||||
MtTestModeBkCr(pAd, AGG_MRCR, TEST_MAC_BKCR);
|
||||
MAC_IO_READ32(pAd, AGG_MRCR, &val);
|
||||
val &= ~BAR_TX_CNT_LIMIT_MASK;
|
||||
val |= BAR_TX_CNT_LIMIT(0);
|
||||
MAC_IO_WRITE32(pAd, AGG_MRCR, val);
|
||||
/* IPG related CR back up */
|
||||
MtTestModeBkCr(pAd, TMAC_TRCR0, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, TMAC_ICR_BAND_0, TEST_MAC_BKCR); /* IFS CR, for SIFS/SLOT time control */
|
||||
MtTestModeBkCr(pAd, ARB_DRNGR0, TEST_MAC_BKCR); /* For fixing backoff random number */
|
||||
MtTestModeBkCr(pAd, ARB_DRNGR1, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, ARB_WMMAC01, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, ARB_WMMAC11, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, ARB_WMMAC21, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, ARB_WMMAC31, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, ARB_WMMALTX0, TEST_MAC_BKCR);
|
||||
#ifdef DBDC_MODE
|
||||
if (IS_ATE_DBDC(pAd)) {
|
||||
MtTestModeBkCr(pAd, TMAC_TRCR1, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, TMAC_ICR_BAND_1, TEST_MAC_BKCR);
|
||||
MtTestModeBkCr(pAd, ARB_WMMALTX1, TEST_MAC_BKCR);
|
||||
}
|
||||
#endif /* DBDC_MODE */
|
||||
}
|
||||
#endif /* defined(MT7615) || defined(MT7622) */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
UINT32 agg_cnt_array[] = {AGG_AALCR0, AGG_AALCR1, AGG_AALCR2, AGG_AALCR3};
|
||||
INT mt_ate_ampdu_ba_limit(RTMP_ADAPTER *pAd, UINT32 band_idx, UINT8 agg_limit)
|
||||
{
|
||||
struct _ATE_CTRL *ATECtrl = &pAd->ATECtrl;
|
||||
UINT32 value;
|
||||
INT wdev_idx = 0;
|
||||
UCHAR WmmIdx = 0xFF;
|
||||
#if !defined(COMPOS_TESTMODE_WIN)
|
||||
struct wifi_dev *pWdev = NULL;
|
||||
|
||||
wdev_idx = TESTMODE_GET_PARAM(ATECtrl, band_idx, wdev_idx);
|
||||
pWdev = pAd->wdev_list[wdev_idx];
|
||||
|
||||
if (pWdev) {
|
||||
WmmIdx = TESTMODE_GET_PARAM(ATECtrl, band_idx, wmm_idx);
|
||||
|
||||
if (WmmIdx > 3) {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR,
|
||||
("%s: wdev_idx=%d, invalid WmmIdx=%d, reset to 0!\n",
|
||||
__func__, wdev_idx, WmmIdx));
|
||||
WmmIdx = 0xFF;
|
||||
}
|
||||
} else {
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_ERROR,
|
||||
("%s: invalid WDEV, reset WmmIdx to 0!\n", __func__));
|
||||
WmmIdx = 0xFF;
|
||||
}
|
||||
|
||||
#endif
|
||||
MTWF_LOG(DBG_CAT_TEST, DBG_SUBCAT_ALL, DBG_LVL_TRACE,
|
||||
("%s: wdev_idx=%d, WmmIdx=%d\n",
|
||||
__func__, wdev_idx, WmmIdx));
|
||||
value = ((agg_limit & 0x3F) << 24)
|
||||
| ((agg_limit & 0x3F) << 16)
|
||||
| ((agg_limit & 0x3F) << 8)
|
||||
| ((agg_limit & 0x3F) << 0);
|
||||
|
||||
if (WmmIdx <= 3)
|
||||
MAC_IO_WRITE32(pAd, agg_cnt_array[WmmIdx], value);
|
||||
else {
|
||||
MAC_IO_WRITE32(pAd, AGG_AALCR0, value);
|
||||
MAC_IO_WRITE32(pAd, AGG_AALCR1, value);
|
||||
MAC_IO_WRITE32(pAd, AGG_AALCR2, value);
|
||||
MAC_IO_WRITE32(pAd, AGG_AALCR3, value);
|
||||
}
|
||||
|
||||
value = 0x0;
|
||||
MAC_IO_WRITE32(pAd, AGG_AWSCR0, value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT mt_ate_set_sta_pause_cr(RTMP_ADAPTER *pAd, UINT32 band_idx)
|
||||
{
|
||||
INT32 ret = 0;
|
||||
UINT32 value;
|
||||
|
||||
/* Set station pause CRs to 0 for TX after reset WTBL */
|
||||
/* The CR meaning in normal mode is that stop to TX packet when STA disconnect */
|
||||
value = 0x0;
|
||||
MAC_IO_WRITE32(pAd, STATION_PAUSE0, value);
|
||||
MAC_IO_WRITE32(pAd, STATION_PAUSE1, value);
|
||||
MAC_IO_WRITE32(pAd, STATION_PAUSE2, value);
|
||||
MAC_IO_WRITE32(pAd, STATION_PAUSE3, value);
|
||||
|
||||
return ret;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* MediaTek Inc.
|
||||
*
|
||||
* All rights reserved. source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of MediaTek. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of MediaTek, Inc. is obtained.
|
||||
***************************************************************************
|
||||
Module Name:
|
||||
mt_testmode_smac.c
|
||||
|
||||
*/
|
||||
|
||||
#ifdef COMPOS_TESTMODE_WIN
|
||||
#include "config.h"
|
||||
#else
|
||||
#include "rt_config.h"
|
||||
#endif
|
||||
|
||||
|
||||
INT mt_ate_mac_cr_restore(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
/* Data frame protection CR recover */
|
||||
MtTestModeRestoreCr(pAd, AGG_PCR);
|
||||
/* RTS threshold CR recover */
|
||||
MtTestModeRestoreCr(pAd, AGG_PCR1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT mt_ate_mac_cr_backup_and_set(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
struct _ATE_CTRL *ATECtrl = &pAd->ATECtrl;
|
||||
UINT32 val = 0;
|
||||
|
||||
NdisZeroMemory(&ATECtrl->bk_cr, sizeof(struct _TESTMODE_BK_CR)*MAX_TEST_BKCR_NUM);
|
||||
/* Enable data frame protection for test mode */
|
||||
MtTestModeBkCr(pAd, AGG_PCR, TEST_MAC_BKCR);
|
||||
MAC_IO_READ32(pAd, AGG_PCR, &val);
|
||||
val = 0x80008;
|
||||
MAC_IO_WRITE32(pAd, AGG_PCR, val);
|
||||
/* RTS threshold need to change to 1 for test mode */
|
||||
MtTestModeBkCr(pAd, AGG_PCR1, TEST_MAC_BKCR);
|
||||
MAC_IO_READ32(pAd, AGG_PCR1, &val);
|
||||
/* val &= 0x0FFFFFFF; */
|
||||
/* val |= 0x10000000; */
|
||||
/* Setting RTS threshold to max value to aviod send RTS in test mode */
|
||||
val = 0xFE0FFFFF;
|
||||
MAC_IO_WRITE32(pAd, AGG_PCR1, val);
|
||||
|
||||
return 0;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,255 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* 4F, No. 2 Technology 5th Rd.
|
||||
* Science-based Industrial Park
|
||||
* Hsin-chu, Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002-2004, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
rt_chip.c
|
||||
|
||||
Abstract:
|
||||
Ralink Wireless driver CHIP related functions
|
||||
|
||||
Revision History:
|
||||
Who When What
|
||||
-------- ---------- ----------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#include "rt_config.h"
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
write high memory.
|
||||
if firmware do not support auto high/low memory switching, we should switch to high memory by ourself.
|
||||
|
||||
Arguments:
|
||||
pAd - WLAN control block pointer
|
||||
Offset - Memory offsets
|
||||
Value - Written value
|
||||
Unit - Unit in "Byte"
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
VOID RtmpChipWriteHighMemory(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN USHORT Offset,
|
||||
IN UINT32 Value,
|
||||
IN UINT8 Unit)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
write memory
|
||||
|
||||
Arguments:
|
||||
pAd - WLAN control block pointer
|
||||
Offset - Memory offsets
|
||||
Value - Written value
|
||||
Unit - Unit in "Byte"
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
VOID RtmpChipWriteMemory(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN USHORT Offset,
|
||||
IN UINT32 Value,
|
||||
IN UINT8 Unit)
|
||||
{
|
||||
switch (Unit) {
|
||||
case 1:
|
||||
RTMP_IO_WRITE8(pAd, Offset, Value);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
RTMP_IO_WRITE16(pAd, Offset, Value);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
RTMP_IO_WRITE32(pAd, Offset, Value);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Initialize normal beacon frame architecture.
|
||||
|
||||
Arguments:
|
||||
pAd - WLAN control block pointer
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
VOID RtmpChipBcnInit(
|
||||
IN RTMP_ADAPTER *pAd)
|
||||
{
|
||||
RTMP_CHIP_CAP *pChipCap = hc_get_chip_cap(pAd->hdev_ctrl);
|
||||
struct _RTMP_CHIP_OP *ops = hc_get_chip_ops(pAd->hdev_ctrl);
|
||||
|
||||
pChipCap->FlgIsSupSpecBcnBuf = FALSE;
|
||||
pChipCap->BcnMaxHwNum = 8;
|
||||
pChipCap->BcnMaxNum = (pChipCap->BcnMaxHwNum - MAX_MESH_NUM - MAX_APCLI_NUM);
|
||||
pChipCap->BcnMaxHwSize = 0x1000;
|
||||
pChipCap->BcnBase[0] = 0x7800;
|
||||
pChipCap->BcnBase[1] = 0x7A00;
|
||||
pChipCap->BcnBase[2] = 0x7C00;
|
||||
pChipCap->BcnBase[3] = 0x7E00;
|
||||
pChipCap->BcnBase[4] = 0x7200;
|
||||
pChipCap->BcnBase[5] = 0x7400;
|
||||
pChipCap->BcnBase[6] = 0x5DC0;
|
||||
pChipCap->BcnBase[7] = 0x5BC0;
|
||||
|
||||
/*
|
||||
If the MAX_MBSSID_NUM is larger than 6,
|
||||
it shall reserve some WCID space(wcid 222~253) for beacon frames.
|
||||
- these wcid 238~253 are reserved for beacon#6(ra6).
|
||||
- these wcid 222~237 are reserved for beacon#7(ra7).
|
||||
*/
|
||||
if (pChipCap->BcnMaxNum == 8)
|
||||
pChipCap->WcidHwRsvNum = 222;
|
||||
else if (pChipCap->BcnMaxNum == 7)
|
||||
pChipCap->WcidHwRsvNum = 238;
|
||||
else
|
||||
pChipCap->WcidHwRsvNum = 255;
|
||||
|
||||
ops->BeaconUpdate = RtmpChipWriteMemory;
|
||||
}
|
||||
|
||||
UINT8 NICGetBandSupported(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
if (BOARD_IS_5G_ONLY(pAd))
|
||||
return RFIC_5GHZ;
|
||||
else if (BOARD_IS_2G_ONLY(pAd))
|
||||
return RFIC_24GHZ;
|
||||
else if (RFIC_IS_5G_BAND(pAd))
|
||||
return RFIC_DUAL_BAND;
|
||||
else
|
||||
return RFIC_24GHZ;
|
||||
}
|
||||
|
||||
|
||||
INT WaitForAsicReady(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
INT AsicGetMacVersion(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
UINT32 reg = 0;
|
||||
struct _RTMP_CHIP_CAP *cap = hc_get_chip_cap(pAd->hdev_ctrl);
|
||||
|
||||
/* TODO: shiang-7603 */
|
||||
if (cap->hif_type == HIF_MT) {
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%s(%d): Not support for HIF_MT yet!\n",
|
||||
__func__, __LINE__));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (WaitForAsicReady(pAd) == TRUE) {
|
||||
RTMP_IO_READ32(pAd, reg, &pAd->MACVersion);
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("MACVersion[Ver:Rev]=0x%08x : 0x%08x\n",
|
||||
pAd->MACVersion, pAd->ChipID));
|
||||
return TRUE;
|
||||
} else {
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s() failed!\n", __func__));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Initialize chip related information.
|
||||
|
||||
Arguments:
|
||||
pCB - WLAN control block pointer
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
int RtmpChipOpsHook(VOID *pCB)
|
||||
{
|
||||
RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pCB;
|
||||
RTMP_CHIP_CAP *pChipCap = hc_get_chip_cap(pAd->hdev_ctrl);
|
||||
int ret = 0;
|
||||
|
||||
#ifdef MT_DFS_SUPPORT
|
||||
/* Initial new DFS channel list */
|
||||
DfsSetNewChInit(pAd);
|
||||
#endif
|
||||
|
||||
/* sanity check */
|
||||
if (WaitForAsicReady(pAd) == FALSE)
|
||||
return -1;
|
||||
|
||||
/* TODO: shiang-7603 */
|
||||
if (IS_MT7603(pAd) || IS_MT7628(pAd) || IS_MT76x6(pAd) || IS_MT7637(pAd) || IS_MT7615(pAd)) {
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_OFF,
|
||||
("%s(%d): Not support for HIF_MT yet! MACVersion=0x%x\n",
|
||||
__func__, __LINE__, pAd->MACVersion));
|
||||
}
|
||||
|
||||
if (pAd->MACVersion == 0xffffffff)
|
||||
return -1;
|
||||
|
||||
/* default init */
|
||||
RTMP_DRS_ALG_INIT(pAd, RATE_ALG_LEGACY);
|
||||
#ifdef RTMP_RBUS_SUPPORT
|
||||
|
||||
if (pAd->infType == RTMP_DEV_INF_RBUS) {
|
||||
/* wilsonl, need DE provide info */
|
||||
#ifndef MT7622
|
||||
RTMP_SYS_IO_READ32(0xb000000c, &pAd->CommonCfg.CID);
|
||||
RTMP_SYS_IO_READ32(0xb0000000, &pAd->CommonCfg.CN);
|
||||
#endif
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("CN: %lx\tCID = %lx\n",
|
||||
pAd->CommonCfg.CN, pAd->CommonCfg.CID));
|
||||
}
|
||||
|
||||
#endif /* RTMP_RBUS_SUPPORT */
|
||||
/*initial chip hook function*/
|
||||
WfSysPreInit(pAd);
|
||||
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Chip specific bbpRegTbSize=%d!\n", pChipCap->bbpRegTbSize));
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Chip VCO calibration mode = %d!\n", pChipCap->FlgIsVcoReCalMode));
|
||||
#ifdef DOT11W_PMF_SUPPORT
|
||||
MTWF_LOG(DBG_CAT_HW, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("[PMF] Encryption mode = %d\n", pChipCap->FlgPMFEncrtptMode));
|
||||
#endif /* DOT11W_PMF_SUPPORT */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1,528 +0,0 @@
|
||||
config MT_WIFI
|
||||
tristate "MT WIFI Driver"
|
||||
select WIFI_BASIC_FUNC if MT_WIFI
|
||||
|
||||
config MT_WIFI_PATH
|
||||
string
|
||||
depends on MT_WIFI
|
||||
default "mt_wifi"
|
||||
|
||||
if MT_WIFI
|
||||
menu "WiFi Generic Feature Options"
|
||||
choice
|
||||
prompt "EEPROM Type of 1st Card"
|
||||
depends on ! FIRST_IF_NONE
|
||||
|
||||
config FIRST_IF_EEPROM_FLASH
|
||||
bool "FLASH"
|
||||
|
||||
config FIRST_IF_EEPROM_EFUSE
|
||||
bool "EFUSE"
|
||||
endchoice
|
||||
|
||||
config RT_FIRST_CARD_EEPROM
|
||||
string
|
||||
depends on ! FIRST_IF_NONE
|
||||
default "flash" if FIRST_IF_EEPROM_FLASH
|
||||
|
||||
choice
|
||||
prompt "EEPROM Type of 2nd Card"
|
||||
depends on ! SECOND_IF_NONE
|
||||
|
||||
config SECOND_IF_EEPROM_FLASH
|
||||
bool "FLASH"
|
||||
|
||||
config SECOND_IF_EEPROM_PROM
|
||||
bool "EEPROM"
|
||||
|
||||
config SECOND_IF_EEPROM_EFUSE
|
||||
bool "EFUSE"
|
||||
|
||||
endchoice
|
||||
|
||||
config RT_SECOND_CARD_EEPROM
|
||||
string
|
||||
depends on ! SECOND_IF_NONE
|
||||
default "prom" if SECOND_IF_EEPROM_PROM
|
||||
default "efuse" if SECOND_IF_EEPROM_EFUSE
|
||||
default "flash" if SECOND_IF_EEPROM_FLASH
|
||||
|
||||
choice
|
||||
prompt "EEPROM Type of 3th Card"
|
||||
depends on ! THIRD_IF_NONE
|
||||
|
||||
config THIRD_IF_EEPROM_FLASH
|
||||
bool "FLASH"
|
||||
|
||||
config THIRD_IF_EEPROM_PROM
|
||||
bool "EEPROM"
|
||||
|
||||
config THIRD_IF_EEPROM_EFUSE
|
||||
bool "EFUSE"
|
||||
|
||||
endchoice
|
||||
|
||||
config RT_THIRD_CARD_EEPROM
|
||||
string
|
||||
depends on ! THIRD_IF_NONE
|
||||
default "prom" if THIRD_IF_EEPROM_PROM
|
||||
default "efuse" if THIRD_IF_EEPROM_EFUSE
|
||||
default "flash" if THIRD_IF_EEPROM_FLASH
|
||||
|
||||
config MULTI_INF_SUPPORT
|
||||
bool
|
||||
default y if !FIRST_IF_NONE && !SECOND_IF_NONE
|
||||
|
||||
config WIFI_BASIC_FUNC
|
||||
bool "Basic Functions"
|
||||
select WIRELESS_EXT
|
||||
select WEXT_SPY
|
||||
select WEXT_PRIV
|
||||
|
||||
config DOT11_N_SUPPORT
|
||||
bool "802.11n support"
|
||||
default y
|
||||
|
||||
config DOT11_VHT_AC
|
||||
bool "802.11AC support"
|
||||
depends on WIFI_DRIVER
|
||||
depends on DOT11_N_SUPPORT
|
||||
default y
|
||||
|
||||
config G_BAND_256QAM_SUPPORT
|
||||
bool "2.4G 256QAM support"
|
||||
depends on WIFI_DRIVER
|
||||
depends on DOT11_VHT_AC
|
||||
default y
|
||||
|
||||
config TPC_SUPPORT
|
||||
bool "802.11h TPC Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config ICAP_SUPPORT
|
||||
bool "ICAP Support"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config SPECTRUM_SUPPORT
|
||||
bool "Wifi Spectrum Support"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
config BACKGROUND_SCAN_SUPPORT
|
||||
bool "Background Scan Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config SMART_CARRIER_SENSE_SUPPORT
|
||||
bool "Smart Carrier Sense Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config MT_DFS_SUPPORT
|
||||
bool "Dynamic Frequency Selection Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
#config WFA_VHT_R2_PF
|
||||
# bool "WFA VHT R2 Plugfest"
|
||||
# depends on DOT11_VHT_AC
|
||||
# default n
|
||||
|
||||
config HDR_TRANS_TX_SUPPORT
|
||||
bool "Tx Header Translation"
|
||||
depends on CHIP_MT7615E || CHIP_MT7622 || CHIP_MT7663E
|
||||
default y
|
||||
|
||||
config HDR_TRANS_RX_SUPPORT
|
||||
bool "Rx Header Translation"
|
||||
depends on CHIP_MT7615E || CHIP_MT7622 || CHIP_MT7663E
|
||||
default y
|
||||
|
||||
config DBDC_MODE
|
||||
bool "dbdc mode support"
|
||||
depends on CHIP_MT7615E
|
||||
select MULTI_PROFILE_SUPPORT
|
||||
# select DEFAULT_5G_PROFILE
|
||||
default y
|
||||
|
||||
config MULTI_PROFILE_SUPPORT
|
||||
bool "Multi Profile Support"
|
||||
depends on DBDC_MODE
|
||||
default y
|
||||
|
||||
config DEFAULT_5G_PROFILE
|
||||
bool "5G default profile for DBDC"
|
||||
depends on DBDC_MODE
|
||||
default n
|
||||
|
||||
config WSC_INCLUDED
|
||||
bool "WSC (WiFi Simple Config)"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config WSC_V2_SUPPORT
|
||||
bool "WSC V2(WiFi Simple Config Version 2.0)"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config DOT11W_PMF_SUPPORT
|
||||
bool "PMF"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config TXBF_SUPPORT
|
||||
bool "Tx Bean Forming Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config FAST_NAT_SUPPORT
|
||||
bool "Fast-NAT support"
|
||||
depends on RA_HW_NAT_WIFI
|
||||
default n
|
||||
|
||||
config WHNAT_SUPPORT
|
||||
tristate "Wifi Hardware NAT support"
|
||||
depends on CHIP_MT7615E
|
||||
depends on WLAN_HOOK
|
||||
depends on FAST_NAT_SUPPORT
|
||||
default n
|
||||
|
||||
#config LLTD_SUPPORT
|
||||
# bool "LLTD (Link Layer Topology Discovery Protocol)"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
#config QOS_DLS_SUPPORT
|
||||
# bool "802.11e DLS ((Direct-Link Setup) Support"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
#config WAPI_SUPPORT
|
||||
# bool "WAPI Support"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config FTM_SUPPORT
|
||||
bool "FTM Support"
|
||||
depends on WIFI_DRIVER
|
||||
select PASSPOINT_R2
|
||||
default n
|
||||
|
||||
config MBO_SUPPORT
|
||||
bool "MBO Support"
|
||||
depends on WIFI_DRIVER
|
||||
select INTERWORKING
|
||||
select WNM_SUPPORT
|
||||
select DOT11K_RRM_SUPPORT
|
||||
select DOT11R_FT_SUPPORT
|
||||
select DOT11W_PMF_SUPPORT
|
||||
select PASSPOINT_R2
|
||||
default n
|
||||
|
||||
#config CARRIER_DETECTION_SUPPORT
|
||||
# bool "Carrier Detect"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config IGMP_SNOOP_SUPPORT
|
||||
bool "IGMP snooping"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT
|
||||
default y
|
||||
|
||||
#config BLOCK_NET_IF
|
||||
# bool "NETIF Block"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
# help
|
||||
# Support Net interface block while Tx-Sw queue full
|
||||
|
||||
#config RATE_ADAPTION
|
||||
# bool "New Rate Adaptation support"
|
||||
# depends on WIFI_DRIVER
|
||||
# default y
|
||||
|
||||
#config NEW_RATE_ADAPT_SUPPORT
|
||||
# bool "Intelligent Rate Adaption"
|
||||
# depends on WIFI_DRIVER && RATE_ADAPTION
|
||||
# default y
|
||||
|
||||
#config AGS_SUPPORT
|
||||
# bool "Adaptive Group Switching"
|
||||
# depends on WIFI_DRIVER && RATE_ADAPTION
|
||||
# depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
# default n
|
||||
|
||||
#config RATE_ADAPT_AGBS_SUPPORT
|
||||
# bool "Adaptive AGBS Mode"
|
||||
# depends on WIFI_DRIVER && RATE_ADAPTION
|
||||
# depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
# default y
|
||||
|
||||
#config IDS_SUPPORT
|
||||
# bool "IDS (Intrusion Detection System) Support"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
#config WIFI_WORK_QUEUE
|
||||
# bool "Work Queue"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
#config WIFI_SKB_RECYCLE
|
||||
# bool "SKB Recycle(Linux)"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
config RTMP_FLASH_SUPPORT
|
||||
bool "Flash Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config PRE_CAL_TRX_SET1_SUPPORT
|
||||
bool "Calibration To Flash/BinFile Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config RLM_CAL_CACHE_SUPPORT
|
||||
bool "RlmCalibrationCache Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config PRE_CAL_TRX_SET2_SUPPORT
|
||||
bool "Pre-calibration to Flash Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
config RF_LOCKDOWN_SUPPORT
|
||||
bool "RF Lockdown Support"
|
||||
depends on WIFI_DRIVER
|
||||
default n
|
||||
|
||||
config LINK_TEST_SUPPORT
|
||||
bool "Link Test Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
#config LED_CONTROL_SUPPORT
|
||||
# bool "LED Support"
|
||||
# depends on WIFI_DRIVER
|
||||
# depends on MT_AP_SUPPORT
|
||||
# default n
|
||||
|
||||
config ATE_SUPPORT
|
||||
bool "ATE/QA Support"
|
||||
depends on WIFI_DRIVER
|
||||
default y
|
||||
|
||||
#config MEMORY_OPTIMIZATION
|
||||
# bool "Memory Optimization"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config PASSPOINT_R2
|
||||
bool "Passpoint Release-2 Support"
|
||||
depends on WIFI_DRIVER
|
||||
select DOT11W_PMF_SUPPORT
|
||||
depends on MT_AP_SUPPORT
|
||||
default n
|
||||
|
||||
#config TRACE_TCP_PKT
|
||||
# bool "TCP DATA/ACK packets trace log"
|
||||
# depends on WIFI_DRIVER
|
||||
# default n
|
||||
|
||||
config UAPSD
|
||||
bool "UAPSD support"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config TCP_RACK_SUPPORT
|
||||
bool "TCP Reduced ACK support"
|
||||
depends on WIFI_DRIVER
|
||||
default n
|
||||
|
||||
#### PA_LNA_Type choice
|
||||
|
||||
config RED_SUPPORT
|
||||
bool "RED(Random Early Drop) support"
|
||||
depends on WIFI_DRIVER
|
||||
depends on MT_AP_SUPPORT || MT_STA_SUPPORT
|
||||
default y
|
||||
|
||||
config FDB_SUPPORT
|
||||
bool "FW Debug Port"
|
||||
depends on WIFI_DRIVER
|
||||
default n
|
||||
|
||||
choice
|
||||
prompt "PA LNA Type of 1st Card"
|
||||
depends on ! FIRST_IF_NONE
|
||||
|
||||
config FIRST_IF_EPAELNA
|
||||
bool "ePAeLNA"
|
||||
config FIRST_IF_IPAILNA
|
||||
bool "iPAiLNA"
|
||||
config FIRST_IF_IPAELNA
|
||||
bool "iPAeLNA"
|
||||
# config FIRST_IF_EPAILNA
|
||||
# bool "ePAiLNA"
|
||||
endchoice
|
||||
choice
|
||||
prompt "PA LNA Type of 2nd Card"
|
||||
depends on ! SECOND_IF_NONE
|
||||
|
||||
config SECOND_IF_EPAELNA
|
||||
bool "ePAeLNA"
|
||||
config SECOND_IF_IPAILNA
|
||||
bool "iPAiLNA"
|
||||
config SECOND_IF_IPAELNA
|
||||
bool "iPAeLNA"
|
||||
# config SECOND_IF_EPAILNA
|
||||
# bool "ePAiLNA"
|
||||
endchoice
|
||||
choice
|
||||
prompt "PA LNA Type of 3rd Card"
|
||||
depends on ! THIRD_IF_NONE
|
||||
|
||||
config THIRD_IF_EPAELNA
|
||||
bool "ePAeLNA"
|
||||
config THIRD_IF_IPAILNA
|
||||
bool "iPAiLNA"
|
||||
config THIRD_IF_IPAELNA
|
||||
bool "iPAeLNA"
|
||||
# config THIRD_IF_EPAILNA
|
||||
# bool "ePAiLNA"
|
||||
endchoice
|
||||
#### PA_LNA_Type choice END
|
||||
|
||||
#
|
||||
# Section for chip architectures
|
||||
#
|
||||
# "RLT MAC Support"
|
||||
config RLT_MAC
|
||||
bool
|
||||
depends on WIFI_DRIVER
|
||||
default n
|
||||
|
||||
config RLT_BBP
|
||||
bool
|
||||
|
||||
config RLT_RF
|
||||
bool
|
||||
|
||||
# "RTMP MAC Support"
|
||||
config RTMP_MAC
|
||||
bool
|
||||
depends on WIFI_DRIVER
|
||||
default n
|
||||
|
||||
config RTMP_BBP
|
||||
bool
|
||||
|
||||
config RTMP_RF
|
||||
bool
|
||||
|
||||
#
|
||||
# Section for interfaces
|
||||
#
|
||||
config RTMP_PCI_SUPPORT
|
||||
bool
|
||||
|
||||
config RTMP_USB_SUPPORT
|
||||
bool
|
||||
|
||||
config RTMP_RBUS_SUPPORT
|
||||
bool
|
||||
|
||||
endmenu
|
||||
|
||||
menu "WiFi Operation Modes"
|
||||
choice
|
||||
prompt "Main Mode"
|
||||
default WIFI_MODE_AP
|
||||
|
||||
config WIFI_MODE_AP
|
||||
tristate "AP"
|
||||
select MT_AP_SUPPORT
|
||||
|
||||
config WIFI_MODE_STA
|
||||
tristate "STA"
|
||||
select MT_STA_SUPPORT
|
||||
|
||||
config WIFI_MODE_BOTH
|
||||
tristate "APSTA"
|
||||
select MT_AP_SUPPORT
|
||||
select MT_STA_SUPPORT
|
||||
endchoice
|
||||
|
||||
if WIFI_MODE_AP || WIFI_MODE_BOTH
|
||||
source "drivers/net/wireless/mt_wifi_ap/Kconfig"
|
||||
endif
|
||||
|
||||
if WIFI_MODE_STA || WIFI_MODE_BOTH
|
||||
source "drivers/net/wireless/mt_wifi_sta/Kconfig"
|
||||
endif
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
if WIFI_RLT_MAC
|
||||
config RLT_MAC
|
||||
bool
|
||||
default y
|
||||
endif
|
||||
|
||||
if WIFI_RTMP_MAC
|
||||
config RTMP_MAC
|
||||
bool
|
||||
default y
|
||||
endif
|
||||
|
||||
if WIFI_MT_MAC
|
||||
config MT_MAC
|
||||
bool
|
||||
default y
|
||||
|
||||
config CHIP_MT7603E
|
||||
bool
|
||||
default n
|
||||
|
||||
config CHIP_MT7615E
|
||||
bool
|
||||
default n
|
||||
|
||||
config CHIP_MT7622
|
||||
bool
|
||||
default n
|
||||
|
||||
config CHIP_MT7663E
|
||||
bool
|
||||
default n
|
||||
endif
|
||||
|
||||
if CHIP_MT7615E
|
||||
config MT_MAC
|
||||
bool
|
||||
default y
|
||||
select RATE_ADAPTION
|
||||
select RATE_ADAPT_AGBS_SUPPORT
|
||||
select DOT11_N_SUPPORT
|
||||
select DOT11_VHT_AC
|
||||
select HDR_TRANS_TX_SUPPORT
|
||||
select HDR_TRANS_RX_SUPPORT
|
||||
endif
|
||||
|
@ -1,527 +0,0 @@
|
||||
ifeq ($(WIFI_MODE),)
|
||||
RT28xx_MODE = AP
|
||||
else
|
||||
RT28xx_MODE = $(WIFI_MODE)
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),)
|
||||
TARGET = LINUX
|
||||
endif
|
||||
|
||||
# CHIPSET
|
||||
ifeq ($(CHIPSET),)
|
||||
CHIPSET = mt7622 mt7615
|
||||
endif
|
||||
|
||||
MODULE = $(word 1, $(CHIPSET))
|
||||
|
||||
#OS ABL - YES or NO
|
||||
OSABL = NO
|
||||
|
||||
ifneq ($(TARGET),THREADX)
|
||||
#RT28xx_DIR = home directory of RT28xx source code
|
||||
RT28xx_EMBEDDED_DIR = $(shell pwd)
|
||||
RT28xx_DIR = $(shell cd ..;pwd)
|
||||
#RT28xx_BIN_DIR = parent directory of bin folder, used by bin2h
|
||||
RT28xx_BIN_DIR = $(shell cd ../..;pwd)
|
||||
RT28xx_OS_DIR = $(RT28xx_DIR)/os
|
||||
endif
|
||||
|
||||
include $(RT28xx_OS_DIR)/linux/config.mk
|
||||
|
||||
RTMP_SRC_DIR = $(RT28xx_DIR)/RT$(MODULE)
|
||||
|
||||
ifeq ($(PLATFORM),)
|
||||
#PLATFORM: Target platform
|
||||
PLATFORM = PC
|
||||
#PLATFORM = BB_SOC
|
||||
#PLATFORM = IKANOS_V160
|
||||
#PLATFORM = IKANOS_V180
|
||||
#PLATFORM = SIGMA
|
||||
#PLATFORM = SIGMA_8622
|
||||
#PLATFORM = INIC
|
||||
#PLATFORM = STAR
|
||||
#PLATFORM = IXP
|
||||
#PLATFORM = INF_TWINPASS
|
||||
#PLATFORM = INF_DANUBE
|
||||
#PLATFORM = INF_AR9
|
||||
#PLATFORM = INF_VR9
|
||||
#PLATFORM = BRCM_6358
|
||||
#PLATFORM = INF_AMAZON_SE
|
||||
#PLATFORM = CAVM_OCTEON
|
||||
#PLATFORM = CMPC
|
||||
#PLATFORM = SMDK
|
||||
#PLATFORM = RMI
|
||||
#PLATFORM = RMI_64
|
||||
#PLATFORM = KODAK_DC
|
||||
#PLATFORM = DM6446
|
||||
#PLATFORM = FREESCALE8377
|
||||
#PLATFORM = BL2348
|
||||
#PLATFORM = BL23570
|
||||
#PLATFORM = BLUBB
|
||||
#PLATFORM = BLPMP
|
||||
#PLATFORM = MT85XX
|
||||
#PLATFORM = MT53XX
|
||||
#PLATFORM = NXP_TV550
|
||||
#PLATFORM = MVL5
|
||||
#PLATFORM = UBICOM_IPX8
|
||||
#PLATFORM = INTELP6
|
||||
#PLATFORM = MT7620
|
||||
#PLATFORM = MT7621
|
||||
#PLATFORM = MT7622
|
||||
endif
|
||||
|
||||
#APSOC
|
||||
ifeq ($(CHIPSET),mt7628)
|
||||
PLATFORM = MT7628
|
||||
endif
|
||||
|
||||
#RELEASE Package
|
||||
RELEASE = FormalRelease
|
||||
|
||||
ifeq ($(TARGET),LINUX)
|
||||
MAKE = make
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), UCOS)
|
||||
MAKE = make
|
||||
endif
|
||||
ifeq ($(TARGET),THREADX)
|
||||
MAKE = gmake
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), ECOS)
|
||||
MAKE = make
|
||||
MODULE = $(shell pwd | sed "s/.*\///" ).o
|
||||
export MODULE
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),BB_SOC)
|
||||
LINUX_SRC = $(KERNEL_DIR)
|
||||
#CROSS_COMPILE = /opt/trendchip/mips-linux-uclibc/usr/bin/mips-linux-uclibc-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),UBICOM_IPX8)
|
||||
LINUX_SRC = /home/sample/Customers/UBICOM/ubicom-linux-dist-2.1.1/linux-2.6.x
|
||||
CROSS_COMPILE = ubicom32-elf-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),IKANOS_V160)
|
||||
LINUX_SRC = /home/sample/projects/LX_2618_RG_5_3_00r4_SRC/linux-2.6.18
|
||||
CROSS_COMPILE = mips-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),IKANOS_V180)
|
||||
LINUX_SRC = /home/sample/projects/LX_BSP_VX180_5_4_0r1_ALPHA_26DEC07/linux-2.6.18
|
||||
CROSS_COMPILE = mips-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),SIGMA)
|
||||
LINUX_SRC = /root/sigma/smp86xx_kernel_source_2.7.172.0/linux-2.6.15
|
||||
CROSS_COMPILE = /root/sigma/smp86xx_toolchain_2.7.172.0/build_mipsel_nofpu/staging_dir/bin/mipsel-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),SIGMA_8622)
|
||||
LINUX_SRC = /home/snowpin/armutils_2.5.120.1/build_arm/linux-2.4.22-em86xx
|
||||
CROSS_COMPILE = /home/snowpin/armutils_2.5.120.1/toolchain/bin/arm-elf-
|
||||
CROSS_COMPILE_INCLUDE = /home/snowpin/armutils_2.5.120.1/toolchain/lib/gcc-lib/arm-elf/2.95.3
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),INIC)
|
||||
UCOS_SRC = /opt/uCOS/iNIC_rt2880
|
||||
CROSS_COMPILE = /usr/bin/mipsel-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),STAR)
|
||||
LINUX_SRC = /opt/star/kernel/linux-2.4.27-star
|
||||
CROSS_COMPILE = /opt/star/tools/arm-linux/bin/arm-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),RMI)
|
||||
LINUX_SRC = /opt/rmi/1.7.0/linux/src/
|
||||
CROSS_COMPILE = /opt/rmi/1.7.0/mipscross/nptl/bin/mips64-unknown-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),RMI_64)
|
||||
LINUX_SRC = /opt/rmi/1.7.0/linux_64/src/
|
||||
CROSS_COMPILE = /opt/rmi/1.7.0/mipscross/nptl/bin/mips64-unknown-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),FREESCALE8377)
|
||||
LINUX_SRC = /opt/ltib-mpc8377_rds-20090309/rpm/BUILD/linux-2.6.25
|
||||
CROSS_COMPILE = /opt/freescale/usr/local/gcc-4.2.187-eglibc-2.5.187/powerpc-linux-gnu/bin/powerpc-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),BL2348)
|
||||
LINUX_SRC = /home/sample/Customers/BroadLight/bl234x-linux-2.6.21-small-v29
|
||||
CROSS_COMPILE = mips-wrs-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),BL23570)
|
||||
LINUX_SRC = /home/FIBERHOME/linux-2.6.34.8
|
||||
CROSS_COMPILE = mips-wrs-linux-gnu-mips_74k_softfp-glibc_small-
|
||||
ARCH:=mips
|
||||
export $ARCH
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),BLUBB)
|
||||
LINUX_SRC = /home/sample/Customers/BroadLight/UBB/gmp20/linux-2.6.21-small
|
||||
CROSS_COMPILE = mips-wrs-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),BLPMP)
|
||||
LINUX_SRC = /home/sample/Customers/BroadLight/UBB/pmp16/bl234x-linux-2.6.21-small-v30.2
|
||||
CROSS_COMPILE = mips-wrs-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),PC)
|
||||
# Linux 2.6
|
||||
LINUX_SRC = /lib/modules/$(shell uname -r)/build
|
||||
# Linux 2.4 Change to your local setting
|
||||
#LINUX_SRC = /usr/src/linux-2.4
|
||||
LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
|
||||
CROSS_COMPILE =
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),INTELP6)
|
||||
LINUX_SRC = /tftpboot/IntelCE-20.0.11052.243193/project_build_i686/IntelCE/kernel-20.0.11024.238456/linux-2.6.35
|
||||
CROSS_COMPILE = /tftpboot/IntelCE-20.0.11052.243193/build_i686/i686-linux-elf/bin/i686-cm-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),IXP)
|
||||
LINUX_SRC = /project/stable/Gmtek/snapgear-uclibc/linux-2.6.x
|
||||
CROSS_COMPILE = arm-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),INF_TWINPASS)
|
||||
# Linux 2.6
|
||||
#LINUX_SRC = /lib/modules/$(shell uname -r)/build
|
||||
# Linux 2.4 Change to your local setting
|
||||
LINUX_SRC = /project/stable/twinpass/release/2.0.1/source/kernel/opensource/linux-2.4.31/
|
||||
CROSS_COMPILE = mips-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),INF_DANUBE)
|
||||
LINUX_SRC = /opt/danube/sdk/linux-2.6.16.x
|
||||
CROSS_COMPILE = mips-linux-
|
||||
ROOTDIR = /opt/danube/sdk
|
||||
export ROOTDIR
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),INF_AR9)
|
||||
LINUX_SRC = /root/ar9/xR9_BSP1.2.2.0/source/kernel/opensource/linux-2.6.20/
|
||||
CROSS_COMPILE = /root/ar9/ifx-lxdb26-1.0.2/gcc-3.4.4/toolchain-mips/bin/
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),INF_VR9)
|
||||
LINUX_SRC = /home/public/lantiq/VR9/UGW-4.2/build_dir/linux-ifxcpe_platform_vr9/linux-2.6.20.19
|
||||
CROSS_COMPILE = /home/public/lantiq/VR9/UGW-4.2/staging_dir/toolchain-mips_gcc-3.4.6_uClibc-0.9.29/bin/mips-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),BRCM_6358)
|
||||
LINUX_SRC =
|
||||
CROSS_COMPILE =
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),INF_AMAZON_SE)
|
||||
# Linux 2.6
|
||||
#LINUX_SRC = /lib/modules/$(shell uname -r)/build
|
||||
# Linux 2.4 Change to your local setting
|
||||
LINUX_SRC = /backup/ifx/3.6.2.2/source/kernel/opensource/linux-2.4.31
|
||||
#CROSS_COMPILE = mips-linux-
|
||||
#LINUX_SRC = /project/Infineon/3.6.2.2/source/kernel/opensource/linux-2.4.31
|
||||
CROSS_COMPILE = /opt/uclibc-toolchain/ifx-lxdb-1-2-3-external/gcc-3.3.6/toolchain-mips/R0208V35/mips-linux-uclibc/bin/
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),ST)
|
||||
LINUX_SRC = /opt/STM/STLinux-2.2/devkit/sources/kernel/linux0039
|
||||
CROSS_COMPILE = /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-
|
||||
ARCH := sh
|
||||
export ARCH
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CAVM_OCTEON)
|
||||
OCTEON_ROOT = /usr/local/Cavium_Networks/OCTEON-SDK
|
||||
LINUX_SRC = $(OCTEON_ROOT)/linux/kernel_2.6/linux
|
||||
CROSS_COMPILE = mips64-octeon-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CMPC)
|
||||
LINUX_SRC = /opt/fvt_11N_SDK_0807/fvt131x_SDK_11n/linux-2.6.17
|
||||
CROSS_COMPILE =
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),SMDK)
|
||||
LINUX_SRC = /home/bhushan/itcenter/may28/linux-2.6-samsung
|
||||
CROSS_COMPILE = /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),KODAK_DC)
|
||||
SKD_SRC = C:/SigmaTel/DC1250_SDK_v1-9/sdk
|
||||
CROSS_COMPILE = $(cc)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DM6446)
|
||||
LINUX_SRC = /home/fonchi/work/soc/ti-davinci
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),MT85XX)
|
||||
LINUX_SRC = /home/john/MTK/BDP_Linux/linux-2.6.27
|
||||
CROSS_COMPILE = armv6z-mediatek-linux-gnueabi-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),MT53XX)
|
||||
TARGET = LINUX
|
||||
#****** For system auto build ******
|
||||
#LINUX_SRC=$(KERNEL_OBJ_ROOT)/$(KERNEL_VER)/$(KERNEL_CONFIG)_modules
|
||||
#****** For local build ******
|
||||
# uncomment the following lines
|
||||
VM_LINUX_ROOT ?= $(word 1, $(subst /vm_linux/,/vm_linux /, $(shell pwd)))
|
||||
LINUX_ROOT ?= $(VM_LINUX_ROOT)
|
||||
LINUX_SRC=$(VM_LINUX_ROOT)/output/Sony_android/Fiji_EU_JB/rel/obj/kernel/chiling/kernel/linux-3.4/_android_smp_mod_defconfig_modules
|
||||
OBJ_ROOT ?= $(VM_LINUX_ROOT)/output/Sony_android/Fiji_EU_JB/rel/obj
|
||||
export KERNEL_OBJ_ROOT=$(LINUX_SRC)/../..
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE=/mtkoss/gnuarm/vfp_4.5.1_2.6.27_cortex-a9-rhel4/i686/bin/armv7a-mediatek451_001_vfp-linux-gnueabi-
|
||||
endif
|
||||
ifeq "$(CC)" "gcc"
|
||||
CC ?= $(CROSS_COMPILE)gcc
|
||||
endif
|
||||
$(warning =============================================)
|
||||
$(warning CC=$(CC) for wifi driver LINUX_SRC=$(LINUX_SRC))
|
||||
$(warning TARGET=$(TARGET))
|
||||
$(warning =============================================)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),NXP_TV550)
|
||||
LINUX_SRC = /data/tv550/kernel/linux-2.6.28.9
|
||||
LINUX_SRC_MODULE = /data/tv550/kernel/linux-2.6.28.9/drivers/net/wireless
|
||||
CROSS_COMPILE = /opt/embeddedalley/nxp_tv550/bin/mipsel-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),MVL5)
|
||||
LINUX_SRC = /home2/charlestu/AP-VT3426/linux-2.6.18
|
||||
CROSS_COMPILE = /opt/montavista/pro/devkit/arm/v5t_le_mvl5/bin/arm_v5t_le-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),MT7620)
|
||||
LINUX_SRC = /home/share/src/MT7601/AP/RT288x_SDK/source/linux-2.6.36.x
|
||||
CROSS_COMPILE = /opt/buildroot-gcc342/bin/mipsel-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),MT7621)
|
||||
LINUX_SRC = /mtkoss/linux_headers/linux-headers-3.10.14-mips
|
||||
CROSS_COMPILE = /opt/buildroot-gcc463/usr/bin/mipsel-linux-
|
||||
ARCH = mips
|
||||
export $ARCH
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),MT7628)
|
||||
LINUX_SRC = /root/Working/MT7628_SDK_2013_0912/RT288x_SDK/source/linux-2.6.36.x
|
||||
CROSS_COMPILE = /opt/buildroot-gcc342/bin/mipsel-linux-
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),MT7622)
|
||||
LINUX_SRC = /mtkoss/linux_headers/linux-headers-4.4.24-arm64/
|
||||
CROSS_COMPILE = /opt/buildroot-gcc492_arm64/usr/bin/aarch64-linux-
|
||||
ARCH = arm64
|
||||
export $ARCH
|
||||
endif
|
||||
|
||||
export OSABL RT28xx_DIR RT28xx_BIN_DIR RT28xx_OS_DIR RT28xx_EMBEDDED_DIR RT28xx_MODE LINUX_SRC CROSS_COMPILE CROSS_COMPILE_INCLUDE PLATFORM RELEASE CHIPSET MODULE RTMP_SRC_DIR LINUX_SRC_MODULE TARGET HAS_WOW_SUPPORT HAS_FPGA_MODE HAS_RX_CUT_THROUGH
|
||||
|
||||
# The targets that may be used.
|
||||
PHONY += all build_tools test UCOS THREADX LINUX release prerelease clean uninstall install libwapi osabl sdk_build_tools
|
||||
|
||||
ifeq ($(TARGET),LINUX)
|
||||
all: build_tools $(TARGET) plug_in
|
||||
else
|
||||
all: $(TARGET)
|
||||
endif
|
||||
|
||||
build_sku_tables:
|
||||
$(MAKE) -C $(RT28xx_DIR)/txpwr
|
||||
$(RT28xx_DIR)/txpwr/dat2h
|
||||
|
||||
build_tools:
|
||||
$(MAKE) -C tools
|
||||
$(RT28xx_EMBEDDED_DIR)/tools/bin2h
|
||||
|
||||
sdk_build_tools:
|
||||
if [ -f $(RT28xx_DIR)/eeprom_log ]; then \
|
||||
rm -f $(RT28xx_DIR)/eeprom_log
|
||||
fi
|
||||
echo $(EE_TYPE) >> eeprom_log
|
||||
echo $(CHIPSET) >> eeprom_log
|
||||
if [ -f $(RT28xx_DIR)/eeprom/SA/MT7603E_EEPROM.bin ]; then \
|
||||
echo 'find SA/MT7603E_EEPROM.bin' >> eeprom_log ; \
|
||||
cp -f $(RT28xx_DIR)/eeprom/SA/MT7603E_EEPROM.bin $(RT28xx_DIR)/eeprom/MT7603E_EEPROM.bin ; \
|
||||
else \
|
||||
cp -f $(RT28xx_DIR)/eeprom/$(EE_TYPE)/MT7603E_EEPROM.bin $(RT28xx_DIR)/eeprom/MT7603E_EEPROM.bin ; \
|
||||
fi
|
||||
$(MAKE) -C tools
|
||||
$(RT28xx_EMBEDDED_DIR)/tools/bin2h
|
||||
# rm -f $(RT28xx_DIR)/eeprom/SA/MT7603E_EEPROM.bin
|
||||
|
||||
test:
|
||||
$(MAKE) -C tools test
|
||||
|
||||
UCOS:
|
||||
$(MAKE) -C os/ucos/ MODE=$(RT28xx_MODE)
|
||||
echo $(RT28xx_MODE)
|
||||
|
||||
ECOS:
|
||||
$(MAKE) -C os/ecos/ MODE=$(RT28xx_MODE)
|
||||
cp -f os/ecos/$(MODULE) $(MODULE)
|
||||
|
||||
THREADX:
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/Threadx -f $(RT28xx_OS_DIR)/ThreadX/Makefile
|
||||
|
||||
LINUX:
|
||||
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
|
||||
|
||||
ifeq ($(OSABL),YES)
|
||||
cp -f $(RT28xx_OS_DIR)/linux/Makefile.4.util $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux/
|
||||
endif
|
||||
|
||||
cp -f $(RT28xx_OS_DIR)/linux/Makefile.4 $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux/
|
||||
|
||||
ifeq ($(OSABL),YES)
|
||||
cp -f $(RT28xx_OS_DIR)/linux/Makefile.4.netif $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux/
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
ifeq ($(OSABL),YES)
|
||||
cp -f $(RT28xx_OS_DIR)/linux/Makefile.6.util $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_OS_DIR)/linux modules
|
||||
endif
|
||||
|
||||
cp -f $(RT28xx_OS_DIR)/linux/Makefile.6 $(RT28xx_OS_DIR)/linux/Makefile
|
||||
ifeq ($(PLATFORM),DM6446)
|
||||
$(MAKE) ARCH=arm CROSS_COMPILE=arm_v5t_le- -C $(LINUX_SRC) SUBDIRS=$(RT28xx_OS_DIR)/linux modules
|
||||
else ifeq ($(PLATFORM),FREESCALE8377)
|
||||
$(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_OS_DIR)/linux modules
|
||||
else ifeq ($(PLATFORM), $(filter $(PLATFORM), MT7622 MT7621))
|
||||
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_OS_DIR)/linux modules
|
||||
else
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_OS_DIR)/linux modules
|
||||
endif
|
||||
|
||||
ifeq ($(OSABL),YES)
|
||||
cp -f $(RT28xx_OS_DIR)/linux/Makefile.6.netif $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_OS_DIR)/linux modules
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
check_build:
|
||||
$(RT28xx_EMBEDDED_DIR)/tools/check_build_script.sh
|
||||
|
||||
plug_in:
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_EMBEDDED_DIR)/tools/plug_in MODULE_FLAGS="$(WFLAGS)"
|
||||
|
||||
release: build_tools
|
||||
$(MAKE) -C $(RT28xx_EMBEDDED_DIR)/striptool -f Makefile.release clean
|
||||
$(MAKE) -C $(RT28xx_EMBEDDED_DIR)/striptool -f Makefile.release
|
||||
striptool/striptool.out
|
||||
ifeq ($(RELEASE), DPO)
|
||||
gcc -o embedded/striptool/banner striptool/banner.c
|
||||
./embedded/striptool/banner -b embedded/striptool/copyright.gpl -s DPO/ -d DPO_GPL -R
|
||||
./embedded/striptool/banner -b embedded/striptool/copyright.frm -s DPO_GPL/include/firmware.h
|
||||
endif
|
||||
|
||||
prerelease:
|
||||
ifeq ($(MODULE), 2880)
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux -f Makefile.release.2880 prerelease
|
||||
else
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux -f Makefile.release prerelease
|
||||
endif
|
||||
cp $(RT28xx_OS_DIR)/linux/Makefile.DPB $(RTMP_SRC_DIR)/os/linux/.
|
||||
cp $(RT28xx_OS_DIR)/linux/Makefile.DPA $(RTMP_SRC_DIR)/os/linux/.
|
||||
cp $(RT28xx_OS_DIR)/linux/Makefile.DPC $(RTMP_SRC_DIR)/os/linux/.
|
||||
ifeq ($(RT28xx_MODE),STA)
|
||||
cp $(RT28xx_OS_DIR)/linux/Makefile.DPD $(RTMP_SRC_DIR)/os/linux/.
|
||||
cp $(RT28xx_OS_DIR)/linux/Makefile.DPO $(RTMP_SRC_DIR)/os/linux/.
|
||||
endif
|
||||
|
||||
clean:
|
||||
ifeq ($(TARGET), LINUX)
|
||||
cp -f $(RT28xx_OS_DIR)/linux/Makefile.clean $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux clean
|
||||
rm -rf $(RT28xx_OS_DIR)/linux/Makefile
|
||||
endif
|
||||
ifeq ($(TARGET), UCOS)
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/ucos clean MODE=$(RT28xx_MODE)
|
||||
endif
|
||||
ifeq ($(TARGET), ECOS)
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/ecos clean MODE=$(RT28xx_MODE)
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
ifeq ($(TARGET), LINUX)
|
||||
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux -f Makefile.4 uninstall
|
||||
else
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux -f Makefile.6 uninstall
|
||||
endif
|
||||
endif
|
||||
|
||||
install:
|
||||
ifeq ($(TARGET), LINUX)
|
||||
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux -f Makefile.4 install
|
||||
else
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux -f Makefile.6 install
|
||||
endif
|
||||
endif
|
||||
|
||||
libwapi:
|
||||
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
|
||||
cp -f embedded/os/linux/Makefile.libwapi.4 $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_OS_DIR)/linux/
|
||||
else
|
||||
cp -f embedded/os/linux/Makefile.libwapi.6 $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_OS_DIR)/linux modules
|
||||
endif
|
||||
|
||||
osutil:
|
||||
ifeq ($(OSABL),YES)
|
||||
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
|
||||
cp -f os/linux/Makefile.4.util $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_DIR)/os/linux/
|
||||
else
|
||||
cp -f os/linux/Makefile.6.util $(RT28xx_OS_DIR)/linux/Makefile
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
|
||||
endif
|
||||
endif
|
||||
|
||||
osnet:
|
||||
ifeq ($(OSABL),YES)
|
||||
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
|
||||
cp -f os/linux/Makefile.4.netif $(RT28xx_DIR)/os/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_DIR)/os/linux/
|
||||
else
|
||||
cp -f os/linux/Makefile.6.netif $(RT28xx_DIR)/os/linux/Makefile
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
|
||||
endif
|
||||
endif
|
||||
|
||||
osdrv:
|
||||
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
|
||||
cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
|
||||
$(MAKE) -C $(RT28xx_DIR)/os/linux/
|
||||
else
|
||||
cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
|
||||
$(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
|
||||
endif
|
||||
|
||||
# Declare the contents of the .PHONY variable as phony. We keep that information in a variable
|
||||
.PHONY: $(PHONY)
|
||||
|
||||
|
||||
|
@ -1,92 +0,0 @@
|
||||
EmbeddedDir=`pwd`
|
||||
BaseCodeDir=`dirname $EmbeddedDir`
|
||||
HomeDir=`dirname $BaseCodeDir`
|
||||
dir_main=mt_wifi
|
||||
dir_ap=mt_wifi_ap
|
||||
dir_sta=mt_wifi_sta
|
||||
release_profile=$BaseCodeDir/Release.log
|
||||
#module_name=`basename $BaseCodeDir`
|
||||
module_name=`cat $release_profile | line`
|
||||
release_version=`sed -e '1d' $release_profile | line`
|
||||
release_date=`sed -e '1,2d' $release_profile | line`
|
||||
package_name=$module_name\_$release_version\_$release_date
|
||||
############################
|
||||
|
||||
cd $HomeDir
|
||||
|
||||
### Creat dir_main ###
|
||||
if [ -d $dir_main ]; then
|
||||
rm -rf $dir_main
|
||||
fi
|
||||
|
||||
if [ -d $dir_ap ]; then
|
||||
rm -rf $dir_ap
|
||||
fi
|
||||
|
||||
#if [ -d $dir_sta ]; then
|
||||
# rm -rf $dir_sta
|
||||
#fi
|
||||
|
||||
if [ -d $HomeDir/../temp_release ]; then
|
||||
rm -rf $HomeDir/../temp_release
|
||||
fi
|
||||
|
||||
mv $BaseCodeDir $HomeDir/../temp_release
|
||||
rm -rf *
|
||||
mv $HomeDir/../temp_release $dir_main
|
||||
#cp Kconfig $dir_main/
|
||||
rm $dir_main/embedded/Pack_Release.sh $dir_main/Release.log
|
||||
|
||||
mkdir $dir_ap
|
||||
cp $dir_main/os/linux/Kconfig.mt_wifi_ap $dir_ap/Kconfig
|
||||
cp $dir_main/os/linux/Makefile.mt_wifi_ap $dir_ap/Makefile
|
||||
cp $dir_main/os/linux/Kconfig.mt_wifi $dir_main/embedded/Kconfig
|
||||
#mv $dir_main/embedded/$dir_sta ./
|
||||
|
||||
### Creat dir_ap ###
|
||||
#if [ -d $dir_ap ]; then
|
||||
# rm -rf $dir_ap
|
||||
#fi
|
||||
#mkdir $dir_ap
|
||||
#if [ ! -d $dir_ap ]; then
|
||||
# echo "Error! Cannot creat folder [$dir_ap]"
|
||||
# exit 1
|
||||
#fi
|
||||
#
|
||||
#
|
||||
#cp $BaseCodeDir/os/linux/Makefile.rlt_wifi_ap $dir_ap/Makefile
|
||||
#cp $BaseCodeDir/os/linux/Kconfig.rlt_wifi_ap $dir_ap/Kconfig
|
||||
|
||||
if [ ! -d $dir_ap ]; then
|
||||
echo "Error! [$dir_ap] doesn't exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#if [ ! -d $dir_sta ]; then
|
||||
# echo "Error! [$dir_sta] doesn't exist."
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
if [ "$1" == "auto_build" ]; then
|
||||
if [ -d ../$dir_main\_auto_build ]; then
|
||||
rm -rf ../$dir_main\_auto_build
|
||||
fi
|
||||
if [ -d ../$dir_ap\_auto_build ]; then
|
||||
rm -rf ../$dir_ap\_auto_build
|
||||
fi
|
||||
#if [ -d ../$dir_sta\_auto_build ]; then
|
||||
# rm -rf ../$dir_sta\_auto_build
|
||||
#fi
|
||||
mv $dir_main ../$dir_main\_auto_build
|
||||
mv $dir_ap ../$dir_ap\_auto_build
|
||||
#mv $dir_sta ../$dir_sta\_auto_build
|
||||
cd ../../
|
||||
#rm -rf release
|
||||
else
|
||||
rm $dir_main/embedded/*auto_build*
|
||||
tar -jcvf $package_name\.tar.bz2 $dir_main $dir_ap
|
||||
#tar -jcvf $package_name\.tar.bz2 $dir_main $dir_ap $dir_sta
|
||||
#rm -rf $dir_main $dir_ap $dir_sta
|
||||
fi
|
||||
|
||||
############################
|
@ -1,134 +0,0 @@
|
||||
OSABL=NO
|
||||
EmbeddedDir=`pwd`
|
||||
BaseCodeDir=`dirname $EmbeddedDir`
|
||||
ChipName="mt7615"
|
||||
WiFiMode=AP
|
||||
DriverVersion="V4.4.0.2"
|
||||
Release="DPA"
|
||||
Note=$1
|
||||
Description="Formal release."
|
||||
release_profile=Release.log
|
||||
###### Fixed Settings ######
|
||||
Day=`date +%d`
|
||||
Month=`date +%m`
|
||||
Year=`date +%Y`
|
||||
Date=$Year$Month$Day
|
||||
Hour=`date +%H`
|
||||
Minute=`date +%M`
|
||||
HomeDir=`dirname $BaseCodeDir`
|
||||
#ModuleName=mt$ChipName\_wifi_$DriverVersion
|
||||
ModulePrefix=MT7615_LinuxAP
|
||||
ModuleName=$ModulePrefix\_$DriverVersion
|
||||
WorkDir=$HomeDir/release
|
||||
TargetDir=$WorkDir/$ModuleName\_$Date\_$Hour$Minute
|
||||
############################
|
||||
|
||||
|
||||
if [ ! -d $WorkDir ]; then
|
||||
mkdir $WorkDir
|
||||
fi
|
||||
|
||||
BaseCodeDir=`readlink -f $BaseCodeDir` #get full path
|
||||
if [ ! -d $BaseCodeDir ] ; then
|
||||
echo "Error: BaseCodeDir ($BaseCodeDir) does not exist."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
cp -a $BaseCodeDir $TargetDir
|
||||
if [ ! -d $TargetDir ] ; then
|
||||
echo "Error: TargetDir ($TargetDir) does not exist."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
cd $TargetDir
|
||||
|
||||
if [ -f /home/haipin/script/chmod_644.sh ]; then
|
||||
/home/haipin/script/chmod_644.sh
|
||||
fi
|
||||
|
||||
if [ -f /home/haipin/script/clean.sh ]; then
|
||||
/home/haipin/script/clean.sh
|
||||
fi
|
||||
|
||||
for i in $Release; do
|
||||
cd $TargetDir/embedded
|
||||
####### Remove unwanted files that do not processed by strip tool ####### // TODO
|
||||
rm os/linux/Makefile.libautoprovision.6 common/rt2860.bin common/rt2870_sw_ch_offload.bin common/RT85592.bin
|
||||
rm tools/mt7662e_ap.sh tools/mt7662e_sta.sh tools/i.sh tools/trace.sh
|
||||
rm ../eeprom/MT7601*.bin ../eeprom/MT7603*.bin ../eeprom/MT7628*.bin ../eeprom/MT7637*.bin ../eeprom/MT7662*.bin
|
||||
rm ../eeprom/MT7636*.bin
|
||||
rm ../mcu/bin/*_FPGA*.bin ../mcu/bin/*_plain*.bin ../mcu/bin/*_test*.bin
|
||||
rm ../mcu/bin/*7601* ../mcu/bin/*7603* ../mcu/bin/*7612* ../mcu/bin/*7636* ../mcu/bin/*7637*
|
||||
rm ../mcu/bin/*7610* ../mcu/bin/*7650* ../mcu/bin/*7662* ../mcu/bin/*7628*
|
||||
rm ../os/linux/Kconfig.ap* ../os/linux/Kconfig.sta* ../os/linux/Kconfig.rlt* ../os/linux/Kconfig.wifi
|
||||
rm ../os/linux/Makefile.ap* ../os/linux/Makefile.sta* ../os/linux/Makefile.2880* ../os/linux/Makefile.rlt*
|
||||
#########################################################################
|
||||
|
||||
## Regenerate Firmware ##
|
||||
#rm -rf include/mcu/mt7628_firmware.h
|
||||
#rm -rf include/mcu/mt7628_e2_firmware.h
|
||||
make build_tools CHIPSET=$ChipName
|
||||
## Regenerate SKU tables ##
|
||||
make build_sku_tables CHIPSET=$ChipName
|
||||
|
||||
if [ "$1" != "auto_build" ]; then
|
||||
make release WIFI_MODE=$WiFiMode CHIPSET=$ChipName RELEASE=$i
|
||||
else
|
||||
make release WIFI_MODE=$WiFiMode CHIPSET=$ChipName RELEASE=$i AUTO_BUILD=y
|
||||
fi
|
||||
|
||||
if [ -d $i ]; then
|
||||
lower=`echo $i | tr A-Z a-z` #transfer "DPA DPB DPC DPD" to lower case
|
||||
#ReleaseDir=$ModuleName\_$lower\_$Date
|
||||
ReleaseDir=$ModuleName\_$i\_$Date
|
||||
#ReleaseDir=$ModuleName\_$Date
|
||||
#ReleaseDir=$ModulePrefix
|
||||
mv $i $TargetDir/$ReleaseDir
|
||||
ReleaseDir=$TargetDir/$ReleaseDir
|
||||
|
||||
#if [ "$i" == "DPA" ]; then
|
||||
cd $ReleaseDir/embedded
|
||||
|
||||
find . -name "*Card.dat" -exec rm -rf {} \; #// TODO
|
||||
find . -name "*2870*.dat" -exec rm -rf {} \;
|
||||
rm -rf doc/*History*.txt doc/*README* doc/RT_WIFI_Revision_History_2010_April.xls doc/RT2860card.readme
|
||||
rm -rf Makefile.OSABL threadX.MakeFile vxworks.makefile History.txt RT2860AP.dat
|
||||
rm -rf os/linux/Makefile.2880.*
|
||||
rm -rf Release.sh load.4 load.6 load unload
|
||||
#rm -rf Makefile
|
||||
cd $TargetDir/embedded
|
||||
#fi
|
||||
|
||||
### Generate profile for release ###
|
||||
echo $ModulePrefix > $ReleaseDir/$release_profile
|
||||
echo $DriverVersion >> $ReleaseDir/$release_profile
|
||||
echo $Date >> $ReleaseDir/$release_profile
|
||||
cp Pack_Release.sh $ReleaseDir/embedded
|
||||
##Copy sku_tables .dat to release package##
|
||||
cp -R $TargetDir/txpwr/sku_tables $ReleaseDir/txpwr/
|
||||
cd $ReleaseDir/embedded
|
||||
sh Pack_Release.sh $1
|
||||
|
||||
#tar -jcvf $ReleaseDir.tar.bz2 $ReleaseDir
|
||||
else
|
||||
echo "Error: ReleaseDir ($i) does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
#####Log File#####
|
||||
#if [ "$1" != "auto_build" ]; then
|
||||
# cd $TargetDir/embedded
|
||||
# echo "OSABL = $OSABL" > Release.log
|
||||
# echo "BaseCodeDir = $BaseCodeDir" >> Release.log
|
||||
# echo "ChipName = $ChipName" >> Release.log
|
||||
# echo "DriverVersion = $DriverVersion" >> Release.log
|
||||
#echo "BuildDir = $BuildDir" >> Release.log
|
||||
# echo "Release = $Release" >> Release.log
|
||||
# if [ "$Description" != "" ]; then
|
||||
# echo "Description = $Description" >> Release.log
|
||||
# fi
|
||||
# echo "Note: $Note" >> Release.log
|
||||
#fi
|
||||
##################
|
@ -1,97 +0,0 @@
|
||||
[ V4.4.0.2 ]
|
||||
Support function:
|
||||
1. MU-MIMO support.
|
||||
2. BW160 for IEEE 802.11 new standard modification.
|
||||
3. Multiple default bin file support.
|
||||
4. Single SKU for TxBF.
|
||||
5. Repeater - WiFi Forwarding Module support
|
||||
|
||||
Issue Fixed:
|
||||
1. Endurance and robustness enhancement.
|
||||
2. DFS - Fix "channel closing time too long" issue.
|
||||
3. 802.11R - Fixed AP would delete STA if STA send disassoc
|
||||
frame which BSSID is AP's BSSID but DA is another AP.
|
||||
4. Fix Auto Channel Selection trigger by iwpriv command.
|
||||
5. Fix BA session overflow issue.
|
||||
|
||||
[ V4.4.0.1 ]
|
||||
Support function:
|
||||
1. 802.11R/802.11K I-phone compliant.
|
||||
2. Single SKU table now can also take TxBF for reference.
|
||||
Issue Fixed:
|
||||
1. Fix throughput degrade after radio off/on.
|
||||
2. Fix CCK TX Power unstable issue.
|
||||
3. Reduce bootup calibration time.
|
||||
4. Fix firmware download failed after s/w reboot.
|
||||
5. Fix RX AMSDU reordering issue.
|
||||
6. Fix Counter Measure failed to recover connection access.
|
||||
7. Fix DFS NOP and CAC issue.
|
||||
|
||||
[ V4.4.0.0 ]
|
||||
Formal Release:
|
||||
Support function:
|
||||
1. Tx Beamforming Support
|
||||
2. Calibration Data Save in Flash Support
|
||||
|
||||
Issue Fixed:
|
||||
1. Fixed a kernel panic issues in repeater mode under heavy traffic loading
|
||||
2. Improve stability when playing video streaming and under heavy traffic loading
|
||||
|
||||
[ V4.4.0.0 ]
|
||||
Beta release 2:
|
||||
Support function:
|
||||
1. DFS master mode and client mode
|
||||
2. IGMP snooping
|
||||
3. Single SKU
|
||||
4. Tx Power Percentage
|
||||
5. ApCli Connection Trial
|
||||
6. LED
|
||||
|
||||
Issue Fixed:
|
||||
1. Site survey cannot find APs in other channels
|
||||
2. Correct data rate displayed in iwconfig
|
||||
3. Support DFS master/slave mode
|
||||
4. Support LED
|
||||
5. Fix kernel panic issue during interface down/up
|
||||
6. Fix scan list cannot correctly show AP with 11ac capability issue.
|
||||
7. 2.4G repeater performance improvement
|
||||
8. Support DFS master/slave mode
|
||||
|
||||
[ V4.4.0.0 ]
|
||||
Beta release 1:
|
||||
Support function:
|
||||
1. 802.11n certification of (AP mode)
|
||||
2. Band Steering
|
||||
3. Thermal Protection
|
||||
4. Concurrent WPS
|
||||
|
||||
Issue Fixed:
|
||||
1. Reduce the total time of Wifi interface up
|
||||
2. IOT: Fix Iphone-6/S6 set to only BW20 when connected.
|
||||
3. Reduce total number of tx/rx packet token to avoid run out of system memory under heavy loading.
|
||||
4. Performance improvement of multi-client/repeater/RvR(Waterfall) .
|
||||
5. Fix system crash issue during interface down/up
|
||||
6. Fix connection stability issue and looping issue of repeater mode.
|
||||
7. Fix jitter and packet loss issues in Verivave tests.
|
||||
8. Fix potential memory leackage issues.
|
||||
|
||||
Known issues:
|
||||
1. 5G Peek Tx/Rx performance on MT7621. (around 850~940Mbps)
|
||||
2. Peek throughput drop about 20~30Mbps (happens ramdonly with about 15% chances)
|
||||
3. CPU loading increased about 3~5% while running peek throughput.
|
||||
|
||||
|
||||
[ V4.4.0.0 ]
|
||||
Alpha release 1:
|
||||
support function:
|
||||
1. 80211.ac
|
||||
2. WPS
|
||||
3. Apcli / MAC Repeater
|
||||
4. PMF
|
||||
|
||||
Known issues:
|
||||
1. VHT MCS8/9 not stable.
|
||||
2. Repeater connection stability
|
||||
3. DBDC performance
|
||||
4. When peer is Ralink device, RDG+Security shows ICV Error
|
||||
5. Occasionally Tx/Rx Stop (E3 fix)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,180 +0,0 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* 4F, No. 2 Technology 5th Rd.
|
||||
* Science-based Industrial Park
|
||||
* Hsin-chu, Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002-2006, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************
|
||||
|
||||
Module Name:
|
||||
ap_apcli.c
|
||||
|
||||
Abstract:
|
||||
Support AP-Client function.
|
||||
|
||||
Note:
|
||||
1. Call RT28xx_ApCli_Init() in init function and
|
||||
call RT28xx_ApCli_Remove() in close function
|
||||
|
||||
2. MAC of ApCli-interface is initialized in RT28xx_ApCli_Init()
|
||||
|
||||
3. ApCli index (0) of different rx packet is got in
|
||||
|
||||
4. ApCli index (0) of different tx packet is assigned in
|
||||
|
||||
5. ApCli index (0) of different interface is got in tx_pkt_handle() by using
|
||||
|
||||
6. ApCli index (0) of IOCTL command is put in pAd->OS_Cookie->ioctl_if
|
||||
|
||||
8. The number of ApCli only can be 1
|
||||
|
||||
9. apcli convert engine subroutines, we should just take care data packet.
|
||||
Revision History:
|
||||
Who When What
|
||||
-------------- ---------- ----------------------------------------------
|
||||
Shiang, Fonchi 02-13-2007 created
|
||||
*/
|
||||
#define RTMP_MODULE_OS
|
||||
|
||||
#ifdef APCLI_SUPPORT
|
||||
|
||||
/*#include "rt_config.h" */
|
||||
#include "rtmp_comm.h"
|
||||
#include "rt_os_util.h"
|
||||
#include "rt_os_net.h"
|
||||
|
||||
/* --------------------------------- Public -------------------------------- */
|
||||
NET_DEV_STATS *RT28xx_get_ether_stats(PNET_DEV net_dev);
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Init AP-Client function.
|
||||
|
||||
Arguments:
|
||||
pAd points to our adapter
|
||||
main_dev_p points to the main BSS network interface
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
1. Only create and initialize virtual network interfaces.
|
||||
2. No main network interface here.
|
||||
========================================================================
|
||||
*/
|
||||
VOID RT28xx_ApCli_Init(VOID *pAd, PNET_DEV main_dev_p)
|
||||
{
|
||||
RTMP_OS_NETDEV_OP_HOOK netDevOpHook;
|
||||
/* init operation functions */
|
||||
NdisZeroMemory(&netDevOpHook, sizeof(RTMP_OS_NETDEV_OP_HOOK));
|
||||
netDevOpHook.open = apcli_virtual_if_open;
|
||||
netDevOpHook.stop = apcli_virtual_if_close;
|
||||
netDevOpHook.xmit = rt28xx_send_packets;
|
||||
netDevOpHook.ioctl = rt28xx_ioctl;
|
||||
netDevOpHook.get_stats = RT28xx_get_ether_stats;
|
||||
RTMP_AP_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_APC_INIT,
|
||||
0, &netDevOpHook, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Open a virtual network interface.
|
||||
|
||||
Arguments:
|
||||
dev_p which WLAN network interface
|
||||
|
||||
Return Value:
|
||||
0: open successfully
|
||||
otherwise: open fail
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
INT apcli_virtual_if_open(PNET_DEV pDev)
|
||||
{
|
||||
VOID *pAd;
|
||||
|
||||
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
|
||||
ASSERT(pAd);
|
||||
MTWF_LOG(DBG_CAT_CLIENT, CATCLIENT_APCLI, DBG_LVL_OFF, ("%s: ===> %s\n",
|
||||
RTMP_OS_NETDEV_GET_DEVNAME(pDev), __func__));
|
||||
|
||||
if (VIRTUAL_IF_INIT(pAd, pDev) != 0)
|
||||
return -1;
|
||||
|
||||
if (VIRTUAL_IF_UP(pAd, pDev) != 0)
|
||||
return -1;
|
||||
|
||||
/* increase MODULE use count */
|
||||
RT_MOD_INC_USE_COUNT();
|
||||
RT_MOD_HNAT_REG(pDev);
|
||||
RTMP_OS_NETDEV_START_QUEUE(pDev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Close a virtual network interface.
|
||||
|
||||
Arguments:
|
||||
dev_p which WLAN network interface
|
||||
|
||||
Return Value:
|
||||
0: close successfully
|
||||
otherwise: close fail
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
INT apcli_virtual_if_close(PNET_DEV pDev)
|
||||
{
|
||||
VOID *pAd;
|
||||
|
||||
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
|
||||
ASSERT(pAd);
|
||||
MTWF_LOG(DBG_CAT_CLIENT, CATCLIENT_APCLI, DBG_LVL_OFF, ("%s: ===> %s\n",
|
||||
RTMP_OS_NETDEV_GET_DEVNAME(pDev), __func__));
|
||||
|
||||
VIRTUAL_IF_DOWN(pAd, pDev);
|
||||
|
||||
VIRTUAL_IF_DEINIT(pAd, pDev);
|
||||
|
||||
RT_MOD_HNAT_DEREG(pDev);
|
||||
RT_MOD_DEC_USE_COUNT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Remove ApCli-BSS network interface.
|
||||
|
||||
Arguments:
|
||||
pAd points to our adapter
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
VOID RT28xx_ApCli_Remove(VOID *pAd)
|
||||
{
|
||||
RTMP_AP_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_APC_REMOVE, 0, NULL, 0);
|
||||
}
|
||||
|
||||
#endif /* APCLI_SUPPORT */
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,433 +0,0 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* 4F, No. 2 Technology 5th Rd.
|
||||
* Science-based Industrial Park
|
||||
* Hsin-chu, Taiwan, R.O.C.
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
****************************************************************************
|
||||
|
||||
Module Name:
|
||||
ap_ids.c
|
||||
|
||||
Abstract:
|
||||
monitor intrusion detection condition
|
||||
|
||||
Revision History:
|
||||
Who When What
|
||||
-------- ---------- ----------------------------------------------
|
||||
*/
|
||||
#ifdef IDS_SUPPORT
|
||||
|
||||
#include "rt_config.h"
|
||||
|
||||
#define IDS_EXEC_INTV 1000 /* 1 sec */
|
||||
|
||||
|
||||
VOID RTMPIdsStart(
|
||||
IN PRTMP_ADAPTER pAd)
|
||||
{
|
||||
if (pAd->ApCfg.IDSTimerRunning == FALSE) {
|
||||
RTMPSetTimer(&pAd->ApCfg.IDSTimer, IDS_EXEC_INTV);
|
||||
pAd->ApCfg.IDSTimerRunning = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
VOID RTMPIdsStop(
|
||||
IN PRTMP_ADAPTER pAd)
|
||||
{
|
||||
BOOLEAN Cancelled;
|
||||
|
||||
if (pAd->ApCfg.IDSTimerRunning == TRUE) {
|
||||
RTMPCancelTimer(&pAd->ApCfg.IDSTimer, &Cancelled);
|
||||
pAd->ApCfg.IDSTimerRunning = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SYSTEM_LOG_SUPPORT
|
||||
VOID RTMPHandleIdsEvent(
|
||||
IN PRTMP_ADAPTER pAd)
|
||||
{
|
||||
INT i, j;
|
||||
UINT32 FloodFrameCount[IW_FLOOD_EVENT_TYPE_NUM];
|
||||
UINT32 FloodFrameThreshold[IW_FLOOD_EVENT_TYPE_NUM];
|
||||
|
||||
FloodFrameCount[0] = pAd->ApCfg.RcvdAuthCount;
|
||||
FloodFrameCount[1] = pAd->ApCfg.RcvdAssocReqCount;
|
||||
FloodFrameCount[2] = pAd->ApCfg.RcvdReassocReqCount;
|
||||
FloodFrameCount[3] = pAd->ApCfg.RcvdProbeReqCount;
|
||||
FloodFrameCount[4] = pAd->ApCfg.RcvdDisassocCount;
|
||||
FloodFrameCount[5] = pAd->ApCfg.RcvdDeauthCount;
|
||||
FloodFrameCount[6] = pAd->ApCfg.RcvdEapReqCount;
|
||||
FloodFrameThreshold[0] = pAd->ApCfg.AuthFloodThreshold;
|
||||
FloodFrameThreshold[1] = pAd->ApCfg.AssocReqFloodThreshold;
|
||||
FloodFrameThreshold[2] = pAd->ApCfg.ReassocReqFloodThreshold;
|
||||
FloodFrameThreshold[3] = pAd->ApCfg.ProbeReqFloodThreshold;
|
||||
FloodFrameThreshold[4] = pAd->ApCfg.DisassocFloodThreshold;
|
||||
FloodFrameThreshold[5] = pAd->ApCfg.DeauthFloodThreshold;
|
||||
FloodFrameThreshold[6] = pAd->ApCfg.EapReqFloodThreshold;
|
||||
|
||||
/* trigger flooding traffic event */
|
||||
for (j = 0; j < IW_FLOOD_EVENT_TYPE_NUM; j++) {
|
||||
if ((FloodFrameThreshold[j] > 0) && (FloodFrameCount[j] > FloodFrameThreshold[j])) {
|
||||
RTMPSendWirelessEvent(pAd, IW_FLOOD_AUTH_EVENT_FLAG + j, NULL, MAIN_MBSSID, 0);
|
||||
/*MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("flooding traffic event(%d) - %d\n", IW_FLOOD_AUTH_EVENT_FLAG + j, FloodFrameCount[j])); */
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++) {
|
||||
UINT32 SpoofedFrameCount[IW_SPOOF_EVENT_TYPE_NUM];
|
||||
CHAR RssiOfSpoofedFrame[IW_SPOOF_EVENT_TYPE_NUM];
|
||||
INT k;
|
||||
|
||||
SpoofedFrameCount[0] = pAd->ApCfg.MBSSID[i].RcvdConflictSsidCount;
|
||||
SpoofedFrameCount[1] = pAd->ApCfg.MBSSID[i].RcvdSpoofedAssocRespCount;
|
||||
SpoofedFrameCount[2] = pAd->ApCfg.MBSSID[i].RcvdSpoofedReassocRespCount;
|
||||
SpoofedFrameCount[3] = pAd->ApCfg.MBSSID[i].RcvdSpoofedProbeRespCount;
|
||||
SpoofedFrameCount[4] = pAd->ApCfg.MBSSID[i].RcvdSpoofedBeaconCount;
|
||||
SpoofedFrameCount[5] = pAd->ApCfg.MBSSID[i].RcvdSpoofedDisassocCount;
|
||||
SpoofedFrameCount[6] = pAd->ApCfg.MBSSID[i].RcvdSpoofedAuthCount;
|
||||
SpoofedFrameCount[7] = pAd->ApCfg.MBSSID[i].RcvdSpoofedDeauthCount;
|
||||
SpoofedFrameCount[8] = pAd->ApCfg.MBSSID[i].RcvdSpoofedUnknownMgmtCount;
|
||||
SpoofedFrameCount[9] = pAd->ApCfg.MBSSID[i].RcvdReplayAttackCount;
|
||||
RssiOfSpoofedFrame[0] = pAd->ApCfg.MBSSID[i].RssiOfRcvdConflictSsid;
|
||||
RssiOfSpoofedFrame[1] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedAssocResp;
|
||||
RssiOfSpoofedFrame[2] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedReassocResp;
|
||||
RssiOfSpoofedFrame[3] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedProbeResp;
|
||||
RssiOfSpoofedFrame[4] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedBeacon;
|
||||
RssiOfSpoofedFrame[5] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedDisassoc;
|
||||
RssiOfSpoofedFrame[6] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedAuth;
|
||||
RssiOfSpoofedFrame[7] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedDeauth;
|
||||
RssiOfSpoofedFrame[8] = pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedUnknownMgmt;
|
||||
RssiOfSpoofedFrame[9] = pAd->ApCfg.MBSSID[i].RssiOfRcvdReplayAttack;
|
||||
|
||||
/* trigger spoofed attack event */
|
||||
for (k = 0; k < IW_SPOOF_EVENT_TYPE_NUM; k++) {
|
||||
if (SpoofedFrameCount[k] > 0) {
|
||||
RTMPSendWirelessEvent(pAd, IW_CONFLICT_SSID_EVENT_FLAG + k, NULL, i, RssiOfSpoofedFrame[k]);
|
||||
/*MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("spoofed attack event(%d) - %d\n", IW_CONFLICT_SSID_EVENT_FLAG + k, SpoofedFrameCount[k])); */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* SYSTEM_LOG_SUPPORT */
|
||||
|
||||
VOID RTMPClearAllIdsCounter(
|
||||
IN PRTMP_ADAPTER pAd)
|
||||
{
|
||||
INT i;
|
||||
|
||||
pAd->ApCfg.RcvdAuthCount = 0;
|
||||
pAd->ApCfg.RcvdAssocReqCount = 0;
|
||||
pAd->ApCfg.RcvdReassocReqCount = 0;
|
||||
pAd->ApCfg.RcvdProbeReqCount = 0;
|
||||
pAd->ApCfg.RcvdDisassocCount = 0;
|
||||
pAd->ApCfg.RcvdDeauthCount = 0;
|
||||
pAd->ApCfg.RcvdEapReqCount = 0;
|
||||
pAd->ApCfg.RcvdMaliciousDataCount = 0;
|
||||
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++) {
|
||||
pAd->ApCfg.MBSSID[i].RcvdConflictSsidCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedAssocRespCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedReassocRespCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedProbeRespCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedBeaconCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedDisassocCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedAuthCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedDeauthCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedUnknownMgmtCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RcvdReplayAttackCount = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdConflictSsid = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedAssocResp = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedReassocResp = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedProbeResp = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedBeacon = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedDisassoc = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedAuth = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedDeauth = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedUnknownMgmt = 0;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdReplayAttack = 0;
|
||||
}
|
||||
}
|
||||
|
||||
VOID RTMPIdsPeriodicExec(
|
||||
IN PVOID SystemSpecific1,
|
||||
IN PVOID FunctionContext,
|
||||
IN PVOID SystemSpecific2,
|
||||
IN PVOID SystemSpecific3)
|
||||
{
|
||||
PRTMP_ADAPTER pAd = (RTMP_ADAPTER *)FunctionContext;
|
||||
|
||||
pAd->ApCfg.IDSTimerRunning = FALSE;
|
||||
#ifdef SYSTEM_LOG_SUPPORT
|
||||
|
||||
/* when IDS occured, send out wireless event */
|
||||
if (pAd->CommonCfg.bWirelessEvent)
|
||||
RTMPHandleIdsEvent(pAd);
|
||||
|
||||
#endif /* SYSTEM_LOG_SUPPORT */
|
||||
/* clear all IDS counter */
|
||||
RTMPClearAllIdsCounter(pAd);
|
||||
|
||||
/* set timer */
|
||||
if (pAd->ApCfg.IdsEnable) {
|
||||
RTMPSetTimer(&pAd->ApCfg.IDSTimer, IDS_EXEC_INTV);
|
||||
pAd->ApCfg.IDSTimerRunning = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
This routine is used to check if a rogue AP sent an 802.11 management
|
||||
frame to a client using our BSSID.
|
||||
|
||||
Arguments:
|
||||
pAd - Pointer to our adapter
|
||||
pHeader - Pointer to 802.11 header
|
||||
|
||||
Return Value:
|
||||
TRUE - This is a spoofed frame
|
||||
FALSE - This isn't a spoofed frame
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
BOOLEAN RTMPSpoofedMgmtDetection(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN RX_BLK * rxblk)
|
||||
{
|
||||
INT i;
|
||||
FRAME_CONTROL *FC = (FRAME_CONTROL *)rxblk->FC;
|
||||
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++) {
|
||||
/* Spoofed BSSID detection */
|
||||
if (NdisEqualMemory(rxblk->Addr2, pAd->ApCfg.MBSSID[i].wdev.bssid, MAC_ADDR_LEN)) {
|
||||
CHAR RcvdRssi;
|
||||
struct raw_rssi_info rssi_info;
|
||||
|
||||
rssi_info.raw_rssi[0] = rxblk->rx_signal.raw_rssi[0];
|
||||
rssi_info.raw_rssi[1] = rxblk->rx_signal.raw_rssi[1];
|
||||
rssi_info.raw_rssi[2] = rxblk->rx_signal.raw_rssi[2];
|
||||
RcvdRssi = RTMPMaxRssi(pAd,
|
||||
ConvertToRssi(pAd, &rssi_info, RSSI_IDX_0),
|
||||
ConvertToRssi(pAd, &rssi_info, RSSI_IDX_1),
|
||||
ConvertToRssi(pAd, &rssi_info, RSSI_IDX_2));
|
||||
|
||||
switch (FC->SubType) {
|
||||
case SUBTYPE_ASSOC_RSP:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedAssocRespCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedAssocResp = RcvdRssi;
|
||||
break;
|
||||
|
||||
case SUBTYPE_REASSOC_RSP:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedReassocRespCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedReassocResp = RcvdRssi;
|
||||
break;
|
||||
|
||||
case SUBTYPE_PROBE_RSP:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedProbeRespCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedProbeResp = RcvdRssi;
|
||||
break;
|
||||
|
||||
case SUBTYPE_BEACON:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedBeaconCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedBeacon = RcvdRssi;
|
||||
break;
|
||||
|
||||
case SUBTYPE_DISASSOC:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedDisassocCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedDisassoc = RcvdRssi;
|
||||
break;
|
||||
|
||||
case SUBTYPE_AUTH:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedAuthCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedAuth = RcvdRssi;
|
||||
break;
|
||||
|
||||
case SUBTYPE_DEAUTH:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedDeauthCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedDeauth = RcvdRssi;
|
||||
break;
|
||||
|
||||
default:
|
||||
pAd->ApCfg.MBSSID[i].RcvdSpoofedUnknownMgmtCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdSpoofedUnknownMgmt = RcvdRssi;
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
VOID RTMPConflictSsidDetection(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PUCHAR pSsid,
|
||||
IN UCHAR SsidLen,
|
||||
IN CHAR Rssi0,
|
||||
IN CHAR Rssi1,
|
||||
IN CHAR Rssi2)
|
||||
{
|
||||
INT i;
|
||||
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++) {
|
||||
/* Conflict SSID detection */
|
||||
if (SSID_EQUAL(pSsid, SsidLen, pAd->ApCfg.MBSSID[i].Ssid, pAd->ApCfg.MBSSID[i].SsidLen)) {
|
||||
CHAR RcvdRssi;
|
||||
struct raw_rssi_info rssi_info;
|
||||
|
||||
rssi_info.raw_rssi[0] = Rssi0;
|
||||
rssi_info.raw_rssi[1] = Rssi1;
|
||||
rssi_info.raw_rssi[2] = Rssi2;
|
||||
RcvdRssi = RTMPMaxRssi(pAd, ConvertToRssi(pAd, &rssi_info, RSSI_IDX_0),
|
||||
ConvertToRssi(pAd, &rssi_info, RSSI_IDX_1),
|
||||
ConvertToRssi(pAd, &rssi_info, RSSI_IDX_2));
|
||||
pAd->ApCfg.MBSSID[i].RcvdConflictSsidCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdConflictSsid = RcvdRssi;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN RTMPReplayAttackDetection(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN UCHAR * pAddr2,
|
||||
IN RX_BLK * rxblk)
|
||||
{
|
||||
INT i;
|
||||
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++) {
|
||||
/* Conflict SSID detection */
|
||||
if (NdisEqualMemory(pAddr2, pAd->ApCfg.MBSSID[i].wdev.bssid, MAC_ADDR_LEN)) {
|
||||
CHAR RcvdRssi;
|
||||
struct raw_rssi_info rssi_info;
|
||||
|
||||
rssi_info.raw_rssi[0] = rxblk->rx_signal.raw_rssi[0];
|
||||
rssi_info.raw_rssi[1] = rxblk->rx_signal.raw_rssi[1];
|
||||
rssi_info.raw_rssi[2] = rxblk->rx_signal.raw_rssi[2];
|
||||
RcvdRssi = RTMPMaxRssi(pAd, ConvertToRssi(pAd, &rssi_info, RSSI_IDX_0),
|
||||
ConvertToRssi(pAd, &rssi_info, RSSI_IDX_1),
|
||||
ConvertToRssi(pAd, &rssi_info, RSSI_IDX_2));
|
||||
pAd->ApCfg.MBSSID[i].RcvdReplayAttackCount++;
|
||||
pAd->ApCfg.MBSSID[i].RssiOfRcvdReplayAttack = RcvdRssi;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
VOID RTMPUpdateStaMgmtCounter(RTMP_ADAPTER *pAd, USHORT type)
|
||||
{
|
||||
switch (type) {
|
||||
case SUBTYPE_ASSOC_REQ:
|
||||
pAd->ApCfg.RcvdAssocReqCount++;
|
||||
break;
|
||||
|
||||
case SUBTYPE_REASSOC_REQ:
|
||||
pAd->ApCfg.RcvdReassocReqCount++;
|
||||
break;
|
||||
|
||||
case SUBTYPE_PROBE_REQ:
|
||||
pAd->ApCfg.RcvdProbeReqCount++;
|
||||
break;
|
||||
|
||||
case SUBTYPE_DISASSOC:
|
||||
pAd->ApCfg.RcvdDisassocCount++;
|
||||
break;
|
||||
|
||||
case SUBTYPE_DEAUTH:
|
||||
pAd->ApCfg.RcvdDeauthCount++;
|
||||
break;
|
||||
|
||||
case SUBTYPE_AUTH:
|
||||
pAd->ApCfg.RcvdAuthCount++;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RcvdAssocReqCount=%d\n", pAd->ApCfg.RcvdAssocReqCount));
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RcvdReassocReqCount=%d\n", pAd->ApCfg.RcvdReassocReqCount));
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RcvdProbeReqCount=%d\n", pAd->ApCfg.RcvdProbeReqCount));
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RcvdDisassocCount=%d\n", pAd->ApCfg.RcvdDisassocCount));
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RcvdDeauthCount=%d\n", pAd->ApCfg.RcvdDeauthCount));
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("RcvdAuthCount=%d\n", pAd->ApCfg.RcvdAuthCount));
|
||||
*/
|
||||
}
|
||||
|
||||
VOID rtmp_read_ids_from_file(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
RTMP_STRING *tmpbuf,
|
||||
RTMP_STRING *buffer)
|
||||
{
|
||||
/*IdsEnable */
|
||||
if (RTMPGetKeyParameter("IdsEnable", tmpbuf, 10, buffer, TRUE)) {
|
||||
if (os_str_tol(tmpbuf, 0, 10) == 1)
|
||||
pAd->ApCfg.IdsEnable = TRUE;
|
||||
else
|
||||
pAd->ApCfg.IdsEnable = FALSE;
|
||||
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("IDS is %s\n", pAd->ApCfg.IdsEnable ? "enabled" : "disabled"));
|
||||
}
|
||||
|
||||
/*AuthFloodThreshold */
|
||||
if (RTMPGetKeyParameter("AuthFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.AuthFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("AuthFloodThreshold = %d\n", pAd->ApCfg.AuthFloodThreshold));
|
||||
}
|
||||
|
||||
/*AssocReqFloodThreshold */
|
||||
if (RTMPGetKeyParameter("AssocReqFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.AssocReqFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("AssocReqFloodThreshold = %d\n", pAd->ApCfg.AssocReqFloodThreshold));
|
||||
}
|
||||
|
||||
/*ReassocReqFloodThreshold */
|
||||
if (RTMPGetKeyParameter("ReassocReqFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.ReassocReqFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("ReassocReqFloodThreshold = %d\n", pAd->ApCfg.ReassocReqFloodThreshold));
|
||||
}
|
||||
|
||||
/*ProbeReqFloodThreshold */
|
||||
if (RTMPGetKeyParameter("ProbeReqFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.ProbeReqFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("ProbeReqFloodThreshold = %d\n", pAd->ApCfg.ProbeReqFloodThreshold));
|
||||
}
|
||||
|
||||
/*DisassocFloodThreshold */
|
||||
if (RTMPGetKeyParameter("DisassocFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.DisassocFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("DisassocFloodThreshold = %d\n", pAd->ApCfg.DisassocFloodThreshold));
|
||||
}
|
||||
|
||||
/*DeauthFloodThreshold */
|
||||
if (RTMPGetKeyParameter("DeauthFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.DeauthFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("DeauthFloodThreshold = %d\n", pAd->ApCfg.DeauthFloodThreshold));
|
||||
}
|
||||
|
||||
/*EapReqFloodThreshold */
|
||||
if (RTMPGetKeyParameter("EapReqFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.EapReqFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("EapReqFloodThreshold = %d\n", pAd->ApCfg.EapReqFloodThreshold));
|
||||
}
|
||||
|
||||
/* DataFloodThreshold */
|
||||
if (RTMPGetKeyParameter("DataFloodThreshold", tmpbuf, 10, buffer, TRUE)) {
|
||||
pAd->ApCfg.DataFloodThreshold = os_str_tol(tmpbuf, 0, 10);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("DataFloodThreshold = %d\n", pAd->ApCfg.DataFloodThreshold));
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* IDS_SUPPORT */
|
@ -1,313 +0,0 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Abstract:
|
||||
|
||||
Support multi-BSS function.
|
||||
|
||||
Note:
|
||||
1. Call RT28xx_MBSS_Init() in init function and
|
||||
call RT28xx_MBSS_Remove() in close function
|
||||
|
||||
2. MAC of different BSS is initialized in APStartUp()
|
||||
|
||||
3. BSS Index (0 ~ 15) of different rx packet is got in
|
||||
|
||||
4. BSS Index (0 ~ 15) of different tx packet is assigned in
|
||||
|
||||
5. BSS Index (0 ~ 15) of different BSS is got in tx_pkt_handle() by using
|
||||
|
||||
6. BSS Index (0 ~ 15) of IOCTL command is put in pAd->OS_Cookie->ioctl_if
|
||||
|
||||
7. Beacon of different BSS is enabled in APMakeAllBssBeacon() by writing 1
|
||||
to the register MAC_BSSID_DW1
|
||||
|
||||
8. The number of MBSS can be 1, 2, 4, or 8
|
||||
|
||||
***************************************************************************/
|
||||
#ifdef MBSS_SUPPORT
|
||||
|
||||
|
||||
#include "rt_config.h"
|
||||
|
||||
#ifdef VENDOR_FEATURE7_SUPPORT
|
||||
#ifndef ARRIS_MODULE_PRESENT
|
||||
void (*f)(int, int, int, char*, int) = arris_event_send_hook_fn;
|
||||
#endif /* !ARRIS_MODULE_PRESENT */
|
||||
#endif
|
||||
#ifdef MULTI_PROFILE
|
||||
INT multi_profile_devname_req(struct _RTMP_ADAPTER *ad, UCHAR *final_name, UCHAR *ifidx);
|
||||
#endif /*MULTI_PROFILE*/
|
||||
|
||||
extern struct wifi_dev_ops ap_wdev_ops;
|
||||
|
||||
/* --------------------------------- Public -------------------------------- */
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Initialize Multi-BSS function.
|
||||
|
||||
Arguments:
|
||||
pAd points to our adapter
|
||||
pDevMain points to the main BSS network interface
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
1. Only create and initialize virtual network interfaces.
|
||||
2. No main network interface here.
|
||||
3. If you down ra0 and modify the BssNum of RT2860AP.dat/RT2870AP.dat,
|
||||
it will not work! You must rmmod rt2860ap.ko and lsmod rt2860ap.ko again.
|
||||
========================================================================
|
||||
*/
|
||||
VOID MBSS_Init(RTMP_ADAPTER *pAd, RTMP_OS_NETDEV_OP_HOOK *pNetDevOps)
|
||||
{
|
||||
#define MBSS_MAX_DEV_NUM 32
|
||||
PNET_DEV pDevNew;
|
||||
INT32 IdBss, MaxNumBss;
|
||||
INT status;
|
||||
RTMP_OS_NETDEV_OP_HOOK netDevHook;
|
||||
struct _RTMP_CHIP_CAP *cap = hc_get_chip_cap(pAd->hdev_ctrl);
|
||||
|
||||
/* sanity check to avoid redundant virtual interfaces are created */
|
||||
if (pAd->FlgMbssInit != FALSE)
|
||||
return;
|
||||
|
||||
MaxNumBss = pAd->ApCfg.BssidNum;
|
||||
|
||||
if (MaxNumBss > HW_BEACON_MAX_NUM)
|
||||
MaxNumBss = HW_BEACON_MAX_NUM;
|
||||
|
||||
/* first IdBss must not be 0 (BSS0), must be 1 (BSS1) */
|
||||
for (IdBss = FIRST_MBSSID; IdBss < HW_BEACON_MAX_NUM; IdBss++) {
|
||||
pAd->ApCfg.MBSSID[IdBss].wdev.if_dev = NULL;
|
||||
pAd->ApCfg.MBSSID[IdBss].wdev.bcn_buf.BeaconPkt = NULL;
|
||||
}
|
||||
|
||||
/* create virtual network interface */
|
||||
for (IdBss = FIRST_MBSSID; IdBss < MaxNumBss; IdBss++) {
|
||||
struct wifi_dev *wdev;
|
||||
UINT32 MC_RowID = 0, IoctlIF = 0;
|
||||
char *dev_name = NULL;
|
||||
INT32 Ret;
|
||||
BSS_STRUCT *pMbss = NULL;
|
||||
UCHAR ifidx = IdBss;
|
||||
UCHAR final_name[32]="";
|
||||
BOOLEAN autoSuffix = TRUE;
|
||||
#ifdef MULTIPLE_CARD_SUPPORT
|
||||
MC_RowID = pAd->MC_RowID;
|
||||
#endif /* MULTIPLE_CARD_SUPPORT */
|
||||
#ifdef HOSTAPD_SUPPORT
|
||||
IoctlIF = pAd->IoctlIF;
|
||||
#endif /* HOSTAPD_SUPPORT */
|
||||
|
||||
dev_name = get_dev_name_prefix(pAd, INT_MBSSID);
|
||||
|
||||
if(dev_name == NULL){
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_ERROR,
|
||||
("get_dev_name_prefix error!\n"));
|
||||
break;
|
||||
}
|
||||
snprintf(final_name,sizeof(final_name),"%s",dev_name);
|
||||
#ifdef MULTI_PROFILE
|
||||
multi_profile_devname_req(pAd,final_name,&ifidx);
|
||||
if (ifidx == 0)
|
||||
autoSuffix = FALSE;
|
||||
#endif /*MULTI_PROFILE*/
|
||||
pDevNew = RtmpOSNetDevCreate(MC_RowID, &IoctlIF, INT_MBSSID, ifidx,
|
||||
sizeof(struct mt_dev_priv), final_name, autoSuffix);
|
||||
#ifdef HOSTAPD_SUPPORT
|
||||
pAd->IoctlIF = IoctlIF;
|
||||
#endif /* HOSTAPD_SUPPORT */
|
||||
|
||||
if (pDevNew == NULL) {
|
||||
pAd->ApCfg.BssidNum = IdBss; /* re-assign new MBSS number */
|
||||
break;
|
||||
}
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Register MBSSID IF (%s)\n", RTMP_OS_NETDEV_GET_DEVNAME(pDevNew)));
|
||||
|
||||
pMbss = &pAd->ApCfg.MBSSID[IdBss];
|
||||
wdev = &pAd->ApCfg.MBSSID[IdBss].wdev;
|
||||
Ret = wdev_init(pAd, wdev, WDEV_TYPE_AP, pDevNew, IdBss,
|
||||
(VOID *)&pAd->ApCfg.MBSSID[IdBss], (void *)pAd);
|
||||
|
||||
if (!Ret) {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("Assign wdev idx for %s failed, free net device!\n",
|
||||
RTMP_OS_NETDEV_GET_DEVNAME(pDevNew)));
|
||||
RtmpOSNetDevFree(pDevNew);
|
||||
break;
|
||||
}
|
||||
|
||||
Ret = wdev_ops_register(wdev, WDEV_TYPE_AP, &ap_wdev_ops,
|
||||
cap->wmm_detect_method);
|
||||
|
||||
if (!Ret) {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_ERROR,
|
||||
("register wdev_ops %s failed, free net device!\n",
|
||||
RTMP_OS_NETDEV_GET_DEVNAME(pDevNew)));
|
||||
RtmpOSNetDevFree(pDevNew);
|
||||
break;
|
||||
}
|
||||
|
||||
RTMP_OS_NETDEV_SET_PRIV(pDevNew, pAd);
|
||||
RTMP_OS_NETDEV_SET_WDEV(pDevNew, wdev);
|
||||
/* init operation functions and flags */
|
||||
NdisCopyMemory(&netDevHook, pNetDevOps, sizeof(netDevHook));
|
||||
netDevHook.priv_flags = INT_MBSSID;
|
||||
netDevHook.needProtcted = TRUE;
|
||||
netDevHook.wdev = wdev;
|
||||
/* Init MAC address of virtual network interface */
|
||||
NdisMoveMemory(&netDevHook.devAddr[0], &wdev->bssid[0], MAC_ADDR_LEN);
|
||||
/* register this device to OS */
|
||||
status = RtmpOSNetDevAttach(pAd->OpMode, pDevNew, &netDevHook);
|
||||
}
|
||||
|
||||
pAd->FlgMbssInit = TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Remove Multi-BSS network interface.
|
||||
|
||||
Arguments:
|
||||
pAd points to our adapter
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
FIRST_MBSSID = 1
|
||||
Main BSS is not removed here.
|
||||
========================================================================
|
||||
*/
|
||||
VOID MBSS_Remove(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
struct wifi_dev *wdev;
|
||||
UINT IdBss;
|
||||
BSS_STRUCT *pMbss;
|
||||
INT32 MaxNumBss;
|
||||
|
||||
if (!pAd)
|
||||
return;
|
||||
|
||||
MaxNumBss = pAd->ApCfg.BssidNum;
|
||||
|
||||
if (MaxNumBss > HW_BEACON_MAX_NUM)
|
||||
MaxNumBss = HW_BEACON_MAX_NUM;
|
||||
|
||||
|
||||
for (IdBss = FIRST_MBSSID; IdBss < MaxNumBss; IdBss++) {
|
||||
wdev = &pAd->ApCfg.MBSSID[IdBss].wdev;
|
||||
pMbss = &pAd->ApCfg.MBSSID[IdBss];
|
||||
|
||||
if (pMbss)
|
||||
bcn_buf_deinit(pAd, &wdev->bcn_buf);
|
||||
|
||||
if (wdev->if_dev) {
|
||||
RtmpOSNetDevProtect(1);
|
||||
RtmpOSNetDevDetach(wdev->if_dev);
|
||||
RtmpOSNetDevProtect(0);
|
||||
wdev_deinit(pAd, wdev);
|
||||
RtmpOSNetDevFree(wdev->if_dev);
|
||||
wdev->if_dev = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Get multiple bss idx.
|
||||
|
||||
Arguments:
|
||||
pAd points to our adapter
|
||||
pDev which WLAN network interface
|
||||
|
||||
Return Value:
|
||||
0: close successfully
|
||||
otherwise: close fail
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
INT32 RT28xx_MBSS_IdxGet(RTMP_ADAPTER *pAd, PNET_DEV pDev)
|
||||
{
|
||||
INT32 BssId = -1;
|
||||
INT32 IdBss;
|
||||
|
||||
if (!pAd || !pDev)
|
||||
return -1;
|
||||
|
||||
for (IdBss = 0; IdBss < pAd->ApCfg.BssidNum; IdBss++) {
|
||||
if (pAd->ApCfg.MBSSID[IdBss].wdev.if_dev == pDev) {
|
||||
BssId = IdBss;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return BssId;
|
||||
}
|
||||
|
||||
#ifdef MT_MAC
|
||||
INT32 ext_mbss_hw_cr_enable(PNET_DEV pDev)
|
||||
{
|
||||
PRTMP_ADAPTER pAd;
|
||||
INT BssId;
|
||||
|
||||
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
|
||||
BssId = RT28xx_MBSS_IdxGet(pAd, pDev);
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("##### %s, BssId = %d\n", __func__, BssId));
|
||||
|
||||
if (BssId < 0)
|
||||
return -1;
|
||||
|
||||
if (!IS_HIF_TYPE(pAd, HIF_MT))
|
||||
return 0;
|
||||
|
||||
AsicSetExtMbssEnableCR(pAd, BssId, TRUE);/* enable rmac 0_1~0_15 bit */
|
||||
AsicSetMbssHwCRSetting(pAd, BssId, TRUE);/* enable lp timing setting for 0_1~0_15 */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT ext_mbss_hw_cr_disable(PNET_DEV pDev)
|
||||
{
|
||||
PRTMP_ADAPTER pAd;
|
||||
INT BssId;
|
||||
|
||||
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
|
||||
BssId = RT28xx_MBSS_IdxGet(pAd, pDev);
|
||||
|
||||
if (BssId < 0)
|
||||
return -1;
|
||||
|
||||
if (!IS_HIF_TYPE(pAd, HIF_MT))
|
||||
return 0;
|
||||
|
||||
AsicSetMbssHwCRSetting(pAd, BssId, FALSE);
|
||||
AsicSetExtMbssEnableCR(pAd, BssId, FALSE);
|
||||
return 0;
|
||||
}
|
||||
#endif /* MT_MAC */
|
||||
|
||||
#endif /* MBSS_SUPPORT */
|
||||
|
||||
|
||||
|
@ -1,186 +0,0 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* Taiwan, R.O.C.
|
||||
*
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Abstract:
|
||||
|
||||
Support multi-BSS function.
|
||||
|
||||
Note:
|
||||
1. Call RT28xx_MBSS_Init() in init function and
|
||||
call RT28xx_MBSS_Remove() in close function
|
||||
|
||||
2. MAC of different BSS is initialized in APStartUp()
|
||||
|
||||
3. BSS Index (0 ~ 15) of different rx packet is got in
|
||||
|
||||
4. BSS Index (0 ~ 15) of different tx packet is assigned in
|
||||
|
||||
5. BSS Index (0 ~ 15) of different BSS is got in ap_tx_pkt_handle() by using
|
||||
|
||||
6. BSS Index (0 ~ 15) of IOCTL command is put in pAd->OS_Cookie->ioctl_if
|
||||
|
||||
7. Beacon of different BSS is enabled in APMakeAllBssBeacon() by writing 1
|
||||
to the register MAC_BSSID_DW1
|
||||
|
||||
8. The number of MBSS can be 1, 2, 4, or 8
|
||||
|
||||
***************************************************************************/
|
||||
#define RTMP_MODULE_OS
|
||||
|
||||
#ifdef MBSS_SUPPORT
|
||||
|
||||
/*#include "rt_config.h" */
|
||||
#include "rtmp_comm.h"
|
||||
#include "rt_os_util.h"
|
||||
#include "rt_os_net.h"
|
||||
|
||||
|
||||
/* --------------------------------- Public -------------------------------- */
|
||||
NET_DEV_STATS *RT28xx_get_ether_stats(PNET_DEV net_dev);
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Initialize Multi-BSS function.
|
||||
|
||||
Arguments:
|
||||
pAd points to our adapter
|
||||
pDevMain points to the main BSS network interface
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
1. Only create and initialize virtual network interfaces.
|
||||
2. No main network interface here.
|
||||
3. If you down ra0 and modify the BssNum of RT2860AP.dat/RT2870AP.dat,
|
||||
it will not work! You must rmmod rt2860ap.ko and lsmod rt2860ap.ko again.
|
||||
========================================================================
|
||||
*/
|
||||
VOID RT28xx_MBSS_Init(VOID *pAd, PNET_DEV pDevMain)
|
||||
{
|
||||
RTMP_OS_NETDEV_OP_HOOK netDevHook;
|
||||
|
||||
NdisZeroMemory(&netDevHook, sizeof(netDevHook));
|
||||
netDevHook.open = mbss_virtual_if_open; /* device opem hook point */
|
||||
netDevHook.stop = mbss_virtual_if_close; /* device close hook point */
|
||||
netDevHook.xmit = rt28xx_send_packets; /* hard transmit hook point */
|
||||
netDevHook.ioctl = rt28xx_ioctl; /* ioctl hook point */
|
||||
netDevHook.get_stats = RT28xx_get_ether_stats;
|
||||
RTMP_AP_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_MBSS_INIT,
|
||||
0, &netDevHook, 0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Remove Multi-BSS network interface.
|
||||
|
||||
Arguments:
|
||||
pAd points to our adapter
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
Note:
|
||||
FIRST_MBSSID = 1
|
||||
Main BSS is not removed here.
|
||||
========================================================================
|
||||
*/
|
||||
VOID RT28xx_MBSS_Remove(VOID *pAd)
|
||||
{
|
||||
RTMP_AP_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_MBSS_REMOVE, 0, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* --------------------------------- Private -------------------------------- */
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Open a virtual network interface.
|
||||
|
||||
Arguments:
|
||||
pDev which WLAN network interface
|
||||
|
||||
Return Value:
|
||||
0: open successfully
|
||||
otherwise: open fail
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
INT mbss_virtual_if_open(PNET_DEV pDev)
|
||||
{
|
||||
VOID *pAd;
|
||||
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%s: ===> %s\n",
|
||||
RTMP_OS_NETDEV_GET_DEVNAME(pDev), __func__));
|
||||
|
||||
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
|
||||
|
||||
if (VIRTUAL_IF_INIT(pAd, pDev) != 0)
|
||||
return -1;
|
||||
|
||||
if (VIRTUAL_IF_UP(pAd, pDev) != 0)
|
||||
return -1;
|
||||
|
||||
/* increase MODULE use count */
|
||||
RT_MOD_INC_USE_COUNT();
|
||||
RT_MOD_HNAT_REG(pDev);
|
||||
RTMP_OS_NETDEV_START_QUEUE(pDev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Close a virtual network interface.
|
||||
|
||||
Arguments:
|
||||
pDev which WLAN network interface
|
||||
|
||||
Return Value:
|
||||
0: close successfully
|
||||
otherwise: close fail
|
||||
|
||||
Note:
|
||||
========================================================================
|
||||
*/
|
||||
INT mbss_virtual_if_close(PNET_DEV pDev)
|
||||
{
|
||||
VOID *pAd;
|
||||
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%s: ===> %s\n",
|
||||
RTMP_OS_NETDEV_GET_DEVNAME(pDev), __func__));
|
||||
|
||||
pAd = RTMP_OS_NETDEV_GET_PRIV(pDev);
|
||||
|
||||
RTMP_OS_NETDEV_STOP_QUEUE(pDev);
|
||||
|
||||
VIRTUAL_IF_DOWN(pAd, pDev);
|
||||
|
||||
VIRTUAL_IF_DEINIT(pAd, pDev);
|
||||
|
||||
RT_MOD_HNAT_DEREG(pDev);
|
||||
RT_MOD_DEC_USE_COUNT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* MBSS_SUPPORT */
|
||||
|
@ -1,732 +0,0 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* 4F, No. 2 Technology 5th Rd.
|
||||
* Science-based Industrial Park
|
||||
* Hsin-chu, Taiwan, R.O.C.
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
****************************************************************************
|
||||
|
||||
Module Name:
|
||||
mlme.c
|
||||
|
||||
Abstract:
|
||||
Major MLME state machiones here
|
||||
|
||||
Revision History:
|
||||
Who When What
|
||||
-------- ---------- ----------------------------------------------
|
||||
John Chang 08-04-2003 created for 11g soft-AP
|
||||
*/
|
||||
|
||||
#include "rt_config.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#define MCAST_WCID_TO_REMOVE 0 /* Pat: TODO */
|
||||
|
||||
#ifdef APCLI_SUPPORT
|
||||
#ifdef APCLI_CERT_SUPPORT
|
||||
extern UCHAR ZeroSsid[32];
|
||||
#endif /* APCLI_CERT_SUPPORT */
|
||||
#endif /* APCLI_SUPPORT */
|
||||
|
||||
#ifdef DOT11_N_SUPPORT
|
||||
|
||||
int DetectOverlappingPeriodicRound;
|
||||
|
||||
|
||||
#ifdef DOT11N_DRAFT3
|
||||
VOID Bss2040CoexistTimeOut(
|
||||
IN PVOID SystemSpecific1,
|
||||
IN PVOID FunctionContext,
|
||||
IN PVOID SystemSpecific2,
|
||||
IN PVOID SystemSpecific3)
|
||||
{
|
||||
int apidx;
|
||||
PRTMP_ADAPTER pAd = (RTMP_ADAPTER *)FunctionContext;
|
||||
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Bss2040CoexistTimeOut(): Recovery to original setting!\n"));
|
||||
/* Recovery to original setting when next DTIM Interval. */
|
||||
pAd->CommonCfg.Bss2040CoexistFlag &= (~BSS_2040_COEXIST_TIMER_FIRED);
|
||||
NdisZeroMemory(&pAd->CommonCfg.LastBSSCoexist2040, sizeof(BSS_2040_COEXIST_IE));
|
||||
pAd->CommonCfg.Bss2040CoexistFlag |= BSS_2040_COEXIST_INFO_SYNC;
|
||||
|
||||
if (pAd->CommonCfg.bBssCoexEnable == FALSE) {
|
||||
/* TODO: Find a better way to handle this when the timer is fired and we disable the bBssCoexEable support!! */
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Bss2040CoexistTimeOut(): bBssCoexEnable is FALSE, return directly!\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
for (apidx = 0; apidx < pAd->ApCfg.BssidNum; apidx++)
|
||||
SendBSS2040CoexistMgmtAction(pAd, MCAST_WCID_TO_REMOVE, apidx, 0);
|
||||
}
|
||||
#endif /* DOT11N_DRAFT3 */
|
||||
|
||||
#endif /* DOT11_N_SUPPORT */
|
||||
|
||||
|
||||
VOID APDetectOverlappingExec(
|
||||
IN PVOID SystemSpecific1,
|
||||
IN PVOID FunctionContext,
|
||||
IN PVOID SystemSpecific2,
|
||||
IN PVOID SystemSpecific3)
|
||||
{
|
||||
#ifdef DOT11_N_SUPPORT
|
||||
PRTMP_ADAPTER pAd = (RTMP_ADAPTER *)FunctionContext;
|
||||
struct freq_oper oper;
|
||||
BOOLEAN bSupport2G = HcIsRfSupport(pAd, RFIC_24GHZ);
|
||||
int i;
|
||||
struct wifi_dev *wdev;
|
||||
UCHAR cfg_ht_bw;
|
||||
UCHAR cfg_ext_cha;
|
||||
|
||||
if (DetectOverlappingPeriodicRound == 0) {
|
||||
/* switch back 20/40 */
|
||||
if (bSupport2G) {
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++) {
|
||||
wdev = &pAd->ApCfg.MBSSID[i].wdev;
|
||||
cfg_ht_bw = wlan_config_get_ht_bw(wdev);
|
||||
if (wmode_2_rfic(wdev->PhyMode) == RFIC_24GHZ && (cfg_ht_bw == HT_BW_40)) {
|
||||
cfg_ext_cha = wlan_config_get_ext_cha(wdev);
|
||||
wlan_operate_set_ht_bw(wdev, HT_BW_40, cfg_ext_cha);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((DetectOverlappingPeriodicRound == 25) || (DetectOverlappingPeriodicRound == 1)) {
|
||||
if (hc_radio_query_by_rf(pAd, RFIC_24GHZ, &oper) != HC_STATUS_OK) {
|
||||
return;
|
||||
}
|
||||
if (oper.ht_bw == HT_BW_40) {
|
||||
SendBeaconRequest(pAd, 1);
|
||||
SendBeaconRequest(pAd, 2);
|
||||
SendBeaconRequest(pAd, 3);
|
||||
}
|
||||
}
|
||||
|
||||
DetectOverlappingPeriodicRound--;
|
||||
}
|
||||
|
||||
#endif /* DOT11_N_SUPPORT */
|
||||
}
|
||||
|
||||
/*
|
||||
==========================================================================
|
||||
Description:
|
||||
This routine is executed every second -
|
||||
1. Decide the overall channel quality
|
||||
2. Check if need to upgrade the TX rate to any client
|
||||
3. perform MAC table maintenance, including ageout no-traffic clients,
|
||||
and release packet buffer in PSQ is fail to TX in time.
|
||||
==========================================================================
|
||||
*/
|
||||
VOID APMlmePeriodicExec(
|
||||
PRTMP_ADAPTER pAd)
|
||||
{
|
||||
#ifdef A_BAND_SUPPORT
|
||||
BOOLEAN bSupport5G = HcIsRfSupport(pAd, RFIC_5GHZ);
|
||||
|
||||
#ifdef MT_DFS_SUPPORT
|
||||
USHORT ChannelMovingTime;
|
||||
#endif
|
||||
#endif /*A_BAND_SUPPORT*/
|
||||
/*
|
||||
Reqeust by David 2005/05/12
|
||||
It make sense to disable Adjust Tx Power on AP mode, since we can't
|
||||
take care all of the client's situation
|
||||
ToDo: need to verify compatibility issue with WiFi product.
|
||||
*/
|
||||
#ifdef CARRIER_DETECTION_SUPPORT
|
||||
|
||||
if (isCarrierDetectExist(pAd) == TRUE) {
|
||||
PCARRIER_DETECTION_STRUCT pCarrierDetect = &pAd->CommonCfg.CarrierDetect;
|
||||
|
||||
if (pCarrierDetect->OneSecIntCount < pCarrierDetect->CarrierGoneThreshold) {
|
||||
pCarrierDetect->CD_State = CD_NORMAL;
|
||||
pCarrierDetect->recheck = pCarrierDetect->recheck1;
|
||||
|
||||
if (pCarrierDetect->Debug != DBG_LVL_TRACE) {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Carrier gone\n"));
|
||||
/* start all TX actions. */
|
||||
UpdateBeaconHandler(
|
||||
pAd,
|
||||
NULL,
|
||||
BCN_UPDATE_AP_RENEW);
|
||||
AsicSetSyncModeAndEnable(pAd, pAd->CommonCfg.BeaconPeriod, HW_BSSID_0, OPMODE_AP);
|
||||
} else
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("Carrier gone\n"));
|
||||
}
|
||||
|
||||
pCarrierDetect->OneSecIntCount = 0;
|
||||
}
|
||||
|
||||
#endif /* CARRIER_DETECTION_SUPPORT */
|
||||
#ifdef VOW_SUPPORT
|
||||
vow_display_info_periodic(pAd);
|
||||
#endif /* VOW_SUPPORT */
|
||||
#ifdef RED_SUPPORT
|
||||
if (pAd->red_debug_en && (pAd->red_have_cr4 == FALSE))
|
||||
appShowRedDebugMessage(pAd);
|
||||
#endif /* RED_SUPPORT */
|
||||
#ifdef FQ_SCH_SUPPORT
|
||||
if (pAd->fq_ctrl.dbg_en)
|
||||
app_show_fq_dbgmsg(pAd);
|
||||
#endif /* RRSCH_SUPPORT */
|
||||
|
||||
RTMP_CHIP_HIGH_POWER_TUNING(pAd, &pAd->ApCfg.RssiSample);
|
||||
/* Disable Adjust Tx Power for WPA WiFi-test. */
|
||||
/* Because high TX power results in the abnormal disconnection of Intel BG-STA. */
|
||||
/*#ifndef WIFI_TEST */
|
||||
/* if (pAd->CommonCfg.bWiFiTest == FALSE) */
|
||||
/* for SmartBit 64-byte stream test */
|
||||
/* removed based on the decision of Ralink congress at 2011/7/06 */
|
||||
/* if (pAd->MacTab.Size > 0) */
|
||||
RTMP_CHIP_ASIC_ADJUST_TX_POWER(pAd);
|
||||
/*#endif // WIFI_TEST */
|
||||
RTMP_CHIP_ASIC_TEMPERATURE_COMPENSATION(pAd);
|
||||
/* walk through MAC table, see if switching TX rate is required */
|
||||
|
||||
/* MAC table maintenance */
|
||||
if (pAd->Mlme.PeriodicRound % MLME_TASK_EXEC_MULTIPLE == 0) {
|
||||
/* one second timer */
|
||||
MacTableMaintenance(pAd);
|
||||
|
||||
RTMPMaintainPMKIDCache(pAd);
|
||||
#ifdef WDS_SUPPORT
|
||||
WdsTableMaintenance(pAd);
|
||||
#endif /* WDS_SUPPORT */
|
||||
#ifdef CLIENT_WDS
|
||||
CliWds_ProxyTabMaintain(pAd);
|
||||
#endif /* CLIENT_WDS */
|
||||
}
|
||||
|
||||
#ifdef AP_SCAN_SUPPORT
|
||||
AutoChannelSelCheck(pAd);
|
||||
#endif /* AP_SCAN_SUPPORT */
|
||||
#ifdef APCLI_SUPPORT
|
||||
|
||||
if (pAd->Mlme.OneSecPeriodicRound % 2 == 0)
|
||||
ApCliIfMonitor(pAd);
|
||||
|
||||
if (pAd->Mlme.OneSecPeriodicRound % 2 == 1
|
||||
#ifdef APCLI_AUTO_CONNECT_SUPPORT
|
||||
&& (pAd->ApCfg.ApCliAutoConnectChannelSwitching == FALSE)
|
||||
#endif /* APCLI_AUTO_CONNECT_SUPPORT */
|
||||
)
|
||||
ApCliIfUp(pAd);
|
||||
|
||||
{
|
||||
INT loop;
|
||||
ULONG Now32;
|
||||
|
||||
#ifdef MAC_REPEATER_SUPPORT
|
||||
|
||||
if (pAd->ApCfg.bMACRepeaterEn)
|
||||
RTMPRepeaterReconnectionCheck(pAd);
|
||||
|
||||
#endif /* MAC_REPEATER_SUPPORT */
|
||||
|
||||
NdisGetSystemUpTime(&Now32);
|
||||
|
||||
for (loop = 0; loop < MAX_APCLI_NUM; loop++) {
|
||||
PAPCLI_STRUCT pApCliEntry = &pAd->ApCfg.ApCliTab[loop];
|
||||
#ifdef APCLI_CERT_SUPPORT
|
||||
|
||||
if ((pApCliEntry->bBlockAssoc == TRUE) &&
|
||||
RTMP_TIME_AFTER(Now32, pApCliEntry->LastMicErrorTime + (60*OS_HZ)))
|
||||
pAd->ApCfg.ApCliTab[loop].bBlockAssoc = FALSE;
|
||||
|
||||
#endif /* APCLI_CERT_SUPPORT */
|
||||
|
||||
if ((pApCliEntry->Valid == TRUE)
|
||||
&& (VALID_UCAST_ENTRY_WCID(pAd, pApCliEntry->MacTabWCID))) {
|
||||
/* update channel quality for Roaming and UI LinkQuality display */
|
||||
MlmeCalculateChannelQuality(pAd,
|
||||
&pAd->MacTab.Content[pApCliEntry->MacTabWCID], Now32);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* APCLI_SUPPORT */
|
||||
#ifdef DOT11_N_SUPPORT
|
||||
{
|
||||
INT IdBss = 0;
|
||||
UCHAR ht_protect_en = 1;
|
||||
BSS_STRUCT *pMbss = NULL;
|
||||
|
||||
for (IdBss = 0; IdBss < pAd->ApCfg.BssidNum; IdBss++) {
|
||||
pMbss = &pAd->ApCfg.MBSSID[IdBss];
|
||||
|
||||
if ((pMbss) && (&pMbss->wdev) && (pMbss->wdev.DevInfo.Active)) {
|
||||
ht_protect_en = wlan_config_get_ht_protect_en(&pMbss->wdev);
|
||||
if (ht_protect_en) {
|
||||
ApUpdateCapabilityAndErpIe(pAd, pMbss);
|
||||
APUpdateOperationMode(pAd, &pMbss->wdev);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* DOT11_N_SUPPORT */
|
||||
|
||||
#ifdef A_BAND_SUPPORT
|
||||
if (bSupport5G && (pAd->CommonCfg.bIEEE80211H == 1)) {
|
||||
INT IdBss = 0;
|
||||
BOOLEAN BandInCac[DBDC_BAND_NUM];
|
||||
UCHAR i;
|
||||
BSS_STRUCT *pMbss = NULL;
|
||||
struct DOT11_H *pDot11hTest = NULL;
|
||||
struct wifi_dev *wdev;
|
||||
UCHAR BandIdx;
|
||||
|
||||
for (i = 0; i < DBDC_BAND_NUM; i++)
|
||||
BandInCac[i] = FALSE;
|
||||
|
||||
for (IdBss = 0; IdBss < pAd->ApCfg.BssidNum; IdBss++) {
|
||||
pMbss = &pAd->ApCfg.MBSSID[IdBss];
|
||||
wdev = &pMbss->wdev;
|
||||
|
||||
if ((pMbss == NULL) || (wdev == NULL))
|
||||
continue;
|
||||
if (wdev->pHObj == NULL)
|
||||
continue;
|
||||
|
||||
BandIdx = HcGetBandByWdev(wdev);
|
||||
pDot11hTest = &pAd->Dot11_H[BandIdx];
|
||||
|
||||
if (pDot11hTest == NULL)
|
||||
continue;
|
||||
#ifdef MT_DFS_SUPPORT
|
||||
if (pDot11hTest->RDMode == RD_SILENCE_MODE) {
|
||||
if (BandInCac[BandIdx] == TRUE)
|
||||
continue;
|
||||
else
|
||||
BandInCac[BandIdx] = TRUE;
|
||||
#ifdef BACKGROUND_SCAN_SUPPORT
|
||||
if (IS_SUPPORT_MT_ZEROWAIT_DFS(pAd) == TRUE)
|
||||
ChannelMovingTime = pDot11hTest->DfsZeroWaitChMovingTime;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ChannelMovingTime = pDot11hTest->ChMovingTime;
|
||||
}
|
||||
|
||||
if (pDot11hTest->RDCount++ > ChannelMovingTime) {
|
||||
pDot11hTest->RDCount = 0;
|
||||
MlmeEnqueue(pAd, DFS_STATE_MACHINE, DFS_CAC_END, 0, NULL, HcGetBandByWdev(wdev));
|
||||
AsicSetSyncModeAndEnable(pAd, pAd->CommonCfg.BeaconPeriod, HW_BSSID_0, OPMODE_AP);
|
||||
pDot11hTest->RDMode = RD_NORMAL_MODE;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
pDot11hTest->InServiceMonitorCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* A_BAND_SUPPORT */
|
||||
|
||||
#ifdef MT_DFS_SUPPORT
|
||||
DfsNonOccupancyCountDown(pAd);
|
||||
DfsOutBandCacCountUpdate(pAd);
|
||||
#endif
|
||||
#ifdef MBO_SUPPORT
|
||||
MboCheckBssTermination(pAd);
|
||||
#endif /* MBO_SUPPORT */
|
||||
#ifdef DOT11R_FT_SUPPORT
|
||||
FT_R1KHInfoMaintenance(pAd);
|
||||
#endif /* DOT11R_FT_SUPPORT */
|
||||
#ifdef APCLI_SUPPORT
|
||||
#ifdef DOT11_N_SUPPORT
|
||||
#ifdef DOT11N_DRAFT3
|
||||
#ifdef APCLI_CERT_SUPPORT
|
||||
/* Perform 20/40 BSS COEX scan every Dot11BssWidthTriggerScanInt */
|
||||
{
|
||||
UCHAR apcli2Gidx = 0;
|
||||
#ifdef DBDC_MODE
|
||||
if (pAd->CommonCfg.dbdc_mode)
|
||||
apcli2Gidx = 1;
|
||||
#endif
|
||||
if (APCLI_IF_UP_CHECK(pAd, apcli2Gidx) && (pAd->bApCliCertTest == TRUE)) {
|
||||
if ((OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_SCAN_2040)) &&
|
||||
(pAd->CommonCfg.Dot11BssWidthTriggerScanInt != 0) &&
|
||||
((pAd->Mlme.OneSecPeriodicRound % pAd->CommonCfg.Dot11BssWidthTriggerScanInt) == (pAd->CommonCfg.Dot11BssWidthTriggerScanInt-1))) {
|
||||
#ifdef MT7615
|
||||
if (IS_MT7615(pAd) || IS_MT7622(pAd)) {
|
||||
PAPCLI_STRUCT pApCliEntry = &pAd->ApCfg.ApCliTab[BSS0];
|
||||
MAC_TABLE_ENTRY *pEntry = NULL;
|
||||
STA_TR_ENTRY *tr_entry = NULL;
|
||||
UINT tx_tp = 0;
|
||||
UINT rx_tp = 0;
|
||||
|
||||
if (pApCliEntry->Valid == TRUE) {
|
||||
pEntry = &pAd->MacTab.Content[pApCliEntry->MacTabWCID];
|
||||
tr_entry = &pAd->MacTab.tr_entry[pApCliEntry->MacTabWCID];
|
||||
}
|
||||
|
||||
if ((pEntry) && IS_ENTRY_APCLI(pEntry) && (tr_entry->PortSecured == WPA_802_1X_PORT_SECURED)) {
|
||||
tx_tp = ((pApCliEntry->OneSecTxBytes) >> BYTES_PER_SEC_TO_MBPS);
|
||||
rx_tp = ((pApCliEntry->OneSecRxBytes) >> BYTES_PER_SEC_TO_MBPS);
|
||||
}
|
||||
|
||||
/* Check last scan time at least 30 seconds from now. */
|
||||
/* Check traffic is less than about 1.5~2Mbps.*/
|
||||
/* it might cause data lost if we enqueue scanning.*/
|
||||
/* This criteria needs to be considered*/
|
||||
|
||||
if ((tx_tp < 1) && (rx_tp < 1)) {
|
||||
MLME_SCAN_REQ_STRUCT ScanReq;
|
||||
/* Fill out stuff for scan request and kick to scan*/
|
||||
ScanParmFill(pAd, &ScanReq, ZeroSsid, 0, BSS_ANY, SCAN_2040_BSS_COEXIST);
|
||||
/* Before scan, reset trigger event table. */
|
||||
TriEventInit(pAd);
|
||||
MlmeEnqueue(pAd, AP_SYNC_STATE_MACHINE, APMT2_MLME_SCAN_REQ, sizeof(MLME_SCAN_REQ_STRUCT), &ScanReq, (ULONG)(&pApCliEntry->wdev));
|
||||
/* Set InfoReq = 1, So after scan , alwats sebd 20/40 Coexistence frame to AP*/
|
||||
pAd->CommonCfg.BSSCoexist2040.field.InfoReq = 1;
|
||||
RTMP_MLME_HANDLER(pAd);
|
||||
}
|
||||
} else
|
||||
#endif /* MT7615 */
|
||||
{
|
||||
MTWF_LOG(DBG_CAT_MLME, DBG_SUBCAT_ALL, DBG_LVL_TRACE,
|
||||
("MMCHK - LastOneSecTotalTxCount/LastOneSecRxOkDataCnt = %d/%d\n",
|
||||
pAd->RalinkCounters.LastOneSecTotalTxCount,
|
||||
pAd->RalinkCounters.LastOneSecRxOkDataCnt));
|
||||
|
||||
/* Check last scan time at least 30 seconds from now. */
|
||||
/* Check traffic is less than about 1.5~2Mbps.*/
|
||||
/* it might cause data lost if we enqueue scanning.*/
|
||||
/* This criteria needs to be considered*/
|
||||
if ((pAd->RalinkCounters.LastOneSecTotalTxCount < 70) && (pAd->RalinkCounters.LastOneSecRxOkDataCnt < 70)) {
|
||||
MLME_SCAN_REQ_STRUCT ScanReq;
|
||||
/* Fill out stuff for scan request and kick to scan*/
|
||||
ScanParmFill(pAd, &ScanReq, ZeroSsid, 0, BSS_ANY, SCAN_2040_BSS_COEXIST);
|
||||
/* Before scan, reset trigger event table. */
|
||||
TriEventInit(pAd);
|
||||
MlmeEnqueue(pAd, AP_SYNC_STATE_MACHINE, APMT2_MLME_SCAN_REQ, sizeof(MLME_SCAN_REQ_STRUCT), &ScanReq, 0);
|
||||
/* Set InfoReq = 1, So after scan , alwats sebd 20/40 Coexistence frame to AP*/
|
||||
pAd->CommonCfg.BSSCoexist2040.field.InfoReq = 1;
|
||||
RTMP_MLME_HANDLER(pAd);
|
||||
}
|
||||
|
||||
MTWF_LOG(DBG_CAT_MLME, DBG_SUBCAT_ALL, DBG_LVL_TRACE,
|
||||
("MMCHK - LastOneSecTotalTxCount/LastOneSecRxOkDataCnt = %d/%d\n",
|
||||
pAd->RalinkCounters.LastOneSecTotalTxCount,
|
||||
pAd->RalinkCounters.LastOneSecRxOkDataCnt));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* APCLI_CERT_SUPPORT */
|
||||
#endif /* DOT11N_DRAFT3 */
|
||||
#endif /* DOT11_N_SUPPORT */
|
||||
#endif /* APCLI_SUPPORT */
|
||||
#ifdef BAND_STEERING
|
||||
BndStrgHeartBeatMonitor(pAd);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*! \brief To substitute the message type if the message is coming from external
|
||||
* \param *Fr The frame received
|
||||
* \param *Machine The state machine
|
||||
* \param *MsgType the message type for the state machine
|
||||
* \return TRUE if the substitution is successful, FALSE otherwise
|
||||
* \pre
|
||||
* \post
|
||||
*/
|
||||
BOOLEAN APMsgTypeSubst(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PFRAME_802_11 pFrame,
|
||||
OUT INT *Machine,
|
||||
OUT INT *MsgType)
|
||||
{
|
||||
USHORT Seq;
|
||||
#ifdef DOT11_SAE_SUPPORT
|
||||
USHORT Alg;
|
||||
#endif /* DOT11_SAE_SUPPORT */
|
||||
UCHAR EAPType;
|
||||
BOOLEAN Return = FALSE;
|
||||
#ifdef WSC_AP_SUPPORT
|
||||
UCHAR EAPCode;
|
||||
PMAC_TABLE_ENTRY pEntry;
|
||||
#endif /* WSC_AP_SUPPORT */
|
||||
unsigned char hdr_len = LENGTH_802_11;
|
||||
|
||||
/*
|
||||
TODO:
|
||||
only PROBE_REQ can be broadcast, all others must be unicast-to-me && is_mybssid;
|
||||
otherwise, ignore this frame
|
||||
*/
|
||||
|
||||
/* wpa EAPOL PACKET */
|
||||
if (pFrame->Hdr.FC.Type == FC_TYPE_DATA) {
|
||||
#ifdef WSC_AP_SUPPORT
|
||||
WSC_CTRL *wsc_ctrl;
|
||||
struct wifi_dev *wdev;
|
||||
|
||||
/*WSC EAPOL PACKET */
|
||||
pEntry = MacTableLookup(pAd, pFrame->Hdr.Addr2);
|
||||
|
||||
if (pEntry) {
|
||||
wdev = &pAd->ApCfg.MBSSID[pEntry->func_tb_idx].wdev;
|
||||
|
||||
if (pEntry->bWscCapable
|
||||
|| IS_AKM_OPEN(wdev->SecConfig.AKMMap)
|
||||
|| IS_AKM_SHARED(wdev->SecConfig.AKMMap)
|
||||
|| IS_AKM_AUTOSWITCH(wdev->SecConfig.AKMMap)) {
|
||||
/*
|
||||
WSC AP only can service one WSC STA in one WPS session.
|
||||
Forward this EAP packet to WSC SM if this EAP packets is from
|
||||
WSC STA that WSC AP services or WSC AP doesn't service any
|
||||
WSC STA now.
|
||||
*/
|
||||
wsc_ctrl = &wdev->WscControl;
|
||||
|
||||
if ((MAC_ADDR_EQUAL(wsc_ctrl->EntryAddr, pEntry->Addr) ||
|
||||
MAC_ADDR_EQUAL(wsc_ctrl->EntryAddr, ZERO_MAC_ADDR)) &&
|
||||
IS_ENTRY_CLIENT(pEntry) &&
|
||||
(wsc_ctrl->WscConfMode != WSC_DISABLE)) {
|
||||
*Machine = WSC_STATE_MACHINE;
|
||||
EAPType = *((UCHAR *)pFrame + hdr_len + LENGTH_802_1_H + 1);
|
||||
EAPCode = *((UCHAR *)pFrame + hdr_len + LENGTH_802_1_H + 4);
|
||||
Return = WscMsgTypeSubst(EAPType, EAPCode, MsgType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WSC_AP_SUPPORT */
|
||||
|
||||
if (!Return) {
|
||||
*Machine = WPA_STATE_MACHINE;
|
||||
EAPType = *((UCHAR *)pFrame + hdr_len + LENGTH_802_1_H + 1);
|
||||
Return = WpaMsgTypeSubst(EAPType, (INT *) MsgType);
|
||||
}
|
||||
|
||||
return Return;
|
||||
}
|
||||
|
||||
if (pFrame->Hdr.FC.Type != FC_TYPE_MGMT)
|
||||
return FALSE;
|
||||
|
||||
switch (pFrame->Hdr.FC.SubType) {
|
||||
case SUBTYPE_ASSOC_REQ:
|
||||
*Machine = AP_ASSOC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_ASSOC_REQ;
|
||||
break;
|
||||
|
||||
/*
|
||||
case SUBTYPE_ASSOC_RSP:
|
||||
*Machine = AP_ASSOC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_ASSOC_RSP;
|
||||
break;
|
||||
*/
|
||||
case SUBTYPE_REASSOC_REQ:
|
||||
*Machine = AP_ASSOC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_REASSOC_REQ;
|
||||
break;
|
||||
|
||||
/*
|
||||
case SUBTYPE_REASSOC_RSP:
|
||||
*Machine = AP_ASSOC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_REASSOC_RSP;
|
||||
break;
|
||||
*/
|
||||
case SUBTYPE_PROBE_REQ:
|
||||
*Machine = AP_SYNC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_PROBE_REQ;
|
||||
break;
|
||||
|
||||
/* For Active Scan */
|
||||
case SUBTYPE_PROBE_RSP:
|
||||
*Machine = AP_SYNC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_PROBE_RSP;
|
||||
break;
|
||||
|
||||
case SUBTYPE_BEACON:
|
||||
*Machine = AP_SYNC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_BEACON;
|
||||
break;
|
||||
|
||||
/*
|
||||
case SUBTYPE_ATIM:
|
||||
*Machine = AP_SYNC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_ATIM;
|
||||
break;
|
||||
*/
|
||||
case SUBTYPE_DISASSOC:
|
||||
*Machine = AP_ASSOC_STATE_MACHINE;
|
||||
*MsgType = APMT2_PEER_DISASSOC_REQ;
|
||||
break;
|
||||
|
||||
case SUBTYPE_AUTH:
|
||||
/* get the sequence number from payload 24 Mac Header + 2 bytes algorithm */
|
||||
#ifdef DOT11_SAE_SUPPORT
|
||||
NdisMoveMemory(&Alg, &pFrame->Octet[0], sizeof(USHORT));
|
||||
#endif /* DOT11_SAE_SUPPORT */
|
||||
NdisMoveMemory(&Seq, &pFrame->Octet[2], sizeof(USHORT));
|
||||
*Machine = AP_AUTH_STATE_MACHINE;
|
||||
|
||||
if (Seq == 1
|
||||
#ifdef DOT11_SAE_SUPPORT
|
||||
|| (Alg == AUTH_MODE_SAE && Seq == 2)
|
||||
#endif /* DOT11_SAE_SUPPORT */
|
||||
)
|
||||
*MsgType = APMT2_PEER_AUTH_REQ;
|
||||
else if (Seq == 3)
|
||||
*MsgType = APMT2_PEER_AUTH_CONFIRM;
|
||||
else {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_TRACE, ("wrong AUTH seq=%d Octet=%02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
Seq,
|
||||
pFrame->Octet[0], pFrame->Octet[1], pFrame->Octet[2], pFrame->Octet[3],
|
||||
pFrame->Octet[4], pFrame->Octet[5], pFrame->Octet[6], pFrame->Octet[7]));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SUBTYPE_DEAUTH:
|
||||
*Machine = AP_AUTH_STATE_MACHINE; /*AP_AUTH_RSP_STATE_MACHINE;*/
|
||||
*MsgType = APMT2_PEER_DEAUTH;
|
||||
break;
|
||||
|
||||
case SUBTYPE_ACTION:
|
||||
case SUBTYPE_ACTION_NO_ACK:
|
||||
*Machine = ACTION_STATE_MACHINE;
|
||||
/* Sometimes Sta will return with category bytes with MSB = 1, if they receive catogory out of their support */
|
||||
if ((pFrame->Octet[0]&0x7F) > MAX_PEER_CATE_MSG)
|
||||
*MsgType = MT2_ACT_INVALID;
|
||||
else
|
||||
*MsgType = (pFrame->Octet[0]&0x7F);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
Periodic evaluate antenna link status
|
||||
|
||||
Arguments:
|
||||
pAd - Adapter pointer
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
VOID APAsicEvaluateRxAnt(
|
||||
IN PRTMP_ADAPTER pAd)
|
||||
{
|
||||
ULONG TxTotalCnt;
|
||||
#ifdef CONFIG_ATE
|
||||
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
|
||||
#endif /* CONFIG_ATE */
|
||||
#ifdef CARRIER_DETECTION_SUPPORT
|
||||
|
||||
if (pAd->CommonCfg.CarrierDetect.CD_State == CD_SILENCE)
|
||||
return;
|
||||
|
||||
#endif /* CARRIER_DETECTION_SUPPORT */
|
||||
bbp_set_rxpath(pAd, pAd->Antenna.field.RxPath);
|
||||
TxTotalCnt = pAd->RalinkCounters.OneSecTxNoRetryOkCount +
|
||||
pAd->RalinkCounters.OneSecTxRetryOkCount +
|
||||
pAd->RalinkCounters.OneSecTxFailCount;
|
||||
|
||||
if (TxTotalCnt > 50) {
|
||||
RTMPSetTimer(&pAd->Mlme.RxAntEvalTimer, 20);
|
||||
pAd->Mlme.bLowThroughput = FALSE;
|
||||
} else {
|
||||
RTMPSetTimer(&pAd->Mlme.RxAntEvalTimer, 300);
|
||||
pAd->Mlme.bLowThroughput = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
After evaluation, check antenna link status
|
||||
|
||||
Arguments:
|
||||
pAd - Adapter pointer
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
VOID APAsicRxAntEvalTimeout(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
CHAR rssi[3], *target_rssi;
|
||||
#ifdef CONFIG_ATE
|
||||
|
||||
if (ATE_ON(pAd))
|
||||
return;
|
||||
|
||||
#endif /* CONFIG_ATE */
|
||||
|
||||
/* if the traffic is low, use average rssi as the criteria */
|
||||
if (pAd->Mlme.bLowThroughput == TRUE)
|
||||
target_rssi = &pAd->ApCfg.RssiSample.LastRssi[0];
|
||||
else
|
||||
target_rssi = &pAd->ApCfg.RssiSample.AvgRssi[0];
|
||||
|
||||
NdisMoveMemory(&rssi[0], target_rssi, 3);
|
||||
/* Disable the below to fix 1T/2R issue. It's suggested by Rory at 2007/7/11. */
|
||||
bbp_set_rxpath(pAd, pAd->Mlme.RealRxPath);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
After evaluation, check antenna link status
|
||||
|
||||
Arguments:
|
||||
pAd - Adapter pointer
|
||||
|
||||
Return Value:
|
||||
None
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
VOID APAsicAntennaAvg(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN UCHAR AntSelect,
|
||||
IN SHORT * RssiAvg)
|
||||
{
|
||||
SHORT realavgrssi;
|
||||
LONG realavgrssi1;
|
||||
ULONG recvPktNum = pAd->RxAnt.RcvPktNum[AntSelect];
|
||||
|
||||
realavgrssi1 = pAd->RxAnt.Pair1AvgRssiGroup1[AntSelect];
|
||||
|
||||
if (realavgrssi1 == 0) {
|
||||
*RssiAvg = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
realavgrssi = (SHORT) (realavgrssi1 / recvPktNum);
|
||||
pAd->RxAnt.Pair1AvgRssiGroup1[0] = 0;
|
||||
pAd->RxAnt.Pair1AvgRssiGroup1[1] = 0;
|
||||
pAd->RxAnt.Pair1AvgRssiGroup2[0] = 0;
|
||||
pAd->RxAnt.Pair1AvgRssiGroup2[1] = 0;
|
||||
pAd->RxAnt.RcvPktNum[0] = 0;
|
||||
pAd->RxAnt.RcvPktNum[1] = 0;
|
||||
*RssiAvg = realavgrssi - 256;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,273 +0,0 @@
|
||||
/****************************************************************************
|
||||
* Ralink Tech Inc.
|
||||
* 4F, No. 2 Technology 5th Rd.
|
||||
* Science-based Industrial Park
|
||||
* Hsin-chu, Taiwan, R.O.C.
|
||||
* (c) Copyright 2002, Ralink Technology, Inc.
|
||||
*
|
||||
* All rights reserved. Ralink's source code is an unpublished work and the
|
||||
* use of a copyright notice does not imply otherwise. This source code
|
||||
* contains confidential trade secret material of Ralink Tech. Any attemp
|
||||
* or participation in deciphering, decoding, reverse engineering or in any
|
||||
* way altering the source code is stricitly prohibited, unless the prior
|
||||
* written consent of Ralink Technology, Inc. is obtained.
|
||||
****************************************************************************
|
||||
|
||||
Module Name:
|
||||
ap_nps.c
|
||||
|
||||
Abstract:
|
||||
IEEE 802.11v NPS SoftAP related function
|
||||
|
||||
Revision History:
|
||||
Who When What
|
||||
-------- ---------- ----------------------------------------------
|
||||
Carter Chen 08-23-2013 created for 7603 AP
|
||||
*/
|
||||
#ifdef MT_MAC
|
||||
|
||||
#include "rt_config.h"
|
||||
|
||||
extern VOID write_tmac_info_tim(RTMP_ADAPTER *pAd, INT apidx, UCHAR *tmac_buf, HTTRANSMIT_SETTING *BeaconTransmit, ULONG frmLen);
|
||||
|
||||
BOOLEAN TimTransmitRequired(RTMP_ADAPTER *pAd, INT apidx, BSS_STRUCT *pMbss)
|
||||
{
|
||||
BOOLEAN result = FALSE;
|
||||
TIM_BUF_STRUC *tim_info;
|
||||
|
||||
tim_info = &pMbss->wdev.bcn_buf.tim_buf;
|
||||
|
||||
if (tim_info->TimBufIdx >= HW_BEACON_MAX_NUM)
|
||||
return result;
|
||||
|
||||
if (tim_info->bTimSntReq == TRUE)
|
||||
result = TRUE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef MT_MAC
|
||||
VOID MtUpdateTimToAsic(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN INT apidx,
|
||||
IN ULONG FrameLen)
|
||||
{
|
||||
TIM_BUF_STRUC *tim_buf = NULL;
|
||||
UCHAR *buf;
|
||||
INT len;
|
||||
PNDIS_PACKET *pkt = NULL;
|
||||
UINT32 WdevIdx;
|
||||
struct wifi_dev *wdev = &pAd->ApCfg.MBSSID[apidx].wdev;
|
||||
struct _RTMP_CHIP_CAP *cap = hc_get_chip_cap(pAd->hdev_ctrl);
|
||||
|
||||
IF_DEV_CONFIG_OPMODE_ON_AP(pAd) {
|
||||
tim_buf = &wdev->bcn_buf.tim_buf;
|
||||
}
|
||||
|
||||
if (!tim_buf) {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s(): bcn_buf is NULL!\n", __func__));
|
||||
return;
|
||||
}
|
||||
|
||||
WdevIdx = wdev->wdev_idx;
|
||||
pkt = tim_buf->TimPkt;
|
||||
|
||||
if (pkt) {
|
||||
UCHAR qIdx;
|
||||
buf = (UCHAR *)GET_OS_PKT_DATAPTR(pkt);
|
||||
len = FrameLen + cap->tx_hw_hdr_len;
|
||||
SET_OS_PKT_LEN(pkt, len);
|
||||
RTMP_SET_PACKET_WDEV(pkt, WdevIdx);
|
||||
qIdx = HcGetBcnQueueIdx(pAd, wdev);
|
||||
RTMP_SET_PACKET_TYPE(pkt, TX_MGMT);
|
||||
send_mlme_pkt(pAd, pkt, wdev, qIdx, FALSE);
|
||||
return;
|
||||
} else
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s(): TimPkt is NULL!\n", __func__));
|
||||
}
|
||||
#endif /* MT_MAC */
|
||||
|
||||
VOID write_tmac_info_tim(RTMP_ADAPTER *pAd, INT apidx, UCHAR *tmac_buf, HTTRANSMIT_SETTING *BeaconTransmit, ULONG frmLen)
|
||||
{
|
||||
MAC_TX_INFO mac_info;
|
||||
struct wifi_dev *wdev;
|
||||
|
||||
NdisZeroMemory((UCHAR *)&mac_info, sizeof(mac_info));
|
||||
#ifdef MT_MAC
|
||||
mac_info.Type = FC_TYPE_MGMT;
|
||||
mac_info.SubType = SUBTYPE_ACTION;
|
||||
#endif
|
||||
mac_info.FRAG = FALSE;
|
||||
mac_info.CFACK = FALSE;
|
||||
mac_info.InsTimestamp = FALSE;
|
||||
mac_info.AMPDU = FALSE;
|
||||
mac_info.BM = 1;
|
||||
mac_info.Ack = FALSE;
|
||||
mac_info.NSeq = TRUE;
|
||||
mac_info.BASize = 0;
|
||||
mac_info.WCID = 0;
|
||||
mac_info.Length = frmLen;
|
||||
mac_info.PID = PID_MGMT;
|
||||
mac_info.TID = 0;
|
||||
mac_info.TxRate = 0;
|
||||
mac_info.Txopmode = IFS_HTTXOP;
|
||||
mac_info.hdr_len = 24;
|
||||
mac_info.bss_idx = apidx;
|
||||
mac_info.SpeEn = 1;
|
||||
mac_info.Preamble = LONG_PREAMBLE;
|
||||
mac_info.IsAutoRate = FALSE;
|
||||
wdev = wdev_search_by_address(pAd, tmac_buf + sizeof(TMAC_TXD_L) + 10);
|
||||
|
||||
if (!wdev)
|
||||
return;
|
||||
|
||||
mac_info.q_idx = HcGetBcnQueueIdx(pAd, wdev);
|
||||
#ifdef MT_MAC
|
||||
mac_info.TxSPriv = wdev->func_idx;
|
||||
mac_info.OmacIdx = wdev->OmacIdx;
|
||||
|
||||
if (wdev->bcn_buf.BcnUpdateMethod == BCN_GEN_BY_FW)
|
||||
mac_info.IsOffloadPkt = TRUE;
|
||||
else
|
||||
mac_info.IsOffloadPkt = FALSE;
|
||||
|
||||
mac_info.Preamble = LONG_PREAMBLE;
|
||||
NdisZeroMemory(tmac_buf, sizeof(TMAC_TXD_L));
|
||||
#endif
|
||||
pAd->archOps.write_tmac_info_fixed_rate(pAd, tmac_buf, &mac_info, BeaconTransmit);
|
||||
}
|
||||
|
||||
VOID APMakeBssTimFrame(RTMP_ADAPTER *pAd, INT apidx)
|
||||
{
|
||||
BSS_STRUCT *pMbss = &pAd->ApCfg.MBSSID[apidx];
|
||||
HEADER_802_11 TimHdr;
|
||||
LARGE_INTEGER FakeTimestamp;
|
||||
ULONG FrameLen = 0;
|
||||
UCHAR *pTimFrame, *ptr, *tmac_info;
|
||||
HTTRANSMIT_SETTING TimTransmit = {.word = 0}; /* MGMT frame PHY rate setting when operatin at HT rate. */
|
||||
struct _RTMP_CHIP_CAP *cap = hc_get_chip_cap(pAd->hdev_ctrl);
|
||||
UINT8 tx_hw_hdr_len = cap->tx_hw_hdr_len;
|
||||
UCHAR Cat = 11;/* Tim Category field */
|
||||
UCHAR Act = 0;/* Tim Action field */
|
||||
UCHAR ChkBcn = 0;/* Check Beacon field init from 0. */
|
||||
ULONG UpdatePos = 0;
|
||||
struct wifi_dev *wdev = &pAd->ApCfg.MBSSID[apidx].wdev;
|
||||
|
||||
if (!TimTransmitRequired(pAd, apidx, pMbss))
|
||||
return;
|
||||
|
||||
if (wdev->bcn_buf.tim_buf.TimPkt == NULL) {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s():Invalid TimPkt for MBSS[%d]\n",
|
||||
__func__, apidx));
|
||||
return;
|
||||
}
|
||||
|
||||
tmac_info = (UCHAR *)GET_OS_PKT_DATAPTR(wdev->bcn_buf.tim_buf.TimPkt);
|
||||
pTimFrame = (UCHAR *)(tmac_info + tx_hw_hdr_len);
|
||||
ActHeaderInit(pAd,
|
||||
&TimHdr,
|
||||
BROADCAST_ADDR,
|
||||
wdev->if_addr,
|
||||
wdev->bssid);
|
||||
MakeOutgoingFrame(pTimFrame, &FrameLen,
|
||||
sizeof(HEADER_802_11), &TimHdr,
|
||||
1, &Cat,
|
||||
1, &Act,
|
||||
1, &ChkBcn,
|
||||
TIMESTAMP_LEN, &FakeTimestamp,
|
||||
END_OF_ARGS);
|
||||
TimTransmit.word = 0;
|
||||
wdev->bcn_buf.TimIELocationInTim = (UCHAR)FrameLen;
|
||||
UpdatePos = wdev->bcn_buf.TimIELocationInTim;
|
||||
/*
|
||||
step 2 - update TIM IE
|
||||
TODO: enlarge TIM bitmap to support up to 64 STAs
|
||||
TODO: re-measure if RT2600 TBTT interrupt happens faster than BEACON sent out time
|
||||
*/
|
||||
ptr = pTimFrame + (UCHAR)FrameLen;
|
||||
*ptr = IE_TIM;
|
||||
*(ptr+1) = 0x0e;
|
||||
*(ptr + 2) = pAd->ApCfg.DtimCount;
|
||||
*(ptr + 3) = pAd->ApCfg.DtimPeriod;
|
||||
*(ptr + 4) = 0xa0;
|
||||
*(ptr + 5) = 0xa0;
|
||||
*(ptr + 6) = 0xa0;
|
||||
*(ptr + 7) = 0xa0;
|
||||
*(ptr + 8) = 0xa0;
|
||||
*(ptr + 9) = 0xa0;
|
||||
*(ptr + 10) = 0xa0;
|
||||
*(ptr + 11) = 0xa0;
|
||||
*(ptr + 12) = 0xa0;
|
||||
*(ptr + 13) = 0xa0;
|
||||
*(ptr + 14) = 0xa0;
|
||||
*(ptr + 15) = 0xa0;
|
||||
/* adjust TIM length according to the new TIM */
|
||||
FrameLen += 16;/* (2 + *(ptr+1)); */
|
||||
|
||||
/* When Beacon is use CCK to send, high rate TIM shall use OFDM to send. and it's mandatory. */
|
||||
if (wdev->channel <= 14) {
|
||||
TimTransmit.field.MODE = MODE_OFDM;
|
||||
TimTransmit.field.MCS = MCS_RATE_6;
|
||||
} else {
|
||||
TimTransmit.field.MODE = MODE_OFDM;
|
||||
TimTransmit.field.MCS = MCS_RATE_9;
|
||||
}
|
||||
|
||||
write_tmac_info_tim(pAd, apidx, tmac_info, &TimTransmit, FrameLen);
|
||||
AsicUpdateBeacon(pAd, wdev, FrameLen, PKT_TIM);
|
||||
|
||||
if (0) {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_OFF,
|
||||
("%s(): Dump the TimFrame of BSS%d!\n",
|
||||
__func__, apidx));
|
||||
hex_dump("Initial TimFrameBuf", tmac_info, FrameLen + tx_hw_hdr_len);
|
||||
}
|
||||
}
|
||||
|
||||
UCHAR GetTimNum(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
int i;
|
||||
int NumTim;
|
||||
TIM_BUF_STRUC *tim_info;
|
||||
|
||||
NumTim = 0;
|
||||
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++) {
|
||||
tim_info = &pAd->ApCfg.MBSSID[i].wdev.bcn_buf.tim_buf;
|
||||
|
||||
if (tim_info->bTimSntReq) {
|
||||
tim_info->TimBufIdx = NumTim;
|
||||
NumTim++;
|
||||
}
|
||||
}
|
||||
|
||||
return NumTim;
|
||||
}
|
||||
|
||||
VOID APMakeAllTimFrame(RTMP_ADAPTER *pAd)
|
||||
{
|
||||
INT i;
|
||||
|
||||
for (i = 0; i < pAd->ApCfg.BssidNum; i++)
|
||||
APMakeBssTimFrame(pAd, i);
|
||||
}
|
||||
|
||||
INT wdev_tim_buf_init(RTMP_ADAPTER *pAd, TIM_BUF_STRUC *tim_info)
|
||||
{
|
||||
INT ret;
|
||||
|
||||
/* tim_info->TimBufIdx = HW_BEACON_MAX_NUM; */
|
||||
if (!tim_info->TimPkt) {
|
||||
ret = RTMPAllocateNdisPacket(pAd, &tim_info->TimPkt, NULL, 0, NULL, MAX_TIM_SIZE);
|
||||
if (ret != NDIS_STATUS_SUCCESS)
|
||||
return FALSE;
|
||||
} else {
|
||||
MTWF_LOG(DBG_CAT_AP, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%s():TimPkt is allocated!\n", __func__));
|
||||
}
|
||||
|
||||
tim_info->bTimSntReq = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
#endif /* MT_MAC */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user