Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libraries/WiFi/src/WiFiGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,9 @@ bool WiFiGenericClass::mode(wifi_mode_t m) {
#else
#define WIFI_PROTOCOL_DEFAULT (WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N)
#endif
uint8_t current_protocol = 0;
uint32_t current_protocol = 0;
if (m & WIFI_MODE_STA) {
err = esp_wifi_get_protocol(WIFI_IF_STA, &current_protocol);
err = esp_wifi_get_protocol(WIFI_IF_STA, (uint8_t *)&current_protocol);
if (err == ESP_OK && current_protocol == WIFI_PROTOCOL_LR) {
log_v("Disabling long range on STA");
err = esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_DEFAULT);
Expand All @@ -614,7 +614,7 @@ bool WiFiGenericClass::mode(wifi_mode_t m) {
}
}
if (m & WIFI_MODE_AP) {
err = esp_wifi_get_protocol(WIFI_IF_AP, &current_protocol);
err = esp_wifi_get_protocol(WIFI_IF_AP, (uint8_t *)&current_protocol);
if (err == ESP_OK && current_protocol == WIFI_PROTOCOL_LR) {
log_v("Disabling long range on AP");
err = esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_DEFAULT);
Expand Down
Loading