mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-05 07:29:54 +00:00
fix(esp_wifi): Roaming app, sync api naming
This commit is contained in:
@@ -26,7 +26,7 @@ static esp_netif_t *s_wifi_netifs[MAX_WIFI_IFS] = { NULL };
|
||||
static bool wifi_default_handlers_set = false;
|
||||
|
||||
static esp_err_t disconnect_and_destroy(esp_netif_t* esp_netif);
|
||||
#ifdef ESP_WIFI_NETWORK_ASSISTED_ROAMING_IP_RENEW_SKIP
|
||||
#ifdef CONFIG_ESP_WIFI_NETWORK_ASSISTED_ROAMING_IP_RENEW_SKIP
|
||||
static bool roaming_ongoing = false;
|
||||
#endif
|
||||
|
||||
@@ -87,7 +87,7 @@ static void wifi_default_action_sta_stop(void *arg, esp_event_base_t base, int32
|
||||
|
||||
static void wifi_default_action_sta_connected(void *arg, esp_event_base_t base, int32_t event_id, void *data)
|
||||
{
|
||||
#ifdef ESP_WIFI_NETWORK_ASSISTED_ROAMING_IP_RENEW_SKIP
|
||||
#ifdef CONFIG_ESP_WIFI_NETWORK_ASSISTED_ROAMING_IP_RENEW_SKIP
|
||||
if (roaming_ongoing) {
|
||||
/* IP stack is already in ready state */
|
||||
roaming_ongoing = false;
|
||||
@@ -113,7 +113,7 @@ static void wifi_default_action_sta_connected(void *arg, esp_event_base_t base,
|
||||
|
||||
static void wifi_default_action_sta_disconnected(void *arg, esp_event_base_t base, int32_t event_id, void *data)
|
||||
{
|
||||
#ifdef ESP_WIFI_NETWORK_ASSISTED_ROAMING_IP_RENEW_SKIP
|
||||
#ifdef CONFIG_ESP_WIFI_NETWORK_ASSISTED_ROAMING_IP_RENEW_SKIP
|
||||
wifi_event_sta_disconnected_t *disconn = data;
|
||||
if (disconn->reason == WIFI_REASON_ROAMING) {
|
||||
roaming_ongoing = true;
|
||||
|
@@ -182,7 +182,7 @@ static esp_err_t wifi_deinit_internal(void)
|
||||
esp_supplicant_deinit();
|
||||
|
||||
#if CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
|
||||
deinit_roaming_app();
|
||||
roam_deinit_app();
|
||||
#endif
|
||||
|
||||
err = esp_wifi_deinit_internal();
|
||||
@@ -447,7 +447,7 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config)
|
||||
}
|
||||
|
||||
#if CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
|
||||
init_roaming_app();
|
||||
roam_init_app();
|
||||
#endif
|
||||
|
||||
} else {
|
||||
@@ -485,7 +485,7 @@ esp_err_t esp_wifi_connect(void)
|
||||
ret = esp_wifi_connect_internal();
|
||||
|
||||
#if CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
|
||||
roaming_app_enable_reconnect();
|
||||
roam_enable_reconnect();
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
@@ -493,11 +493,11 @@ esp_err_t esp_wifi_connect(void)
|
||||
esp_err_t esp_wifi_disconnect(void)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
#if CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
|
||||
roam_disable_reconnect();
|
||||
#endif
|
||||
ret = esp_wifi_disconnect_internal();
|
||||
|
||||
#if CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
|
||||
roaming_app_disable_reconnect();
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user