From b0e445b1a9ee962c1d151526eeb39d657f6f855c Mon Sep 17 00:00:00 2001
From: Jakob Olsson <jakob.olsson@iopsys.eu>
Date: Thu, 14 Apr 2022 10:35:37 +0000
Subject: [PATCH] config: rename dfs_cleanup -> allow_bgdfs and acs ->
 channel_plan

---
 src/cntlr_ubus.c |  4 ++--
 src/config.c     | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/cntlr_ubus.c b/src/cntlr_ubus.c
index b9089cb7..2588e3cb 100644
--- a/src/cntlr_ubus.c
+++ b/src/cntlr_ubus.c
@@ -625,8 +625,8 @@ static int cntlr_timers(struct ubus_context *ctx, struct ubus_object *obj,
 
 	blob_buf_init(&bb, 0);
 	t = blobmsg_open_table(&bb, "channel_planning");
-	blobmsg_add_u32(&bb, "acs", uloop_timeout_remaining(&c->acs));
-	blobmsg_add_u32(&bb, "dfs_cleanup", uloop_timeout_remaining(&c->dfs_cleanup));
+	blobmsg_add_u32(&bb, "channel_plan", uloop_timeout_remaining(&c->acs));
+	blobmsg_add_u32(&bb, "allow_bgdfs", uloop_timeout_remaining(&c->dfs_cleanup));
 	blobmsg_close_table(&bb, t);
 	ubus_send_reply(ctx, req, bb.head);
 	blob_buf_free(&bb);
diff --git a/src/config.c b/src/config.c
index 37eb936e..43336e52 100644
--- a/src/config.c
+++ b/src/config.c
@@ -542,8 +542,8 @@ static int cntlr_config_get_base(struct controller_config *c,
 		CNTLR_USE_BCN_METRICS,
 		CNTLR_USE_USTA_METRICS,
 		CNTLR_STEER_MODULE,
-		CNTLR_ACS_TIMEOUT,
-		CNTLR_DFS_CLEANUP_TIMEOUT,
+		CNTLR_CHANNEL_PLAN_TIMEOUT,
+		CNTLR_BGDFS_TIMEOUT,
 		NUM_CNTLR_ATTRS
 	};
 	const struct uci_parse_option opts[] = {
@@ -556,8 +556,8 @@ static int cntlr_config_get_base(struct controller_config *c,
 		{ .name = "use_bcn_metrics", .type = UCI_TYPE_STRING },
 		{ .name = "use_usta_metrics", .type = UCI_TYPE_STRING },
 		{ .name = "steer_module", .type = UCI_TYPE_LIST },
-		{ .name = "acs", .type = UCI_TYPE_STRING },
-		{ .name = "dfs_cleanup", .type = UCI_TYPE_STRING },
+		{ .name = "channel_plan", .type = UCI_TYPE_STRING },
+		{ .name = "allow_bgdfs", .type = UCI_TYPE_STRING },
 	};
 	struct uci_option *tb[NUM_CNTLR_ATTRS];
 
@@ -631,8 +631,8 @@ static int cntlr_config_get_base(struct controller_config *c,
 		dbg("\n");
 	}
 
-	if (tb[CNTLR_ACS_TIMEOUT]) {
-		const char *val = tb[CNTLR_ACS_TIMEOUT]->v.string;
+	if (tb[CNTLR_CHANNEL_PLAN_TIMEOUT]) {
+		const char *val = tb[CNTLR_CHANNEL_PLAN_TIMEOUT]->v.string;
 
 		c->acs_timeout = atoi(val);
 		/* TODO agree conf param - by default run each 3 hours */
@@ -640,8 +640,8 @@ static int cntlr_config_get_base(struct controller_config *c,
 			c->acs_timeout = 3600 * 3;
 	}
 
-	if (tb[CNTLR_DFS_CLEANUP_TIMEOUT]) {
-		const char *val = tb[CNTLR_DFS_CLEANUP_TIMEOUT]->v.string;
+	if (tb[CNTLR_BGDFS_TIMEOUT]) {
+		const char *val = tb[CNTLR_BGDFS_TIMEOUT]->v.string;
 
 		c->dfs_cleanup_timeout = atoi(val);
 		if (c->dfs_cleanup_timeout < 120)
-- 
GitLab