Revert "Pairing fails when IPv6 enabled in SoftAP intf"

This reverts commit 18285e1fc1.
pull/12372/head
adbridge 2020-02-06 11:27:33 +00:00
parent f86022a61d
commit aa298c0769
5 changed files with 0 additions and 67 deletions

View File

@ -565,41 +565,6 @@ nsapi_error_t LWIP::add_ethernet_interface(EMAC &emac, bool default_if, OnboardN
#endif //LWIP_ETHERNET #endif //LWIP_ETHERNET
} }
nsapi_error_t LWIP::remove_ethernet_interface(OnboardNetworkStack::Interface **interface_out)
{
#if LWIP_ETHERNET
if ((interface_out != NULL) && (*interface_out != NULL)) {
Interface *lwip = static_cast<Interface *>(*interface_out);
Interface *node = lwip->list;
if (lwip->list != NULL) {
if (lwip->list == lwip) {
lwip->list = lwip->list->next;
netif_remove(&node->netif);
*interface_out = NULL;
delete node;
} else {
while (node->next != NULL && node->next != lwip) {
node = node->next;
}
if (node->next != NULL && node->next == lwip) {
Interface *remove = node->next;
node->next = node->next->next;
netif_remove(&remove->netif);
*interface_out = NULL;
delete remove;
}
}
}
}
return NSAPI_ERROR_OK;
#else
return NSAPI_ERROR_UNSUPPORTED;
#endif //LWIP_ETHERNET
}
nsapi_error_t LWIP::add_l3ip_interface(L3IP &l3ip, bool default_if, OnboardNetworkStack::Interface **interface_out) nsapi_error_t LWIP::add_l3ip_interface(L3IP &l3ip, bool default_if, OnboardNetworkStack::Interface **interface_out)
{ {

View File

@ -288,14 +288,6 @@ public:
* @param[out] interface_out pointer to stack interface object controlling the L3IP * @param[out] interface_out pointer to stack interface object controlling the L3IP
* @return NSAPI_ERROR_OK on success, or error code * @return NSAPI_ERROR_OK on success, or error code
*/ */
virtual nsapi_error_t remove_ethernet_interface(OnboardNetworkStack::Interface **interface_out);
/** Remove a network interface from IP stack
*
* Removes PPP objects,network interface from stack list, and shutdown device driver.
* @param[out] interface_out pointer to stack interface object controlling the PPP
* @return NSAPI_ERROR_OK on success, or error code
*/
virtual nsapi_error_t remove_l3ip_interface(OnboardNetworkStack::Interface **interface_out); virtual nsapi_error_t remove_l3ip_interface(OnboardNetworkStack::Interface **interface_out);
/** Remove a network interface from IP stack /** Remove a network interface from IP stack

View File

@ -169,11 +169,6 @@ public:
return NSAPI_ERROR_UNSUPPORTED; return NSAPI_ERROR_UNSUPPORTED;
}; };
virtual nsapi_error_t remove_ethernet_interface(Interface **interface_out)
{
return NSAPI_ERROR_OK;
};
virtual nsapi_error_t remove_l3ip_interface(Interface **interface_out) virtual nsapi_error_t remove_l3ip_interface(Interface **interface_out)
{ {
return NSAPI_ERROR_OK; return NSAPI_ERROR_OK;

View File

@ -355,15 +355,6 @@ nsapi_error_t WhdSTAInterface::disconnect()
} }
whd_emac_wifi_link_state_changed(_whd_emac.ifp, WHD_FALSE); whd_emac_wifi_link_state_changed(_whd_emac.ifp, WHD_FALSE);
// remove the interface added in connect
if (_interface) {
nsapi_error_t err = _stack.remove_ethernet_interface(&_interface);
if (err != NSAPI_ERROR_OK) {
return err;
}
_iface_shared.iface_sta = NULL;
}
res = whd_wifi_deregister_event_handler(_whd_emac.ifp, sta_link_update_entry); res = whd_wifi_deregister_event_handler(_whd_emac.ifp, sta_link_update_entry);
if (res != WHD_SUCCESS) { if (res != WHD_SUCCESS) {
return whd_toerror(res); return whd_toerror(res);

View File

@ -201,16 +201,6 @@ int WhdSoftAPInterface::stop(void)
if (res != WHD_SUCCESS) { if (res != WHD_SUCCESS) {
return whd_toerror(res); return whd_toerror(res);
} }
// remove the interface added in start
if (_interface) {
nsapi_error_t err = _stack.remove_ethernet_interface(&_interface);
if (err != NSAPI_ERROR_OK) {
return err;
}
_iface_shared.iface_softap = NULL;
}
return NSAPI_ERROR_OK; return NSAPI_ERROR_OK;
} }