diff --git a/wpa_supplicant-P2P-Remove-pending-p2p-listen-radio-work-on-stopping.patch b/wpa_supplicant-P2P-Remove-pending-p2p-listen-radio-work-on-stopping.patch new file mode 100644 index 0000000..b4f2153 --- /dev/null +++ b/wpa_supplicant-P2P-Remove-pending-p2p-listen-radio-work-on-stopping.patch @@ -0,0 +1,42 @@ +From 3242793cb8df65122a11d1a90914c308c936c52f Mon Sep 17 00:00:00 2001 +Message-ID: <3242793cb8df65122a11d1a90914c308c936c52f.1718814356.git.davide.caratti@gmail.com> +From: Jouni Malinen +Date: Sat, 28 Oct 2023 17:23:25 +0300 +Subject: [PATCH] P2P: Remove pending p2p-listen radio work on stopping listen + +Some kind of race condition seemed to be hit at least in test sequence +"p2p_ext_vendor_elem_invitation pasn_comeback_after_0_sae" where the P2P +invitation response could have been received just after having scheduled +a new p2p-listen radio work, but before that work had been started. In +the case of accepted invitation, this could result in unnecessary extra +delay when that p2p-listen work ended up getting started at the exact +time that the local device was starting GO. + +Avoid this race condition by removing the pending p2p-listen radio work +when P2P listen is stopped. + +Signed-off-by: Jouni Malinen +--- + wpa_supplicant/p2p_supplicant.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c +index e60beda72..de597cbb0 100644 +--- a/wpa_supplicant/p2p_supplicant.c ++++ b/wpa_supplicant/p2p_supplicant.c +@@ -2796,6 +2796,12 @@ static void wpas_stop_listen(void *ctx) + wpa_drv_probe_req_report(wpa_s, 0); + + wpas_p2p_listen_work_done(wpa_s); ++ ++ if (radio_work_pending(wpa_s, "p2p-listen")) { ++ wpa_printf(MSG_DEBUG, ++ "P2P: p2p-listen is still pending - remove it"); ++ radio_remove_works(wpa_s, "p2p-listen", 0); ++ } + } + + +-- +2.45.1 + diff --git a/wpa_supplicant.spec b/wpa_supplicant.spec index b181c6d..adce7fa 100644 --- a/wpa_supplicant.spec +++ b/wpa_supplicant.spec @@ -41,6 +41,8 @@ Patch10: wpa_supplicant-mka-Allow-configuration-of-MACsec-hardware-offload.patch Patch11: wpa_supplicant-macsec_linux-Add-support-for-MACsec-hardware-offload.patch # fix PEAP client to require successful Phase2 authentication when needed (CVE-2023-52160) Patch12: wpa_supplicant-PEAP-client-Update-Phase-2-authentication-requiremen.patch +# backport P2P bugfix causing nmci failures +Patch13: wpa_supplicant-P2P-Remove-pending-p2p-listen-radio-work-on-stopping.patch URL: http://w1.fi/wpa_supplicant/