You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/20 19:02:34 UTC

[incubator-nuttx] branch master updated (770147ffe3 -> ae1cbc47ef)

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


    from 770147ffe3 arch/esp32: Introduce the ESP32_RTC option.
     new 4ccedb176e arch/esp32: Re-organise shared functions and options for ESP32 Wireless code
     new 20c6996e81 esp32c3/Kconfig: Don't select options already selected.
     new ae1cbc47ef esp32&c3/Kconfig: CONFIG_ESP32(C3)_WIRELESS doesn't need to be user selectable.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/risc-v/src/esp32c3/Kconfig                    |   6 +-
 arch/xtensa/src/esp32/Kconfig                      |  15 +-
 arch/xtensa/src/esp32/Make.defs                    |  18 +-
 arch/xtensa/src/esp32/esp32_irq.c                  |  12 +-
 arch/xtensa/src/esp32/esp32_wifi_adapter.c         | 176 --------------------
 arch/xtensa/src/esp32/esp32_wifi_adapter.h         |   2 -
 arch/xtensa/src/esp32/esp32_wifi_utils.c           |   1 +
 arch/xtensa/src/esp32/esp32_wireless.c             | 183 ++++++++++++++++++++-
 arch/xtensa/src/esp32/esp32_wireless.h             |  91 ++++++++++
 arch/xtensa/src/esp32/esp32_wlan.c                 |   4 +-
 arch/xtensa/src/esp32/esp32_wlan.h                 |   4 +-
 .../xtensa/esp32/common/include/esp32_board_wlan.h |   4 +-
 boards/xtensa/esp32/common/src/Make.defs           |   2 +-
 .../esp32/esp32-devkitc/configs/autopm/defconfig   |   2 +-
 .../esp32/esp32-devkitc/configs/blewifi/defconfig  |   1 +
 .../esp32/esp32-devkitc/configs/coex/defconfig     |   1 +
 .../esp32/esp32-devkitc/configs/efuse/defconfig    |   2 +-
 .../configs/mcuboot_update_agent/defconfig         |   2 +-
 .../esp32/esp32-devkitc/configs/mqttc/defconfig    |   2 +-
 .../esp32-devkitc/configs/sta_softap/defconfig     |   2 +-
 .../configs/wamr_wasi_debug/defconfig              |   2 +-
 .../esp32/esp32-devkitc/configs/wapi/defconfig     |  11 +-
 .../esp32/esp32-devkitc/configs/wapi_smp/defconfig |   2 +-
 .../esp32/esp32-devkitc/configs/wifinsh/defconfig  |   2 +-
 .../xtensa/esp32/esp32-devkitc/src/esp32_bringup.c |   4 +-
 .../esp32-ethernet-kit/configs/autopm/defconfig    |   2 +-
 .../configs/mcuboot_update_agent/defconfig         |   2 +-
 .../esp32-ethernet-kit/configs/wapi/defconfig      |   2 +-
 .../esp32/esp32-ethernet-kit/src/esp32_bringup.c   |   4 +-
 .../esp32-wrover-kit/configs/autopm/defconfig      |   2 +-
 .../configs/mcuboot_update_agent/defconfig         |   2 +-
 .../esp32/esp32-wrover-kit/configs/wapi/defconfig  |   2 +-
 .../esp32/esp32-wrover-kit/src/esp32_bringup.c     |   4 +-
 .../esp32/ttgo_lora_esp32/src/esp32_bringup.c      |   4 +-
 34 files changed, 335 insertions(+), 240 deletions(-)


[incubator-nuttx] 03/03: esp32&c3/Kconfig: CONFIG_ESP32(C3)_WIRELESS doesn't need to be user selectable.

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit ae1cbc47ef6ee653bac29596c049e0d2baeb5bbb
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Mon Jul 18 17:01:38 2022 +0200

    esp32&c3/Kconfig: CONFIG_ESP32(C3)_WIRELESS doesn't need to be user
    selectable.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/risc-v/src/esp32c3/Kconfig | 4 ++--
 arch/xtensa/src/esp32/Kconfig   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/Kconfig b/arch/risc-v/src/esp32c3/Kconfig
index 215c738b8f..7c573b6a53 100644
--- a/arch/risc-v/src/esp32c3/Kconfig
+++ b/arch/risc-v/src/esp32c3/Kconfig
@@ -112,7 +112,7 @@ choice ESP32C3_FLASH_FREQ
 	default ESP32C3_FLASH_FREQ_40M
 	---help---
 		SPI FLASH frequency
-		
+
 config ESP32C3_FLASH_FREQ_80M
 	bool "80 MHz"
 
@@ -333,7 +333,7 @@ config ESP32C3_ADC1
 	select ESP32C3_ADC
 
 config ESP32C3_WIRELESS
-	bool "Wireless"
+	bool
 	default n
 	select NET
 	select ARCH_PHY_INTERRUPT
diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index 2db9544c99..426f188b8c 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -471,7 +471,7 @@ config ESP32_UART2
 	select ARCH_HAVE_SERIAL_TERMIOS
 
 config ESP32_WIRELESS
-	bool "Wireless"
+	bool
 	default n
 	select NET
 	select ARCH_PHY_INTERRUPT


[incubator-nuttx] 01/03: arch/esp32: Re-organise shared functions and options for ESP32 Wireless code

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4ccedb176e0bc0652ca5d6b5985bd1a68c1ecaa1
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Thu Jun 9 10:30:24 2022 +0200

    arch/esp32: Re-organise shared functions and options for ESP32 Wireless code
    
     - Introduce the ESP32_WIFI option to replace the broader
    ESP32_WIRELESS option.  ESP32_WIRELESS is used by both WIFI and BLE.
    
     - Move common functions from esp32_wifi_adapter to esp32_wireless.
    
     - Change the order of including the external libraries to avoid undefined references.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/xtensa/src/esp32/Kconfig                      |  13 +-
 arch/xtensa/src/esp32/Make.defs                    |  18 +-
 arch/xtensa/src/esp32/esp32_irq.c                  |  12 +-
 arch/xtensa/src/esp32/esp32_wifi_adapter.c         | 176 --------------------
 arch/xtensa/src/esp32/esp32_wifi_adapter.h         |   2 -
 arch/xtensa/src/esp32/esp32_wifi_utils.c           |   1 +
 arch/xtensa/src/esp32/esp32_wireless.c             | 183 ++++++++++++++++++++-
 arch/xtensa/src/esp32/esp32_wireless.h             |  91 ++++++++++
 arch/xtensa/src/esp32/esp32_wlan.c                 |   4 +-
 arch/xtensa/src/esp32/esp32_wlan.h                 |   4 +-
 .../xtensa/esp32/common/include/esp32_board_wlan.h |   4 +-
 boards/xtensa/esp32/common/src/Make.defs           |   2 +-
 .../esp32/esp32-devkitc/configs/autopm/defconfig   |   2 +-
 .../esp32/esp32-devkitc/configs/blewifi/defconfig  |   1 +
 .../esp32/esp32-devkitc/configs/coex/defconfig     |   1 +
 .../esp32/esp32-devkitc/configs/efuse/defconfig    |   2 +-
 .../configs/mcuboot_update_agent/defconfig         |   2 +-
 .../esp32/esp32-devkitc/configs/mqttc/defconfig    |   2 +-
 .../esp32-devkitc/configs/sta_softap/defconfig     |   2 +-
 .../configs/wamr_wasi_debug/defconfig              |   2 +-
 .../esp32/esp32-devkitc/configs/wapi/defconfig     |  11 +-
 .../esp32/esp32-devkitc/configs/wapi_smp/defconfig |   2 +-
 .../esp32/esp32-devkitc/configs/wifinsh/defconfig  |   2 +-
 .../xtensa/esp32/esp32-devkitc/src/esp32_bringup.c |   4 +-
 .../esp32-ethernet-kit/configs/autopm/defconfig    |   2 +-
 .../configs/mcuboot_update_agent/defconfig         |   2 +-
 .../esp32-ethernet-kit/configs/wapi/defconfig      |   2 +-
 .../esp32/esp32-ethernet-kit/src/esp32_bringup.c   |   4 +-
 .../esp32-wrover-kit/configs/autopm/defconfig      |   2 +-
 .../configs/mcuboot_update_agent/defconfig         |   2 +-
 .../esp32/esp32-wrover-kit/configs/wapi/defconfig  |   2 +-
 .../esp32/esp32-wrover-kit/src/esp32_bringup.c     |   4 +-
 .../esp32/ttgo_lora_esp32/src/esp32_bringup.c      |   4 +-
 33 files changed, 332 insertions(+), 235 deletions(-)

diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index c030989906..2db9544c99 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -481,6 +481,13 @@ config ESP32_WIRELESS
 	---help---
 		Enable Wireless support
 
+config ESP32_WIFI
+	bool "Wi-Fi"
+	default n
+	select ESP32_WIRELESS
+	---help---
+		Enable Wi-Fi support
+
 config ESP32_BLE
 	bool "BLE"
 	default n
@@ -519,7 +526,7 @@ endmenu # ESP32 Peripheral Selection
 config ESP32_WIFI_BT_COEXIST
 	bool "Wi-Fi and BT coexist"
 	default n
-	depends on ESP32_WIRELESS && ESP32_BLE
+	depends on ESP32_WIFI && ESP32_BLE
 
 menu "Memory Configuration"
 
@@ -1191,7 +1198,7 @@ config ESP32_ETH_PHY_ADDR
 endmenu # ESP32_EMAC
 
 menu "Wi-Fi configuration"
-	depends on ESP32_WIRELESS
+	depends on ESP32_WIFI
 
 choice
 	prompt "ESP32 Wi-Fi mode"
@@ -1327,7 +1334,7 @@ choice EXAMPLE_POWER_SAVE_MODE
 		bool "maximum modem"
 endchoice
 
-endmenu # ESP32_WIRELESS
+endmenu # ESP32_WIFI
 
 menu "BLE Configuration"
 	depends on ESP32_BLE
diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs
index 4619a76a96..dfb47c46ec 100644
--- a/arch/xtensa/src/esp32/Make.defs
+++ b/arch/xtensa/src/esp32/Make.defs
@@ -206,10 +206,19 @@ distclean::
 
 INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)include)
 INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)include$(DELIM)esp32)
-CHIP_CSRCS += esp32_wlan.c esp32_wifi_utils.c esp32_wifi_adapter.c
 
 EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)libs$(DELIM)esp32
-EXTRA_LIBS += -lcore -lrtc -lnet80211 -lpp -lsmartconfig -lespnow -lphy -lwpa_supplicant
+EXTRA_LIBS += -lphy -lrtc
+
+# Wireless interfaces.
+
+CHIP_CSRCS += esp32_wireless.c
+endif
+
+ifeq ($(CONFIG_ESP32_WIFI),y)
+CHIP_CSRCS += esp32_wlan.c esp32_wifi_utils.c esp32_wifi_adapter.c
+EXTRA_LIBS += -lcore -lnet80211 -lpp -lsmartconfig -lespnow -lwpa_supplicant
+endif
 
 ifeq ($(CONFIG_ESP32_BLE),y)
 CHIP_CSRCS += esp32_ble_adapter.c esp32_ble.c
@@ -218,8 +227,3 @@ EXTRA_LIBS += -lbtdm_app
     EXTRA_LIBS += -lcoexist
   endif
 endif
-
-# Wireless interfaces.
-
-CHIP_CSRCS += esp32_wireless.c
-endif
diff --git a/arch/xtensa/src/esp32/esp32_irq.c b/arch/xtensa/src/esp32/esp32_irq.c
index 18598db8da..53d369bbef 100644
--- a/arch/xtensa/src/esp32/esp32_irq.c
+++ b/arch/xtensa/src/esp32/esp32_irq.c
@@ -98,10 +98,10 @@
 #define ESP32_MAX_PRIORITY     5
 #define ESP32_PRIO_INDEX(p)    ((p) - ESP32_MIN_PRIORITY)
 
-#ifdef CONFIG_ESP32_WIRELESS
-#  define ESP32_WIRELESS_RESERVE_INT  (1 << ESP32_CPUINT_MAC)
+#ifdef CONFIG_ESP32_WIFI
+#  define ESP32_WIFI_RESERVE_INT  (1 << ESP32_CPUINT_MAC)
 #else
-#  define ESP32_WIRELESS_RESERVE_INT  0
+#  define ESP32_WIFI_RESERVE_INT  0
 #endif
 
 #ifdef CONFIG_ESP32_BLE
@@ -170,7 +170,7 @@ static uint32_t g_intenable[CONFIG_SMP_NCPUS];
  */
 
 static uint32_t g_cpu0_freeints = ESP32_CPUINT_PERIPHSET &
-                                  (~ESP32_WIRELESS_RESERVE_INT &
+                                  (~ESP32_WIFI_RESERVE_INT &
                                    ~ESP32_BLE_RESERVE_INT);
 #ifdef CONFIG_SMP
 static uint32_t g_cpu1_freeints = ESP32_CPUINT_PERIPHSET;
@@ -460,7 +460,7 @@ void up_irqinitialize(void)
 
   g_irqmap[XTENSA_IRQ_TIMER0] = IRQ_MKMAP(0, ESP32_CPUINT_TIMER0);
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
   g_irqmap[ESP32_IRQ_MAC] = IRQ_MKMAP(0, ESP32_CPUINT_MAC);
 #endif
 
@@ -479,7 +479,7 @@ void up_irqinitialize(void)
 
   /* Reserve CPU0 interrupt for some special drivers */
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
   g_cpu0_intmap[ESP32_CPUINT_MAC]  = CPUINT_ASSIGN(ESP32_IRQ_MAC);
   xtensa_enable_cpuint(&g_intenable[0], 1 << ESP32_CPUINT_MAC);
 #endif
diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.c b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
index 17ead5d65d..bb52f609c4 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_adapter.c
+++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
@@ -2460,90 +2460,6 @@ static int32_t wifi_phy_update_country_info(const char *country)
   return -1;
 }
 
-/****************************************************************************
- * Name: esp_read_mac
- *
- * Description:
- *   Read MAC address from efuse
- *
- * Input Parameters:
- *   mac  - MAC address buffer pointer
- *   type - MAC address type
- *
- * Returned Value:
- *   0 if success or -1 if fail
- *
- ****************************************************************************/
-
-int32_t esp_read_mac(uint8_t *mac, esp_mac_type_t type)
-{
-  uint32_t regval[2];
-  uint8_t tmp;
-  uint8_t *data = (uint8_t *)regval;
-  uint8_t crc;
-  int i;
-
-  if (type > ESP_MAC_BT)
-    {
-      wlerr("Input type is error=%d\n", type);
-      return -1;
-    }
-
-  regval[0] = getreg32(MAC_ADDR0_REG);
-  regval[1] = getreg32(MAC_ADDR1_REG);
-
-  crc = data[6];
-  for (i = 0; i < MAC_LEN; i++)
-    {
-      mac[i] = data[5 - i];
-    }
-
-  if (crc != esp_crc8(mac, MAC_LEN))
-    {
-      wlerr("Failed to check MAC address CRC\n");
-      return -1;
-    }
-
-  if (type == ESP_MAC_WIFI_SOFTAP)
-    {
-      tmp = mac[0];
-      for (i = 0; i < 64; i++)
-        {
-          mac[0] = tmp | 0x02;
-          mac[0] ^= i << 2;
-
-          if (mac[0] != tmp)
-            {
-              break;
-            }
-        }
-
-      if (i >= 64)
-        {
-          wlerr("Failed to generate SoftAP MAC\n");
-          return -1;
-        }
-    }
-
-  if (type == ESP_MAC_BT)
-    {
-      tmp = mac[0];
-      for (i = 0; i < 64; i++)
-        {
-          mac[0] = tmp | 0x02;
-          mac[0] ^= i << 2;
-
-          if (mac[0] != tmp)
-            {
-              break;
-            }
-        }
-      mac[5] += 1;
-    }
-
-  return 0;
-}
-
 /****************************************************************************
  * Name: esp_wifi_read_mac
  *
@@ -4294,98 +4210,6 @@ static int esp_freq_to_channel(uint16_t freq)
   return 0;
 }
 
-/****************************************************************************
- * Functions needed by libphy.a
- ****************************************************************************/
-
-/****************************************************************************
- * Name: esp_dport_access_reg_read
- *
- * Description:
- *   Read register value safely in SMP
- *
- * Input Parameters:
- *   reg - Register address
- *
- * Returned Value:
- *   Register value
- *
- ****************************************************************************/
-
-uint32_t IRAM_ATTR esp_dport_access_reg_read(uint32_t reg)
-{
-  return getreg32(reg);
-}
-
-/****************************************************************************
- * Name: phy_enter_critical
- *
- * Description:
- *   Enter critical state
- *
- * Input Parameters:
- *   None
- *
- * Returned Value:
- *   CPU PS value
- *
- ****************************************************************************/
-
-uint32_t IRAM_ATTR phy_enter_critical(void)
-{
-  irqstate_t flags;
-
-  flags = enter_critical_section();
-
-  return flags;
-}
-
-/****************************************************************************
- * Name: phy_exit_critical
- *
- * Description:
- *   Exit from critical state
- *
- * Input Parameters:
- *   level - CPU PS value
- *
- * Returned Value:
- *   None
- *
- ****************************************************************************/
-
-void IRAM_ATTR phy_exit_critical(uint32_t level)
-{
-  leave_critical_section(level);
-}
-
-/****************************************************************************
- * Name: phy_printf
- *
- * Description:
- *   Output format string and its arguments
- *
- * Input Parameters:
- *   format - format string
- *
- * Returned Value:
- *   0
- *
- ****************************************************************************/
-
-int phy_printf(const char *format, ...)
-{
-#ifdef CONFIG_DEBUG_WIRELESS_INFO
-  va_list arg;
-
-  va_start(arg, format);
-  vsyslog(LOG_INFO, format, arg);
-  va_end(arg);
-#endif
-
-  return 0;
-}
-
 /****************************************************************************
  * Functions needed by libnet80211.a
  ****************************************************************************/
diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.h b/arch/xtensa/src/esp32/esp32_wifi_adapter.h
index e64facb461..84ec6b78b8 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_adapter.h
+++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.h
@@ -61,8 +61,6 @@ extern "C"
 #  define ESP32_WLAN_DEVS         2
 #endif
 
-#define MAC_LEN                     (6)
-
 /* Needed to fix coex_adapter_funcs_t definition */
 
 #define CONFIG_IDF_TARGET_ESP32   1
diff --git a/arch/xtensa/src/esp32/esp32_wifi_utils.c b/arch/xtensa/src/esp32/esp32_wifi_utils.c
index d88c089b64..eda921a06a 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_utils.c
+++ b/arch/xtensa/src/esp32/esp32_wifi_utils.c
@@ -33,6 +33,7 @@
 
 #include "esp32_wifi_adapter.h"
 #include "esp32_wifi_utils.h"
+#include "esp32_wireless.h"
 #include "espidf_wifi.h"
 
 /****************************************************************************
diff --git a/arch/xtensa/src/esp32/esp32_wireless.c b/arch/xtensa/src/esp32/esp32_wireless.c
index 9a08db7ff3..069c4bd145 100644
--- a/arch/xtensa/src/esp32/esp32_wireless.c
+++ b/arch/xtensa/src/esp32/esp32_wireless.c
@@ -31,6 +31,7 @@
 #include "xtensa.h"
 #include "hardware/esp32_soc.h"
 #include "hardware/esp32_dport.h"
+#include "hardware/esp32_emac.h"
 #include "esp32_wireless.h"
 #include "esp_phy_init.h"
 #include "phy_init_data.h"
@@ -46,10 +47,11 @@ static inline void phy_digital_regs_load(void);
  * Extern Functions declaration
  ****************************************************************************/
 
+extern uint8_t esp_crc8(const uint8_t *p, uint32_t len);
 extern void coex_bt_high_prio(void);
 extern void phy_wakeup_init(void);
 extern void phy_close_rf(void);
-extern void phy_dig_reg_backup(bool init, uint32_t *regs);
+extern uint8_t phy_dig_reg_backup(bool init, uint32_t *regs);
 extern int  register_chipv7_phy(const esp_phy_init_data_t *init_data,
                                 esp_phy_calibration_data_t *cal_data,
                                 esp_phy_calibration_mode_t cal_mode);
@@ -115,6 +117,102 @@ static inline void phy_digital_regs_load(void)
     }
 }
 
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Functions needed by libphy.a
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: esp_dport_access_reg_read
+ *
+ * Description:
+ *   Read register value safely in SMP
+ *
+ * Input Parameters:
+ *   reg - Register address
+ *
+ * Returned Value:
+ *   Register value
+ *
+ ****************************************************************************/
+
+uint32_t IRAM_ATTR esp_dport_access_reg_read(uint32_t reg)
+{
+  return getreg32(reg);
+}
+
+/****************************************************************************
+ * Name: phy_enter_critical
+ *
+ * Description:
+ *   Enter critical state
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   CPU PS value
+ *
+ ****************************************************************************/
+
+uint32_t IRAM_ATTR phy_enter_critical(void)
+{
+  irqstate_t flags;
+
+  flags = enter_critical_section();
+
+  return flags;
+}
+
+/****************************************************************************
+ * Name: phy_exit_critical
+ *
+ * Description:
+ *   Exit from critical state
+ *
+ * Input Parameters:
+ *   level - CPU PS value
+ *
+ * Returned Value:
+ *   None
+ *
+ ****************************************************************************/
+
+void IRAM_ATTR phy_exit_critical(uint32_t level)
+{
+  leave_critical_section(level);
+}
+
+/****************************************************************************
+ * Name: phy_printf
+ *
+ * Description:
+ *   Output format string and its arguments
+ *
+ * Input Parameters:
+ *   format - format string
+ *
+ * Returned Value:
+ *   0
+ *
+ ****************************************************************************/
+
+int phy_printf(const char *format, ...)
+{
+#ifdef CONFIG_DEBUG_WIRELESS_INFO
+  va_list arg;
+
+  va_start(arg, format);
+  vsyslog(LOG_INFO, format, arg);
+  va_end(arg);
+#endif
+
+  return 0;
+}
+
 /****************************************************************************
  * Name: esp32_phy_enable_clock
  *
@@ -181,9 +279,90 @@ void esp32_phy_disable_clock(void)
 }
 
 /****************************************************************************
- * Public Functions
+ * Name: esp_read_mac
+ *
+ * Description:
+ *   Read MAC address from efuse
+ *
+ * Input Parameters:
+ *   mac  - MAC address buffer pointer
+ *   type - MAC address type
+ *
+ * Returned Value:
+ *   0 if success or -1 if fail
+ *
  ****************************************************************************/
 
+int32_t esp_read_mac(uint8_t *mac, esp_mac_type_t type)
+{
+  uint32_t regval[2];
+  uint8_t tmp;
+  uint8_t *data = (uint8_t *)regval;
+  uint8_t crc;
+  int i;
+
+  if (type > ESP_MAC_BT)
+    {
+      wlerr("Input type is error=%d\n", type);
+      return -1;
+    }
+
+  regval[0] = getreg32(MAC_ADDR0_REG);
+  regval[1] = getreg32(MAC_ADDR1_REG);
+
+  crc = data[6];
+  for (i = 0; i < MAC_LEN; i++)
+    {
+      mac[i] = data[5 - i];
+    }
+
+  if (crc != esp_crc8(mac, MAC_LEN))
+    {
+      wlerr("Failed to check MAC address CRC\n");
+      return -1;
+    }
+
+  if (type == ESP_MAC_WIFI_SOFTAP)
+    {
+      tmp = mac[0];
+      for (i = 0; i < 64; i++)
+        {
+          mac[0] = tmp | 0x02;
+          mac[0] ^= i << 2;
+
+          if (mac[0] != tmp)
+            {
+              break;
+            }
+        }
+
+      if (i >= 64)
+        {
+          wlerr("Failed to generate SoftAP MAC\n");
+          return -1;
+        }
+    }
+
+  if (type == ESP_MAC_BT)
+    {
+      tmp = mac[0];
+      for (i = 0; i < 64; i++)
+        {
+          mac[0] = tmp | 0x02;
+          mac[0] ^= i << 2;
+
+          if (mac[0] != tmp)
+            {
+              break;
+            }
+        }
+
+      mac[5] += 1;
+    }
+
+  return 0;
+}
+
 /****************************************************************************
  * Name: esp32_phy_disable
  *
diff --git a/arch/xtensa/src/esp32/esp32_wireless.h b/arch/xtensa/src/esp32/esp32_wireless.h
index d5e959a079..5546b30b25 100644
--- a/arch/xtensa/src/esp32/esp32_wireless.h
+++ b/arch/xtensa/src/esp32/esp32_wireless.h
@@ -27,6 +27,10 @@
 
 #include <nuttx/config.h>
 
+#include "xtensa_attr.h"
+
+#include "espidf_wifi.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
@@ -39,10 +43,29 @@
 #define CONFIG_MAC_BB_PD                                0
 #define SOC_COEX_HW_PTI                                 0
 
+#define MAC_LEN                                       (6)
+
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: esp_read_mac
+ *
+ * Description:
+ *   Read MAC address from efuse
+ *
+ * Input Parameters:
+ *   mac  - MAC address buffer pointer
+ *   type - MAC address type
+ *
+ * Returned Value:
+ *   0 if success or -1 if fail
+ *
+ ****************************************************************************/
+
+int32_t esp_read_mac(uint8_t *mac, esp_mac_type_t type);
+
 /****************************************************************************
  * Name: esp32_phy_enable
  *
@@ -107,4 +130,72 @@ void esp32_phy_enable_clock(void);
 
 void esp32_phy_disable_clock(void);
 
+/****************************************************************************
+ * Functions needed by libphy.a
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: esp_dport_access_reg_read
+ *
+ * Description:
+ *   Read register value safely in SMP
+ *
+ * Input Parameters:
+ *   reg - Register address
+ *
+ * Returned Value:
+ *   Register value
+ *
+ ****************************************************************************/
+
+uint32_t IRAM_ATTR esp_dport_access_reg_read(uint32_t reg);
+
+/****************************************************************************
+ * Name: phy_enter_critical
+ *
+ * Description:
+ *   Enter critical state
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   CPU PS value
+ *
+ ****************************************************************************/
+
+uint32_t IRAM_ATTR phy_enter_critical(void);
+
+/****************************************************************************
+ * Name: phy_exit_critical
+ *
+ * Description:
+ *   Exit from critical state
+ *
+ * Input Parameters:
+ *   level - CPU PS value
+ *
+ * Returned Value:
+ *   None
+ *
+ ****************************************************************************/
+
+void IRAM_ATTR phy_exit_critical(uint32_t level);
+
+/****************************************************************************
+ * Name: phy_printf
+ *
+ * Description:
+ *   Output format string and its arguments
+ *
+ * Input Parameters:
+ *   format - format string
+ *
+ * Returned Value:
+ *   0
+ *
+ ****************************************************************************/
+
+int phy_printf(const char *format, ...) printflike(1, 2);
+
 #endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_WIRELESS_H */
diff --git a/arch/xtensa/src/esp32/esp32_wlan.c b/arch/xtensa/src/esp32/esp32_wlan.c
index f111fe3509..6b16fe4c2f 100644
--- a/arch/xtensa/src/esp32/esp32_wlan.c
+++ b/arch/xtensa/src/esp32/esp32_wlan.c
@@ -24,7 +24,7 @@
 
 #include <nuttx/config.h>
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
 
 #include <queue.h>
 #include <assert.h>
@@ -1873,4 +1873,4 @@ int esp32_wlan_softap_initialize(void)
 }
 #endif
 
-#endif  /* CONFIG_ESP32_WIRELESS */
+#endif  /* CONFIG_ESP32_WIFI */
diff --git a/arch/xtensa/src/esp32/esp32_wlan.h b/arch/xtensa/src/esp32/esp32_wlan.h
index 9ba5b04711..537c7ac303 100644
--- a/arch/xtensa/src/esp32/esp32_wlan.h
+++ b/arch/xtensa/src/esp32/esp32_wlan.h
@@ -40,7 +40,7 @@ extern "C"
 #define EXTERN extern
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
 
 /****************************************************************************
  * Public Function Prototypes
@@ -82,7 +82,7 @@ int esp32_wlan_sta_initialize(void);
 int esp32_wlan_softap_initialize(void);
 #endif
 
-#endif /* CONFIG_ESP32_WIRELESS */
+#endif /* CONFIG_ESP32_WIFI */
 #ifdef __cplusplus
 }
 #endif
diff --git a/boards/xtensa/esp32/common/include/esp32_board_wlan.h b/boards/xtensa/esp32/common/include/esp32_board_wlan.h
index 7f09619352..ffa65f2bf0 100644
--- a/boards/xtensa/esp32/common/include/esp32_board_wlan.h
+++ b/boards/xtensa/esp32/common/include/esp32_board_wlan.h
@@ -46,7 +46,7 @@ extern "C"
  * Public Function Prototypes
  ****************************************************************************/
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
 
 /****************************************************************************
  * Name: board_wlan_init
@@ -62,7 +62,7 @@ extern "C"
 
 int board_wlan_init(void);
 
-#endif /* CONFIG_ESP32_WIRELESS */
+#endif /* CONFIG_ESP32_WIFI */
 
 #undef EXTERN
 #if defined(__cplusplus)
diff --git a/boards/xtensa/esp32/common/src/Make.defs b/boards/xtensa/esp32/common/src/Make.defs
index e46c11e667..2d044889e1 100644
--- a/boards/xtensa/esp32/common/src/Make.defs
+++ b/boards/xtensa/esp32/common/src/Make.defs
@@ -48,7 +48,7 @@ ifeq ($(CONFIG_ESP32_SPIFLASH),y)
   CSRCS += esp32_board_spiflash.c
 endif
 
-ifeq ($(CONFIG_ESP32_WIRELESS),y)
+ifeq ($(CONFIG_ESP32_WIFI),y)
   CSRCS += esp32_board_wlan.c
 endif
 
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig
index aa44cf687f..78d992494f 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig
@@ -28,8 +28,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig
index 56cb8477ef..ced10f8ae8 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig
@@ -36,6 +36,7 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig
index 5df847d4f2..86b3708f72 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig
@@ -69,6 +69,7 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SMARTFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_BT_COEXIST=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
 CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig
index e59b7d5f06..118f98a942 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig
@@ -45,8 +45,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_FS_PROCFS=y
 CONFIG_HOST_MACOS=y
 CONFIG_IDLETHREAD_STACKSIZE=3072
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig
index be93f1a388..8867e8059a 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig
@@ -33,7 +33,7 @@ CONFIG_DRIVERS_WIRELESS=y
 CONFIG_ESP32_APP_FORMAT_MCUBOOT=y
 CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_UART0=y
-CONFIG_ESP32_WIRELESS=y
+CONFIG_ESP32_WIFI=y
 CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT=y
 CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT_DL_BUFFER_SIZE=4096
 CONFIG_EXPERIMENTAL=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig
index 61b9a8bbe0..5beb754405 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig
@@ -27,7 +27,7 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
-CONFIG_ESP32_WIRELESS=y
+CONFIG_ESP32_WIFI=y
 CONFIG_EXAMPLES_MQTTC=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig
index 8e46072cde..ed22584bf6 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig
@@ -34,9 +34,9 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
 CONFIG_ESP32_WIFI_STATION_SOFTAP_COEXISTENCE=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_EXAMPLES_DHCPD=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_FS_PROCFS=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig
index de14bc2449..70bf3b6646 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig
@@ -49,7 +49,7 @@ CONFIG_ESP32_IRAM_HEAP=y
 CONFIG_ESP32_RTC_HEAP=y
 CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_UART0=y
-CONFIG_ESP32_WIRELESS=y
+CONFIG_ESP32_WIFI=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_FS_LITTLEFS=y
 CONFIG_FS_PROCFS=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wapi/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wapi/defconfig
index 13cd1619e4..829fab454d 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/wapi/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/wapi/defconfig
@@ -23,18 +23,9 @@ CONFIG_ARCH_XTENSA=y
 CONFIG_BOARD_LOOPSPERMSEC=16717
 CONFIG_BUILTIN=y
 CONFIG_DEBUG_ASSERTIONS=y
-CONFIG_DEBUG_ERROR=y
 CONFIG_DEBUG_FEATURES=y
 CONFIG_DEBUG_FULLOPT=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_MM=y
-CONFIG_DEBUG_MM_ERROR=y
-CONFIG_DEBUG_MM_WARN=y
-CONFIG_DEBUG_NET=y
-CONFIG_DEBUG_NET_ERROR=y
-CONFIG_DEBUG_NET_WARN=y
 CONFIG_DEBUG_SYMBOLS=y
-CONFIG_DEBUG_WARN=y
 CONFIG_DEFAULT_TASK_STACKSIZE=4096
 CONFIG_DEV_URANDOM=y
 CONFIG_DRIVERS_IEEE80211=y
@@ -43,8 +34,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_FS_PROCFS=y
 CONFIG_IDLETHREAD_STACKSIZE=3072
 CONFIG_INIT_ENTRYPOINT="nsh_main"
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wapi_smp/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wapi_smp/defconfig
index 52625e1011..2fe65146fa 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/wapi_smp/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/wapi_smp/defconfig
@@ -34,8 +34,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_EXAMPLES_HELLO=y
 CONFIG_EXAMPLES_WEBSERVER=y
 CONFIG_FS_PROCFS=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig
index 222fa59d9a..d97015f32b 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig
@@ -28,8 +28,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c b/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c
index 058cee002d..766c5d9cd1 100644
--- a/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c
+++ b/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c
@@ -75,7 +75,7 @@
 #  include "esp32_ble.h"
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
 #  include "esp32_board_wlan.h"
 #endif
 
@@ -285,7 +285,7 @@ int esp32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
   ret = board_wlan_init();
   if (ret < 0)
     {
diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig
index ba3695fdcb..8d9e93e201 100644
--- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig
+++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig
@@ -27,8 +27,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/mcuboot_update_agent/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/mcuboot_update_agent/defconfig
index 578fa4eb28..1f2c40f1bd 100644
--- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/mcuboot_update_agent/defconfig
+++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/mcuboot_update_agent/defconfig
@@ -32,7 +32,7 @@ CONFIG_DRIVERS_WIRELESS=y
 CONFIG_ESP32_APP_FORMAT_MCUBOOT=y
 CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_UART0=y
-CONFIG_ESP32_WIRELESS=y
+CONFIG_ESP32_WIFI=y
 CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT=y
 CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT_DL_BUFFER_SIZE=4096
 CONFIG_EXPERIMENTAL=y
diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/wapi/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/wapi/defconfig
index 5b2aa91ff0..cebbb45587 100644
--- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/wapi/defconfig
+++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/wapi/defconfig
@@ -26,8 +26,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c
index d1b024a854..ea3b76f084 100644
--- a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c
+++ b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c
@@ -69,7 +69,7 @@
 #  include "esp32_ble.h"
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
 #  include "esp32_board_wlan.h"
 #endif
 
@@ -176,7 +176,7 @@ int esp32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
   ret = board_wlan_init();
   if (ret < 0)
     {
diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig
index 6b7ceb93a4..8371c44e66 100644
--- a/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig
+++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig
@@ -28,8 +28,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/mcuboot_update_agent/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/mcuboot_update_agent/defconfig
index 5d58ccca6e..9557b1aa6e 100644
--- a/boards/xtensa/esp32/esp32-wrover-kit/configs/mcuboot_update_agent/defconfig
+++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/mcuboot_update_agent/defconfig
@@ -33,7 +33,7 @@ CONFIG_DRIVERS_WIRELESS=y
 CONFIG_ESP32_APP_FORMAT_MCUBOOT=y
 CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_UART0=y
-CONFIG_ESP32_WIRELESS=y
+CONFIG_ESP32_WIFI=y
 CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT=y
 CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT_DL_BUFFER_SIZE=4096
 CONFIG_EXPERIMENTAL=y
diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/wapi/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/wapi/defconfig
index 960e44f220..6d0c7ac5a7 100644
--- a/boards/xtensa/esp32/esp32-wrover-kit/configs/wapi/defconfig
+++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/wapi/defconfig
@@ -27,8 +27,8 @@ CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_SPIFLASH_SPIFFS=y
 CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
 CONFIG_ESP32_UART0=y
+CONFIG_ESP32_WIFI=y
 CONFIG_ESP32_WIFI_SAVE_PARAM=y
-CONFIG_ESP32_WIRELESS=y
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
diff --git a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c
index 8c0a1dcd1d..a8dfc1dbd5 100644
--- a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c
+++ b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c
@@ -68,7 +68,7 @@
 #  include "esp32_ble.h"
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
 #  include "esp32_board_wlan.h"
 #endif
 
@@ -210,7 +210,7 @@ int esp32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
   ret = board_wlan_init();
   if (ret < 0)
     {
diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_bringup.c b/boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_bringup.c
index d7a7a12a97..3a72792c2e 100644
--- a/boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_bringup.c
+++ b/boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_bringup.c
@@ -75,7 +75,7 @@
 #  include "esp32_ble.h"
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
 #  include "esp32_board_wlan.h"
 #endif
 
@@ -208,7 +208,7 @@ int esp32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_ESP32_WIRELESS
+#ifdef CONFIG_ESP32_WIFI
   ret = board_wlan_init();
   if (ret < 0)
     {


[incubator-nuttx] 02/03: esp32c3/Kconfig: Don't select options already selected.

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 20c6996e81872683c6ea580c6ab76881e0546427
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Mon Jul 18 14:21:55 2022 +0200

    esp32c3/Kconfig: Don't select options already selected.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/risc-v/src/esp32c3/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/Kconfig b/arch/risc-v/src/esp32c3/Kconfig
index 2535afed5b..215c738b8f 100644
--- a/arch/risc-v/src/esp32c3/Kconfig
+++ b/arch/risc-v/src/esp32c3/Kconfig
@@ -365,8 +365,6 @@ config ESP32C3_RSA_ACCELERATOR
 config ESP32C3_WIFI
 	bool "Wi-Fi"
 	default n
-	select NET
-	select ARCH_PHY_INTERRUPT
 	select ESP32C3_WIRELESS
 	---help---
 		Enable Wi-Fi support