Skip to content

Commit b484531

Browse files
committed
gluon-core: this fixes the mediatek-mt7622 issue with renaming wireless phys
Signed-off-by: Florian Maurer <[email protected]>
1 parent d7619c6 commit b484531

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ local iwinfo = require 'iwinfo'
99
local M = {}
1010

1111
function M.find_phy(config)
12-
return iwinfo.nl80211.phyname(config['.name'])
12+
local phyname = iwinfo.nl80211.phyname(config['.name'])
13+
14+
-- TODO: quick-fix for mt7622 phy renaming
15+
-- remove if fixed in upstream openwrt
16+
if not phyname then
17+
phyname = iwinfo.nl80211.phyname(config['.name']:gsub("radio", "phy"))
18+
end
19+
return phyname
1320
end
1421

1522
local function get_addresses(radio)

0 commit comments

Comments
 (0)