[PATCH 14/71] driver_nl80211: Register for NAFs
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Apr 1 15:01:23 PDT 2026
Receive NAN action frames on NAN device interface.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/drivers/driver_nl80211.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 4d0f7d90a0..98e5b6de99 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2729,7 +2729,9 @@ static int nl80211_register_action_frame(struct i802_bss *bss,
}
-#define NAN_PUB_ACTION ((const u8 *) "\x04\x09\x50\x6f\x9a\x13")
+#define NAN_SDF_ACTION ((const u8 *) "\x04\x09\x50\x6f\x9a\x13")
+#define NAN_NAF_ACTION ((const u8 *) "\x04\x09\x50\x6f\x9a\x18")
+
static int nl80211_mgmt_subscribe_nan(struct i802_bss *bss)
{
@@ -2751,9 +2753,9 @@ static int nl80211_mgmt_subscribe_nan(struct i802_bss *bss)
bss->nl_mgmt);
/* NAN SDF Public Action */
- if (nl80211_register_action_frame2(bss, NAN_PUB_ACTION, 6, true) < 0) {
+ if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, true) < 0) {
/* fallback to non-multicast */
- if (nl80211_register_action_frame2(bss, NAN_PUB_ACTION, 6,
+ if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6,
false) < 0) {
wpa_printf(MSG_INFO,
"nl80211: Failed to subscribe to NAN public action frames");
@@ -2762,6 +2764,14 @@ static int nl80211_mgmt_subscribe_nan(struct i802_bss *bss)
}
}
+ /* NAF Public Action */
+ if (nl80211_register_action_frame2(bss, NAN_NAF_ACTION, 6, true)) {
+ wpa_printf(MSG_DEBUG,
+ "nl80211: Failed to subscribe to NAFs");
+ nl_destroy_handles(&bss->nl_mgmt);
+ return -1;
+ }
+
nl80211_mgmt_handle_register_eloop(bss);
#endif /* CONFIG_NAN */
@@ -2843,9 +2853,9 @@ static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss)
#endif /* CONFIG_P2P */
#ifdef CONFIG_NAN_USD
/* NAN SDF Public Action */
- if (nl80211_register_action_frame2(bss, NAN_PUB_ACTION, 6, true) < 0) {
+ if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, true) < 0) {
/* fallback to non-multicast */
- if (nl80211_register_action_frame2(bss, NAN_PUB_ACTION, 6,
+ if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6,
false) < 0)
ret = -1;
}
--
2.53.0
More information about the Hostap
mailing list