update scan frame handling schedule
This commit is contained in:
@@ -449,14 +449,18 @@ int32_t L2_Scan_PktHandler(L2_INST *instPtr, uint8_t *msg)
|
|||||||
ASSERT(msg != NULL);
|
ASSERT(msg != NULL);
|
||||||
int32_t Status;
|
int32_t Status;
|
||||||
L2_SCAN_FSM *scanFsmPtr = instPtr->scanFSM;
|
L2_SCAN_FSM *scanFsmPtr = instPtr->scanFSM;
|
||||||
L2_FRAME_TYPE frameType = L2_GetLastOptFrameType(instPtr);
|
L2_FRAME_TYPE frameType = L2_NONE_FRAME;
|
||||||
|
L2_FrameGetChunk(msg, L2_MSG_TYPE, L2_MSG_TYPE_LEN, &frameType);
|
||||||
switch (frameType)
|
switch (frameType)
|
||||||
{
|
{
|
||||||
case L2_SCAN_FRAME:
|
case L2_SCAN_FRAME:
|
||||||
LockStateUpdate(scanFsmPtr, true);
|
|
||||||
StageUpdate(scanFsmPtr, L2_SCAN_ADV_STAGE);
|
|
||||||
case L2_ADV_FRAME:
|
case L2_ADV_FRAME:
|
||||||
{
|
{
|
||||||
|
if (L2_GetLastOptFrameType(instPtr) == L2_SCAN_FRAME)
|
||||||
|
{
|
||||||
|
LockStateUpdate(scanFsmPtr, true);
|
||||||
|
StageUpdate(scanFsmPtr, L2_SCAN_ADV_STAGE);
|
||||||
|
}
|
||||||
if (L2_GetNodeType(instPtr) == L2_NODE_HEAD)
|
if (L2_GetNodeType(instPtr) == L2_NODE_HEAD)
|
||||||
{
|
{
|
||||||
DBG_ERROR("Unexpected call from head node, only member Node can handle L2_SCAN_FRAME and L2_ADV_FRAME.\n");
|
DBG_ERROR("Unexpected call from head node, only member Node can handle L2_SCAN_FRAME and L2_ADV_FRAME.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user