[PATCH 61/71] NAN: Pass the entire frame in follow up receive callbacks
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Apr 1 15:02:10 PDT 2026
Follow up frames may be used outside of DE to carry additional
attributes. For example using NPBA for bootstrapping etc.
Extend the receive callback so the entire frame buffer is provided.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
src/ap/nan_usd_ap.c | 3 ++-
src/common/nan_de.c | 8 +++++---
src/common/nan_de.h | 3 ++-
wpa_supplicant/nan_supplicant.c | 3 ++-
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/ap/nan_usd_ap.c b/src/ap/nan_usd_ap.c
index 5263a0be41..e862e9b31d 100644
--- a/src/ap/nan_usd_ap.c
+++ b/src/ap/nan_usd_ap.c
@@ -129,7 +129,8 @@ static void hostapd_nan_de_subscribe_terminated(void *ctx, int subscribe_id,
static void hostapd_nan_de_receive(void *ctx, int id, int peer_instance_id,
const u8 *ssi, size_t ssi_len,
- const u8 *peer_addr)
+ const u8 *peer_addr,
+ const u8 *buf, size_t len)
{
struct hostapd_data *hapd = ctx;
char *ssi_hex;
diff --git a/src/common/nan_de.c b/src/common/nan_de.c
index 38a4245745..1820d1c412 100644
--- a/src/common/nan_de.c
+++ b/src/common/nan_de.c
@@ -1324,7 +1324,8 @@ offload:
static bool nan_de_rx_follow_up(struct nan_de *de, struct nan_de_service *srv,
const u8 *peer_addr, const u8 *a3,
- u8 instance_id, const u8 *ssi, size_t ssi_len)
+ u8 instance_id, const u8 *ssi, size_t ssi_len,
+ const u8 *buf, size_t len)
{
/* Follow-up function processing of a receive Follow-up message for a
* Subscribe or Publish instance */
@@ -1347,7 +1348,7 @@ static bool nan_de_rx_follow_up(struct nan_de *de, struct nan_de_service *srv,
if (de->cb.receive)
de->cb.receive(de->cb.ctx, srv->id, instance_id, ssi, ssi_len,
- peer_addr);
+ peer_addr, buf, len);
return true;
}
@@ -1566,7 +1567,8 @@ static bool nan_de_rx_sda(struct nan_de *de, const u8 *peer_addr, const u8 *a3,
break;
case NAN_SRV_CTRL_FOLLOW_UP:
ret |= nan_de_rx_follow_up(de, srv, peer_addr, a3,
- instance_id, ssi, ssi_len);
+ instance_id,
+ ssi, ssi_len, buf, len);
break;
}
}
diff --git a/src/common/nan_de.h b/src/common/nan_de.h
index e0d11af85c..ab7f70a40c 100644
--- a/src/common/nan_de.h
+++ b/src/common/nan_de.h
@@ -55,7 +55,8 @@ struct nan_callbacks {
void (*receive)(void *ctx, int id, int peer_instance_id,
const u8 *ssi, size_t ssi_len,
- const u8 *peer_addr);
+ const u8 *peer_addr,
+ const u8 *buf, size_t len);
void (*process_p2p_usd_elems)(void *ctx, const u8 *buf,
u16 buf_len, const u8 *peer_addr,
diff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c
index 736ea6af2e..6cc7cc1dc5 100644
--- a/wpa_supplicant/nan_supplicant.c
+++ b/wpa_supplicant/nan_supplicant.c
@@ -2669,7 +2669,8 @@ static void wpas_nan_usd_offload_cancel_subscribe(void *ctx, int subscribe_id)
static void wpas_nan_de_receive(void *ctx, int id, int peer_instance_id,
const u8 *ssi, size_t ssi_len,
- const u8 *peer_addr)
+ const u8 *peer_addr,
+ const u8 *buf, size_t len)
{
struct wpa_supplicant *wpa_s = ctx;
--
2.53.0
More information about the Hostap
mailing list