From 9897fd9c87019780175b885e5b3b6f4ded21adc4 Mon Sep 17 00:00:00 2001 From: xuxiao Date: Thu, 18 Apr 2024 19:48:23 +0800 Subject: [PATCH] fix(wifi): fix some esp32c6 wifi bugs (Backport v5.2) --- .../esp_wifi/include/esp_wifi_he_types.h | 22 ++++++++++++++++++- components/esp_wifi/include/esp_wifi_types.h | 2 ++ components/esp_wifi/lib | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_he_types.h b/components/esp_wifi/include/esp_wifi_he_types.h index 41d4424abd..397cd088f5 100644 --- a/components/esp_wifi/include/esp_wifi_he_types.h +++ b/components/esp_wifi/include/esp_wifi_he_types.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -240,6 +240,26 @@ typedef struct { uint32_t actual_suspend_time_ms[8]; /**< the actual suspend time for each flow id, unit: ms */ } wifi_event_sta_itwt_suspend_t; +/** + * @brief TWT types + */ +typedef enum { + TWT_TYPE_INDIVIDUAL, /**< individual twt */ + TWT_TYPE_BROADCAST, /**< broadcast twt */ + TWT_TYPE_MAX, /**< the max value */ +} wifi_twt_type_t; + +/** Argument structure for twt configuration */ +typedef struct { + bool post_wakeup_event; /**< post twt wakeup event */ +} wifi_twt_config_t; + +/** Argument structure for WIFI_EVENT_TWT_WAKEUP event */ +typedef struct { + wifi_twt_type_t twt_type; /**< twt type */ + uint8_t flow_id; /**< flow id */ +} wifi_event_sta_twt_wakeup_t; + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index 95108b3e21..3d66423ee5 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -583,6 +583,7 @@ typedef struct { uint8_t *hdr; /**< header of the wifi packet */ uint8_t *payload; /**< payload of the wifi packet */ uint16_t payload_len; /**< payload len of the wifi packet */ + uint16_t rx_seq; /**< rx sequence number of the wifi packet */ } wifi_csi_info_t; /** @@ -895,6 +896,7 @@ typedef enum { WIFI_EVENT_ITWT_TEARDOWN, /**< iTWT teardown */ WIFI_EVENT_ITWT_PROBE, /**< iTWT probe */ WIFI_EVENT_ITWT_SUSPEND, /**< iTWT suspend */ + WIFI_EVENT_TWT_WAKEUP, /**< TWT wakeup */ WIFI_EVENT_NAN_STARTED, /**< NAN Discovery has started */ WIFI_EVENT_NAN_STOPPED, /**< NAN Discovery has stopped */ diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 6a55cb409b..4fba9c81ba 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 6a55cb409b50ee8c135b901cff9ba5323a03b6cc +Subproject commit 4fba9c81baa3baf0996a8697127aca176a89e350