Hi all,
We try to compile the smallest project for NRF7002. We except to use it for scan only.
We start from the shell wifi sample in NCS 2.1.2.
When we remove the configuration CONFIG_WPA_SUPP from conf file, we have an issue with include.
In /subsys/net/l2/wifi/wifi_mgmt.c, code depending from CONFIG_WPA_SUPP is protected but not the #include "supp_api.h".
We suggest to add preprocessor directive in order to exclude include when it's usless.
Please find a patch attached.
From 3475ad95a5e10dab9e4f200a7e6f7a2a82236dc2 Mon Sep 17 00:00:00 2001
From: mbracq <[email protected]>
Date: Wed, 16 Nov 2022 09:26:34 +0100
Subject: [PATCH] fix: protect include when WPA_SUPP is not required
---
subsys/net/l2/wifi/wifi_mgmt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/subsys/net/l2/wifi/wifi_mgmt.c b/subsys/net/l2/wifi/wifi_mgmt.c
index 8456c376f..98180f94a 100644
--- a/subsys/net/l2/wifi/wifi_mgmt.c
+++ b/subsys/net/l2/wifi/wifi_mgmt.c
@@ -12,7 +12,9 @@ LOG_MODULE_REGISTER(net_wifi_mgmt, CONFIG_NET_L2_NRF_WIFI_MGMT_LOG_LEVEL);
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/wifi_mgmt.h>
-#include "supp_api.h"
+#if CONFIG_WPA_SUPP
+ #include "supp_api.h"
+#endif
static int wifi_connect(uint32_t mgmt_request, struct net_if *iface,
void *data, size_t len)
--
0001-fix-protect-include-when-WPA_SUPP-is-not-required.patch
Best regards,
Manuel