Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
afc69e9d
Unverified
Commit
afc69e9d
authored
1 year ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua
+1
-5
1 addition, 5 deletions
package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua
with
1 addition
and
5 deletions
package/gluon-core/luasrc/usr/lib/lua/gluon/wireless.lua
+
1
−
5
View file @
afc69e9d
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment