Skip to content

Commit

Permalink
esp_dpp: Fix retry with esp_supp_dpp_start_listen after failure
Browse files Browse the repository at this point in the history
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would
call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag
to true.  Subsequent attempts to restart listening with
esp_supp_dpp_start_listen then only attempt to listen once more for
500ms before reading the s_dpp_stop_listening flag again and giving up.

This contributes greatly to #10615, but the fix here is still largely
a work-around as it sometimes requires manually retrying a couple times
before it works.  Without this fix, any number of retries by
deinit/init again will seemingly not work as the retries for currently
unknown reasons.

Signed-off-by: Shreyas Sheth <shreyas.sheth@espressif.com>

Closes #10865
  • Loading branch information
jasta authored and jack0c committed May 19, 2023
1 parent 9aedb4b commit 3ef8c77
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/wpa_supplicant/esp_supplicant/src/esp_dpp.c
Expand Up @@ -586,6 +586,7 @@ esp_err_t esp_supp_dpp_start_listen(void)
return ESP_ERR_INVALID_STATE;
}

s_dpp_stop_listening = false;
return esp_dpp_post_evt(SIG_DPP_LISTEN_NEXT_CHANNEL, 0);
}

Expand Down

0 comments on commit 3ef8c77

Please sign in to comment.