[PATCH v2 04/35] driver: Add support for NAN device operations

Andrei Otcheretianski andrei.otcheretianski at intel.com
Tue Dec 23 03:45:53 PST 2025


From: Ilan Peer <ilan.peer at intel.com>

Add driver callback to start/update/stop NAN cluster
operation.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/drivers/driver.h | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 8035f1ae81..627acfd3a5 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2433,7 +2433,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS2_NON_TRIGGER_BASED_RESPONDER   0x0000000020000000ULL
 /** Driver supports non-trigger based ranging initiator functionality */
 #define WPA_DRIVER_FLAGS2_NON_TRIGGER_BASED_INITIATOR	0x0000000040000000ULL
-
+/** Driver supports NAN Device interface and NAN Synchronization */
+#define WPA_DRIVER_FLAGS2_SUPPORT_NAN			0x0000000080000000ULL
 	u64 flags2;
 
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
@@ -2574,6 +2575,11 @@ struct wpa_driver_capa {
 	u8 max_rx_sts_gt_80;
 	u8 max_tx_sts_le_80;
 	u8 max_tx_sts_gt_80;
+
+#ifdef CONFIG_NAN
+#define WPA_DRIVER_FLAGS_NAN_SUPPORT_DUAL_BAND		0x00000001
+	u32 nan_flags;
+#endif /* CONFIG_NAN */
 };
 
 
@@ -3198,6 +3204,11 @@ struct driver_sta_mlo_info {
 	} links[MAX_NUM_MLD_LINKS];
 };
 
+struct nan_cluster_config {
+	u8 master_pref;
+	u8 dual_band;
+};
+
 /**
  * struct wpa_driver_ops - Driver interface API definition
  *
@@ -5544,6 +5555,34 @@ struct wpa_driver_ops {
 	 */
 	struct hostapd_multi_hw_info *
 	(*get_multi_hw_info)(void *priv, unsigned int *num_multi_hws);
+
+#ifdef CONFIG_NAN
+	/**
+	 * nan_start - start NAN operation
+	 * @priv: Private driver interface data
+	 * @conf: NAN configuration parameters
+	 * Returns 0 on success, -1 on failure
+	 *
+	 * This command joins an existing NAN cluster or starts a new one.
+	 */
+	int (*nan_start)(void *priv, struct nan_cluster_config *conf);
+
+	/**
+	 * nan_change_config - Update the NAN cluster configuration
+	 * @priv: Private driver interface data
+	 * @conf: NAN configuration parameters
+	 * Returns 0 on success, -1 on failure
+	 *
+	 * This command modifies the NAN cluster configuration.
+	 */
+	int (*nan_change_config)(void *priv, struct nan_cluster_config *conf);
+
+	/**
+	 * nan_stop - stops NAN operation
+	 * @priv: Private driver interface data
+	 */
+	void (*nan_stop)(void *priv);
+#endif
 };
 
 /**
-- 
2.49.0




More information about the Hostap mailing list