omit redundant code.
This commit is contained in:
@@ -81,8 +81,6 @@ static int32_t MgmtMsg_Packing(L2_INST* instPtr, BIT_ARRAY* bitarr, L2_MSG_TYPE
|
||||
return EPARAM;
|
||||
}
|
||||
}
|
||||
|
||||
memset(bitarr->words, 0x99, (size_t) (MGMT_MSG_LEN / 8));
|
||||
switch (msgType) {
|
||||
case L2_MSG_TK_INIT:
|
||||
// Series tag
|
||||
@@ -918,9 +916,6 @@ int32_t MgmtNet_Routine(L2_INST* instPtr, const L2_RTNE_TABLE_ENTRY* rtneEntry){
|
||||
}
|
||||
|
||||
// Update RTT FSM if needed.
|
||||
if (L2_GetLastFrameType(instPtr) == L2_INTRA_TSYNC_FRAME && L2_GetLastTor(instPtr) == L2_TOR_RX) {
|
||||
RTT_FsmUpdate(instPtr, L2_TOR_RX);
|
||||
}
|
||||
if (rtneEntry->slotType == L2_SLOT_INTRA_TSYNC) {
|
||||
if(torState == L2_TOR_TX) {
|
||||
RTT_FsmUpdate(instPtr, L2_TOR_TX);
|
||||
@@ -942,7 +937,7 @@ int32_t MgmtNet_Routine(L2_INST* instPtr, const L2_RTNE_TABLE_ENTRY* rtneEntry){
|
||||
L2_SetupNextSlot(instPtr, torState, L2_INTER_MGMT_FRAME);
|
||||
break;
|
||||
case L2_SLOT_INTRA_MGMT:
|
||||
memset(instPtr->sendPktData, 0xAA, INTRA_MGMT_FRAME_LENGTH_MAX);
|
||||
memset(instPtr->sendPktData, 0xAA, L2_PACKET_LEN_MAX);
|
||||
if (torState == L2_TOR_TX) {
|
||||
if(MgmtPkt_Packing(instPtr, MGMTPKT_INTRA_MGMT) != SUCCESS) {
|
||||
Status = FAILURE;
|
||||
@@ -957,7 +952,7 @@ int32_t MgmtNet_Routine(L2_INST* instPtr, const L2_RTNE_TABLE_ENTRY* rtneEntry){
|
||||
break;
|
||||
case L2_SLOT_INTRA_TSYNC:
|
||||
if (torState == L2_TOR_TX) {
|
||||
memset(instPtr->sendPktData, 0xAA, INTRA_RTT_FRAME_LENGTH_MAX);
|
||||
memset(instPtr->sendPktData, 0xAA, L2_PACKET_LEN_MAX);
|
||||
if(L2_GetNodeType(instPtr) == L2_NODE_HEAD){
|
||||
if(MgmtPkt_Packing(instPtr, MGMTPKT_INTRA_RTTREQ) != SUCCESS) {
|
||||
Status = FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user