diff --git a/README.md b/README.md index ba0624c3b752e6b362976348d4afd84bb5790331..368631dd23fd771bb5bd56ecf9dca66bcf2e3228 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/src/cntlr_map.c b/src/cntlr_map.c index d1e74e9fc8d4d4764eb1e6bef6d6b201e04a2593..0437c29f8e2e1b789b2e5ab837c347729af8989d 100644 --- a/src/cntlr_map.c +++ b/src/cntlr_map.c @@ -1009,14 +1009,17 @@ static int cntlr_parse_radio_scan_caps(struct controller *c, struct node *n, /* put addr into an array of radio MACs to be scanned */ - memcpy(&radio_id[num_radio], + 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 */ - cntlr_initial_channel_scan_from_caps(c, n, radio_id, num_radio); + if (c->cfg.initial_channel_scan) + cntlr_initial_channel_scan_from_caps(c, n, radio_id, num_radio); return 0; } diff --git a/src/config.c b/src/config.c index 16d0742f2ea2e60e9ddcc0091badc5d111cb39b9..594600c617a195077b9923801c7e667e2a3a20e3 100644 --- a/src/config.c +++ b/src/config.c @@ -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; diff --git a/src/config.h b/src/config.h index d55395ef9ec8611f644b6dd677f5bd71855a0228..7b57d07effa66e12dd86cc0be2013e20fca2a449 100644 --- a/src/config.h +++ b/src/config.h @@ -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;