[PATCH 14/15] NAN: Use the sync TX path for merged DW SDFs

Andrei Otcheretianski andrei.otcheretianski at intel.com
Thu Oct 8 09:05:23 PDT 2026


nan_de_dw_trigger() only counts synchronized services, but
nan_de_tx_merged_sdf() re-iterated all services, so a USD service
could be aggregated into a DW frame and sent with the cluster ID.

The merged SDF was also transmitted with a frequency but without a
TX wait. That takes the off-channel radio work path, where the work
is only released on TX wait expiry, so it was never completed and
blocked scans for as long as NAN services were active. A station
could then no longer connect to a BSS once an NDP was up.

Aggregate only the services of the requested class and, as
nan_de_tx_sdf() does for a single service, drop the frequency and the
TX wait for the synchronized ones.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/common/nan_de.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/common/nan_de.c b/src/common/nan_de.c
index 150b0b153c..9b36f95f4a 100644
--- a/src/common/nan_de.c
+++ b/src/common/nan_de.c
@@ -3775,7 +3775,8 @@ int nan_de_config(struct nan_de *de, struct nan_de_cfg *cfg)
 }
 
 
-static void nan_de_tx_merged_sdf(struct nan_de *de, unsigned int freq,
+static void nan_de_tx_merged_sdf(struct nan_de *de, bool sync,
+				 unsigned int freq, unsigned int wait_time,
 				 const u8 *dst, const u8 *bssid)
 {
 	struct wpabuf *buf;
@@ -3795,7 +3796,7 @@ static void nan_de_tx_merged_sdf(struct nan_de *de, unsigned int freq,
 	for (i = 0; i < NAN_DE_MAX_SERVICE; i++) {
 		struct nan_de_service *srv = de->service[i];
 
-		if (!srv)
+		if (!srv || srv->sync != sync)
 			continue;
 
 		if ((srv->type == NAN_DE_PUBLISH && srv->publish.unsolicited) ||
@@ -3907,7 +3908,8 @@ static void nan_de_tx_merged_sdf(struct nan_de *de, unsigned int freq,
 		os_free(irsa_tag_tlv);
 	}
 
-	nan_de_tx(de, freq, 0, dst, de->nmi, bssid, buf, NULL, handle);
+	nan_de_tx(de, sync ? 0 : freq, sync ? 0 : wait_time, dst, de->nmi,
+		  bssid, buf, NULL, handle);
 	wpabuf_free(buf);
 
 	/* Update last_multicast time for all services */
@@ -3949,7 +3951,8 @@ void nan_de_dw_trigger(struct nan_de *de, int freq)
 	}
 
 	if (has_services)
-		nan_de_tx_merged_sdf(de, freq, nan_network_id, de->cluster_id);
+		nan_de_tx_merged_sdf(de, true, freq, 0, nan_network_id,
+				     de->cluster_id);
 }
 
 
-- 
2.53.0




More information about the Hostap mailing list