[PATCH v2] DPP: Add driver listen notifications for push button mode

Janusz Dziedzic janusz.dziedzic at gmail.com
Sun Feb 1 08:27:57 PST 2026


Configure driver RX filtering correctly for broadcast
public action frames.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic at gmail.com>
---
Found when run with ath9k HW:
./run-tests.py -c cfg-janusz.py -d ath9k-1 -r ath9k-2 -h dpp_push_button
using ath9k hw

 src/ap/dpp_hostapd.c            | 2 ++
 wpa_supplicant/dpp_supplicant.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index 01a057660..eb5f46e4f 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -3987,6 +3987,7 @@ int hostapd_dpp_push_button(struct hostapd_data *hapd, const char *cmd)
 	}
 	eloop_register_timeout(100, 0, hostapd_dpp_push_button_expire,
 			       hapd, NULL);
+	hostapd_drv_dpp_listen(hapd, true);
 
 	wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_PB_STATUS "started");
 	return 0;
@@ -4002,6 +4003,7 @@ void hostapd_dpp_push_button_stop(struct hostapd_data *hapd)
 	eloop_cancel_timeout(hostapd_dpp_push_button_expire, hapd, NULL);
 	if (hostapd_dpp_pb_active(hapd)) {
 		wpa_printf(MSG_DEBUG, "DPP: Stop active push button mode");
+		hostapd_drv_dpp_listen(hapd, false);
 		if (!ifaces->dpp_pb_result_indicated)
 			wpa_msg(hapd->msg_ctx, MSG_INFO,
 				DPP_EVENT_PB_RESULT "failed");
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index d003bf1d0..3c3f95664 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -5783,6 +5783,7 @@ int wpas_dpp_push_button(struct wpa_supplicant *wpa_s, const char *cmd)
 	wpa_s->scan_req = MANUAL_SCAN_REQ;
 	wpa_s->scan_res_handler = wpas_dpp_pb_scan_res_handler;
 	wpa_supplicant_cancel_sched_scan(wpa_s);
+	wpa_drv_dpp_listen(wpa_s, true);
 	wpa_supplicant_req_scan(wpa_s, 0, 0);
 	wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_PB_STATUS "started");
 	return 0;
@@ -5800,6 +5801,8 @@ void wpas_dpp_push_button_stop(struct wpa_supplicant *wpa_s)
 	if (wpa_s->dpp_pb_bi) {
 		char id[20];
 
+		wpa_drv_dpp_listen(wpa_s, false);
+
 		if (wpa_s->dpp_pb_bi == wpa_s->dpp_pkex_bi)
 			wpa_s->dpp_pkex_bi = NULL;
 		os_snprintf(id, sizeof(id), "%u", wpa_s->dpp_pb_bi->id);
-- 
2.43.0




More information about the Hostap mailing list