From ac8b9543f3adca561d3b29cbece078292ee837d7 Mon Sep 17 00:00:00 2001
From: Jakob Olsson <jakob.olsson@iopsys.eu>
Date: Fri, 10 Nov 2023 11:23:39 +0100
Subject: [PATCH] dpp: wip2

---
 src/cntlr_map.c  | 4 +++-
 src/cntlr_ubus.c | 5 ++---
 src/dpp.c        | 9 ++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/cntlr_map.c b/src/cntlr_map.c
index 4aa48a10..c026b6e2 100644
--- a/src/cntlr_map.c
+++ b/src/cntlr_map.c
@@ -3473,6 +3473,7 @@ int handle_proxied_encap_dpp(void *cntlr, struct cmdu_buff *cmdu,
 	uint8_t *frame;
 
 	UNUSED(hashlen);
+	UNUSED(hash);
 
 	if (!validate_proxied_encap_dpp(cmdu, tv)) {
 		dbg("cmdu validation: [PROXIED_ENCAP_DPP] failed\n");
@@ -3557,6 +3558,7 @@ int handle_proxied_encap_dpp(void *cntlr, struct cmdu_buff *cmdu,
 	if (!hash)
 		return -1;
 #endif
+#ifdef USE_LIBDPP
 	switch (frm->type) {
 	case DPP_PA_PRESENCE_ANNOUNCEMENT: {
 		int ret;
@@ -3596,7 +3598,7 @@ int handle_proxied_encap_dpp(void *cntlr, struct cmdu_buff *cmdu,
 		dbg("Unknown frame!\n");
 		break;
 	}
-
+#endif
 
 	return 0;
 }
diff --git a/src/cntlr_ubus.c b/src/cntlr_ubus.c
index 5378dd20..1d3270fa 100644
--- a/src/cntlr_ubus.c
+++ b/src/cntlr_ubus.c
@@ -886,6 +886,7 @@ static int cntlr_dpp_uri(struct ubus_context *ctx, struct ubus_object *obj,
 	return UBUS_STATUS_OK;
 }
 #endif
+#endif
 
 static int cntlr_steer_summary(struct ubus_context *ctx, struct ubus_object *obj,
 			struct ubus_request_data *req, const char *method,
@@ -3545,10 +3546,8 @@ int cntlr_publish_object(struct controller *c, const char *objname)
 #ifdef USE_LIBDPP
 		UBUS_METHOD("dpp_enrollee_uri", cntlr_dpp_uri,
 				dpp_uri_params),
-		UBUS_METHOD("dpp_enrollee_uri_eth", cntlr_dpp_uri_eth,
-				dpp_uri_params),
 #endif
-#endif /* DPP */
+#endif
 		UBUS_METHOD("steer_summary", cntlr_steer_summary,
 				steer_summary_params),
 		UBUS_METHOD("steer_history", cntlr_steer_history,
diff --git a/src/dpp.c b/src/dpp.c
index df8f9ce2..ed7222d9 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -2,6 +2,8 @@
  * Copyright (C) 2023 IOPSYS Software Solutions AB. All rights reserved.
  */
 #if (EASYMESH_VERSION > 2)
+#ifdef USE_LIBDPP
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -46,11 +48,8 @@
 #include "utils/utils.h"
 #include "utils/debug.h"
 #include "utils/dpp_sock.h"
-#if (EASYMESH_VERSION > 2)
-#ifdef USE_LIBDPP
+
 #include <dpp_api.h>
-#endif
-#endif
 
 #include "dpp.h"
 #include <math.h>
@@ -249,7 +248,6 @@ out:
 }
 #endif
 
-#ifdef USE_LIBDPP
 int dpp_frame_handler(void *dpp, uint8_t *smac, enum dpp_event ev,
 		      uint8_t *frame, size_t framelen)
 {
@@ -356,3 +354,4 @@ int dpp_frame_handler(void *dpp, uint8_t *smac, enum dpp_event ev,
 	return 0;
 }
 #endif
+#endif
-- 
GitLab