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
5ec08d84
Unverified
Commit
5ec08d84
authored
4 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-core: platform: clean up device_supports_mfp()
- Use util.find_phy() - Stop foreach() as soon as the result is known
parent
64725858
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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/platform.lua
+4
-5
4 additions, 5 deletions
package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua
with
4 additions
and
5 deletions
package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua
+
4
−
5
View file @
5ec08d84
...
...
@@ -66,21 +66,20 @@ function M.device_supports_wpa3()
end
function
M
.
device_supports_mfp
(
uci
)
local
idx
=
0
local
supports_mfp
=
true
if
not
M
.
device_supports_wpa3
()
then
return
false
end
uci
:
foreach
(
'wireless'
,
'wifi-device'
,
function
()
local
phypath
=
'/sys/kernel/debug/ieee80211/phy'
..
idx
..
'/'
uci
:
foreach
(
'wireless'
,
'wifi-device'
,
function
(
radio
)
local
phy
=
util
.
find_phy
(
radio
)
local
phypath
=
'/sys/kernel/debug/ieee80211/'
..
phy
..
'/'
if
not
util
.
file_contains_line
(
phypath
..
'hwflags'
,
'MFP_CAPABLE'
)
then
supports_mfp
=
false
return
false
end
idx
=
idx
+
1
end
)
return
supports_mfp
...
...
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