Merge pull request #2442 from cesanta/nerr

honor ifp->nerr
This commit is contained in:
Sergio R. Caprile authored and GitHub committed 2023-10-31 12:06:44 -03:00
commit deab6772e8
2 files changed
+2

No files matched your search

+1
View File
@@ -213,6 +213,7 @@ static size_t mg_tcpip_driver_stm32h_tx(const void *buf, size_t len,
MG_ERROR(("Frame too big, %ld", (long) len));
len = 0; // Frame is too big
} else if ((s_txdesc[s_txno][3] & BIT(31))) {
ifp->nerr++;
MG_ERROR(("No free descriptors: %u %08X %08X %08X", s_txno,
s_txdesc[s_txno][3], ETH->DMACSR, ETH->DMACTCR));
for (int i = 0; i < ETH_DESC_CNT; i++) MG_ERROR(("%08X", s_txdesc[i][3]));
+1
View File
@@ -188,6 +188,7 @@ static size_t mg_tcpip_driver_tm4c_tx(const void *buf, size_t len,
MG_ERROR(("Frame too big, %ld", (long) len));
len = 0; // fail
} else if ((s_txdesc[s_txno][0] & BIT(31))) {
ifp->nerr++;
MG_ERROR(("No descriptors available"));
// printf("D0 %lx SR %lx\n", (long) s_txdesc[0][0], (long)
// EMAC->EMACDMARIS);