diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua index b9e81b1f..677cfc52 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua @@ -151,7 +151,7 @@ function get_mac(index) return generate_mac(3*(index-1)) end -function get_wlan_mac(radio, index, vif) +function get_wlan_mac_from_driver(radio, vif) local primary = sysconfig.primary_mac:lower() local i = 1 @@ -164,6 +164,13 @@ function get_wlan_mac(radio, index, vif) i = i + 1 end end +end + +function get_wlan_mac(radio, index, vif) + local addr = get_wlan_mac_from_driver(radio, vif) + if addr then + return addr + end return generate_mac(3*(index-1) + (vif-1)) end