gluon-core: gluon.util: change find_phy argument to config table and make public

This commit is contained in:
Matthias Schiffer 2017-04-11 01:24:24 +02:00
parent 9d5c551166
commit da22c5cf8e
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -149,9 +149,7 @@ local function find_phy_by_macaddr(macaddr)
end
end
local function find_phy(radio)
local config = uci:get_all('wireless', radio)
function find_phy(config)
if not config or config.type ~= 'mac80211' then
return nil
elseif config.path then
@ -164,7 +162,7 @@ local function find_phy(radio)
end
local function get_addresses(radio)
local phy = find_phy(radio)
local phy = find_phy(uci:get_all('wireless', radio))
if not phy then
return function() end
end