mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-08-15 14:38:00 +00:00
tcpip adapter refactor: notify pbuf free with netif pointer to make if object-wise
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user