tcpip adapter refactor: notify pbuf free with netif pointer to make if object-wise

This commit is contained in:
David Cermak
2019-11-06 16:54:12 +01:00
parent f2bd195eed
commit ca011b417b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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
};