Bringdown interface when stopping softap

The interface should be brought down when stopping softap.
pull/11696/head
Lei Zhang 2019-08-26 12:11:45 -07:00 committed by adbridge
parent 6b75945eaa
commit 46247ca029
1 changed files with 13 additions and 1 deletions

View File

@ -173,7 +173,19 @@ int WhdSoftAPInterface::stop(void)
return NSAPI_ERROR_DHCP_FAILURE; return NSAPI_ERROR_DHCP_FAILURE;
} }
_dhcp_server.reset(); _dhcp_server.reset();
return whd_wifi_stop_ap(_whd_emac.ifp);
// bring down
int err = _interface->bringdown();
if (err) {
return err;
}
// stop softap
whd_result_t res = whd_wifi_stop_ap(_whd_emac.ifp);
if (res != WHD_SUCCESS) {
return whd_toerror(res);
}
return NSAPI_ERROR_OK;
} }
int WhdSoftAPInterface::remove_custom_ie(const whd_custom_ie_info_t *ie_info) int WhdSoftAPInterface::remove_custom_ie(const whd_custom_ie_info_t *ie_info)