From 4758622331bb753b7e5de82c14156cc883f232cb Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Fri, 20 Sep 2024 20:32:42 +0800 Subject: [PATCH] feat(wifi): support esp32c2 eco4 wifi bringup --- components/esp_wifi/include/esp_wifi_types.h | 1 + components/esp_wifi/src/wifi_init.c | 16 ++++++++++++++++ .../esp_supplicant/src/esp_wifi_driver.h | 2 ++ 3 files changed, 19 insertions(+) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index dc67efd68f..b497c3e61c 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -884,6 +884,7 @@ typedef enum { WIFI_EVENT_STA_BEACON_TIMEOUT, /**< Station beacon timeout */ WIFI_EVENT_CONNECTIONLESS_MODULE_WAKE_INTERVAL_START, /**< Connectionless module wake interval start */ + /* Add next events after this only */ WIFI_EVENT_AP_WPS_RG_SUCCESS, /**< Soft-AP wps succeeds in registrar mode */ WIFI_EVENT_AP_WPS_RG_FAILED, /**< Soft-AP wps fails in registrar mode */ diff --git a/components/esp_wifi/src/wifi_init.c b/components/esp_wifi/src/wifi_init.c index 7361f366fd..0619a4bc23 100644 --- a/components/esp_wifi/src/wifi_init.c +++ b/components/esp_wifi/src/wifi_init.c @@ -579,3 +579,19 @@ void nan_sm_handle_event(void *p1, int p2) } #endif + +#if CONFIG_IDF_TARGET_ESP32C2 +#if CONFIG_ESP32C2_REV_MIN_FULL < 200 +void esp32c2_eco4_rom_ptr_init(void) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ +} +#endif +#endif + +#ifndef CONFIG_ESP_WIFI_SLP_SAMPLE_BEACON_FEATURE +void pm_beacon_offset_funcs_init(void) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ +} +#endif diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h index 6be0bb3358..1556c1d991 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h @@ -57,6 +57,7 @@ typedef enum { } wifi_appie_ram_t; enum { + /* this enum is in C2 ROM, do not change before WPA3_AUTH_OWE */ NONE_AUTH = 0x01, WPA_AUTH_UNSPEC = 0x02, WPA_AUTH_PSK = 0x03, @@ -72,6 +73,7 @@ enum { WPA2_AUTH_ENT_SHA384_SUITE_B = 0x0d, WPA2_AUTH_FT_PSK = 0x0e, WPA3_AUTH_OWE = 0x0f, + /* this enum is in C2 ROM, do not change before WPA3_AUTH_OWE */ WPA2_AUTH_INVALID };