Hallo,
hope you are well!
I am testing the lwIP example program for ADIN-1110 and I have a problem. There is in lwIP_adin1110_app.c file in the function rxCallback a "netif" and "p" not defineirt!
Is this intended and do I have a problem when porting lwIP stack or these variables should be passed from previous called functions!
MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len);
if (unicast)
{
MIB2_STATS_NETIF_INC(netif, ifinucastpkts);
}
else
{
MIB2_STATS_NETIF_INC(netif, ifinnucastpkts);
}
I tried to comment on these lines and bring Program in the run, but a ping did not work out.
here I also share the whole function:
static void rxCallback(void *pCBParam, uint32_t Event, void *pArg){
adin1110_DeviceHandle_t hDevice = (adin1110_DeviceHandle_t)pCBParam;
adi_eth_BufDesc_t *pRxBufDesc;
pRxBufDesc = (adi_eth_BufDesc_t *)pArg;
uint16_t frmLen = pRxBufDesc->trxSize;
int unicast = ((pRxBufDesc->pBuf[0] & 0x01) == 0);
LINK_STATS_INC(link.recv);
MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len);
if (unicast)
{
MIB2_STATS_NETIF_INC(netif, ifinucastpkts);
}
else
{
MIB2_STATS_NETIF_INC(netif, ifinnucastpkts);
}
writePQ(&pQ[0], pRxBufDesc->pBuf, frmLen);
/* Since we're not doing anything with the Rx buffer in this example, */
/* we are re-submitting it to the queue. */
rxBufDesc[0].pBuf = &rxBuf[0][0];
rxBufDesc[0].bufSize = MAX_FRAME_BUF_SIZE;
rxBufDesc[0].cbFunc = rxCallback;
adin1110_SubmitRxBuffer(hDevice, pRxBufDesc);
}
Have you had this problem too and how can I solve!
Thank you and I look forward to your feedback
Regards,