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

[Silabs] Adds fix for wifi diagnostics attributes #23932

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
2 changes: 2 additions & 0 deletions examples/platform/silabs/efr32/wf200/host_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ static void sl_wfx_connect_callback(sl_wfx_connect_ind_body_t connect_indication
{
uint8_t * mac = connect_indication_body.mac;
uint32_t status = connect_indication_body.status;
ap_info.chan = connect_indication_body.channel;
memcpy(&ap_info.security, &wifi_provision.security, sizeof(wifi_provision.security));
switch (status)
{
case WFM_STATUS_SUCCESS: {
Expand Down
12 changes: 12 additions & 0 deletions src/platform/silabs/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,18 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCou
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount)
{
wfx_wifi_scan_ext_t extra_info;
int32_t err = wfx_get_ap_ext(&extra_info);
if (err == 0)
{
beaconRxCount = extra_info.beacon_rx_count;
return CHIP_NO_ERROR;
}
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts()
{
int32_t err = wfx_reset_counts();
Expand Down
1 change: 1 addition & 0 deletions src/platform/silabs/DiagnosticDataProviderImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider
CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override;
CHIP_ERROR GetWiFiRssi(int8_t & rssi) override;
CHIP_ERROR GetWiFiBeaconLostCount(uint32_t & beaconLostCount) override;
CHIP_ERROR GetWiFiBeaconRxCount(uint32_t & beaconRxCount) override;
CHIP_ERROR GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) override;
CHIP_ERROR GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) override;
CHIP_ERROR GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) override;
Expand Down