From 125902ab2c4bcf1fe44d8267dcd13ffae2cf150c Mon Sep 17 00:00:00 2001 From: muhaidong Date: Thu, 15 Jun 2023 15:11:24 +0800 Subject: [PATCH] esp_wifi: support country code CS --- components/esp_wifi/include/esp_phy_init.h | 1 + components/esp_wifi/src/phy_init.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_phy_init.h b/components/esp_wifi/include/esp_phy_init.h index 84163c7f47..87ff5b2ea9 100644 --- a/components/esp_wifi/include/esp_phy_init.h +++ b/components/esp_wifi/include/esp_phy_init.h @@ -83,6 +83,7 @@ typedef enum { ESP_PHY_INIT_DATA_TYPE_OFCA, ESP_PHY_INIT_DATA_TYPE_IFETEL, ESP_PHY_INIT_DATA_TYPE_RCM, + ESP_PHY_INIT_DATA_TYPE_CS, ESP_PHY_INIT_DATA_TYPE_NUMBER, } phy_init_data_type_t; #endif diff --git a/components/esp_wifi/src/phy_init.c b/components/esp_wifi/src/phy_init.c index e38eb20f17..5d789c3c59 100644 --- a/components/esp_wifi/src/phy_init.c +++ b/components/esp_wifi/src/phy_init.c @@ -88,8 +88,8 @@ static char s_phy_current_country[PHY_COUNTRY_CODE_LEN] = {0}; static bool s_multiple_phy_init_data_bin = false; /* PHY init data type array */ -static char* s_phy_type[ESP_PHY_INIT_DATA_TYPE_NUMBER] = {"DEFAULT", "SRRC", "FCC", "CE", "NCC", "KCC", "MIC", "IC", - "ACMA", "ANATEL", "ISED", "WPC", "OFCA", "IFETEL", "RCM"}; +static char* s_phy_type[ESP_PHY_INIT_DATA_TYPE_NUMBER] = {"DEFAULT", "SRRC", "FCC", "CE", "NCC", "KCC", "MIC", "IC", + "ACMA", "ANATEL", "ISED", "WPC", "OFCA", "IFETEL", "RCM", "CS"}; /* Country and PHY init data type map */ static phy_country_to_bin_type_t s_country_code_map_type_table[] = { @@ -137,6 +137,7 @@ static phy_country_to_bin_type_t s_country_code_map_type_table[] = { {"SK", ESP_PHY_INIT_DATA_TYPE_CE}, {"TW", ESP_PHY_INIT_DATA_TYPE_NCC}, {"US", ESP_PHY_INIT_DATA_TYPE_FCC}, + {"CS", ESP_PHY_INIT_DATA_TYPE_CS}, }; #endif uint32_t IRAM_ATTR phy_enter_critical(void)