Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
map-controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Multi-AP
map-controller
Commits
1f0ad33f
Commit
1f0ad33f
authored
2 years ago
by
Filip Matusiak
Browse files
Options
Downloads
Patches
Plain Diff
Add debug ubus API for clearing steer summary
Signed-off-by:
Filip Matusiak
<
filip.matusiak@iopsys.eu
>
parent
2dea6c3e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!237
Adjust time to wait for beacon metrics dynamically
Pipeline
#98573
passed
2 years ago
Stage: static_code_analysis
Stage: compile_test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cntlr.c
+2
-1
2 additions, 1 deletion
src/cntlr.c
src/cntlr_ubus_dbg.c
+76
-0
76 additions, 0 deletions
src/cntlr_ubus_dbg.c
with
78 additions
and
1 deletion
src/cntlr.c
+
2
−
1
View file @
1f0ad33f
...
@@ -814,7 +814,8 @@ static void cntlr_bcn_metrics_parse(atimer_t *t)
...
@@ -814,7 +814,8 @@ static void cntlr_bcn_metrics_parse(atimer_t *t)
__func__
,
MAC2STR
(
s
->
de_sta
->
macaddr
),
MAC2STR
(
s
->
bssid
),
MAC2STR
(
n
->
alid
));
__func__
,
MAC2STR
(
s
->
de_sta
->
macaddr
),
MAC2STR
(
s
->
bssid
),
MAC2STR
(
n
->
alid
));
list_for_each_entry_safe
(
b
,
tmp
,
&
s
->
de_sta
->
meas_reportlist
,
list
)
{
list_for_each_entry_safe
(
b
,
tmp
,
&
s
->
de_sta
->
meas_reportlist
,
list
)
{
dbg
(
"bcn-report from "
MACFMT
"
\n
"
,
MAC2STR
(
b
->
bssid
));
dbg
(
"bcn-report from "
MACFMT
" %s
\n
"
,
MAC2STR
(
b
->
bssid
),
b
->
stale
?
"(stale)"
:
""
);
/* Skip entry not in our network */
/* Skip entry not in our network */
bss
=
cntlr_iterate_fbss
(
c
,
b
->
bssid
);
bss
=
cntlr_iterate_fbss
(
c
,
b
->
bssid
);
...
...
This diff is collapsed.
Click to expand it.
src/cntlr_ubus_dbg.c
+
76
−
0
View file @
1f0ad33f
...
@@ -53,6 +53,15 @@
...
@@ -53,6 +53,15 @@
#ifndef MAP_CNTLR_DISABLE_UBUS_DBG
#ifndef MAP_CNTLR_DISABLE_UBUS_DBG
enum
{
CLR_STEER_SUMMARY_STA
,
__CLR_STEER_SUMMARY_MAX
,
};
static
const
struct
blobmsg_policy
clr_steer_summary_params
[
__CLR_STEER_SUMMARY_MAX
]
=
{
[
CLR_STEER_SUMMARY_STA
]
=
{
.
name
=
"sta"
,
.
type
=
BLOBMSG_TYPE_STRING
},
};
static
int
cntlr_dbg_list_macs
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
static
int
cntlr_dbg_list_macs
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
blob_attr
*
msg
)
struct
blob_attr
*
msg
)
...
@@ -90,6 +99,71 @@ static int cntlr_dbg_list_macs(struct ubus_context *ctx, struct ubus_object *obj
...
@@ -90,6 +99,71 @@ static int cntlr_dbg_list_macs(struct ubus_context *ctx, struct ubus_object *obj
return
UBUS_STATUS_OK
;
return
UBUS_STATUS_OK
;
}
}
static
int
cntlr_dbg_clear_steer_summary
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
blob_attr
*
msg
)
{
struct
controller
*
c
=
container_of
(
obj
,
struct
controller
,
obj_dbg
);
struct
blob_attr
*
tb
[
__CLR_STEER_SUMMARY_MAX
];
uint8_t
macaddr
[
6
]
=
{
0
};
char
sta
[
18
]
=
{
0
};
struct
sta
*
s
=
NULL
;
blobmsg_parse
(
clr_steer_summary_params
,
__CLR_STEER_SUMMARY_MAX
,
tb
,
blob_data
(
msg
),
blob_len
(
msg
));
if
(
tb
[
CLR_STEER_SUMMARY_STA
])
{
strncpy
(
sta
,
blobmsg_data
(
tb
[
CLR_STEER_SUMMARY_STA
]),
sizeof
(
sta
)
-
1
);
if
(
!
hwaddr_aton
(
sta
,
macaddr
))
{
dbg
(
"|%s:%d|Must provide valid STA address!
\n
"
,
__func__
,
__LINE__
);
return
UBUS_STATUS_UNKNOWN_ERROR
;
}
}
if
(
!
hwaddr_is_zero
(
macaddr
))
{
s
=
cntlr_find_sta
(
c
,
macaddr
);
if
(
s
)
{
s
->
de_sta
->
mapsta
.
stats
.
no_candidate_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
blacklist_attempt_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
blacklist_success_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
blacklist_failure_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_attempt_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_success_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_failure_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_query_resp_cnt
=
0
;
timestamp_reset
(
&
s
->
de_sta
->
mapsta
.
stats
.
last_attempt_tsp
);
timestamp_reset
(
&
s
->
de_sta
->
mapsta
.
stats
.
last_steer_tsp
);
}
return
UBUS_STATUS_OK
;
}
list_for_each_entry
(
s
,
&
c
->
stalist
,
list
)
{
s
->
de_sta
->
mapsta
.
stats
.
no_candidate_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
blacklist_attempt_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
blacklist_success_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
blacklist_failure_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_attempt_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_success_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_failure_cnt
=
0
;
s
->
de_sta
->
mapsta
.
stats
.
btm_query_resp_cnt
=
0
;
timestamp_reset
(
&
s
->
de_sta
->
mapsta
.
stats
.
last_attempt_tsp
);
timestamp_reset
(
&
s
->
de_sta
->
mapsta
.
stats
.
last_steer_tsp
);
}
c
->
dlem
.
network
.
steer_summary
.
no_candidate_cnt
=
0
;
c
->
dlem
.
network
.
steer_summary
.
blacklist_attempt_cnt
=
0
;
c
->
dlem
.
network
.
steer_summary
.
blacklist_success_cnt
=
0
;
c
->
dlem
.
network
.
steer_summary
.
blacklist_failure_cnt
=
0
;
c
->
dlem
.
network
.
steer_summary
.
btm_attempt_cnt
=
0
;
c
->
dlem
.
network
.
steer_summary
.
btm_success_cnt
=
0
;
c
->
dlem
.
network
.
steer_summary
.
btm_failure_cnt
=
0
;
c
->
dlem
.
network
.
steer_summary
.
btm_query_resp_cnt
=
0
;
return
UBUS_STATUS_OK
;
}
#if (EASYMESH_VERSION > 2)
#if (EASYMESH_VERSION > 2)
static
int
cntlr_dbg_list_uris
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
static
int
cntlr_dbg_list_uris
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
...
@@ -165,6 +239,8 @@ int cntlr_publish_dbg_object(struct controller *c, const char *objname)
...
@@ -165,6 +239,8 @@ int cntlr_publish_dbg_object(struct controller *c, const char *objname)
struct
ubus_method
*
obj_methods
;
struct
ubus_method
*
obj_methods
;
struct
ubus_method
m
[]
=
{
struct
ubus_method
m
[]
=
{
UBUS_METHOD_NOARG
(
"list_macs"
,
cntlr_dbg_list_macs
),
UBUS_METHOD_NOARG
(
"list_macs"
,
cntlr_dbg_list_macs
),
UBUS_METHOD
(
"clear_steer_summary"
,
cntlr_dbg_clear_steer_summary
,
clr_steer_summary_params
),
#if (EASYMESH_VERSION > 2)
#if (EASYMESH_VERSION > 2)
UBUS_METHOD_NOARG
(
"list_uris"
,
cntlr_dbg_list_uris
),
UBUS_METHOD_NOARG
(
"list_uris"
,
cntlr_dbg_list_uris
),
#endif
#endif
...
...
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