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
9720be51
Commit
9720be51
authored
5 years ago
by
David Bauer
Committed by
Martin Weinelt
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gluon-web-wifi-config: set state of OWE VAP
parent
6692095f
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-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua
+31
-7
31 additions, 7 deletions
.../luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua
with
31 additions
and
7 deletions
package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua
+
31
−
7
View file @
9720be51
...
...
@@ -61,21 +61,45 @@ uci:foreach('wireless', 'wifi-device', function(config)
local
p
=
f
:
section
(
Section
,
title
)
local
function
vif_option
(
t
,
msg
)
if
not
uci
:
get
(
'wireless'
,
t
..
'_'
..
radio
)
then
local
function
filter_existing_interfaces
(
interfaces
)
local
out
=
{}
for
_
,
interface
in
ipairs
(
interfaces
)
do
if
uci
:
get
(
'wireless'
,
interface
..
'_'
..
radio
)
then
table.insert
(
out
,
interface
)
end
end
return
out
end
local
function
filter_active_interfaces
(
interfaces
)
local
out
=
false
for
_
,
interface
in
ipairs
(
interfaces
)
do
if
not
uci
:
get_bool
(
'wireless'
,
interface
..
'_'
..
radio
,
'disabled'
)
then
out
=
true
end
end
return
out
end
local
function
vif_option
(
name
,
interfaces
,
msg
)
local
existing_interfaces
=
filter_existing_interfaces
(
interfaces
)
if
#
existing_interfaces
==
0
then
return
end
local
o
=
p
:
option
(
Flag
,
radio
..
'_'
..
t
..
'_enabled'
,
msg
)
o
.
default
=
not
uci
:
get_bool
(
'wireless'
,
t
..
'_'
..
radio
,
'disabled'
)
local
o
=
p
:
option
(
Flag
,
radio
..
'_'
..
name
..
'_enabled'
,
msg
)
o
.
default
=
filter_active_interfaces
(
existing_interfaces
)
function
o
:
write
(
data
)
uci
:
set
(
'wireless'
,
t
..
'_'
..
radio
,
'disabled'
,
not
data
)
for
_
,
interface
in
ipairs
(
existing_interfaces
)
do
uci
:
set
(
'wireless'
,
interface
..
'_'
..
radio
,
'disabled'
,
not
data
)
end
end
end
vif_option
(
'client'
,
translate
(
'Enable client network (access point)'
))
vif_option
(
'mesh'
,
translate
(
"Enable mesh network (802.11s)"
))
vif_option
(
'client'
,
{
'client'
,
'owe'
},
translate
(
'Enable client network (access point)'
))
vif_option
(
'mesh'
,
{
'mesh'
},
translate
(
"Enable mesh network (802.11s)"
))
local
phy
=
util
.
find_phy
(
config
)
if
not
phy
then
...
...
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