From 55184e83aa50506ee493a502555eab90fbc394fe Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Fri, 20 Sep 2024 20:32:42 +0800 Subject: [PATCH 1/6] 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 502b40810f..81d184e8df 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -670,6 +670,7 @@ typedef enum { WIFI_EVENT_STA_BEACON_TIMEOUT, /**< ESP32 station beacon timeout */ WIFI_EVENT_CONNECTIONLESS_MODULE_WAKE_INTERVAL_START, /**< ESP32 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 3d78f2a63f..25bfba9794 100644 --- a/components/esp_wifi/src/wifi_init.c +++ b/components/esp_wifi/src/wifi_init.c @@ -428,3 +428,19 @@ void * ieee80211_alloc_proberesp(void *p, int arg) } #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 ee22f58f5d..1777353419 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 }; From c117ea6bfc49ad6ba1711919be9b3caf63c6de93 Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Tue, 6 Aug 2024 19:48:20 +0800 Subject: [PATCH 2/6] fix(wifi): fix esp32c2 eco4 ld --- .../esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld | 74 ++++++++++--------- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 36 ++++----- 2 files changed, 56 insertions(+), 54 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index 90009fc3e2..97412bcc06 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -19,16 +19,16 @@ lmacAdjustTimestamp = 0x40001b10; lmacDiscardMSDU = 0x40001b18; lmacEndFrameExchangeSequence = 0x40001b1c; lmacMSDUAged = 0x40001b28; -lmacSetTxFrame = 0x40001b4c; +//lmacSetTxFrame = 0x40001b4c; pm_check_state = 0x40001b6c; pm_dream = 0x40001b78; pm_on_beacon_rx = 0x40001ba0; -pm_parse_beacon = 0x40001bac; +//pm_parse_beacon = 0x40001bac; pm_process_tim = 0x40001bb0; pm_rx_beacon_process = 0x40001bb4; pm_rx_data_process = 0x40001bb8; pm_sleep = 0x40001bbc; -pm_tbtt_process = 0x40001bc4; +//pm_tbtt_process = 0x40001bc4; ppAssembleAMPDU = 0x40001bcc; ppCalTxAMPDULength = 0x40001bd8; ppRxFragmentProc = 0x40001c28; @@ -38,17 +38,17 @@ rcGetSched = 0x40001c88; rcTxUpdatePer = 0x40001c94; rcUpdateRate = 0x40001c9c; wDev_AppendRxBlocks = 0x40001cdc; -wDev_IndicateFrame = 0x40001cec; +//wDev_IndicateFrame = 0x40001cec; wDev_ProcessFiq = 0x40001d08; wDev_ProcessRxSucData = 0x40001d0c; -ppProcTxDone = 0x40001d1c; +//ppProcTxDone = 0x40001d1c; pm_tx_data_done_process = 0x40001d20; ppMapWaitTxq = 0x40001d28; lmacDiscardFrameExchangeSequence = 0x40001d70; lmacDisableTransmit = 0x40001d74; lmacProcessTxTimeout = 0x40001d78; lmacProcessTxSuccess = 0x40001d7c; -lmacProcessTxComplete = 0x40001d8c; +//lmacProcessTxComplete = 0x40001d8c; lmacProcessTxopQComplete = 0x40001dc0; lmacInit = 0x40001dc8; hal_init = 0x40001dd0; @@ -57,15 +57,15 @@ lmac_stop_hw_txq = 0x40001df8; ppTxFragmentProc = 0x40001e08; esf_buf_setup = 0x40001e0c; hal_crypto_set_key_entry = 0x40001e18; -pm_start = 0x40001e34; -pm_stop = 0x40001e38; +//pm_start = 0x40001e34; +//pm_stop = 0x40001e38; hal_set_sta_tbtt = 0x40001e4c; -pm_update_next_tbtt = 0x40001e50; +//pm_update_next_tbtt = 0x40001e50; pm_set_sleep_type = 0x40001e54; pm_tx_null_data_done_process = 0x40001eb0; -pm_tx_data_process = 0x40001eb4; -pm_attach = 0x40001eb8; -pm_coex_schm_process = 0x40001ebc; +//pm_tx_data_process = 0x40001eb4; +//pm_attach = 0x40001eb8; +//pm_coex_schm_process = 0x40001ebc; pm_on_probe_resp_rx = 0x40001ecc; pm_send_probe_stop = 0x40001edc; hal_sniffer_rx_set_promis = 0x40001ef4; @@ -78,6 +78,7 @@ tsf_hal_set_tbtt_start_time = 0x40001f38; ***************************************/ /* Functions */ +/* ieee80211_ampdu_reorder = 0x40001fb0; ieee80211_encap_esfbuf = 0x40001fb8; ieee80211_output_process = 0x40001fc4; @@ -86,39 +87,40 @@ ieee80211_classify = 0x40001fe0; ieee80211_crypto_decap = 0x40001ff8; ieee80211_ccmp_decrypt = 0x4000200c; ieee80211_ccmp_encrypt = 0x40002010; -ieee80211_send_action_vendor_spec = 0x40002034; -ieee80211_send_mgmt = 0x40002038; -ieee80211_auth_construct = 0x4000203c; +//ieee80211_send_action_vendor_spec = 0x40002034; +//ieee80211_send_mgmt = 0x40002038; +//ieee80211_auth_construct = 0x4000203c; ieee80211_deauth_construct = 0x40002040; ieee80211_disassoc_construct = 0x40002044; -ieee80211_add_xrates = 0x40002058; -ieee80211_assoc_req_construct = 0x40002060; +//ieee80211_add_xrates = 0x40002058; +//ieee80211_assoc_req_construct = 0x40002060; ieee80211_assoc_resp_construct = 0x40002064; ieee80211_timer_process = 0x4000208c; -cnx_coexist_timeout = 0x40002090; -sta_recv_mgmt = 0x40002094; -ieee80211_send_probereq = 0x4000209c; -sta_auth_open = 0x400020a0; -sta_auth_sae = 0x400020a8; -cnx_coexist_timeout_process = 0x400020ac; -ieee80211_add_extcap = 0x400020cc; -ieee80211_alloc_proberesp = 0x400020d8; +//cnx_coexist_timeout = 0x40002090; +//sta_recv_mgmt = 0x40002094; +//ieee80211_send_probereq = 0x4000209c; +//sta_auth_open = 0x400020a0; +//sta_auth_sae = 0x400020a8; +//cnx_coexist_timeout_process = 0x400020ac; +//ieee80211_add_extcap = 0x400020cc; +//ieee80211_alloc_proberesp = 0x400020d8; esp_wifi_80211_tx = 0x400020f8; ieee80211_crypto_aes_128_cmac_decrypt = 0x40002104; ieee80211_output_do = 0x4000210c; ieee80211_send_nulldata = 0x40002110; -ieee80211_setup_robust_mgmtframe = 0x40002114; -ieee80211_mgmt_output = 0x40002118; +//ieee80211_setup_robust_mgmtframe = 0x40002114; +//ieee80211_mgmt_output = 0x40002118; ieee80211_send_deauth = 0x40002120; -ieee80211_tx_mgt_cb = 0x4000212c; +//ieee80211_tx_mgt_cb = 0x4000212c; sta_rx_csa = 0x40002134; -sta_send_sa_query_req = 0x40002138; -sta_send_sa_query_resp = 0x4000213c; -sta_recv_sa_query_req = 0x40002140; -sta_recv_sa_query_resp = 0x40002144; -ieee80211_parse_beacon = 0x40002148; +//sta_send_sa_query_req = 0x40002138; +//sta_send_sa_query_resp = 0x4000213c; +//sta_recv_sa_query_req = 0x40002140; +//sta_recv_sa_query_resp = 0x40002144; +//ieee80211_parse_beacon = 0x40002148; ieee80211_match_security = 0x40002154; -ieee80211_parse_rsn = 0x4000215c; +//ieee80211_parse_rsn = 0x4000215c; +*/ /* Data (.data, .bss, .rodata) */ s_sa_query_retries = 0x3fcdfad8; s_sa_query_success = 0x3fcdfad5; @@ -177,7 +179,7 @@ g_authmode_threshold_failure_ptr = 0x3fcdfa68; ***************************************/ /* Functions */ -pm_enable_dream_timer = 0x40003030; +//pm_enable_dream_timer = 0x40003030; pm_handle_tbtt_interval = 0x40003034; hal_set_sta_light_sleep_wake_ahead_time = 0x40003038; hal_get_time_to_sta_next_tbtt = 0x4000303c; @@ -199,7 +201,7 @@ pm_beacon_offset_get_expect = 0x40003078; pm_beacon_offset_get_params = 0x4000307c; pm_beacon_offset_sample_start = 0x40003080; pm_beacon_offset_sample = 0x40003084; -pm_beacon_offset_reset = 0x40003088; +//pm_beacon_offset_reset = 0x40003088; pm_beacon_offset_is_sampling = 0x4000308c; pm_beacon_offset_is_enabled = 0x40003090; pm_beacon_offset_configure = 0x40003094; diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 9d61a481f3..7a68535245 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -616,7 +616,7 @@ pm_on_tbtt = 0x40001ba8; pm_rx_data_process = 0x40001bb8; /*pm_sleep = 0x40001bbc;*/ pm_sleep_for = 0x40001bc0; -pm_tbtt_process = 0x40001bc4; +//pm_tbtt_process = 0x40001bc4; ppAMPDU2Normal = 0x40001bc8; /*ppAssembleAMPDU = 0x40001bcc;*/ ppCalFrameTimes = 0x40001bd0; @@ -671,8 +671,8 @@ rcSetTxAmpduLimit = 0x40001c90; /* rcTxUpdatePer = 0x40001c94;*/ rcUpdateAckSnr = 0x40001c98; /*rcUpdateRate = 0x40001c9c;*/ -rcUpdateTxDone = 0x40001ca0; -rcUpdateTxDoneAmpdu2 = 0x40001ca4; +//rcUpdateTxDone = 0x40001ca0; +//rcUpdateTxDoneAmpdu2 = 0x40001ca4; rcUpSched = 0x40001ca8; rssi_margin = 0x40001cac; rx11NRate2AMPDULimit = 0x40001cb0; @@ -702,7 +702,7 @@ wdev_mac_sleep = 0x40001d04; wdevProcessRxSucDataAll = 0x40001d10; wdev_csi_len_align = 0x40001d14; ppDequeueTxDone_Locked = 0x40001d18; -ppProcTxDone = 0x40001d1c; +//ppProcTxDone = 0x40001d1c; /*pm_tx_data_done_process = 0x40001d20;*/ config_is_cache_tx_buf_enabled = 0x40001d24; /* ppMapWaitTxq = 0x40001d28; */ @@ -730,7 +730,7 @@ hal_mac_get_txq_pmd = 0x40001d6c; lmacProcessCollision = 0x40001d80; lmacProcessTxRtsError = 0x40001d84; lmacProcessCtsTimeout = 0x40001d88; -lmacProcessTxComplete = 0x40001d8c; +//lmacProcessTxComplete = 0x40001d8c; lmacProcessAckTimeout = 0x40001d90; lmacProcessTxError = 0x40001d94; lmacProcessTxseckiderr = 0x40001d98; @@ -799,7 +799,7 @@ dbg_lmac_rxtx_statis_dump = 0x40001e90; dbg_lmac_hw_statis_dump = 0x40001e94; dbg_lmac_diag_statis_dump = 0x40001e98; dbg_lmac_ps_statis_dump = 0x40001e9c; -pp_timer_do_process = 0x40001ea0; +//pp_timer_do_process = 0x40001ea0; rcUpdateAMPDUParam = 0x40001ea4; rcUpdatePhyMode = 0x40001ea8; rcGetHighestRateIdx = 0x40001eac; @@ -969,12 +969,12 @@ wep_encap = 0x40002024; wep_decap = 0x40002028; dbg_hmac_rxtx_statis_dump = 0x4000202c; dbg_hmac_statis_dump = 0x40002030; -ieee80211_send_action_vendor_spec = 0x40002034; +//ieee80211_send_action_vendor_spec = 0x40002034; ieee80211_vnd_lora_ie_size = 0x40002048; ieee80211_vnd_ie_size = 0x4000204c; ieee80211_add_ssid = 0x40002050; ieee80211_add_rates = 0x40002054; -ieee80211_add_xrates = 0x40002058; +//ieee80211_add_xrates = 0x40002058; ieee80211_is_ht_cipher = 0x4000205c; ieee80211_setup_lr_rates = 0x40002068; ieee80211_ht_node_init = 0x4000206c; @@ -986,12 +986,12 @@ ieee80211_sta_is_connected = 0x40002080; current_task_is_wifi_task = 0x40002084; wifi_get_init_state = 0x40002088; /* ieee80211_timer_process = 0x4000208c;*/ -cnx_coexist_timeout = 0x40002090; +//cnx_coexist_timeout = 0x40002090; /* sta_recv_mgmt = 0x40002094;*/ ieee80211_send_setup = 0x40002098; /* ieee80211_send_probereq = 0x4000209c; */ sta_auth_shared = 0x400020a4; -cnx_coexist_timeout_process = 0x400020ac; +//cnx_coexist_timeout_process = 0x400020ac; ieee80211_alloc_challenge = 0x400020b0; cnx_assoc_timeout = 0x400020b4; ieee80211_vnd_ie_set = 0x400020b8; @@ -999,7 +999,7 @@ ieee80211_vnd_lora_ie_set = 0x400020bc; ieee80211_add_wme_param = 0x400020c0; ieee80211_add_dsparams = 0x400020c4; ieee80211_add_csa = 0x400020c8; -ieee80211_add_extcap = 0x400020cc; +//ieee80211_add_extcap = 0x400020cc; ieee80211_regdomain_get_country = 0x400020d0; ieee80211_add_countryie = 0x400020d4; ieee80211_amsdu_adjust_head = 0x400020dc; @@ -1016,12 +1016,12 @@ ieee80211_alloc_tx_buf = 0x40002108; /* ieee80211_send_nulldata = 0x40002110; */ /* ieee80211_setup_robust_mgmtframe = 0x40002114; */ ieee80211_encap_null_data = 0x4000211c; -ieee80211_send_deauth = 0x40002120; +//ieee80211_send_deauth = 0x40002120; ieee80211_alloc_deauth = 0x40002124; ieee80211_send_proberesp = 0x40002128; ieee80211_getcapinfo = 0x40002130; -sta_rx_csa = 0x40002134; -sta_recv_sa_query_resp = 0x40002144; +//sta_rx_csa = 0x40002134; +//sta_recv_sa_query_resp = 0x40002144; ieee80211_set_max_rate = 0x4000214c; ic_set_sta = 0x40002150; ieee80211_parse_wpa = 0x40002158; @@ -1048,13 +1048,13 @@ s_wifi_task_hdl = 0x3fcdfaec; in_rssi_adjust = 0x3fcdfae8; rssi_saved = 0x3fcdfae0; rssi_index = 0x3fcdfadc; -s_sa_query_retries = 0x3fcdfad8; -s_sa_query_success = 0x3fcdfad5; +//s_sa_query_retries = 0x3fcdfad8; +//s_sa_query_success = 0x3fcdfad5; g_sta_connected_flag = 0x3fcdfad4; wpa_crypto_funcs_ptr = 0x3fcdfad0; s_netstack_ref = 0x3fcdfacc; sta_csa_timer_ptr = 0x3fcdfac8; -s_trans_id = 0x3fcdfac4; +//s_trans_id = 0x3fcdfac4; /*************************************** @@ -1079,7 +1079,7 @@ coex_hw_timer_set = 0x4000219c; coex_schm_interval_set = 0x400021a0; coex_schm_lock = 0x400021a4; coex_schm_unlock = 0x400021a8; -coex_status_get = 0x400021ac; +//coex_status_get = 0x400021ac; coex_wifi_release = 0x400021b0; esp_coex_ble_conn_dynamic_prio_get = 0x400021b4; /*coex_hw_timer_tick_get = 0x400021b8;*/ From 28621c5d7d7f22c6f0dd022b5f4b85686f3b908e Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Fri, 8 Nov 2024 17:17:16 +0800 Subject: [PATCH 3/6] ix(wifi): fix esp32c2 eco4 in v5.0 extra ld issue --- .../esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index 97412bcc06..4e8749ef85 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -13,7 +13,7 @@ esf_buf_alloc = 0x40001ae0; esf_buf_alloc_dynamic = 0x40001ae4; esf_buf_recycle = 0x40001ae8; -hal_mac_tx_set_ppdu = 0x40001af8; +//hal_mac_tx_set_ppdu = 0x40001af8; ic_mac_deinit = 0x40001b00; lmacAdjustTimestamp = 0x40001b10; lmacDiscardMSDU = 0x40001b18; @@ -29,7 +29,7 @@ pm_rx_beacon_process = 0x40001bb4; pm_rx_data_process = 0x40001bb8; pm_sleep = 0x40001bbc; //pm_tbtt_process = 0x40001bc4; -ppAssembleAMPDU = 0x40001bcc; +//ppAssembleAMPDU = 0x40001bcc; ppCalTxAMPDULength = 0x40001bd8; ppRxFragmentProc = 0x40001c28; ppRxPkt = 0x40001c2c; @@ -42,32 +42,32 @@ wDev_AppendRxBlocks = 0x40001cdc; wDev_ProcessFiq = 0x40001d08; wDev_ProcessRxSucData = 0x40001d0c; //ppProcTxDone = 0x40001d1c; -pm_tx_data_done_process = 0x40001d20; +//pm_tx_data_done_process = 0x40001d20; ppMapWaitTxq = 0x40001d28; lmacDiscardFrameExchangeSequence = 0x40001d70; lmacDisableTransmit = 0x40001d74; -lmacProcessTxTimeout = 0x40001d78; +//lmacProcessTxTimeout = 0x40001d78; lmacProcessTxSuccess = 0x40001d7c; //lmacProcessTxComplete = 0x40001d8c; lmacProcessTxopQComplete = 0x40001dc0; lmacInit = 0x40001dc8; -hal_init = 0x40001dd0; -mac_txrx_init = 0x40001de0; +//hal_init = 0x40001dd0; +//mac_txrx_init = 0x40001de0; lmac_stop_hw_txq = 0x40001df8; -ppTxFragmentProc = 0x40001e08; +//ppTxFragmentProc = 0x40001e08; esf_buf_setup = 0x40001e0c; -hal_crypto_set_key_entry = 0x40001e18; +//hal_crypto_set_key_entry = 0x40001e18; //pm_start = 0x40001e34; //pm_stop = 0x40001e38; hal_set_sta_tbtt = 0x40001e4c; //pm_update_next_tbtt = 0x40001e50; -pm_set_sleep_type = 0x40001e54; -pm_tx_null_data_done_process = 0x40001eb0; +//pm_set_sleep_type = 0x40001e54; +//pm_tx_null_data_done_process = 0x40001eb0; //pm_tx_data_process = 0x40001eb4; //pm_attach = 0x40001eb8; //pm_coex_schm_process = 0x40001ebc; -pm_on_probe_resp_rx = 0x40001ecc; -pm_send_probe_stop = 0x40001edc; +//pm_on_probe_resp_rx = 0x40001ecc; +//pm_send_probe_stop = 0x40001edc; hal_sniffer_rx_set_promis = 0x40001ef4; hal_sniffer_set_promis_misc_pkt = 0x40001efc; tsf_hal_set_tbtt_start_time = 0x40001f38; @@ -78,11 +78,11 @@ tsf_hal_set_tbtt_start_time = 0x40001f38; ***************************************/ /* Functions */ -/* ieee80211_ampdu_reorder = 0x40001fb0; ieee80211_encap_esfbuf = 0x40001fb8; ieee80211_output_process = 0x40001fc4; sta_input = 0x40001fcc; +/* ieee80211_classify = 0x40001fe0; ieee80211_crypto_decap = 0x40001ff8; ieee80211_ccmp_decrypt = 0x4000200c; @@ -167,8 +167,8 @@ systimer_hal_set_tick_rate_ops = 0x40002eac; /* Functions */ sta_reset_beacon_timeout = 0x40003024; -ieee80211_post_hmac_tx = 0x40003028; -sta_rx_eapol = 0x4000302c; +//ieee80211_post_hmac_tx = 0x40003028; +//sta_rx_eapol = 0x4000302c; /* Data (.data, .bss, .rodata) */ len_dh_ie_ptr = 0x3fcdfa6c; g_authmode_threshold_failure_ptr = 0x3fcdfa68; @@ -189,11 +189,11 @@ pm_beacon_monitor_tbtt_stop = 0x40003048; pm_beacon_monitor_timeout_process = 0x4000304c; pm_beacon_monitor_tbtt_timeout_process = 0x40003050; pm_on_tsf_timer = 0x40003054; -pp_coex_tx_release = 0x40003058; +//pp_coex_tx_release = 0x40003058; ppRegressAmpdu = 0x4000305c; trc_onPPTxDone = 0x40003060; is_fragmented_pkt = 0x40003064; -pm_tx_null_data_done_quick_wake_process = 0x40003068; +//pm_tx_null_data_done_quick_wake_process = 0x40003068; pm_enable_beacon_monitor_timer = 0x4000306c; pm_disable_beacon_monitor_timer = 0x40003070; pm_beacon_offset_get_average = 0x40003074; @@ -201,7 +201,7 @@ pm_beacon_offset_get_expect = 0x40003078; pm_beacon_offset_get_params = 0x4000307c; pm_beacon_offset_sample_start = 0x40003080; pm_beacon_offset_sample = 0x40003084; -//pm_beacon_offset_reset = 0x40003088; +pm_beacon_offset_reset = 0x40003088; pm_beacon_offset_is_sampling = 0x4000308c; pm_beacon_offset_is_enabled = 0x40003090; pm_beacon_offset_configure = 0x40003094; From e56f427065555f3c148dc34fed76f50408c0f308 Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Tue, 19 Nov 2024 15:12:06 +0800 Subject: [PATCH 4/6] fix(wifi): put more useful rom code in used --- .../esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld | 42 +++++++++---------- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 14 +++---- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index 4e8749ef85..1637bc12f7 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -13,7 +13,7 @@ esf_buf_alloc = 0x40001ae0; esf_buf_alloc_dynamic = 0x40001ae4; esf_buf_recycle = 0x40001ae8; -//hal_mac_tx_set_ppdu = 0x40001af8; +hal_mac_tx_set_ppdu = 0x40001af8; ic_mac_deinit = 0x40001b00; lmacAdjustTimestamp = 0x40001b10; lmacDiscardMSDU = 0x40001b18; @@ -29,7 +29,7 @@ pm_rx_beacon_process = 0x40001bb4; pm_rx_data_process = 0x40001bb8; pm_sleep = 0x40001bbc; //pm_tbtt_process = 0x40001bc4; -//ppAssembleAMPDU = 0x40001bcc; +ppAssembleAMPDU = 0x40001bcc; ppCalTxAMPDULength = 0x40001bd8; ppRxFragmentProc = 0x40001c28; ppRxPkt = 0x40001c2c; @@ -41,33 +41,33 @@ wDev_AppendRxBlocks = 0x40001cdc; //wDev_IndicateFrame = 0x40001cec; wDev_ProcessFiq = 0x40001d08; wDev_ProcessRxSucData = 0x40001d0c; -//ppProcTxDone = 0x40001d1c; -//pm_tx_data_done_process = 0x40001d20; +ppProcTxDone = 0x40001d1c; +pm_tx_data_done_process = 0x40001d20; ppMapWaitTxq = 0x40001d28; lmacDiscardFrameExchangeSequence = 0x40001d70; lmacDisableTransmit = 0x40001d74; -//lmacProcessTxTimeout = 0x40001d78; +lmacProcessTxTimeout = 0x40001d78; lmacProcessTxSuccess = 0x40001d7c; -//lmacProcessTxComplete = 0x40001d8c; +lmacProcessTxComplete = 0x40001d8c; lmacProcessTxopQComplete = 0x40001dc0; lmacInit = 0x40001dc8; -//hal_init = 0x40001dd0; -//mac_txrx_init = 0x40001de0; +hal_init = 0x40001dd0; +mac_txrx_init = 0x40001de0; lmac_stop_hw_txq = 0x40001df8; -//ppTxFragmentProc = 0x40001e08; +ppTxFragmentProc = 0x40001e08; esf_buf_setup = 0x40001e0c; -//hal_crypto_set_key_entry = 0x40001e18; +hal_crypto_set_key_entry = 0x40001e18; //pm_start = 0x40001e34; //pm_stop = 0x40001e38; hal_set_sta_tbtt = 0x40001e4c; //pm_update_next_tbtt = 0x40001e50; -//pm_set_sleep_type = 0x40001e54; -//pm_tx_null_data_done_process = 0x40001eb0; +pm_set_sleep_type = 0x40001e54; +pm_tx_null_data_done_process = 0x40001eb0; //pm_tx_data_process = 0x40001eb4; //pm_attach = 0x40001eb8; //pm_coex_schm_process = 0x40001ebc; -//pm_on_probe_resp_rx = 0x40001ecc; -//pm_send_probe_stop = 0x40001edc; +pm_on_probe_resp_rx = 0x40001ecc; +pm_send_probe_stop = 0x40001edc; hal_sniffer_rx_set_promis = 0x40001ef4; hal_sniffer_set_promis_misc_pkt = 0x40001efc; tsf_hal_set_tbtt_start_time = 0x40001f38; @@ -82,13 +82,12 @@ ieee80211_ampdu_reorder = 0x40001fb0; ieee80211_encap_esfbuf = 0x40001fb8; ieee80211_output_process = 0x40001fc4; sta_input = 0x40001fcc; -/* ieee80211_classify = 0x40001fe0; ieee80211_crypto_decap = 0x40001ff8; ieee80211_ccmp_decrypt = 0x4000200c; ieee80211_ccmp_encrypt = 0x40002010; //ieee80211_send_action_vendor_spec = 0x40002034; -//ieee80211_send_mgmt = 0x40002038; +ieee80211_send_mgmt = 0x40002038; //ieee80211_auth_construct = 0x4000203c; ieee80211_deauth_construct = 0x40002040; ieee80211_disassoc_construct = 0x40002044; @@ -98,7 +97,7 @@ ieee80211_assoc_resp_construct = 0x40002064; ieee80211_timer_process = 0x4000208c; //cnx_coexist_timeout = 0x40002090; //sta_recv_mgmt = 0x40002094; -//ieee80211_send_probereq = 0x4000209c; +ieee80211_send_probereq = 0x4000209c; //sta_auth_open = 0x400020a0; //sta_auth_sae = 0x400020a8; //cnx_coexist_timeout_process = 0x400020ac; @@ -120,7 +119,6 @@ sta_rx_csa = 0x40002134; //ieee80211_parse_beacon = 0x40002148; ieee80211_match_security = 0x40002154; //ieee80211_parse_rsn = 0x4000215c; -*/ /* Data (.data, .bss, .rodata) */ s_sa_query_retries = 0x3fcdfad8; s_sa_query_success = 0x3fcdfad5; @@ -167,8 +165,8 @@ systimer_hal_set_tick_rate_ops = 0x40002eac; /* Functions */ sta_reset_beacon_timeout = 0x40003024; -//ieee80211_post_hmac_tx = 0x40003028; -//sta_rx_eapol = 0x4000302c; +ieee80211_post_hmac_tx = 0x40003028; +sta_rx_eapol = 0x4000302c; /* Data (.data, .bss, .rodata) */ len_dh_ie_ptr = 0x3fcdfa6c; g_authmode_threshold_failure_ptr = 0x3fcdfa68; @@ -189,11 +187,11 @@ pm_beacon_monitor_tbtt_stop = 0x40003048; pm_beacon_monitor_timeout_process = 0x4000304c; pm_beacon_monitor_tbtt_timeout_process = 0x40003050; pm_on_tsf_timer = 0x40003054; -//pp_coex_tx_release = 0x40003058; +pp_coex_tx_release = 0x40003058; ppRegressAmpdu = 0x4000305c; trc_onPPTxDone = 0x40003060; is_fragmented_pkt = 0x40003064; -//pm_tx_null_data_done_quick_wake_process = 0x40003068; +pm_tx_null_data_done_quick_wake_process = 0x40003068; pm_enable_beacon_monitor_timer = 0x4000306c; pm_disable_beacon_monitor_timer = 0x40003070; pm_beacon_offset_get_average = 0x40003074; diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 7a68535245..75cea54bd4 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -702,7 +702,7 @@ wdev_mac_sleep = 0x40001d04; wdevProcessRxSucDataAll = 0x40001d10; wdev_csi_len_align = 0x40001d14; ppDequeueTxDone_Locked = 0x40001d18; -//ppProcTxDone = 0x40001d1c; +ppProcTxDone = 0x40001d1c; /*pm_tx_data_done_process = 0x40001d20;*/ config_is_cache_tx_buf_enabled = 0x40001d24; /* ppMapWaitTxq = 0x40001d28; */ @@ -730,7 +730,7 @@ hal_mac_get_txq_pmd = 0x40001d6c; lmacProcessCollision = 0x40001d80; lmacProcessTxRtsError = 0x40001d84; lmacProcessCtsTimeout = 0x40001d88; -//lmacProcessTxComplete = 0x40001d8c; +lmacProcessTxComplete = 0x40001d8c; lmacProcessAckTimeout = 0x40001d90; lmacProcessTxError = 0x40001d94; lmacProcessTxseckiderr = 0x40001d98; @@ -771,7 +771,7 @@ hal_crypto_clr_key_entry = 0x40001e20; config_get_wifi_task_stack_size = 0x40001e24; pp_create_task = 0x40001e28; hal_set_sta_tsf_wakeup = 0x40001e2c; -hal_set_rx_beacon_pti = 0x40001e30; +//hal_set_rx_beacon_pti = 0x40001e30; /* pm_start = 0x40001e34; */ /* pm_stop = 0x40001e38; */ hal_disable_sta_tbtt = 0x40001e3c; @@ -799,7 +799,7 @@ dbg_lmac_rxtx_statis_dump = 0x40001e90; dbg_lmac_hw_statis_dump = 0x40001e94; dbg_lmac_diag_statis_dump = 0x40001e98; dbg_lmac_ps_statis_dump = 0x40001e9c; -//pp_timer_do_process = 0x40001ea0; +pp_timer_do_process = 0x40001ea0; rcUpdateAMPDUParam = 0x40001ea4; rcUpdatePhyMode = 0x40001ea8; rcGetHighestRateIdx = 0x40001eac; @@ -1016,11 +1016,11 @@ ieee80211_alloc_tx_buf = 0x40002108; /* ieee80211_send_nulldata = 0x40002110; */ /* ieee80211_setup_robust_mgmtframe = 0x40002114; */ ieee80211_encap_null_data = 0x4000211c; -//ieee80211_send_deauth = 0x40002120; +ieee80211_send_deauth = 0x40002120; ieee80211_alloc_deauth = 0x40002124; ieee80211_send_proberesp = 0x40002128; ieee80211_getcapinfo = 0x40002130; -//sta_rx_csa = 0x40002134; +sta_rx_csa = 0x40002134; //sta_recv_sa_query_resp = 0x40002144; ieee80211_set_max_rate = 0x4000214c; ic_set_sta = 0x40002150; @@ -1079,7 +1079,7 @@ coex_hw_timer_set = 0x4000219c; coex_schm_interval_set = 0x400021a0; coex_schm_lock = 0x400021a4; coex_schm_unlock = 0x400021a8; -//coex_status_get = 0x400021ac; +coex_status_get = 0x400021ac; coex_wifi_release = 0x400021b0; esp_coex_ble_conn_dynamic_prio_get = 0x400021b4; /*coex_hw_timer_tick_get = 0x400021b8;*/ From c9102147d1a41e01adf4160a90d4c5d46fdbf4df Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Wed, 27 Nov 2024 11:13:45 +0800 Subject: [PATCH 5/6] fix(wifi): fix esp32c2 eco4 ci issue ld --- components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld | 10 +++++----- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index 1637bc12f7..ffa3c23b44 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -41,7 +41,7 @@ wDev_AppendRxBlocks = 0x40001cdc; //wDev_IndicateFrame = 0x40001cec; wDev_ProcessFiq = 0x40001d08; wDev_ProcessRxSucData = 0x40001d0c; -ppProcTxDone = 0x40001d1c; +//ppProcTxDone = 0x40001d1c; pm_tx_data_done_process = 0x40001d20; ppMapWaitTxq = 0x40001d28; lmacDiscardFrameExchangeSequence = 0x40001d70; @@ -94,10 +94,10 @@ ieee80211_disassoc_construct = 0x40002044; //ieee80211_add_xrates = 0x40002058; //ieee80211_assoc_req_construct = 0x40002060; ieee80211_assoc_resp_construct = 0x40002064; -ieee80211_timer_process = 0x4000208c; +//ieee80211_timer_process = 0x4000208c; //cnx_coexist_timeout = 0x40002090; //sta_recv_mgmt = 0x40002094; -ieee80211_send_probereq = 0x4000209c; +//ieee80211_send_probereq = 0x4000209c; //sta_auth_open = 0x400020a0; //sta_auth_sae = 0x400020a8; //cnx_coexist_timeout_process = 0x400020ac; @@ -130,8 +130,8 @@ s_trans_id = 0x3fcdfac4; ***************************************/ /* Functions */ -coex_core_event_duration_get = 0x40002178; -coex_core_timer_idx_get = 0x4000218c; +//coex_core_event_duration_get = 0x40002178; +//coex_core_timer_idx_get = 0x4000218c; coex_hw_timer_tick_get = 0x400021b8; diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 75cea54bd4..d9111de86b 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -702,7 +702,7 @@ wdev_mac_sleep = 0x40001d04; wdevProcessRxSucDataAll = 0x40001d10; wdev_csi_len_align = 0x40001d14; ppDequeueTxDone_Locked = 0x40001d18; -ppProcTxDone = 0x40001d1c; +//ppProcTxDone = 0x40001d1c; /*pm_tx_data_done_process = 0x40001d20;*/ config_is_cache_tx_buf_enabled = 0x40001d24; /* ppMapWaitTxq = 0x40001d28; */ @@ -799,7 +799,7 @@ dbg_lmac_rxtx_statis_dump = 0x40001e90; dbg_lmac_hw_statis_dump = 0x40001e94; dbg_lmac_diag_statis_dump = 0x40001e98; dbg_lmac_ps_statis_dump = 0x40001e9c; -pp_timer_do_process = 0x40001ea0; +//pp_timer_do_process = 0x40001ea0; rcUpdateAMPDUParam = 0x40001ea4; rcUpdatePhyMode = 0x40001ea8; rcGetHighestRateIdx = 0x40001eac; From 2bf982e747983038024e3d6a1e73ee99d63d914d Mon Sep 17 00:00:00 2001 From: "wangtao@espressif.com" Date: Mon, 18 Nov 2024 16:24:23 +0800 Subject: [PATCH 6/6] feat(wifi): support esp32c2 eco4 wifi lib --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index e09a9a1e22..56ded4e55f 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit e09a9a1e22e0f4d967f953dc2a8404c7f48b92b6 +Subproject commit 56ded4e55f8eca15472eab425a5ae8b9da5ad9ac