Skip to content
Snippets Groups Projects
Commit 3bd67ab2 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by Andreas Ziegler
Browse files

gluon-core: retrieve primary MAC address from board.json for Netgear DGN3500B

parent d8b944ea
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ if sysconfig.primary_mac then
end
local json = require 'jsonc'
local platform = require 'gluon.platform'
local util = require 'gluon.util'
......@@ -30,6 +31,15 @@ local function phy(index)
return sysfs('/sys/class/ieee80211/phy%d/macaddress', index)
end
local function board(iface)
return function()
local data = json.load('/etc/board.json')
if data and data.network and data.network[iface] then
return data.network[iface].macaddr
end
end
end
-- Entries are matched in the order they are listed
local primary_addrs = {
......@@ -111,6 +121,11 @@ local primary_addrs = {
'dir-860l-b1',
}},
}},
{board('lan'), {
{'lantiq', 'xway', {
'netgear,dgn3500b',
}},
}},
-- phy0 default
{phy(0), {
{}, -- matches everything
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment