From 2e5c28eb46d6084585c6c7b7b111a133e503f5d7 Mon Sep 17 00:00:00 2001 From: Jessy Chen Date: Mon, 25 Apr 2022 23:29:11 -0400 Subject: [PATCH] esp_phy: fix tx power limit for esp32s2/s3/c3 --- components/esp_phy/esp32c3/include/phy_init_data.h | 4 ++-- components/esp_phy/esp32s2/include/phy_init_data.h | 4 ++-- components/esp_phy/esp32s3/include/phy_init_data.h | 4 ++-- components/esp_phy/src/phy_init.c | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/components/esp_phy/esp32c3/include/phy_init_data.h b/components/esp_phy/esp32c3/include/phy_init_data.h index 7e458c4311..212cd582de 100644 --- a/components/esp_phy/esp32c3/include/phy_init_data.h +++ b/components/esp_phy/esp32c3/include/phy_init_data.h @@ -20,8 +20,8 @@ extern "C" { // define the lowest tx power as LOWEST_PHY_TX_POWER #define PHY_TX_POWER_LOWEST LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 52) -#define PHY_TX_POWER_OFFSET 44 -#define PHY_TX_POWER_NUM 5 +#define PHY_TX_POWER_OFFSET 2 +#define PHY_TX_POWER_NUM 14 #if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN #define PHY_CRC_ALGORITHM 1 diff --git a/components/esp_phy/esp32s2/include/phy_init_data.h b/components/esp_phy/esp32s2/include/phy_init_data.h index e1aa8d4613..5128a86569 100644 --- a/components/esp_phy/esp32s2/include/phy_init_data.h +++ b/components/esp_phy/esp32s2/include/phy_init_data.h @@ -20,8 +20,8 @@ extern "C" { // define the lowest tx power as LOWEST_PHY_TX_POWER #define PHY_TX_POWER_LOWEST LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 52) -#define PHY_TX_POWER_OFFSET 44 -#define PHY_TX_POWER_NUM 5 +#define PHY_TX_POWER_OFFSET 2 +#define PHY_TX_POWER_NUM 14 #if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN #define PHY_CRC_ALGORITHM 1 diff --git a/components/esp_phy/esp32s3/include/phy_init_data.h b/components/esp_phy/esp32s3/include/phy_init_data.h index 88f56282d5..4f2b669450 100644 --- a/components/esp_phy/esp32s3/include/phy_init_data.h +++ b/components/esp_phy/esp32s3/include/phy_init_data.h @@ -20,8 +20,8 @@ extern "C" { // define the lowest tx power as LOWEST_PHY_TX_POWER #define PHY_TX_POWER_LOWEST LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 52) -#define PHY_TX_POWER_OFFSET 44 -#define PHY_TX_POWER_NUM 5 +#define PHY_TX_POWER_OFFSET 2 +#define PHY_TX_POWER_NUM 14 #if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN #define PHY_CRC_ALGORITHM 1 diff --git a/components/esp_phy/src/phy_init.c b/components/esp_phy/src/phy_init.c index 475684a9d1..f7d92dec41 100644 --- a/components/esp_phy/src/phy_init.c +++ b/components/esp_phy/src/phy_init.c @@ -608,7 +608,6 @@ static esp_err_t store_cal_data_to_nvs_handle(nvs_handle_t handle, } #if CONFIG_ESP_PHY_REDUCE_TX_POWER -// TODO: fix the esp_phy_reduce_tx_power unused warning for esp32s2 - IDF-759 static void __attribute((unused)) esp_phy_reduce_tx_power(esp_phy_init_data_t* init_data) { uint8_t i;