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/nuttx.git

commit 7b807a8540628d5abd2f840b82f65bda55e43500
Author: Tiago Medicci Serrano <[email protected]>
AuthorDate: Thu Mar 9 15:42:42 2023 -0300

    esp32-esp32c3/wifi: remove naming inconsistencies
    
    * Remove the 'COEXISTENCE' suffix from Wi-Fi's STA + SoftAP mode.
    Coexistence usually refers to Wi-Fi + BLE, instead of Wi-Fi's
    operation mode;
    * Remove commented debug code;
    * Remove outdate function descriptions;
---
 arch/risc-v/src/esp32c3/Kconfig                                   | 4 ++--
 arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c                    | 5 -----
 arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.h                    | 3 ++-
 arch/risc-v/src/esp32c3/esp32c3_wlan.c                            | 1 -
 arch/xtensa/src/esp32/Kconfig                                     | 4 ++--
 arch/xtensa/src/esp32/esp32_wifi_adapter.c                        | 5 -----
 arch/xtensa/src/esp32/esp32_wifi_adapter.h                        | 3 ++-
 arch/xtensa/src/esp32/esp32_wlan.c                                | 1 -
 boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig | 2 +-
 boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig    | 2 +-
 10 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/Kconfig b/arch/risc-v/src/esp32c3/Kconfig
index a2866074d5..de0f10296e 100644
--- a/arch/risc-v/src/esp32c3/Kconfig
+++ b/arch/risc-v/src/esp32c3/Kconfig
@@ -733,8 +733,8 @@ config ESP32C3_WIFI_STATION
 config ESP32C3_WIFI_SOFTAP
        bool "SoftAP mode"
 
-config ESP32C3_WIFI_STATION_SOFTAP_COEXISTENCE
-       bool "Station + SoftAP coexistence"
+config ESP32C3_WIFI_STATION_SOFTAP
+       bool "Station + SoftAP"
 
 endchoice # ESP32-C3 Wi-Fi mode
 
diff --git a/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c 
b/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c
index 1d91f8bec7..63af512b56 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c
@@ -4195,11 +4195,6 @@ static unsigned long esp_random_ulong(void)
 static IRAM_ATTR void esp_wifi_tx_done_cb(uint8_t ifidx, uint8_t *data,
                                           uint16_t *len, bool txstatus)
 {
-#if 0
-  wlinfo("INFO: ifidx=%d data=%p *len=%p txstatus=%d\n",
-         ifidx, data, len, txstatus);
-#endif
-
 #ifdef ESP32C3_WLAN_HAS_STA
   if (ifidx == ESP_IF_WIFI_STA)
     {
diff --git a/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.h 
b/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.h
index 1d2cfc1e03..b3165d45a0 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.h
+++ b/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.h
@@ -52,7 +52,7 @@ extern "C"
 #  define ESP32C3_WLAN_HAS_SOFTAP
 #  define ESP32C3_WLAN_SOFTAP_DEVNO 0
 #  define ESP32C3_WLAN_DEVS         1
-#elif defined(CONFIG_ESP32C3_WIFI_STATION_SOFTAP_COEXISTENCE)
+#elif defined(CONFIG_ESP32C3_WIFI_STATION_SOFTAP)
 #  define ESP32C3_WLAN_HAS_STA
 #  define ESP32C3_WLAN_HAS_SOFTAP
 #  define ESP32C3_WLAN_STA_DEVNO    0
@@ -716,6 +716,7 @@ int esp_wifi_softap_auth(struct iwreq *iwr, bool set);
  *
  * Input Parameters:
  *   iwr - The argument of the ioctl cmd
+ *   set - true: set data; false: get data
  *
  * Returned Value:
  *   OK on success (positive non-zero values are cmd-specific)
diff --git a/arch/risc-v/src/esp32c3/esp32c3_wlan.c 
b/arch/risc-v/src/esp32c3/esp32c3_wlan.c
index cc56944850..548d0a4e7e 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_wlan.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_wlan.c
@@ -1368,7 +1368,6 @@ static int wlan_sta_rx_done(void *buffer, uint16_t len, 
void *eb)
  *   station sending next packet.
  *
  * Input Parameters:
- *   ifidx  - The interface ID that the TX callback has been triggered from.
  *   data   - Pointer to the data transmitted.
  *   len    - Length of the data transmitted.
  *   status - True if data was transmitted successfully or false if failed.
diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index 987eb1b1c1..e19874ffc0 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -1989,8 +1989,8 @@ config ESP32_WIFI_STATION
 config ESP32_WIFI_SOFTAP
        bool "SoftAP mode"
 
-config ESP32_WIFI_STATION_SOFTAP_COEXISTENCE
-       bool "Station + SoftAP coexistence"
+config ESP32_WIFI_STATION_SOFTAP
+       bool "Station + SoftAP"
 
 endchoice # ESP32 Wi-Fi mode
 
diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.c 
b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
index f003863f8e..958125cbd1 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_adapter.c
+++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
@@ -4073,11 +4073,6 @@ static unsigned long esp_random_ulong(void)
 static IRAM_ATTR void esp_wifi_tx_done_cb(uint8_t ifidx, uint8_t *data,
                                           uint16_t *len, bool txstatus)
 {
-#if 0
-  wlinfo("ifidx=%d data=%p *len=%p txstatus=%d\n",
-         ifidx, data, len, txstatus);
-#endif
-
 #ifdef ESP32_WLAN_HAS_STA
   if (ifidx == ESP_IF_WIFI_STA)
     {
diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.h 
b/arch/xtensa/src/esp32/esp32_wifi_adapter.h
index 8219942e4d..ddf26b4aef 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_adapter.h
+++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.h
@@ -53,7 +53,7 @@ extern "C"
 #  define ESP32_WLAN_HAS_SOFTAP
 #  define ESP32_WLAN_SOFTAP_DEVNO 0
 #  define ESP32_WLAN_DEVS         1
-#elif defined(CONFIG_ESP32_WIFI_STATION_SOFTAP_COEXISTENCE)
+#elif defined(CONFIG_ESP32_WIFI_STATION_SOFTAP)
 #  define ESP32_WLAN_HAS_STA
 #  define ESP32_WLAN_HAS_SOFTAP
 #  define ESP32_WLAN_STA_DEVNO    0
@@ -734,6 +734,7 @@ int esp_wifi_softap_auth(struct iwreq *iwr, bool set);
  *
  * Input Parameters:
  *   iwr - The argument of the ioctl cmd
+ *   set - true: set data; false: get data
  *
  * Returned Value:
  *   OK on success (positive non-zero values are cmd-specific)
diff --git a/arch/xtensa/src/esp32/esp32_wlan.c 
b/arch/xtensa/src/esp32/esp32_wlan.c
index 827c6a4f49..c8f9e8c536 100644
--- a/arch/xtensa/src/esp32/esp32_wlan.c
+++ b/arch/xtensa/src/esp32/esp32_wlan.c
@@ -1697,7 +1697,6 @@ static int wlan_sta_rx_done(void *buffer, uint16_t len, 
void *eb)
  *   station sending next packet.
  *
  * Input Parameters:
- *   ifidx  - The interface id that the tx callback has been triggered from.
  *   data   - Pointer to the data transmitted.
  *   len    - Length of the data transmitted.
  *   status - True if data was transmitted successfully or false if failed.
diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig 
b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig
index 90fe1f51ae..2ec1a4fc98 100644
--- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig
+++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig
@@ -34,7 +34,7 @@ CONFIG_ESP32C3_STORAGE_MTD_OFFSET=0x110000
 CONFIG_ESP32C3_STORAGE_MTD_SIZE=0xf0000
 CONFIG_ESP32C3_WIFI=y
 CONFIG_ESP32C3_WIFI_SAVE_PARAM=y
-CONFIG_ESP32C3_WIFI_STATION_SOFTAP_COEXISTENCE=y
+CONFIG_ESP32C3_WIFI_STATION_SOFTAP=y
 CONFIG_EXAMPLES_DHCPD=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_FS_PROCFS=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig 
b/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig
index 55e8743c32..099f9df52e 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig
@@ -35,7 +35,7 @@ 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_WIFI_STATION_SOFTAP=y
 CONFIG_EXAMPLES_DHCPD=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_FS_PROCFS=y

Reply via email to