-
Notifications
You must be signed in to change notification settings - Fork 3k
Correct network status callbacks with ethernet and nanostack #8817
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
Correct network status callbacks with ethernet and nanostack #8817
Conversation
Please review |
42eb345
to
d621c18
Compare
astyle fix done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main change looks fine, but make sure this doesn't break the border router app somehow. Shouldn't do, but worth checking.
And cross-check with #8698
arm_nwk_interface_down(tasklet_data_ptr->network_interface_id); | ||
eventOS_timeout_cancel(tasklet_data_ptr->poll_network_status_timeout); | ||
tasklet_data_ptr->poll_network_status_timeout = NULL; | ||
memcpy(tasklet_data_ptr->ip, 0x0, 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mean memset
@@ -119,6 +120,25 @@ void enet_tasklet_main(arm_event_s *event) | |||
case APPLICATION_EVENT: | |||
if (event->event_id == APPL_EVENT_CONNECT) { | |||
enet_tasklet_configure_and_connect_to_network(); | |||
} else if (event->event_id == APPL_BACKHAUL_INTERFACE_PHY_UP) { | |||
// Ethernet cable has been pluged-in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"plugged in" (no hyphen either)
@@ -283,7 +300,7 @@ void enet_tasklet_init(void) | |||
} | |||
} | |||
|
|||
int8_t enet_tasklet_network_init(int8_t device_id) | |||
uint8_t enet_tasklet_network_init(int8_t device_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correction should be the other way, I believe - it's the header that's wrong. network_interface_id
is int8_t
.
#8698 is already correcting this that way - this would conflict. Either don't touch, or make an identical change to it.
@@ -257,21 +277,18 @@ int8_t enet_tasklet_connect(mesh_interface_cb callback, int8_t nwk_interface_id) | |||
return 0; | |||
} | |||
|
|||
int8_t enet_tasklet_disconnect(bool send_cb) | |||
void enet_tasklet_disconnect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts with #8698 - I think its version is correct.
Actually, #8698 is possibly struggling to proceed. Maybe make identical changes to it, and then we can close that one. |
d621c18
to
19c98da
Compare
Ethernet-tasklet needs to be registered for emac link state changes. Ethernet-tasklet will then handle ethernet cable connection/disconnection events.
19c98da
to
26beb98
Compare
Checked that nanostack border router app is still working after these changes, also conficts with #8698 removed. |
@kjbracey-arm Please review |
All the PRs need to be engineering ready (marked as "needs: CI") by the end of the day (Austin time). Otherwise it won't make 5.11 and will need to come in the next release (5.12 for features, 5.11.1 for fixes and new platforms). |
Moved to 5.11.1 (this is a fix that can land in the next patch release) |
CI started |
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
@KariHaapalehto Unfortunately #8698 seems to have died, so the problems that you also spotted and avoided touching are potentially going to go unfixed. Could you pick those up? |
@kjbracey-arm Let's merge these changes in and I'll fix them at separate PR |
Ethernet-tasklet needs to be registered for emac link state changes.
Ethernet-tasklet will then handle ethernet cable connection/disconnection events.
Tested locally with K64F and ethernet cable
Pull request type