Skip to content
Snippets Groups Projects
Commit ae5a3c41 authored by Filip Matusiak's avatar Filip Matusiak
Browse files

Add cfg option for initial channel scan feature

parent a959d2df
Branches
Tags
1 merge request!139Issue initial channel scan
Pipeline #65401 failed
......@@ -33,6 +33,7 @@ config controller 'controller'
option enable_bsta_steer '0'
option use_bcn_metrics '0'
option use_usta_metrics '0'
option initial_channel_scan '0'
option primary_vid '1'
option primary_pcp '0'
option allow_bgdfs '0'
......@@ -400,8 +401,18 @@ config:
config controller 'controller'
option enable_sta_steer '1'
option use_bcn_metrics '1'
option initial_channel_scan '1'
```
BTM steering may also work fine w/o the initial_channel_scan set - it
depends on the bottom layer implementation.
Setting the initial_channel_scan option itself will cause a radio scan request
to be issued towards given node and it's reported radios, providing there was
no prior scan results reported on given radio. This radio channel scan will
be issued once controller obtains first scan capability information tlv from
given node. Radios, opclasses and channels to scan depend on these scan caps.
The steering decision is based upon drop of the STA RCPI below certain
threshold, which can be modified per radio via UCI config:
......
......
......@@ -1009,13 +1009,16 @@ static int cntlr_parse_radio_scan_caps(struct controller *c, struct node *n,
/* put addr into an array of radio MACs to be scanned */
if (c->cfg.initial_channel_scan)
memcpy(&radio_id[num_radio],
nr->radio_el->macaddr,
6);
num_radio++;
}
/* issue a channel scan on reported radios */
if (c->cfg.initial_channel_scan)
cntlr_initial_channel_scan_from_caps(c, n, radio_id, num_radio);
return 0;
......
......
......@@ -563,6 +563,7 @@ static int cntlr_config_get_base(struct controller_config *c,
CNTLR_ENABLE_BSTA_STEER,
CNTLR_USE_BCN_METRICS,
CNTLR_USE_USTA_METRICS,
CNTLR_INITIAL_CHANNEL_SCAN,
CNTLR_STEER_MODULE,
CNTLR_CHANNEL_PLAN_TIMEOUT,
CNTLR_BGDFS_TIMEOUT,
......@@ -580,6 +581,7 @@ static int cntlr_config_get_base(struct controller_config *c,
{ .name = "enable_bsta_steer", .type = UCI_TYPE_STRING },
{ .name = "use_bcn_metrics", .type = UCI_TYPE_STRING },
{ .name = "use_usta_metrics", .type = UCI_TYPE_STRING },
{ .name = "initial_channel_scan", .type = UCI_TYPE_STRING },
{ .name = "steer_module", .type = UCI_TYPE_LIST },
{ .name = "channel_plan", .type = UCI_TYPE_STRING },
{ .name = "allow_bgdfs", .type = UCI_TYPE_STRING },
......@@ -643,6 +645,12 @@ static int cntlr_config_get_base(struct controller_config *c,
c->use_usta_metrics = atoi(val) == 1 ? true : false;
}
if (tb[CNTLR_INITIAL_CHANNEL_SCAN]) {
const char *val = tb[CNTLR_INITIAL_CHANNEL_SCAN]->v.string;
c->initial_channel_scan = atoi(val) == 1 ? true : false;
}
if (tb[CNTLR_STEER_MODULE]) {
struct uci_element *e;
struct steer_control_config *sc;
......
......
......@@ -127,6 +127,7 @@ struct controller_config {
bool enable_bsta_steer;
bool use_bcn_metrics;
bool use_usta_metrics;
bool initial_channel_scan;
int num_bss;
int num_apolicy;
int acs_timeout;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment