Skip to content
Snippets Groups Projects
Unverified Commit c9f3017a authored by Matthias Schiffer's avatar Matthias Schiffer Committed by GitHub
Browse files

Merge pull request #1955 from freifunk-gluon/dgn3500b

lantiq-xway: add support for NETGEAR DGN3500B
parents cd09c95e 3bd67ab2
No related branches found
No related tags found
No related merge requests found
...@@ -274,6 +274,10 @@ lantiq-xway ...@@ -274,6 +274,10 @@ lantiq-xway
- FRITZ!Box 7330 [#avmflash]_ [#lan_as_wan]_ - FRITZ!Box 7330 [#avmflash]_ [#lan_as_wan]_
- FRITZ!Box 7330 SL [#avmflash]_ [#lan_as_wan]_ - FRITZ!Box 7330 SL [#avmflash]_ [#lan_as_wan]_
* NETGEAR
- DGN3500B [#lan_as_wan]_
mpc85xx-generic mpc85xx-generic
--------------- ---------------
......
...@@ -8,6 +8,7 @@ if sysconfig.primary_mac then ...@@ -8,6 +8,7 @@ if sysconfig.primary_mac then
end end
local json = require 'jsonc'
local platform = require 'gluon.platform' local platform = require 'gluon.platform'
local util = require 'gluon.util' local util = require 'gluon.util'
...@@ -30,6 +31,15 @@ local function phy(index) ...@@ -30,6 +31,15 @@ local function phy(index)
return sysfs('/sys/class/ieee80211/phy%d/macaddress', index) return sysfs('/sys/class/ieee80211/phy%d/macaddress', index)
end 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 -- Entries are matched in the order they are listed
local primary_addrs = { local primary_addrs = {
...@@ -111,6 +121,11 @@ local primary_addrs = { ...@@ -111,6 +121,11 @@ local primary_addrs = {
'dir-860l-b1', 'dir-860l-b1',
}}, }},
}}, }},
{board('lan'), {
{'lantiq', 'xway', {
'netgear,dgn3500b',
}},
}},
-- phy0 default -- phy0 default
{phy(0), { {phy(0), {
{}, -- matches everything {}, -- matches everything
......
...@@ -6,3 +6,7 @@ device('avm-fritz-box-7320', 'avm_fritz7320', { ...@@ -6,3 +6,7 @@ device('avm-fritz-box-7320', 'avm_fritz7320', {
factory = false, factory = false,
aliases = {'avm-fritz-box-7330', 'avm-fritz-box-7330-sl'}, aliases = {'avm-fritz-box-7330', 'avm-fritz-box-7330-sl'},
}) })
device('netgear-dgn3500b', 'netgear_dgn3500b', {
factory_ext = '.img',
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment