From 6b503a7e0d6c7f07af62e1c1f2052ef74b5a3876 Mon Sep 17 00:00:00 2001
From: Jakob Olsson <jakob.olsson@iopsys.eu>
Date: Wed, 3 Mar 2021 16:20:25 +0100
Subject: [PATCH] map-agent: apply AP-autoconfig credentials to onboarded radio
 (2band support)

---
 src/core/agent_map.c | 7 -------
 src/core/config.c    | 4 ----
 2 files changed, 11 deletions(-)

diff --git a/src/core/agent_map.c b/src/core/agent_map.c
index 06bab764a..1fbcee44e 100644
--- a/src/core/agent_map.c
+++ b/src/core/agent_map.c
@@ -914,13 +914,6 @@ int handle_ap_autoconfig_wsc(void *agent, struct cmdu_cstruct *cmdu)
 
 	wifi_teardown_map_ifaces_by_radio(a, radio->name);
 
-	if (radio->onboarded) {
-		dbg("|%s:%d| radio (%s) was onboarded, do not apply m2, apply heartbeat for this radio\n",
-				__func__, __LINE__, radio->name);
-		radio->configured = 1; /* not necessarily true */
-		radio->state = ACS_HEARTBEAT;
-		goto teardown;
-	}
 	/* iterate every TLV_TYPE_WSC, may be multiple */
 	for (i = 0; i < cmdu->num_tlvs; i++) {
 		tlv = cmdu->tlvs[i];
diff --git a/src/core/config.c b/src/core/config.c
index 3c4664cbf..27c365f58 100644
--- a/src/core/config.c
+++ b/src/core/config.c
@@ -845,10 +845,6 @@ int uci_apply_m2(struct agent_config *cfg, char *interface_name, char *device,
 			interface_name, "uuid", buf);
 	} while(0);
 
-
-	if (onboarded)
-		uci_set_wireless_interface_option(UCI_WIRELESS, UCI_WLAN_IFACE, "ifname",
-			interface_name, "disabled", "1");
 	if (multi_ap == 0x01) {
 		uci_set_wireless_interface_option(UCI_WIRELESS, UCI_WLAN_IFACE,
 			"ifname", interface_name, "hidden", "1");
-- 
GitLab