Skip to content

Commit

Permalink
fix asr platform issue (#26645)
Browse files Browse the repository at this point in the history
* fix asr platform issue:
1,modify PlatformManagerImpl implementation
2,bump third_party/asr/xxx/asr_sdk
3,remove unless code in SystemTimeSupport

* keep queue and mutex when shut down

* remove unused implemention in diagnosticdata
  • Loading branch information
tx2rx authored and pull[bot] committed May 24, 2024
1 parent a286ffb commit 4764f4f
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 276 deletions.
4 changes: 2 additions & 2 deletions src/platform/ASR/ASRConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ CHIP_ERROR ASRConfig::ReadFactoryConfigValue(asr_matter_partition_t matter_parti
ret = asr_factory_config_read(matter_partition, buf, (uint32_t) bufSize, (uint32_t *) &outLen);

if (ret != 0)
ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, ret = %d\n", matter_partition, ret);
ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, ret = %d\n", matter_partition, static_cast<int>(ret));

if (ret == 0)
{
Expand All @@ -251,7 +251,7 @@ CHIP_ERROR ASRConfig::ReadFactoryConfigValue(asr_matter_partition_t matter_parti
ret = -1;

if (ret != 0)
ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, ret = %d\n", matter_partition, ret);
ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, ret = %d\n", matter_partition, static_cast<int>(ret));

if (ret == 0)
{
Expand Down
58 changes: 1 addition & 57 deletions src/platform/ASR/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNe

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wifiVersion)
{
// Support 802.11a/n Wi-Fi in Beken chipset
// TODO: https://github.com/project-chip/connectedhomeip/issues/25543
wifiVersion = app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum::kN;
return CHIP_NO_ERROR;
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiChannelNumber(uint16_t & channelNumber)
Expand Down Expand Up @@ -289,59 +286,6 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi)
return CHIP_NO_ERROR;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount)
{
beaconRxCount = 0;
return CHIP_NO_ERROR;
}

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

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

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

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

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

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

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

CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts()
{
return CHIP_NO_ERROR;
}

DiagnosticDataProvider & GetDiagnosticDataProviderImpl()
{
return DiagnosticDataProviderImpl::GetDefaultInstance();
Expand Down
25 changes: 0 additions & 25 deletions src/platform/ASR/DiagnosticDataProviderImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,6 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider
CHIP_ERROR GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wifiVersion) override;
CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override;
CHIP_ERROR GetWiFiRssi(int8_t & rssi) override;
CHIP_ERROR GetWiFiBeaconRxCount(uint32_t & beaconRxCount) override;
CHIP_ERROR GetWiFiBeaconLostCount(uint32_t & beaconLostCount) override;
CHIP_ERROR GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) override;
CHIP_ERROR GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) override;
CHIP_ERROR GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) override;
CHIP_ERROR GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) override;
CHIP_ERROR GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) override;
CHIP_ERROR GetWiFiOverrunCount(uint64_t & overrunCount) override;
CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override;
/* These variables will be set to 0 during start up and will be updated when reset-counts
* zcl command is received.
* These are considered as base for below attributes of WiFi Diagnostics Cluster:
* BeaconLostCount, BeaconRxCount, PacketMulticastRxCount, PacketMulticastTxCount,
* PacketUnicastRxCount, PacketUnicastTxCount, OverrunCount.
* Each attributes read will be difference of WLAN counters minus equivalent variables below.
*/
uint32_t mBeaconRxCount = 0;
uint32_t mBeaconLostCount = 0;
uint32_t mPacketMulticastRxCount = 0;
uint32_t mPacketMulticastTxCount = 0;
uint32_t mPacketUnicastRxCount = 0;
uint32_t mPacketUnicastTxCount = 0;
uint64_t mOverrunCount = 0;
bool mipv4_offpremise = false;
bool mipv6_offpremise = false;
};

/**
Expand Down
Loading

0 comments on commit 4764f4f

Please sign in to comment.