Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP32] Correct Wi-Fi Network Diagnostics data #13621

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
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
23 changes: 8 additions & 15 deletions src/platform/ESP32/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId)
{
wifi_ap_record_t ap_info;
esp_err_t err;
uint8_t macAddress[kMaxHardwareAddrSize];
static uint8_t macAddress[kMaxHardwareAddrSize];

err = esp_wifi_sta_get_ap_info(&ap_info);
if (err == ESP_OK)
Expand Down Expand Up @@ -314,44 +314,37 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi)

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount)
{
beaconLostCount = 0;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiCurrentMaxRate(uint64_t & currentMaxRate)
{
currentMaxRate = 0;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount)
{
packetMulticastRxCount = 0;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount)
{
packetMulticastTxCount = 0;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount)
{
packetUnicastRxCount = 0;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount)
{
packetUnicastTxCount = 0;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount)
{
overrunCount = 0;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts()
Expand Down
2 changes: 1 addition & 1 deletion src/platform/ESP32/DiagnosticDataProviderImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace chip {
namespace DeviceLayer {

/**
* Concrete implementation of the PlatformManager singleton object for Linux platforms.
* Concrete implementation of the PlatformManager singleton object for ESP32 platforms.
*/
class DiagnosticDataProviderImpl : public DiagnosticDataProvider
{
Expand Down