forked from gatsby/df_datalink
bugfix: correct L2_ROUTINE_FINISH handling.
This commit is contained in:
@@ -973,8 +973,8 @@ int32_t Linklayer_EventHandler(L2_INST *instPtr, const L2_EVENT *l2Event)
|
||||
if (L2_GetNodeType(instPtr) != L2_NODE_HEAD)
|
||||
{
|
||||
instPtr->cxn2Net = true;
|
||||
}
|
||||
UpdateMainSate(instPtr, L2_NORMAL_STATE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case L2_EV_TIME_SYNC:
|
||||
@@ -1008,16 +1008,17 @@ int32_t Linklayer_EventHandler(L2_INST *instPtr, const L2_EVENT *l2Event)
|
||||
case L2_ROUTINE_FINISH:
|
||||
{
|
||||
DBG_INFO("Event L2_ROUTINE_FINISH asserted....\n");
|
||||
if (instPtr->nextState == L2_NORMAL_STATE)
|
||||
if (instPtr->nextState == L2_INIT_STATE)
|
||||
{
|
||||
// Reset scan net FMS for next scan process.
|
||||
L2_Scan_Reset(instPtr->scanFSM);
|
||||
UpdateMainSate(instPtr, L2_INIT_STATE);
|
||||
instPtr->rtneConfig.rtneTable = normalTable;
|
||||
instPtr->rtneConfig.rtnePrd = ARRAY_SIZE(normalTable);
|
||||
instPtr->rtneConfig.rtneTable = initTable;
|
||||
instPtr->rtneConfig.rtnePrd = ARRAY_SIZE(initTable);
|
||||
}
|
||||
else if (instPtr->nextState == L2_NORMAL_STATE)
|
||||
{
|
||||
UpdateMainSate(instPtr, L2_NORMAL_STATE);
|
||||
instPtr->rtneConfig.rtneTable = normalTable;
|
||||
instPtr->rtneConfig.rtnePrd = ARRAY_SIZE(normalTable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user