Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions source/TR-181/board_sbapi/eth_hal_interface.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/TR-181/board_sbapi/eth_hal_interface.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'source/TR-181/board_sbapi/eth_hal_interface.c' (Match: rdkb/components/opensource/ccsp/CcspEthAgent/rdkb/components/opensource/ccsp/CcspEthAgent/1, 535 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/CcspEthAgent/+archive/RDKB-TEST-RELEASE-1.tar.gz, file: source/TR-181/board_sbapi/eth_hal_interface.c)
* following copyright and licenses apply:
*
* Copyright 2018 RDK Management
Expand Down Expand Up @@ -390,14 +390,15 @@
static BOOL isDeleteAllDone = FALSE;


// CcspTraceInfo(("<EthMonThrd> Iteration Start\n") );
CcspTraceDebug(("<EthMonThrd> Iteration Start, flags: bProcessFurther=%d, isDeleteAllDone=%d\n", bProcessFurther, isDeleteAllDone));
//Get Associated Device Details from HAL. Do nothing if failure case
if(-1 == CcspHalExtSw_getAssociatedDevice( &ulTotalEthDeviceCount, &pstRecvEthDevice ))
{
CcspTraceInfo(("%s %d - Fail to get AssociatedDevice details\n" ,__FUNCTION__,__LINE__ ) );
bProcessFurther = FALSE;
}

CcspTraceDebug(("<EthMonThrd> Total ethernet count from HAL=%lu, flags: bProcessFurther=%d, isDeleteAllDone=%d\n", ulTotalEthDeviceCount, bProcessFurther, isDeleteAllDone));
if( bProcessFurther )
{
/*
Expand Down Expand Up @@ -439,9 +440,10 @@
bProcessFurther = FALSE;
}

CcspTraceDebug(("<EthMonThrd> Handle notification start, flags: bProcessFurther=%d, isDeleteAllDone=%d\n", bProcessFurther, isDeleteAllDone));
if( bProcessFurther )
{
// CcspTraceInfo(("<EthMonThrd> - Host(+) Loop Start\n") );
CcspTraceDebug(("<EthMonThrd> - Host(+) Loop Start\n") );

// Reset isDeleteAllDone variable to proceed further from next iteration
isDeleteAllDone = FALSE;
Expand Down Expand Up @@ -469,6 +471,7 @@
if( 0 == ValidateClient( tmp_mac_id ) )
{
//Delete and send notification
CcspTraceDebug(("<EthMonThrd> - Delete host and send notification, mac:%s\n", tmp_mac_id));
CcspHalExtSw_DeleteHost( &pstRecvEthDevice[ iLoopCount ], eth_device_hashArrayList, TRUE );
continue;
}
Expand All @@ -478,16 +481,18 @@
if ( NULL == CcspHalExtSw_FindHost( &pstRecvEthDevice[ iLoopCount ], eth_device_hashArrayList, NULL ) )
{
//Add and send notification
CcspTraceDebug(("<EthMonThrd> - Add host and send notification, mac:%s\n", tmp_mac_id));
CcspHalExtSw_AddHost( &pstRecvEthDevice[ iLoopCount ], eth_device_hashArrayList, TRUE );
}

//Add in temp hash list and Don't send notification
CcspTraceDebug(("<EthMonThrd> - Add host tmp list, mac:%s\n", tmp_mac_id));
CcspHalExtSw_AddHost( &pstRecvEthDevice[ iLoopCount ], eth_device_hashArrayTempList, FALSE );
}

// CcspTraceInfo(("<EthMonThrd> - Host(+) Loop End\n") );
CcspTraceDebug(("<EthMonThrd> - Host(+) Loop End\n"));

// CcspTraceInfo(("<EthMonThrd> - Host(-) Loop Start\n") );
CcspTraceDebug(("<EthMonThrd> - Host(-) Loop Start\n"));

//Disconnection Case
for( iLoopCount = 0; iLoopCount< ETH_NODE_HASH_SIZE; iLoopCount++ )
Expand All @@ -499,14 +504,16 @@
)
{
//Delete and Need to send notification
CcspTraceDebug(("<EthMonThrd> - Delete and send notification disconnect\n"));
CcspHalExtSw_DeleteHost( eth_device_hashArrayList[ iLoopCount ], eth_device_hashArrayList, TRUE );
}
}

//Delete all hosts from temp hash list
CcspTraceDebug(("<EthMonThrd> - Delete all host tmp list\n"));
CcspHalExtSw_DeleteAllHosts( eth_device_hashArrayTempList, FALSE );

// CcspTraceInfo(("<EthMonThrd> - Host(-) Loop End\n") );
CcspTraceDebug(("<EthMonThrd> - Host(-) Loop End\n"));
}
//Free if memory is valid case
if( NULL != pstRecvEthDevice )
Expand All @@ -516,7 +523,7 @@
}
}

// CcspTraceInfo(("<EthMonThrd> Iteration End\n") );
CcspTraceDebug(("<EthMonThrd> Iteration End\n"));

//Sleep
sleep( ETH_POLLING_PERIOD );
Expand Down
Loading