Include all reason codes.

This commit is contained in:
anecdata 2021-01-13 23:46:52 -06:00
parent f75bb5c50f
commit d1249fbe47

View File

@ -36,10 +36,39 @@
const mp_obj_type_t wifi_radio_type;
typedef enum {
WIFI_RADIO_ERROR_NONE,
WIFI_RADIO_ERROR_UNKNOWN,
WIFI_RADIO_ERROR_AUTH,
WIFI_RADIO_ERROR_NO_AP_FOUND
// 0 is circuitpython-specific; 1-53 are IEEE; 200+ are Espressif
WIFI_RADIO_ERROR_NONE = 0,
WIFI_RADIO_ERROR_UNSPECIFIED = 1,
WIFI_RADIO_ERROR_AUTH_EXPIRE = 2,
WIFI_RADIO_ERROR_AUTH_LEAVE = 3,
WIFI_RADIO_ERROR_ASSOC_EXPIRE = 4,
WIFI_RADIO_ERROR_ASSOC_TOOMANY = 5,
WIFI_RADIO_ERROR_NOT_AUTHED = 6,
WIFI_RADIO_ERROR_NOT_ASSOCED = 7,
WIFI_RADIO_ERROR_ASSOC_LEAVE = 8,
WIFI_RADIO_ERROR_ASSOC_NOT_AUTHED = 9,
WIFI_RADIO_ERROR_DISASSOC_PWRCAP_BAD = 10,
WIFI_RADIO_ERROR_DISASSOC_SUPCHAN_BAD = 11,
WIFI_RADIO_ERROR_IE_INVALID = 13,
WIFI_RADIO_ERROR_MIC_FAILURE = 14,
WIFI_RADIO_ERROR_4WAY_HANDSHAKE_TIMEOUT = 15,
WIFI_RADIO_ERROR_GROUP_KEY_UPDATE_TIMEOUT = 16,
WIFI_RADIO_ERROR_IE_IN_4WAY_DIFFERS = 17,
WIFI_RADIO_ERROR_GROUP_CIPHER_INVALID = 18,
WIFI_RADIO_ERROR_PAIRWISE_CIPHER_INVALID = 19,
WIFI_RADIO_ERROR_AKMP_INVALID = 20,
WIFI_RADIO_ERROR_UNSUPP_RSN_IE_VERSION = 21,
WIFI_RADIO_ERROR_INVALID_RSN_IE_CAP = 22,
WIFI_RADIO_ERROR_802_1X_AUTH_FAILED = 23,
WIFI_RADIO_ERROR_CIPHER_SUITE_REJECTED = 24,
WIFI_RADIO_ERROR_INVALID_PMKID = 53,
WIFI_RADIO_ERROR_BEACON_TIMEOUT = 200,
WIFI_RADIO_ERROR_NO_AP_FOUND = 201,
WIFI_RADIO_ERROR_AUTH_FAIL = 202,
WIFI_RADIO_ERROR_ASSOC_FAIL = 203,
WIFI_RADIO_ERROR_HANDSHAKE_TIMEOUT = 204,
WIFI_RADIO_ERROR_CONNECTION_FAIL = 205,
WIFI_RADIO_ERROR_AP_TSF_RESET = 206,
} wifi_radio_error_t;
extern bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self);