simplified function signature.
This commit is contained in:
@@ -440,7 +440,7 @@ failed:
|
||||
static int32_t Scan_InitScanHandler(L2_INST *instPtr)
|
||||
{
|
||||
ASSERT(instPtr != NULL);
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanNetFSM;
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanFSM;
|
||||
DBG_INFO("** Netsetup - InitScan Procedure (Attempts: %u)**\n", scanFsmPtr->scanCnt);
|
||||
|
||||
if (scanFsmPtr->scanMode == L2_SCAN_INTRA_MODE)
|
||||
@@ -494,7 +494,7 @@ static int32_t Scan_InitScanHandler(L2_INST *instPtr)
|
||||
******************************************************************************/
|
||||
static int32_t Scan_BmAdvtHandler(L2_INST *instPtr)
|
||||
{
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanNetFSM;
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanFSM;
|
||||
DBG_INFO("** Netsetup - BmAdvt Procedure (Timeout: %u) **\n", scanFsmPtr->bmTimeout);
|
||||
|
||||
// if received a valid bm frame.
|
||||
@@ -528,7 +528,7 @@ static int32_t Scan_BmAdvtHandler(L2_INST *instPtr)
|
||||
return FAILURE;
|
||||
}
|
||||
DBG_WARNING("BM timeout, restart net scan from L2_SCAN_INIT_STAGE.\n");
|
||||
ScanNet_Reset(scanFsmPtr);
|
||||
L2_Scan_Reset(scanFsmPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -564,7 +564,7 @@ static int32_t Scan_BmAdvtHandler(L2_INST *instPtr)
|
||||
******************************************************************************/
|
||||
static int32_t Scan_2WAcqHandler(L2_INST *instPtr)
|
||||
{
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanNetFSM;
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanFSM;
|
||||
DBG_INFO("** Netsetup - 2WAcq Procedure (Timeout: %u) **\n", scanFsmPtr->w2acqTimeout);
|
||||
L2_FRAME_TYPE frameType = L2_NONE_FRAME;
|
||||
|
||||
@@ -586,7 +586,7 @@ static int32_t Scan_2WAcqHandler(L2_INST *instPtr)
|
||||
if (scanFsmPtr->w2acqTimeout >= WAY2_ACQ_SLOT_MAX)
|
||||
{
|
||||
DBG_WARNING("2WAcq timeout, restart net scan from L2_SCAN_INIT_STAGE.\n");
|
||||
ScanNet_Reset(scanFsmPtr);
|
||||
L2_Scan_Reset(scanFsmPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -610,11 +610,11 @@ static int32_t Scan_2WAcqHandler(L2_INST *instPtr)
|
||||
* error code
|
||||
*
|
||||
******************************************************************************/
|
||||
int32_t ScanNet_PktHandler(L2_INST *instPtr)
|
||||
int32_t L2_Scan_PktHandler(L2_INST *instPtr)
|
||||
{
|
||||
ASSERT(instPtr != NULL);
|
||||
uint32_t Status;
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanNetFSM;
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanFSM;
|
||||
uint64_t dataChunk;
|
||||
|
||||
DBG_INFO("Scan net handling packet...\n");
|
||||
@@ -865,7 +865,7 @@ failed:
|
||||
* EMAC_MEMORY_ALLOC_ERROR Memory allocate error.
|
||||
*
|
||||
******************************************************************************/
|
||||
int32_t ScanNet_Init(L2_SCAN_FSM **scanFSMPtr)
|
||||
int32_t L2_Scan_Init(L2_SCAN_FSM **scanFSMPtr)
|
||||
{
|
||||
*scanFSMPtr = (L2_SCAN_FSM *)malloc(sizeof(L2_SCAN_FSM));
|
||||
if (*scanFSMPtr == NULL)
|
||||
@@ -873,7 +873,7 @@ int32_t ScanNet_Init(L2_SCAN_FSM **scanFSMPtr)
|
||||
DBG_ERROR("Failed to allocate memory for scanFsmPtr.\n");
|
||||
return EALLOC;
|
||||
}
|
||||
ScanNet_Reset(*scanFSMPtr);
|
||||
L2_Scan_Reset(*scanFSMPtr);
|
||||
return (SUCCESS);
|
||||
}
|
||||
|
||||
@@ -886,7 +886,7 @@ int32_t ScanNet_Init(L2_SCAN_FSM **scanFSMPtr)
|
||||
* @return NONE
|
||||
*
|
||||
******************************************************************************/
|
||||
void ScanNet_Reset(L2_SCAN_FSM *scanFSMPtr)
|
||||
void L2_Scan_Reset(L2_SCAN_FSM *scanFSMPtr)
|
||||
{
|
||||
ASSERT(scanFSMPtr != NULL);
|
||||
scanFSMPtr->isLocked = false;
|
||||
@@ -924,7 +924,7 @@ void ScanNet_Reset(L2_SCAN_FSM *scanFSMPtr)
|
||||
* @return NONE
|
||||
*
|
||||
******************************************************************************/
|
||||
void ScanNet_Destroy(L2_SCAN_FSM *scanFSMPtr)
|
||||
void L2_Scan_Destroy(L2_SCAN_FSM *scanFSMPtr)
|
||||
{
|
||||
free(scanFSMPtr);
|
||||
}
|
||||
@@ -938,12 +938,12 @@ void ScanNet_Destroy(L2_SCAN_FSM *scanFSMPtr)
|
||||
* @return used slot (5ms slot).
|
||||
*
|
||||
******************************************************************************/
|
||||
int32_t ScanNet_Proc(L2_INST *instPtr)
|
||||
int32_t L2_Scan_Proc(L2_INST *instPtr)
|
||||
{
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanNetFSM;
|
||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanFSM;
|
||||
if (L2_GetNodeType(instPtr) == L2_NODE_HEAD)
|
||||
{
|
||||
DBG_ERROR("Only member node needs to execute ScanNet_Proc. \n");
|
||||
DBG_ERROR("Only member node needs to execute L2_Scan_Proc. \n");
|
||||
return FAILURE;
|
||||
}
|
||||
int32_t Status;
|
||||
@@ -983,7 +983,7 @@ int32_t ScanNet_Proc(L2_INST *instPtr)
|
||||
*
|
||||
******************************************************************************/
|
||||
int acqSend = 0;
|
||||
int32_t ScanNet_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
||||
int32_t L2_Scan_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
||||
{
|
||||
ASSERT(instPtr != NULL);
|
||||
L2_TOR_TYPE torState;
|
||||
@@ -1087,7 +1087,7 @@ int32_t ScanNet_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
||||
Status = FAILURE;
|
||||
goto routine_err;
|
||||
}
|
||||
W2ackStateUpdate(instPtr->scanNetFSM, true);
|
||||
W2ackStateUpdate(instPtr->scanFSM, true);
|
||||
acqSend++;
|
||||
}
|
||||
/* Antenna setting (reserved.) */
|
||||
|
||||
Reference in New Issue
Block a user