diff --git a/src/core/pbuf.c b/src/core/pbuf.c index f2f1bd11..ed509041 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -780,7 +780,7 @@ pbuf_free(struct pbuf *p) } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) { #if ESP_PBUF if (p->l2_owner != NULL && p->l2_buf != NULL && p->l2_owner->l2_buffer_free_notify != NULL) { - p->l2_owner->l2_buffer_free_notify(p->l2_buf); + p->l2_owner->l2_buffer_free_notify(p->l2_owner, p->l2_buf); } #endif memp_free(MEMP_PBUF, p); diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 43858a68..f72f082e 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -407,7 +407,7 @@ struct netif { #endif /* LWIP_LOOPBACK_MAX_PBUFS */ #endif /* ENABLE_LOOPBACK */ #if ESP_PBUF - void (*l2_buffer_free_notify)(void *user_buf); /* Allows LWIP to notify driver when a L2-supplied pbuf can be freed */ + void (*l2_buffer_free_notify)(struct netif *lwip_netif, void *user_buf); /* Allows LWIP to notify driver when a L2-supplied pbuf can be freed */ ip_addr_t last_ip_addr; /* Store last non-zero ip address */ #endif };