Skip to content

Commit 6352450

Browse files
committed
fix(wifi): remove incorrect clearing of esp_hosted_init_done in esp_wifi_remote_deinit()
1 parent 5b8cb01 commit 6352450

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.6.4
4+
5+
- Fix the esp_wifi_deinit() call from host
6+
37
## 2.6.3
48

59
### Bug Fixes

host/api/src/esp_hosted_api.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ static uint8_t esp_hosted_init_done;
3131
static uint8_t esp_hosted_transport_up;
3232

3333

34-
#define check_transport_up() \
35-
if (!esp_hosted_transport_up) return ESP_FAIL
34+
#define check_transport_up() \
35+
do { \
36+
if (!(esp_hosted_transport_up)) { \
37+
ESP_LOGE(TAG, "ESP-Hosted link not yet up"); \
38+
return ESP_FAIL; \
39+
} \
40+
} while (0)
41+
3642

3743

3844
/** Exported variables **/
@@ -136,6 +142,7 @@ int esp_hosted_deinit(void)
136142
ESP_ERROR_CHECK(rpc_deinit());
137143
ESP_ERROR_CHECK(teardown_transport());
138144
esp_hosted_init_done = 0;
145+
esp_hosted_transport_up = 0;
139146
return ESP_OK;
140147
}
141148

@@ -197,7 +204,6 @@ esp_err_t esp_wifi_remote_init(const wifi_init_config_t *arg)
197204

198205
esp_err_t esp_wifi_remote_deinit(void)
199206
{
200-
esp_hosted_transport_up = 0;
201207
check_transport_up();
202208
return rpc_wifi_deinit();
203209
}

host/esp_hosted_host_fw_ver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#define ESP_HOSTED_VERSION_MAJOR_1 2
1717
#define ESP_HOSTED_VERSION_MINOR_1 6
18-
#define ESP_HOSTED_VERSION_PATCH_1 3
18+
#define ESP_HOSTED_VERSION_PATCH_1 4
1919

2020
/**
2121
* Macro to convert version number into an integer

idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "2.6.3"
1+
version: "2.6.4"
22
description: ESP-Hosted-MCU provide drivers to act any ESP chipset as Wi-Fi or Bluetooth co-processor.
33
url: https://github.com/espressif/esp-hosted-mcu
44
examples:

slave/main/esp_hosted_coprocessor_fw_ver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#define PROJECT_VERSION_MAJOR_1 2
1717
#define PROJECT_VERSION_MINOR_1 6
18-
#define PROJECT_VERSION_PATCH_1 3
18+
#define PROJECT_VERSION_PATCH_1 4
1919

2020
/**
2121
* Macro to convert version number into an integer

0 commit comments

Comments
 (0)