wifi: handle WIFI_REASON_ROAMING reason in event (#5153)

This commit is contained in:
Stijn Tintel 2023-07-31 00:23:30 +03:00 committed by Jesse Hills
parent 3843d21dbf
commit 9b19c45735
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -569,6 +569,8 @@ const char *get_disconnect_reason_str(uint8_t reason) {
return "Handshake Failed"; return "Handshake Failed";
case WIFI_REASON_CONNECTION_FAIL: case WIFI_REASON_CONNECTION_FAIL:
return "Connection Failed"; return "Connection Failed";
case WIFI_REASON_ROAMING:
return "Station Roaming";
case WIFI_REASON_UNSPECIFIED: case WIFI_REASON_UNSPECIFIED:
default: default:
return "Unspecified"; return "Unspecified";
@ -631,7 +633,9 @@ void WiFiComponent::wifi_process_event_(IDFWiFiEvent *data) {
if (it.reason == WIFI_REASON_NO_AP_FOUND) { if (it.reason == WIFI_REASON_NO_AP_FOUND) {
ESP_LOGW(TAG, "Event: Disconnected ssid='%s' reason='Probe Request Unsuccessful'", buf); ESP_LOGW(TAG, "Event: Disconnected ssid='%s' reason='Probe Request Unsuccessful'", buf);
s_sta_connect_not_found = true; s_sta_connect_not_found = true;
} else if (it.reason == WIFI_REASON_ROAMING) {
ESP_LOGI(TAG, "Event: Disconnected ssid='%s' reason='Station Roaming'", buf);
return;
} else { } else {
ESP_LOGW(TAG, "Event: Disconnected ssid='%s' bssid=" LOG_SECRET("%s") " reason='%s'", buf, ESP_LOGW(TAG, "Event: Disconnected ssid='%s' bssid=" LOG_SECRET("%s") " reason='%s'", buf,
format_mac_addr(it.bssid).c_str(), get_disconnect_reason_str(it.reason)); format_mac_addr(it.bssid).c_str(), get_disconnect_reason_str(it.reason));