CI: esp_netif tests: Fix netsuite driver layer per wifi optimization changes

esp-wifi introcuded wifi tx optimization in !9147 . Update needed in netsuite to pass the tx data using  function
This commit is contained in:
David Cermak 2020-09-08 11:38:23 +02:00
parent 228adfa6b1
commit 59471c9f3f

View File

@ -22,6 +22,7 @@
// 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_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);
/**
@ -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 = {
.driver_free_rx_buffer = NULL,
.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
};
@ -64,6 +66,19 @@ static esp_err_t netsuite_io_transmit(void *h, void *buffer, size_t len)
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
*