forked from gatsby/df_datalink
*bugfix: CFM_FRAME_SLOTS should only be pull in every 4th slot.
This commit is contained in:
@@ -26,7 +26,9 @@
|
||||
|
||||
/************************** Constant Definitions *****************************/
|
||||
#define ADV_LISTEN_TIMEOUT 40
|
||||
#define CFM_LISTEN_TIMEOUT 40
|
||||
#define CFM_LISTEN_TIMEOUT 25
|
||||
#define ADV_FRAME_SLOTS 4
|
||||
#define CFM_FRAME_SLOTS 4
|
||||
/***************** Macros (In-line Functions) Definitions *********************/
|
||||
|
||||
/**************************** Type Definitions *******************************/
|
||||
@@ -193,15 +195,16 @@ static int32_t Scan_CfmHandler(L2_INST *instPtr)
|
||||
{
|
||||
DBG_WARNING("Cmf timeout, restart net scan from L2_SCAN_INIT_STAGE.\n");
|
||||
L2_Scan_Reset(scanFsmPtr);
|
||||
return SUCCESS;
|
||||
}
|
||||
else
|
||||
if (L2_GetNextSlotNum(instPtr) % CFM_FRAME_SLOTS == 0)
|
||||
{
|
||||
scanFsmPtr->cfmTimeout++; // increase counter.
|
||||
}
|
||||
// using pull mode to receive confirm frame
|
||||
// since first time sync procedure is accomplished in BM stage.
|
||||
// since first time sync procedure is accomplished in ADV stage.
|
||||
Phy_SetMode(instPtr->config.phyInstPtr, PHY_MODE_PULL);
|
||||
L2_SetupNextSlot(instPtr, L2_TOR_RX, L2_CFM_FRAME);
|
||||
scanFsmPtr->cfmTimeout++; // increase counter.
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user