bugfix: corrected L2_EV_NET_SETUP_DONE handling.

This commit is contained in:
Gatsby Van
2024-01-24 11:25:57 +08:00
parent 0c80b32eaa
commit c330bf0c2a
@@ -963,21 +963,18 @@ int32_t Linklayer_EventHandler(L2_INST *instPtr, const L2_EVENT *l2Event)
}
else
{
DBG_WARNING("Invalid call from head node.")
DBG_WARNING("Invalid call from head node.");
}
break;
}
case L2_EV_NET_SETUP_DONE:
{
DBG_INFO("Event L2_EV_NETSETUP_DONE asserted....\n");
DBG_INFO("Event L2_EV_NET_SETUP_DONE asserted....\n");
if (L2_GetNodeType(instPtr) != L2_NODE_HEAD)
{
instPtr->cxn2Net = true;
}
else
{ // Head node
UpdateMainSate(instPtr, L2_NORMAL_STATE);
}
break;
}
case L2_EV_TIME_SYNC: