bugfix: rtt rx event happens two slots after.

This commit is contained in:
Gatsby Van
2023-12-22 01:22:06 +08:00
parent 57dfad7b82
commit 9642a003e0
+11 -1
View File
@@ -918,9 +918,19 @@ int32_t MgmtNet_Routine(L2_INST* instPtr, const L2_RTNE_TABLE_ENTRY* rtneEntry){
if (L2_GetLastFrameType(instPtr) == L2_INTRA_TSYNC_FRAME && L2_GetLastTor(instPtr) == L2_TOR_RX) {
RTT_FsmUpdate(instPtr, L2_TOR_RX);
}
if (rtneEntry->slotType == SLOT_INTRA_TSYNC && torState == L2_TOR_TX) {
if (rtneEntry->slotType == SLOT_INTRA_TSYNC) {
if(torState == L2_TOR_TX) {
RTT_FsmUpdate(instPtr, L2_TOR_TX);
}
else if (torState == L2_TOR_RX)
{
L2_SCHD_EVENT* rttRxEvent = L2_CreatNewSchdEvent(instPtr->schdEventPool, L2_EV_RTT_RECV_UPDATE, true);
if(rttRxEvent == NULL) {
DBG_ERROR("Failed to initialize rtt event.\n");
}
Status = L2_ScheduleEventAfter(instPtr, rttRxEvent, INTRA_TSYNC_SLOTS + 1);
}
}
switch (rtneEntry->slotType) {
case SLOT_INTER_MGMT: