bugfix: correct record shift mechanism.

This commit is contained in:
Gatsby Van
2023-12-22 13:14:21 +08:00
parent 15ed440200
commit 26a912dcc0
+4 -5
View File
@@ -299,10 +299,6 @@ void L2_FrameStateUpdate(L2_INST* instPtr) {
// Update physical layer status.
// Phy_UpdateState(phyRef);
// Frame types shift (last <- curr <- next)
L2_RcdShift(&(instPtr->frame), L2_NONE_FRAME);
L2_RcdShift(&(instPtr->tor), L2_TOR_SUSPEND);
// Update frame state.
if (Phy_IsFrameValid(phyRef) == false) {
L2_DataAvailUpdate(instPtr, false);
@@ -949,7 +945,6 @@ int mgmtFrameRecv = 0;
int svcFrameRecv = 0;
int32_t Linklayer_PktHandler(L2_INST* instPtr, L2_FRAME_TYPE frameType) {
ASSERT(instPtr != NULL);
DBG_INFO("Link layer handling packet...\n");
int32_t Status = SUCCESS;
if (instPtr->dataAvail == false) {
@@ -1148,6 +1143,10 @@ int32_t Linklayer_Proc(L2_INST* instPtr) {
// Update slot number.
L2_UpdateSlotNum(instPtr);
// Frame types shift (last <- curr <- next)
L2_RcdShift(&(instPtr->frame), L2_NONE_FRAME);
L2_RcdShift(&(instPtr->tor), L2_TOR_SUSPEND);
// Update link layer state.
instPtr->mainState = instPtr->nextState;