From 734d1925dea7e2dbfa8599c4e8121f830fe10895 Mon Sep 17 00:00:00 2001
From: Julian Labus <julian@labus-online.de>
Date: Sun, 9 Apr 2017 20:33:16 +0200
Subject: [PATCH] gluon-core: gluon.util: fix PHY detection for radios
 addressed by PCIe address

---
 package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua | 4 ++++
 1 file changed, 4 insertions(+)

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 8fdbe98f0..0bfe9ee7f 100644
--- a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua
+++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua
@@ -138,6 +138,10 @@ local function find_phy_by_path(path)
 	for phy in fs.glob('/sys/devices/' .. path .. '/ieee80211/phy*') do
 		return phy:match('([^/]+)$')
 	end
+
+	for phy in fs.glob('/sys/devices/platform/' .. path .. '/ieee80211/phy*') do
+		return phy:match('([^/]+)$')
+	end
 end
 
 local function find_phy_by_macaddr(macaddr)
-- 
GitLab