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

Janusz Dziedzic janusz.dziedzic at gmail.com
Fri Jan 30 07:16:35 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:
./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 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index 01a057660..2e1343301 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;
@@ -4000,6 +4001,7 @@ void hostapd_dpp_push_button_stop(struct hostapd_data *hapd)
 	if (!ifaces || !ifaces->dpp)
 		return;
 	eloop_cancel_timeout(hostapd_dpp_push_button_expire, hapd, NULL);
+	hostapd_drv_dpp_listen(hapd, false);
 	if (hostapd_dpp_pb_active(hapd)) {
 		wpa_printf(MSG_DEBUG, "DPP: Stop active push button mode");
 		if (!ifaces->dpp_pb_result_indicated)
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index d003bf1d0..c72bcfd81 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;
@@ -5793,6 +5794,7 @@ void wpas_dpp_push_button_stop(struct wpa_supplicant *wpa_s)
 {
 	if (!wpa_s->dpp)
 		return;
+	wpa_drv_dpp_listen(wpa_s, false);
 	os_free(wpa_s->dpp_pb_freqs);
 	wpa_s->dpp_pb_freqs = NULL;
 	wpabuf_free(wpa_s->dpp_pb_announcement);
-- 
2.43.0




More information about the Hostap mailing list