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

Fix ARP response after RCP factory reset, CC_ASSERT calls #576

Merged
merged 2 commits into from
Apr 26, 2024
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
9 changes: 9 additions & 0 deletions src/device/pf_cmina.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,15 @@ int pf_cmina_set_default_cfg (pnet_t * net, uint16_t reset_mode)
0,
sizeof (net->cmina_nonvolatile_dcp_ase.station_name));

/* Reset network interface */
pnal_set_ip_suite (
net->pf_interface.main_port.name,
&net->cmina_nonvolatile_dcp_ase.full_ip_suite.ip_suite.ip_addr,
&net->cmina_nonvolatile_dcp_ase.full_ip_suite.ip_suite.ip_mask,
&net->cmina_nonvolatile_dcp_ase.full_ip_suite.ip_suite.ip_gateway,
net->cmina_nonvolatile_dcp_ase.station_name,
true);

pf_file_clear (p_file_directory, PF_FILENAME_IP);
pf_file_clear (p_file_directory, PF_FILENAME_DIAGNOSTICS);
#if PNET_OPTION_SNMP
Expand Down
4 changes: 3 additions & 1 deletion src/ports/STM32Cube/pnal.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ pnal_buf_t * pnal_buf_alloc (uint16_t length)

void pnal_buf_free (pnal_buf_t * p)
{
CC_ASSERT (pbuf_free (p) == 1);
uint8_t deallocated = pbuf_free (p);
(void)deallocated;
CC_ASSERT (deallocated == 1);
}

uint8_t pnal_buf_header (pnal_buf_t * p, int16_t header_size_increment)
Expand Down
4 changes: 3 additions & 1 deletion src/ports/iMX8M/pnal.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ pnal_buf_t * pnal_buf_alloc (uint16_t length)

void pnal_buf_free (pnal_buf_t * p)
{
CC_ASSERT (pbuf_free (p) == 1);
uint8_t deallocated = pbuf_free (p);
(void)deallocated;
CC_ASSERT (deallocated == 1);
}

uint8_t pnal_buf_header (pnal_buf_t * p, int16_t header_size_increment)
Expand Down
4 changes: 3 additions & 1 deletion src/ports/rt-kernel/pnal.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ pnal_buf_t * pnal_buf_alloc (uint16_t length)

void pnal_buf_free (pnal_buf_t * p)
{
ASSERT (pbuf_free (p) == 1);
uint8_t deallocated = pbuf_free (p);
(void)deallocated;
ASSERT (deallocated == 1);
}

uint8_t pnal_buf_header (pnal_buf_t * p, int16_t header_size_increment)
Expand Down