1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_WIFI_ERROR_NO_H 17 #define OHOS_WIFI_ERROR_NO_H 18 19 /* Wifi Native Operation Error Code */ 20 typedef enum WifiErrorNo { 21 WIFI_HAL_OPT_OK = 0, /* Hal operation succeeded */ 22 WIFI_HAL_OPT_FAILED = 1, /* Hal operation failed */ 23 WIFI_HAL_OPT_SCAN_BUSY = 2, /* Scan failed. Scan busy. */ 24 WIFI_HAL_OPT_PBC_OVERLAP = 3, /* WPS PBC mode: overlap */ 25 WIFI_HAL_OPT_SUPPLICANT_NOT_INIT = 4, /* The wpa_supplicant is not initialized or fails to be initialized */ 26 WIFI_HAL_OPT_OPEN_SUPPLICANT_FAILED = 5, /* Failed to enable wpa_supplicant. */ 27 WIFI_HAL_OPT_CONN_SUPPLICANT_FAILED = 6, /* Failed to connect to wpa_supplicant. */ 28 WIFI_HAL_OPT_HOSTAPD_NOT_INIT = 7, /* Hostapd is not initialized or initialization fails. */ 29 WIFI_HAL_OPT_OPEN_HOSTAPD_FAILED = 8, /* Failed to start the hostapd. */ 30 WIFI_HAL_OPT_CONN_HOSTAPD_FAILED = 9, /* Failed to connect to the hostapd. */ 31 WIFI_HAL_OPT_NOT_SUPPORT, 32 WIFI_HAL_OPT_GET_WIFI_COND_FAILED, 33 WIFI_HAL_OPT_BUFFER_TOO_LITTLE, 34 WIFI_HAL_OPT_INPUT_MAC_INVALID, 35 WIFI_HAL_OPT_GET_VENDOR_HAL_FAILED, /* Initialized vendor hal failed. */ 36 WIFI_HAL_OPT_VENDOR_UNKNOWN, 37 WIFI_HAL_OPT_VENDOR_UNINITIALIZED, 38 WIFI_HAL_OPT_VENDOR_NOT_AVAILABLE, 39 WIFI_HAL_OPT_VENDOR_INVALID_ARGS, 40 WIFI_HAL_OPT_VENDOR_INVALID_REQUEST_ID, 41 WIFI_HAL_OPT_VENDOR_TIMED_OUT, 42 WIFI_HAL_OPT_VENDOR_TOO_MANY_REQUESTS, 43 WIFI_HAL_OPT_VENDOR_OUT_OF_MEMORY, 44 WIFI_HAL_OPT_VENDOR_BUSY, 45 WIFI_HAL_OPT_INVALID_PARAM, 46 WIFI_HAL_OPT_GET_P2P_GROUP_INFACE_FAILED, 47 } WifiErrorNo; 48 49 #endif 50