Fix typo: WifiInterface -> WiFiInterface and add missing return.

Default WiFiInterface did not even build. And when it was fixed to build,
it was always returning NULL.
pull/7245/head
Seppo Takalo 2018-06-19 10:47:12 +03:00
parent 412f654c8d
commit 384fc7e778
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,7 @@ MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
* we have at least an access point name.
*/
#ifdef MBED_CONF_NSAPI_DEFAULT_WIFI_SSID
WiFiInterface *wifi = WifiInterface::get_default_instance();
WiFiInterface *wifi = WiFiInterface::get_default_instance();
if (!wifi) {
return NULL;
}
@ -97,6 +97,7 @@ MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
#define concat(x,y) concat_(x,y)
#define SECURITY concat(NSAPI_SECURITY_,MBED_CONF_NSAPI_DEFAULT_WIFI_SECURITY)
wifi->set_credentials(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID, MBED_CONF_NSAPI_DEFAULT_WIFI_PASSWORD, SECURITY);
return wifi;
#else
return NULL;
#endif