Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
IOPSYS
map-controller
Commits
65aca068
Commit
65aca068
authored
Dec 06, 2022
by
Filip Matusiak
Browse files
Channel scan: allow scan of the whole opclass
parent
6e857bf7
Pipeline
#75474
passed with stages
in 9 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/cntlr_ubus.c
View file @
65aca068
...
...
@@ -2206,6 +2206,7 @@ static int cntlr_scan(struct ubus_context *ctx, struct ubus_object *obj,
strncpy
(
mac_str
,
blobmsg_data
(
attr
),
17
);
if
(
!
hwaddr_aton
(
mac_str
,
scan_req_data
.
radios
[
i
].
radio_mac
))
{
dbg
(
"|%s:%d| Failed to parse radio MAC.
\n
"
,
__func__
,
__LINE__
);
return
UBUS_STATUS_UNKNOWN_ERROR
;
}
...
...
@@ -2256,8 +2257,11 @@ static int cntlr_scan(struct ubus_context *ctx, struct ubus_object *obj,
k
++
;
}
if
(
k
!=
num_radios
)
return
UBUS_STATUS_UNKNOWN_ERROR
;
if
(
tb
[
SCAN_POLICY_CHANNEL
]
&&
k
!=
num_radios
)
{
dbg
(
"|%s:%d| number of elements in radio & channel arrays differ.
\n
"
,
__func__
,
__LINE__
);
return
UBUS_STATUS_INVALID_ARGUMENT
;
}
/* Opclasses (cur - current opclass id) */
k
=
0
;
...
...
@@ -2274,6 +2278,15 @@ static int cntlr_scan(struct ubus_context *ctx, struct ubus_object *obj,
k
++
;
}
if
(
tb
[
SCAN_POLICY_CLASSID
]
&&
k
!=
num_radios
)
{
dbg
(
"|%s:%d| number of elements in radio & opclass arrays differ.
\n
"
,
__func__
,
__LINE__
);
return
UBUS_STATUS_INVALID_ARGUMENT
;
}
trace
(
"%s: Sending channel scan request to the agent "
MACFMT
".
\n
"
,
__func__
,
MAC2STR
(
agent_mac
));
ret
=
cntlr_send_channel_scan_request
(
c
,
agent_mac
,
&
scan_req_data
);
return
ret
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment