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 debug prints for rs911x platform for better understanding #37102

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
10 changes: 6 additions & 4 deletions src/platform/silabs/wifi/lwip-support/ethernetif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
struct pbuf * q;
uint16_t framelength = 0;
uint16_t datalength = 0;
int32_t status = 0;
rosahay-silabs marked this conversation as resolved.
Show resolved Hide resolved
#if WIFI_DEBUG_ENABLED
ChipLogProgress(DeviceLayer, "LWIP : low_level_output");
#endif
Expand All @@ -367,14 +368,14 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
#endif
if ((netif->flags & (NETIF_FLAG_LINK_UP | NETIF_FLAG_UP)) != (NETIF_FLAG_LINK_UP | NETIF_FLAG_UP))
{
ChipLogProgress(DeviceLayer, "EN-RSI:NOT UP");
ChipLogError(DeviceLayer, "EN-RSI:NOT UP");
xSemaphoreGive(ethout_sem);
return ERR_IF;
}
packet = wfx_rsi_alloc_pkt();
if (!packet)
{
ChipLogProgress(DeviceLayer, "EN-RSI:No buf");
ChipLogError(DeviceLayer, "EN-RSI:No buf");
xSemaphoreGive(ethout_sem);
return ERR_IF;
}
Expand Down Expand Up @@ -402,9 +403,10 @@ static err_t low_level_output(struct netif * netif, struct pbuf * p)
/* forward the generated packet to RSI to
* send the data over wifi network
*/
if (wfx_rsi_send_data(packet, datalength))
status = wfx_rsi_send_data(packet, datalength);
if (status != 0)
{
ChipLogProgress(DeviceLayer, "*ERR*EN-RSI:Send fail");
ChipLogError(DeviceLayer, "*ERR*EN-RSI:Send fail: %d", status);
xSemaphoreGive(ethout_sem);
return ERR_IF;
}
Expand Down
3 changes: 3 additions & 0 deletions src/platform/silabs/wifi/rs911x/WifiInterfaceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@ void HandleDHCPPolling(void)
*/
if ((ip6_addr_ispreferred(netif_ip6_addr_state(sta_netif, 0))) && !hasNotifiedIPV6)
{
char addrStr[chip::Inet::IPAddress::kMaxStringLength] = { 0 };
VerifyOrReturn(ip6addr_ntoa_r(netif_ip6_addr(sta_netif, 0), addrStr, sizeof(addrStr)) != nullptr);
ChipLogProgress(DeviceLayer, "SLAAC OK: linklocal addr: %s", addrStr);
NotifyIPv6Change(true);
hasNotifiedIPV6 = true;
WifiPlatformEvent event = WifiPlatformEvent::kStationDhcpDone;
Expand Down
Loading