mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'bugfix/fix_netsuite_tx_wrap_v4.2' into 'release/v4.2'
CI: esp_netif tests: Fix netsuite driver layer per wifi optimization changes (v4.2) See merge request espressif/esp-idf!11388
This commit is contained in:
@ -22,6 +22,7 @@
|
|||||||
// Internal functions declaration referenced in io object
|
// Internal functions declaration referenced in io object
|
||||||
//
|
//
|
||||||
static esp_err_t netsuite_io_transmit(void *h, void *buffer, size_t len);
|
static esp_err_t netsuite_io_transmit(void *h, void *buffer, size_t len);
|
||||||
|
static esp_err_t netsuite_io_transmit_wrap(void *h, void *buffer, size_t len, void *netstack_buf);
|
||||||
static esp_err_t netsuite_io_attach(esp_netif_t * esp_netif, void * args);
|
static esp_err_t netsuite_io_attach(esp_netif_t * esp_netif, void * args);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,6 +32,7 @@ static esp_err_t netsuite_io_attach(esp_netif_t * esp_netif, void * args);
|
|||||||
const esp_netif_driver_ifconfig_t c_driver_ifconfig = {
|
const esp_netif_driver_ifconfig_t c_driver_ifconfig = {
|
||||||
.driver_free_rx_buffer = NULL,
|
.driver_free_rx_buffer = NULL,
|
||||||
.transmit = netsuite_io_transmit,
|
.transmit = netsuite_io_transmit,
|
||||||
|
.transmit_wrap = netsuite_io_transmit_wrap,
|
||||||
.handle = "netsuite-io-object" // this IO object is a singleton, its handle uses as a name
|
.handle = "netsuite-io-object" // this IO object is a singleton, its handle uses as a name
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -64,6 +66,19 @@ static esp_err_t netsuite_io_transmit(void *h, void *buffer, size_t len)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Transmit wrapper that is typically used for buffer handling and optimization.
|
||||||
|
* Here just wraps the netsuite_io_transmit().
|
||||||
|
*
|
||||||
|
* @note The netstack_buf could be a ref-counted network stack buffer and might be used
|
||||||
|
* by the lower layers directly if an additional handling is practical.
|
||||||
|
* See docs on `esp_wifi_internal_tx_by_ref()` in components/esp_wifi/include/esp_private/wifi.h
|
||||||
|
*/
|
||||||
|
static esp_err_t netsuite_io_transmit_wrap(void *h, void *buffer, size_t len, void *netstack_buf)
|
||||||
|
{
|
||||||
|
return netsuite_io_transmit(h, buffer, len);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Post attach adapter for netsuite i/o
|
* @brief Post attach adapter for netsuite i/o
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user