]> granicus.if.org Git - esp-idf/commitdiff
esp32: add options to disable/enable TX/RX AMPDU independently
authorLiu Zhi Fu <liuzhifu@espressif.com>
Fri, 17 Nov 2017 07:47:22 +0000 (15:47 +0800)
committerLiu Zhi Fu <liuzhifu@espressif.com>
Thu, 23 Nov 2017 01:42:31 +0000 (09:42 +0800)
Make menuconfig can disable/enable TX/RX AMPDU independently

components/esp32/Kconfig
components/esp32/include/esp_wifi.h
components/esp32/lib

index 39cffdc42bd7ea80aed424c44552ae98b87a646e..73e4fe4c64455bbeaa6152dcafdbb6cd3e62f53e 100644 (file)
@@ -874,16 +874,16 @@ config ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM
         can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
         buffers.
 
-config ESP32_WIFI_AMPDU_ENABLED
-    bool "WiFi AMPDU"
+config ESP32_WIFI_AMPDU_TX_ENABLED
+    bool "WiFi AMPDU TX"
     default y
     help
-        Select this option to enable AMPDU feature
+        Select this option to enable AMPDU TX feature
 
 
 config ESP32_WIFI_TX_BA_WIN
     int "WiFi AMPDU TX BA window size"
-    depends on ESP32_WIFI_AMPDU_ENABLED
+    depends on ESP32_WIFI_AMPDU_TX_ENABLED
     range 2 32
     default 6
     help
@@ -892,9 +892,15 @@ config ESP32_WIFI_TX_BA_WIN
         test the maximum UDP TX throughput with iperf etc. For iperf test in shieldbox, the recommended
         value is 9~12.
 
+config ESP32_WIFI_AMPDU_RX_ENABLED
+    bool "WiFi AMPDU RX"
+    default y
+    help
+        Select this option to enable AMPDU RX feature
+
 config ESP32_WIFI_RX_BA_WIN
     int "WiFi AMPDU RX BA window size"
-    depends on ESP32_WIFI_AMPDU_ENABLED
+    depends on ESP32_WIFI_AMPDU_RX_ENABLED
     range 2 32
     default 6
     help
index 6d47d2a5ab3d47e0fc8589948b43bd6485e757e8..47a056347cae734581e5fc8574642cf16fa77e8e 100755 (executable)
@@ -105,7 +105,8 @@ typedef struct {
     int                    tx_buf_type;            /**< WiFi TX buffer type */
     int                    static_tx_buf_num;      /**< WiFi static TX buffer number */
     int                    dynamic_tx_buf_num;     /**< WiFi dynamic TX buffer number */
-    int                    ampdu_enable;           /**< WiFi AMPDU feature enable flag */
+    int                    ampdu_rx_enable;        /**< WiFi AMPDU RX feature enable flag */
+    int                    ampdu_tx_enable;        /**< WiFi AMPDU TX feature enable flag */
     int                    nvs_enable;             /**< WiFi NVS flash enable flag */
     int                    nano_enable;            /**< Nano option for printf/scan family enable flag */
     int                    tx_ba_win;              /**< WiFi Block Ack TX window size */
@@ -125,10 +126,16 @@ typedef struct {
 #define WIFI_DYNAMIC_TX_BUFFER_NUM 0
 #endif
 
-#if CONFIG_ESP32_WIFI_AMPDU_ENABLED
-#define WIFI_AMPDU_ENABLED        1
+#if CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED
+#define WIFI_AMPDU_RX_ENABLED        1
 #else
-#define WIFI_AMPDU_ENABLED        0
+#define WIFI_AMPDU_RX_ENABLED        0
+#endif
+
+#if CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED
+#define WIFI_AMPDU_TX_ENABLED        1
+#else
+#define WIFI_AMPDU_TX_ENABLED        0
 #endif
 
 #if CONFIG_ESP32_WIFI_NVS_ENABLED
@@ -147,12 +154,16 @@ extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
 
 #define WIFI_INIT_CONFIG_MAGIC    0x1F2F3F4F
 
-#ifdef CONFIG_ESP32_WIFI_AMPDU_ENABLED
+#ifdef CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED
 #define WIFI_DEFAULT_TX_BA_WIN CONFIG_ESP32_WIFI_TX_BA_WIN
+#else
+#define WIFI_DEFAULT_TX_BA_WIN 0 /* unused if ampdu_tx_enable == false */
+#endif
+
+#ifdef CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED
 #define WIFI_DEFAULT_RX_BA_WIN CONFIG_ESP32_WIFI_RX_BA_WIN
 #else
-#define WIFI_DEFAULT_TX_BA_WIN 0 /* unused if ampdu_enable == false */
-#define WIFI_DEFAULT_RX_BA_WIN 0
+#define WIFI_DEFAULT_RX_BA_WIN 0 /* unused if ampdu_rx_enable == false */
 #endif
 
 #define WIFI_INIT_CONFIG_DEFAULT() { \
@@ -163,7 +174,8 @@ extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
     .tx_buf_type = CONFIG_ESP32_WIFI_TX_BUFFER_TYPE,\
     .static_tx_buf_num = WIFI_STATIC_TX_BUFFER_NUM,\
     .dynamic_tx_buf_num = WIFI_DYNAMIC_TX_BUFFER_NUM,\
-    .ampdu_enable = WIFI_AMPDU_ENABLED,\
+    .ampdu_rx_enable = WIFI_AMPDU_RX_ENABLED,\
+    .ampdu_tx_enable = WIFI_AMPDU_TX_ENABLED,\
     .nvs_enable = WIFI_NVS_ENABLED,\
     .nano_enable = WIFI_NANO_FORMAT_ENABLED,\
     .tx_ba_win = WIFI_DEFAULT_TX_BA_WIN,\
index 6cb9bf46b663781fd8fc57ef9c73c9c4068e5433..8919e66ee87d46c3f0c0f49598e8a9b86105e50c 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 6cb9bf46b663781fd8fc57ef9c73c9c4068e5433
+Subproject commit 8919e66ee87d46c3f0c0f49598e8a9b86105e50c