diff --git a/src/controller.conf b/src/controller.conf index e34cb611d0acd13770af031c34d48c64c22f62b5..155015341ad4ec0d74afbb3a170e99d1c59f5d41 100644 --- a/src/controller.conf +++ b/src/controller.conf @@ -52,6 +52,7 @@ config agent-policy option report_metric_periodic '0' # 0, or 1 - 255 in secs option report_rcpi_threshold '0' # 0, or 1 - 220 option report_util_threshold '0' # 0, or channel-util value + option rcpi_hysteresis_margin '0' # 0, or > 0 - hysteresis margin option include_sta_stats '0' # sta stats in AP metric resp option include_sta_metric '0' # sta metric in AP metric resp option pvid '100' # primary vlan id @@ -72,6 +73,7 @@ config agent-policy option report_metric_periodic '0' # 0, or 1 - 255 in secs option report_rcpi_threshold '0' # 0, or 1 - 220 option report_util_threshold '0' # 0, or channel-util value + option rcpi_hysteresis_margin '0' # 0, or > 0 - hysteresis margin option include_sta_stats '0' # sta stats in AP metric resp option include_sta_metric '0' # sta metric in AP metric resp option pvid '100' # primary vlan id diff --git a/src/core/cntlr_tlv_generator.c b/src/core/cntlr_tlv_generator.c index 2c8b11c5676caf6bc4b1e027c6940b9c8751b0cc..558492cb22693b4682a4bd3dfd6c6ab9d393a786 100644 --- a/src/core/cntlr_tlv_generator.c +++ b/src/core/cntlr_tlv_generator.c @@ -397,7 +397,8 @@ struct tlv_metric_report_policy *cntlr_gen_metric_report_policy( memcpy(p->metric_reporting_policy[i].radio_id, &radiolist[i*6], 6); p->metric_reporting_policy[i].rcpi_thres = a->report_rcpi_threshold; - p->metric_reporting_policy[i].rcpi_hysteresis_margin; //FIXME + p->metric_reporting_policy[i].rcpi_hysteresis_margin = + a->rcpi_hysteresis_margin; p->metric_reporting_policy[i].channel_utilization_thres = a->report_util_threshold; p->metric_reporting_policy[i].is_assoc_sta_traffic_stats = diff --git a/src/core/config.c b/src/core/config.c index 293494f6a0bce75b6bd821e781a6670de82fa6b4..08db6bd444fa3cc5ed94910688aedd04dc976129 100644 --- a/src/core/config.c +++ b/src/core/config.c @@ -91,6 +91,7 @@ void cntlr_config_dump(struct controller_config *c) dbg(" Report metric : %d\n", c->apolicy.report_metric_periodic); dbg(" Report RCPI-thresh : %d\n", c->apolicy.report_rcpi_threshold); dbg(" Report Util-thresh : %d\n", c->apolicy.report_util_threshold); + dbg(" RCPI hysteresis margin: %d\n", c->apolicy.rcpi_hysteresis_margin); dbg(" Include STA stats : %d\n", c->apolicy.include_sta_stats); dbg(" Include STA metric : %d\n", c->apolicy.include_sta_metric); dbg(" Primary VLAN ID : %d\n", c->apolicy.pvid); @@ -259,6 +260,7 @@ static int cntlr_config_get_agent_policy(struct controller_config *c, POL_RPT_METRIC_PERIODIC, POL_RPT_RCPI_TH, POL_RPT_UTIL_TH, + POL_RPT_HYS_MARGIN, POL_INC_STA_STATS, POL_INC_STA_METRIC, POL_PVID, @@ -280,6 +282,7 @@ static int cntlr_config_get_agent_policy(struct controller_config *c, { .name = "report_metric_periodic", .type = UCI_TYPE_STRING }, { .name = "report_rcpi_threshold", .type = UCI_TYPE_STRING }, { .name = "report_util_threshold", .type = UCI_TYPE_STRING }, + { .name = "rcpi_hysteresis_margin", .type = UCI_TYPE_STRING }, { .name = "include_sta_stats", .type = UCI_TYPE_STRING }, { .name = "include_sta_metric", .type = UCI_TYPE_STRING }, { .name = "pvid", .type = UCI_TYPE_STRING }, @@ -358,6 +361,11 @@ static int cntlr_config_get_agent_policy(struct controller_config *c, atoi(tb[POL_RPT_UTIL_TH]->v.string); } + if (tb[POL_RPT_HYS_MARGIN]) { + a->rcpi_hysteresis_margin = + atoi(tb[POL_RPT_HYS_MARGIN]->v.string); + } + if (tb[POL_INC_STA_STATS]) { a->include_sta_stats = atoi(tb[POL_INC_STA_STATS]->v.string) == 1 ? diff --git a/src/core/config.h b/src/core/config.h index 75c0af2a5d12516f5134b9ea1719801d04aba909..b4aa7029df296c613821ebc07aeb7f3bc3328cc6 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -72,6 +72,7 @@ struct agent_policy { uint8_t report_metric_periodic; /* 0 = disable, else 1 - 255 in secs */ uint8_t report_rcpi_threshold; /* 0, or 1 - 220 */ uint8_t report_util_threshold; /* 0, or channel utilization value */ + uint8_t rcpi_hysteresis_margin; /* 0, or > 0 - hysteresis margin */ bool include_sta_stats; /* sta stats in AP metric response */ bool include_sta_metric; /* sta metric in AP metric response */ uint16_t pvid; /* primary vlan id */