Skip to content

Commit 47230eb

Browse files
committed
Revert "Convert 4way handshake to auth_fail"
This reverts commit 0de469c.
1 parent 6f042ff commit 47230eb

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

ports/espressif/common-hal/wifi/__init__.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,14 @@ static void event_handler(void *arg, esp_event_base_t event_base,
104104
wifi_event_sta_disconnected_t *d = (wifi_event_sta_disconnected_t *)event_data;
105105
uint8_t reason = d->reason;
106106
ESP_LOGW(TAG, "reason %d 0x%02x", reason, reason);
107-
if (radio->retries_left > 0) {
108-
if (
109-
reason != WIFI_REASON_AUTH_FAIL &&
110-
reason != WIFI_REASON_NO_AP_FOUND &&
111-
reason != WIFI_REASON_ASSOC_LEAVE) {
112-
radio->retries_left--;
113-
ESP_LOGI(TAG, "Retrying connect. %d retries remaining", radio->retries_left);
114-
esp_wifi_connect();
115-
return;
116-
}
117-
} else if (reason == WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT) {
118-
ESP_LOGW(TAG, "reason %d masked as %d", WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT, WIFI_REASON_AUTH_FAIL);
119-
reason = WIFI_REASON_AUTH_FAIL;
107+
if (radio->retries_left > 0 &&
108+
reason != WIFI_REASON_AUTH_FAIL &&
109+
reason != WIFI_REASON_NO_AP_FOUND &&
110+
reason != WIFI_REASON_ASSOC_LEAVE) {
111+
radio->retries_left--;
112+
ESP_LOGI(TAG, "Retrying connect. %d retries remaining", radio->retries_left);
113+
esp_wifi_connect();
114+
return;
120115
}
121116

122117
radio->last_disconnect_reason = reason;

0 commit comments

Comments
 (0)