mirror of https://github.com/ARMmbed/mbed-os.git
Fixing changes to make greentea test mbed-os-tests-netsocket-connectivity pass for target Realtek AMEBA
parent
2e1c2a1cdf
commit
1fcfced203
|
@ -594,11 +594,13 @@ nsapi_error_t mbed_lwip_emac_init(emac_interface_t *emac)
|
|||
// Backwards compatibility with people using DEVICE_EMAC
|
||||
nsapi_error_t mbed_lwip_init(emac_interface_t *emac)
|
||||
{
|
||||
nsapi_error_t ret;
|
||||
nsapi_error_t ret = NSAPI_ERROR_OK;
|
||||
mbed_lwip_core_init();
|
||||
ret = mbed_lwip_emac_init(emac);
|
||||
if (ret == NSAPI_ERROR_OK) {
|
||||
netif_inited = true;
|
||||
if(netif_inited == false){
|
||||
ret = mbed_lwip_emac_init(emac);
|
||||
if (ret == NSAPI_ERROR_OK) {
|
||||
netif_inited = true;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -228,8 +228,9 @@ nsapi_error_t RTWInterface::connect(const char *ssid, const char *pass,
|
|||
nsapi_error_t RTWInterface::disconnect()
|
||||
{
|
||||
char essid[33];
|
||||
|
||||
|
||||
wlan_emac_link_change(false);
|
||||
mbed_lwip_bringdown();
|
||||
if(wifi_is_connected_to_ap() != RTW_SUCCESS)
|
||||
return NSAPI_ERROR_NO_CONNECTION;
|
||||
if(wifi_disconnect()<0){
|
||||
|
|
Loading…
Reference in New Issue