mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-27 04:55:53 +00:00
lwip: Refactor support for L2 pbuf free notification into each driver
Makes it easier to handle different drivers enabled at compile/link time.
This commit is contained in:
@@ -330,6 +330,10 @@ struct netif {
|
||||
u16_t loop_cnt_current;
|
||||
#endif /* LWIP_LOOPBACK_MAX_PBUFS */
|
||||
#endif /* ENABLE_LOOPBACK */
|
||||
|
||||
#if ESP_LWIP
|
||||
void (*l2_buffer_free_notify)(void *user_buf); /* Allows LWIP to notify driver when a L2-supplied pbuf can be freed */
|
||||
#endif
|
||||
};
|
||||
|
||||
#if LWIP_CHECKSUM_CTRL_PER_NETIF
|
||||
|
||||
@@ -105,12 +105,6 @@ typedef enum {
|
||||
/** indicates this pbuf includes a TCP FIN flag */
|
||||
#define PBUF_FLAG_TCP_FIN 0x20U
|
||||
|
||||
#if ESP_LWIP
|
||||
#define PBUF_USER_FLAG_OWNER_NULL 0
|
||||
#define PBUF_USER_FLAG_OWNER_WIFI 1
|
||||
#define PBUF_USER_FLAG_OWNER_ETH 2
|
||||
#endif
|
||||
|
||||
struct pbuf {
|
||||
/** next pbuf in singly linked pbuf chain */
|
||||
struct pbuf *next;
|
||||
@@ -142,10 +136,10 @@ struct pbuf {
|
||||
* the stack itself, or pbuf->next pointers from a chain.
|
||||
*/
|
||||
u16_t ref;
|
||||
|
||||
|
||||
#if ESP_LWIP
|
||||
void *user_buf;
|
||||
u8_t user_flag;
|
||||
struct netif *l2_owner;
|
||||
void *l2_buf;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user