case NET_ERR_ACTIVE_CONNECTION_EXISTS:
case NET_ERR_ALREADY_EXISTS:
return WIFI_MANAGER_ERROR_ALREADY_EXISTS;
+ case NET_ERR_WIFI_NO_CARRIER:
+ return WIFI_MANAGER_ERROR_NO_CARRIER;
/*Connection Failure Error Codes*/
case NET_ERR_CONNECTION_OUT_OF_RANGE:
return WIFI_MANAGER_ERROR_OUT_OF_RANGE;
static void __scan_cb(wifi_manager_handle_s *wifi_handle,
net_event_info_s *event_cb, bool is_requested)
{
- wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
+ wifi_manager_error_e error_code = __convert_to_ap_error_type(event_cb->Error);
- if (event_cb->Error != NET_ERR_NONE) {
+ if (error_code != WIFI_MANAGER_ERROR_NONE)
WIFI_LOG(WIFI_ERROR, "Scan failed[%d]", event_cb->Error);
- error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
- }
if (wifi_handle->scan_request_cb) {
wifi_handle->scan_request_cb(error_code, wifi_handle->scan_request_user_data);
static void __specific_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
{
- wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
+ wifi_manager_error_e error_code = __convert_to_ap_error_type(event_cb->Error);
__clear_profile_list(&(wifi_handle->specific_profile_iterator));
- if (event_cb->Error != NET_ERR_NONE) {
+ if (error_code != WIFI_MANAGER_ERROR_NONE) {
WIFI_LOG(WIFI_ERROR, "Specific scan failed!, Error [%d]", event_cb->Error);
- error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
} else if (event_cb->Data) {
__update_specific_iterator(wifi_handle, (GSList *)event_cb->Data);
WIFI_LOG(WIFI_INFO, "Specific AP count : %d",
static void __bssid_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
{
- wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
+ wifi_manager_error_e error_code = __convert_to_ap_error_type(event_cb->Error);
__clear_profile_list(&(wifi_handle->bss_profile_iterator));
- if (event_cb->Error != NET_ERR_NONE) {
+ if (error_code != WIFI_MANAGER_ERROR_NONE) {
WIFI_LOG(WIFI_ERROR, "BSSID scan failed!, Error [%d]",
event_cb->Error);
- error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
} else if (event_cb->Data) {
__update_bss_profile_iterator(wifi_handle, (GSList *)event_cb->Data);
WIFI_LOG(WIFI_INFO, "BSS AP count : %d",
static void __netlink_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
{
- wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
+ wifi_manager_error_e error_code = __convert_to_ap_error_type(event_cb->Error);
__clear_profile_list(&(wifi_handle->bss_profile_iterator));
- if (event_cb->Error != NET_ERR_NONE) {
+ if (error_code != WIFI_MANAGER_ERROR_NONE) {
WIFI_LOG(WIFI_ERROR, "NETLINK scan failed!, Error [%d]",
event_cb->Error);
- error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
} else if (event_cb->Data) {
__update_netlink_scan_profile_iterator(wifi_handle, (GSList *)event_cb->Data);
WIFI_LOG(WIFI_INFO, "BSS AP count : %d",
static void __multi_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
{
- wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
+ wifi_manager_error_e error_code = __convert_to_ap_error_type(event_cb->Error);
- if (event_cb->Error != NET_ERR_NONE) {
+ if (error_code != WIFI_MANAGER_ERROR_NONE)
WIFI_LOG(WIFI_ERROR, "Multi Scan failed[%d]", event_cb->Error);
- error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
- }
if (wifi_handle->multi_scan_cb)
wifi_handle->multi_scan_cb(error_code, wifi_handle->multi_scan_user_data);