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

gluon-core: lua: wireless: simplify table index lookup in get_wlan_mac_from_driver()

No need to iterate to look up a table entry.
parent 28951a00
No related branches found
No related tags found
No related merge requests found
...@@ -36,11 +36,7 @@ local function get_wlan_mac_from_driver(radio, vif) ...@@ -36,11 +36,7 @@ local function get_wlan_mac_from_driver(radio, vif)
return nil return nil
end end
for i, addr in ipairs(addresses) do return addresses[vif]
if i == vif then
return addr
end
end
end end
function M.get_wlan_mac(_, radio, index, vif) function M.get_wlan_mac(_, radio, index, vif)
......
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