Skip to content

Commit 11c66b6

Browse files
fengming-yejukkar
authored andcommitted
[toup] dpp: add zephyr own timeout for dpp response timeout
For some MCUs in zephyr that has lite CPU, hard code 1s or 2s may be not enough for SHA384 and SHA512 crypto calculation. So extend DPP wait for reponse timeout to 5s. Signed-off-by: Fengming Ye <[email protected]>
1 parent 6f75577 commit 11c66b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

wpa_supplicant/dpp_supplicant.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,13 @@ static void wpas_dpp_tx_status(struct wpa_supplicant *wpa_s,
534534
* allow new authentication exchanges to be started. */
535535
eloop_cancel_timeout(wpas_dpp_auth_conf_wait_timeout, wpa_s,
536536
NULL);
537+
#ifdef __ZEPHYR__
538+
eloop_register_timeout(5, 0, wpas_dpp_auth_conf_wait_timeout,
539+
wpa_s, NULL);
540+
#else
537541
eloop_register_timeout(1, 0, wpas_dpp_auth_conf_wait_timeout,
538542
wpa_s, NULL);
543+
#endif
539544
}
540545

541546
if (!is_broadcast_ether_addr(dst) && auth->waiting_auth_resp &&
@@ -4005,8 +4010,13 @@ static void wpas_dpp_chirp_tx_status(struct wpa_supplicant *wpa_s,
40054010
}
40064011

40074012
wpa_printf(MSG_DEBUG, "DPP: Chirp send completed - wait for response");
4013+
#ifdef __ZEPHYR__
4014+
if (eloop_register_timeout(5, 0, wpas_dpp_chirp_timeout,
4015+
wpa_s, NULL) < 0)
4016+
#else
40084017
if (eloop_register_timeout(2, 0, wpas_dpp_chirp_timeout,
40094018
wpa_s, NULL) < 0)
4019+
#endif
40104020
wpas_dpp_chirp_stop(wpa_s);
40114021
}
40124022

0 commit comments

Comments
 (0)