[PATCH v3 07/46] NAN: Make NAN and P2P network IDs globally accessible

Kavita Kavita kavita.kavita at oss.qualcomm.com
Wed May 13 02:59:31 PDT 2026


From: Peddolla Harshavardhan Reddy <peddolla.reddy at oss.qualcomm.com>

Remove the static qualifier from nan_network_id and p2p_network_id
and add extern declarations in nan_de.h and nan_defs.h so other
modules can reference these network IDs directly.

Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy at oss.qualcomm.com>
---
 src/common/nan_de.c   | 4 ++--
 src/common/nan_de.h   | 3 +++
 src/common/nan_defs.h | 4 ++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/common/nan_de.c b/src/common/nan_de.c
index c5b102277..72ee6fe47 100644
--- a/src/common/nan_de.c
+++ b/src/common/nan_de.c
@@ -19,7 +19,7 @@
 #include "nan_defs.h"
 #include "nan_de.h"
 
-static const u8 nan_network_id[ETH_ALEN] =
+const u8 nan_network_id[ETH_ALEN] =
 { 0x51, 0x6f, 0x9a, 0x01, 0x00, 0x00 };
 
 enum nan_de_service_type {
@@ -27,7 +27,7 @@ enum nan_de_service_type {
 	NAN_DE_SUBSCRIBE,
 };
 
-static const u8 p2p_network_id[ETH_ALEN] =
+const u8 p2p_network_id[ETH_ALEN] =
 { 0x51, 0x6f, 0x9a, 0x02, 0x00, 0x00 };
 
 static const u8 wildcard_bssid[ETH_ALEN] =
diff --git a/src/common/nan_de.h b/src/common/nan_de.h
index e3d872f38..95ca161f2 100644
--- a/src/common/nan_de.h
+++ b/src/common/nan_de.h
@@ -84,6 +84,9 @@ struct nan_callbacks {
 	bool (*is_peer_paired)(void *ctx, const u8 *addr);
 };
 
+extern const u8 nan_network_id[ETH_ALEN];
+extern const u8 p2p_network_id[ETH_ALEN];
+
 bool nan_de_is_nan_network_id(const u8 *addr);
 bool nan_de_is_p2p_network_id(const u8 *addr);
 struct nan_de * nan_de_init(const u8 *nmi, bool offload, bool ap,
diff --git a/src/common/nan_defs.h b/src/common/nan_defs.h
index 88b46eaf3..f0c804553 100644
--- a/src/common/nan_defs.h
+++ b/src/common/nan_defs.h
@@ -173,6 +173,10 @@ enum nan_pairing_bootstrapping_method {
 
 #define NAN_USD_DEFAULT_FREQ 2437
 
+extern const u8 p2p_network_id[ETH_ALEN];
+
+extern const u8 nan_network_id[ETH_ALEN];
+
 /* Map ID
  * Wi-Fi Aware spec v4.0, Table 79 (Device Capability attribute format) */
 #define NAN_DEV_CAPA_MAP_ID_DONT_APPLY_ALL BIT(0)
-- 
2.34.1




More information about the Hostap mailing list