luci-compat: network.lua: recognize wifi interfaces with nonstandard names
authorJo-Philipp Wich <jo@mein.io>
Thu, 14 Nov 2019 10:12:40 +0000 (11:12 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 14 Nov 2019 10:13:43 +0000 (11:13 +0100)
Ref: https://github.com/openwrt/luci/issues/3306
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-compat/luasrc/model/network.lua

index a36a23f321b25375cbb496c35133e6d65815b3d3..7c88b428cc7b321106d04499630171809b05a857 100644 (file)
@@ -181,7 +181,7 @@ function _wifi_iface(x)
                        return true
                end
        end
-       return false
+       return (nfs.access("/sys/class/net/%s/phy80211" % x) == true)
 end
 
 local function _wifi_iwinfo_by_ifname(ifname, force_phy_only)