mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(lwip): esp_netif supports esp_netif_get_netif_impl() for PPP
This commit is contained in:
parent
63e8e01646
commit
d707161881
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@ -29,10 +29,7 @@ extern "C" {
|
|||||||
esp_netif_t* esp_netif_get_handle_from_netif_impl(void *dev);
|
esp_netif_t* esp_netif_get_handle_from_netif_impl(void *dev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns network stack specific implementation handle (if supported)
|
* @brief Returns network stack specific implementation handle
|
||||||
*
|
|
||||||
* Note that it is not supported to acquire PPP netif impl pointer and
|
|
||||||
* this function will return NULL for esp_netif instances configured to PPP mode
|
|
||||||
*
|
*
|
||||||
* @param[in] esp_netif Handle to esp-netif instance
|
* @param[in] esp_netif Handle to esp-netif instance
|
||||||
*
|
*
|
||||||
|
@ -495,8 +495,7 @@ esp_netif_t* esp_netif_get_handle_from_netif_impl(void *dev)
|
|||||||
|
|
||||||
void* esp_netif_get_netif_impl(esp_netif_t *esp_netif)
|
void* esp_netif_get_netif_impl(esp_netif_t *esp_netif)
|
||||||
{
|
{
|
||||||
// get impl ptr only for vanilla lwip impl (ppp_pcb not supported)
|
if (esp_netif) {
|
||||||
if (esp_netif && !ESP_NETIF_IS_POINT2POINT_TYPE(esp_netif, PPP_LWIP_NETIF)) {
|
|
||||||
return esp_netif->lwip_netif;
|
return esp_netif->lwip_netif;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user