Left base folder: C:\backup\mcu_plus_sdk_am64x_08_02_00_12 Right base folder: C:\ti\mcu_plus_sdk_am64x_08_02_00_12 --- examples\networking\lwip\enet_lwip_cpsw\test_enet.c 2022-01-27 13:58:12.000000000 +-0530 +++ examples\networking\lwip\enet_lwip_cpsw\test_enet.c 2022-05-26 17:56:26.000000000 +-0530 @@ -175,12 +175,24 @@ *enetType = Board_getEthType(); *instId = 0; *numMacPorts = 1; macPortList[0] = ENET_MAC_PORT_1; } +#if defined(ENET_ENABLE_ICSSG) +/* Need to add dummy function to build*/ +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, + uint32_t coreId, + Enet_MacPort macPort, + uint8_t macAddr[]) +{ + EnetAppUtils_assert(false); + return (-1); +} +#endif + int enet_lwip_example(void *args) { Enet_Type enetType; uint32_t instId; Enet_MacPort macPortList[1]; uint8_t numMacPorts; --- examples\networking\lwip\enet_lwip_icssg\test_enet.c 2022-01-27 13:58:12.000000000 +-0530 +++ examples\networking\lwip\enet_lwip_icssg\test_enet.c 2022-05-26 17:45:30.000000000 +-0530 @@ -182,12 +182,39 @@ *enetType = ENET_ICSSG_DUALMAC; *instId = 2; *numMacPorts = 1; macPortList[0] = ENET_MAC_PORT_1; } +#if defined(ENET_ENABLE_ICSSG) +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, + uint32_t coreId, + Enet_MacPort macPort, + uint8_t macAddr[]) +{ + int32_t status; + Enet_IoctlPrms prms; + IcssgMacPort_SetMacAddressInArgs inArgs; + + memset(&inArgs, 0, sizeof(inArgs)); + + /* Pass custom mac id to memcpy if do not want to use preconfigured MAC */ + memcpy(&inArgs.macAddr[0U], &macAddr[0U], sizeof(inArgs.macAddr)); + inArgs.macPort = macPort; + + ENET_IOCTL_SET_IN_ARGS(&prms, &inArgs); + status = Enet_ioctl(hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms); + if (status != ENET_SOK) + { + EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n", + status); + } + return status; +} +#endif + int enet_lwip_example(void *args) { Enet_Type enetType; uint32_t instId; Enet_MacPort macPortList[1]; uint8_t numMacPorts; --- source\networking\enet\core\lwipif\src\V1\lwipifcb.c 2022-01-27 13:58:13.000000000 +-0530 +++ source\networking\enet\core\lwipif\src\V1\lwipifcb.c 2022-05-26 16:54:20.000000000 +-0530 @@ -314,26 +314,18 @@ EnetAppUtils_printMacAddr(&outArgs->rxInfo.macAddr[0U]); #if defined(ENET_ENABLE_ICSSG) /* Add port MAC entry in case of ICSSG dual MAC */ if (ENET_ICSSG_DUALMAC == gLwipIfCbObj.enetType) { - Enet_IoctlPrms prms; - IcssgMacPort_SetMacAddressInArgs inArgs; - memset(&inArgs, 0, sizeof(inArgs)); - memcpy(&inArgs.macAddr[0U], &outArgs->rxInfo.macAddr[0U], sizeof(inArgs.macAddr)); - inArgs.macPort = gLwipIfCbObj.macPortList[0U]; - - ENET_IOCTL_SET_IN_ARGS(&prms, &inArgs); - status = Enet_ioctl(handleInfo.hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms); - if (status != ENET_SOK) - { - EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n", - status); - } + status = EnetApp_setEnetInterfaceMacAddr(handleInfo.hEnet, + coreId, + gLwipIfCbObj.macPortList[0U], + &outArgs->rxInfo.macAddr[0U]); + EnetAppUtils_assert(status == ENET_SOK); } #endif } void LwipifEnetAppCb_releaseHandle(LwipifEnetAppIf_ReleaseHandleInfo *releaseInfo) --- source\networking\enet\utils\include\enet_apputils.h 2022-01-27 13:58:13.000000000 +-0530 +++ source\networking\enet\utils\include\enet_apputils.h 2022-05-26 16:56:57.000000000 +-0530 @@ -408,12 +408,20 @@ int32_t EnetAppUtils_showRxFlowStats(EnetDma_RxChHandle hRxFlow); int32_t EnetAppUtils_showTxChStats(EnetDma_TxChHandle hTxCh); void EnetApp_getEnetInstInfo(Enet_Type *enetType, uint32_t *instId, Enet_MacPort macPortList[], uint8_t *numMacPorts); + +#if defined(ENET_ENABLE_ICSSG) +int32_t EnetApp_setEnetInterfaceMacAddr(Enet_Handle hEnet, + uint32_t coreId, + Enet_MacPort macPort, + uint8_t macAddr[]); +#endif + void EnetApp_getCpswInitCfg(Enet_Type enetType, uint32_t instId, Cpsw_Cfg *cpswCfg); void EnetApp_initLinkArgs(EnetPer_PortLinkCfg *linkArgs, Enet_MacPort macPort); bool EnetApp_isPortLinked(Enet_Handle hEnet); /* ========================================================================== */