Merge branch 'feature/bringup_esp32c6_chip_wifi_rebase_master_2' into 'master'

esp_wifi: add txop limit support, sync header

See merge request espressif/esp-idf!21913
This commit is contained in:
Jiang Jiang Jian
2023-01-31 19:41:50 +08:00
12 changed files with 152 additions and 100 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -86,7 +86,7 @@ static int wifi_cmd_itwt(int argc, char **argv)
// teardown a given flow id, all_twt has a high priority
int flow_id = itwt_args.flowid->count ? itwt_args.flowid->ival[0] : (-1);
bool all_twt = itwt_args.all_twt->count ? ((itwt_args.all_twt->ival[0] == 1) ? true : false) : false;
flow_id = (all_twt == true) ? 8 : flow_id;
flow_id = (all_twt == true) ? FLOW_ID_ALL : flow_id;
if (flow_id >= 0) {
err = esp_wifi_sta_itwt_teardown(flow_id);
ESP_LOGI(TAG, "(itwt)teardown, flow_id:%d, all_twt:%d, err:0x%x", flow_id, all_twt, err);
@@ -98,7 +98,7 @@ static int wifi_cmd_itwt(int argc, char **argv)
// suspend a given flow id
int flow_id = itwt_args.flowid->count ? itwt_args.flowid->ival[0] : (-1);
bool all_twt = itwt_args.all_twt->count ? (itwt_args.all_twt->ival[0] ? true : false) : false;
flow_id = (all_twt == true) ? 8 : flow_id;
flow_id = (all_twt == true) ? FLOW_ID_ALL : flow_id;
int suspend_time_ms = itwt_args.suspend_time_ms->count ? itwt_args.suspend_time_ms->ival[0] : 0;
if (flow_id > 0) {
err = esp_wifi_sta_itwt_suspend(flow_id, suspend_time_ms);
+1 -1
View File
@@ -193,7 +193,7 @@ void initialise_wifi(void)
esp_wifi_enable_rx_statistics(true, false);
#endif
#endif
#if CONFIG_ENABLE_WIFI_TX_STATS
#if CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS
esp_wifi_enable_tx_statistics(ESP_WIFI_ACI_BE, true);
#endif
initialized = true;
@@ -17,3 +17,6 @@ CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_IP_REASS_MAX_PBUFS=15
CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS=n
CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS=n
+7 -5
View File
@@ -8,18 +8,20 @@ This example shows how to use itwt of wifi.
Itwt only works in station mode. And AP needs to support the capability of itwt.
This example support command "itwt, itwt_probe, itwt_info" to config itwt.
Itwt can works under differnet power save mode.
* itwt: this command is for itwt setup/teardown.
### Modem sleep (supported)
This is default mode. Under this mode, can support console command "itwt, probe" to config itwt.
* itwt_probe: this command will send a probe request to update tsf time with ap
* itwt: this command is for itwt setup/teardown/suspend.
* probe: this command will send a probe request to update tsf time with ap
* itwt_info: this command will send a TWT Information frame to AP for suspending/resuming extablished iTWT agreements.
### Light Sleep (will support)
Need system suport light sleep. Console command will not support in this mode.
### Typical current consumption with Itwt enabled
### Typical current consumption with Itwt disabled
@@ -15,3 +15,6 @@ CONFIG_LWIP_TCP_WND_DEFAULT=34000
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS=n
CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS=n