From: Andrei Otcheretianski Date: Tue, 23 Dec 2025 11:46:01 +0000 (+0200) Subject: NAN: Add more driver capability flags X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a44239b09d4e4bc4d257aa0ac74e7b469deec3d9;p=thirdparty%2Fhostap.git NAN: Add more driver capability flags Add new NAN driver flags to indicate support for: - Synchronization offload and support for additional NAN sync parameters. - Support for user space NAN DE implementation which requires the driver to send DW notification and be able to transmit and receive SDF frames over NAN device interface with the correct timing. Signed-off-by: Andrei Otcheretianski --- diff --git a/src/drivers/driver.h b/src/drivers/driver.h index b91d4fc6e..f171a612e 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2579,6 +2579,10 @@ struct wpa_driver_capa { #ifdef CONFIG_NAN /* Driver supports dual band NAN operation */ #define WPA_DRIVER_FLAGS_NAN_SUPPORT_DUAL_BAND 0x00000001 +/* Driver supports NAN synchronization configuration */ +#define WPA_DRIVER_FLAGS_NAN_SUPPORT_SYNC_CONFIG 0x00000002 +/* Driver supports DW notifications and SDF TX/RX over NAN device interface */ +#define WPA_DRIVER_FLAGS_NAN_SUPPORT_USERSPACE_DE 0x00000004 u32 nan_flags; #endif /* CONFIG_NAN */ }; diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 0c4abaafb..98e82a4f2 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -7992,6 +7992,10 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s, return -1; #endif /* CONFIG_NAN_USD */ +#ifdef CONFIG_NAN + wpa_s->nan_drv_flags = capa.nan_flags; +#endif /* CONFIG_NAN */ + if (wpa_supplicant_init_eapol(wpa_s) < 0) return -1; wpa_sm_set_eapol(wpa_s->wpa, wpa_s->eapol); diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 5371f5b6e..60c65009c 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1670,6 +1670,7 @@ struct wpa_supplicant { bool nan_mgmt; #ifdef CONFIG_NAN + u32 nan_drv_flags; struct nan_data *nan; #endif /* CONFIG_NAN */ };