From da22c5cf8ea0f8c3ef92ef7d143fd72cef27d11d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer <mschiffer@universe-factory.net> Date: Tue, 11 Apr 2017 01:24:24 +0200 Subject: [PATCH] gluon-core: gluon.util: change find_phy argument to config table and make public --- package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua index efaf0d486..8fdbe98f0 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua @@ -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 -- GitLab