gluon-core: split get_wlan_mac_from_driver() out of get_wlan_mac()

This commit is contained in:
Matthias Schiffer 2016-07-27 03:28:36 +02:00
parent 806af27083
commit 279a409198
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -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