Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f122366

Browse filesBrowse files
fix(wifi): Workaround bug in esp_wifi_get_protocol() (espressif#11239)
* fix(wifi): Workaround bug in esp_wifi_get_protocol() * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 9cad83b commit f122366
Copy full SHA for f122366

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎libraries/WiFi/src/WiFiGeneric.cpp

Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiGeneric.cpp
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@ bool WiFiGenericClass::mode(wifi_mode_t m) {
602602
#else
603603
#define WIFI_PROTOCOL_DEFAULT (WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N)
604604
#endif
605-
uint8_t current_protocol = 0;
605+
uint32_t current_protocol = 0;
606606
if (m & WIFI_MODE_STA) {
607-
err = esp_wifi_get_protocol(WIFI_IF_STA, &current_protocol);
607+
err = esp_wifi_get_protocol(WIFI_IF_STA, (uint8_t *)&current_protocol);
608608
if (err == ESP_OK && current_protocol == WIFI_PROTOCOL_LR) {
609609
log_v("Disabling long range on STA");
610610
err = esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_DEFAULT);
@@ -614,7 +614,7 @@ bool WiFiGenericClass::mode(wifi_mode_t m) {
614614
}
615615
}
616616
if (m & WIFI_MODE_AP) {
617-
err = esp_wifi_get_protocol(WIFI_IF_AP, &current_protocol);
617+
err = esp_wifi_get_protocol(WIFI_IF_AP, (uint8_t *)&current_protocol);
618618
if (err == ESP_OK && current_protocol == WIFI_PROTOCOL_LR) {
619619
log_v("Disabling long range on AP");
620620
err = esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_DEFAULT);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.