Skip to content

Commit

Permalink
esp32/network_wlan.c: Add Wi-Fi constants.
Browse files Browse the repository at this point in the history
Add WIFI_AUTH_WPA3_ENTERPRISE
and WIFI_AUTH_WPA2_WPA3_ENTERPRISE.

Signed-off-by: IhorNehrutsa <[email protected]>

Co-Authored-By: Daniel van de Giessen <[email protected]>
  • Loading branch information
IhorNehrutsa and DvdGiessen committed Jan 21, 2025
1 parent b4f53a0 commit 30a96b3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ports/esp32/network_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,14 +763,20 @@ static const mp_rom_map_elem_t wlan_if_locals_dict_table[] = {
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
{ MP_ROM_QSTR(MP_QSTR_SEC_DPP), MP_ROM_INT(WIFI_AUTH_DPP) },
#endif
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
{ MP_ROM_QSTR(MP_QSTR_SEC_WPA3_ENTERPRISE), MP_ROM_INT(WIFI_AUTH_WPA3_ENTERPRISE) },
{ MP_ROM_QSTR(MP_QSTR_SEC_WPA2_WPA3_ENTERPRISE), MP_ROM_INT(WIFI_AUTH_WPA2_WPA3_ENTERPRISE) },
#endif

{ MP_ROM_QSTR(MP_QSTR_PM_NONE), MP_ROM_INT(WIFI_PS_NONE) },
{ MP_ROM_QSTR(MP_QSTR_PM_PERFORMANCE), MP_ROM_INT(WIFI_PS_MIN_MODEM) },
{ MP_ROM_QSTR(MP_QSTR_PM_POWERSAVE), MP_ROM_INT(WIFI_PS_MAX_MODEM) },
};
static MP_DEFINE_CONST_DICT(wlan_if_locals_dict, wlan_if_locals_dict_table);

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
_Static_assert(WIFI_AUTH_MAX == 16, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types_generic.h");
#elif ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
_Static_assert(WIFI_AUTH_MAX == 14, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types_generic.h");
#elif ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
_Static_assert(WIFI_AUTH_MAX == 13, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");
Expand Down

0 comments on commit 30a96b3

Please sign in to comment.