Skip to content
Snippets Groups Projects
Commit f4adb667 authored by David Bauer's avatar David Bauer
Browse files

gluon-web-private-wifi: define ifname for WAN radio


Set the ifname for the WAN radio (Private WLAN) to wanX, X being the
radio index.

All other radios created by Gluon already have their ifname defined
following this pattern.

Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
parent a63be692
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,7 @@ mfp.default = uci:get('wireless', primary_iface, 'ieee80211w') or "0" ...@@ -49,6 +49,7 @@ mfp.default = uci:get('wireless', primary_iface, 'ieee80211w') or "0"
function f:write() function f:write()
wireless.foreach_radio(uci, function(radio, index) wireless.foreach_radio(uci, function(radio, index)
local radio_name = radio['.name'] local radio_name = radio['.name']
local suffix = radio_name:match('^radio(%d+)$')
local name = "wan_" .. radio_name local name = "wan_" .. radio_name
if enabled.data then if enabled.data then
...@@ -62,6 +63,7 @@ function f:write() ...@@ -62,6 +63,7 @@ function f:write()
ssid = ssid.data, ssid = ssid.data,
key = key.data, key = key.data,
macaddr = macaddr, macaddr = macaddr,
ifname = suffix and 'wan' .. suffix,
disabled = false, disabled = false,
}) })
......
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