From 2e53b81f647a97def1a76b5eb352fd2b4ab7405a Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 3 Sep 2024 12:47:18 +0200 Subject: [PATCH] fix(wifi_remote): Update per espressif/esp-idf@27f61966 --- components/esp_wifi_remote/Kconfig | 88 +++++++++++++++---- .../esp_wifi_remote/esp_wifi_remote_weak.c | 55 ++++++++++++ .../esp_wifi_remote/esp_wifi_with_remote.c | 55 ++++++++++++ .../include/esp_wifi_remote_api.h | 11 +++ .../include/esp_wifi_types_native.h | 80 ++++++++--------- .../components/esp_hosted/esp_hosted_mock.c | 55 ++++++++++++ .../esp_hosted/include/esp_hosted_mock.h | 11 +++ .../test/smoke_test/main/all_wifi_calls.c | 59 +++++++++++++ .../smoke_test/main/all_wifi_remote_calls.c | 59 +++++++++++++ 9 files changed, 416 insertions(+), 57 deletions(-) diff --git a/components/esp_wifi_remote/Kconfig b/components/esp_wifi_remote/Kconfig index 918e11bfa..80fde92a9 100644 --- a/components/esp_wifi_remote/Kconfig +++ b/components/esp_wifi_remote/Kconfig @@ -250,7 +250,10 @@ menu "Wi-Fi Remote" range 6 32 default 32 help - Set the number of WiFi management short buffer. + Set the maximum number of Wi-Fi management short buffers. These buffers are dynamically allocated, + with their size determined by the length of the management packet to be sent. When a management + packet is less than 64 bytes, the Wi-Fi driver classifies it as a short management packet and + assigns it to one of these buffers. config ESP_WIFI_IRAM_OPT bool "WiFi IRAM speed optimization" @@ -263,7 +266,7 @@ menu "Wi-Fi Remote" config ESP_WIFI_EXTRA_IRAM_OPT bool "WiFi EXTRA IRAM speed optimization" - default y if SLAVE_IDF_TARGET_ESP32C6 + default y if SLAVE_SOC_WIFI_HE_SUPPORT default n help Select this option to place additional frequently called Wi-Fi library functions @@ -318,6 +321,7 @@ menu "Wi-Fi Remote" bool "WiFi SLP IRAM speed optimization" select PM_SLP_DEFAULT_PARAMS_OPT select PERIPH_CTRL_FUNC_IN_IRAM + default y if SLAVE_SOC_WIFI_HE_SUPPORT help Select this option to place called Wi-Fi library TBTT process and receive beacon functions in IRAM. Some functions can be put in IRAM either by ESP_WIFI_IRAM_OPT and ESP_WIFI_RX_IRAM_OPT, or this one. @@ -330,17 +334,30 @@ menu "Wi-Fi Remote" int "Minimum active time" range 8 60 default 50 - depends on ESP_WIFI_SLP_IRAM_OPT help - The minimum timeout for waiting to receive data, unit: milliseconds. + Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station enters the active state, + it will work for at least ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME. If a data packet is received or sent + during this period, the time will be refreshed. If the time is up, but the station still has packets + to receive or send, the time will also be refreshed. unit: milliseconds. config ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME int "Maximum keep alive time" range 10 60 default 10 - depends on ESP_WIFI_SLP_IRAM_OPT help - The maximum time that wifi keep alive, unit: seconds. + Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. If no packet has been + sent within ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME, a null data packet will be sent + to maintain the connection with the AP. unit: seconds. + + config ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME + int "Minimum wait broadcast data time" + range 10 30 + default 15 + help + Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station knows through the beacon + that AP will send broadcast packet, it will wait for ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME + before entering the sleep process. If a broadcast packet is received with more data bits, the time + will refreshed. unit: milliseconds. config ESP_WIFI_FTM_ENABLE bool "WiFi FTM" @@ -375,7 +392,7 @@ menu "Wi-Fi Remote" config ESP_WIFI_GMAC_SUPPORT bool "WiFi GMAC Support(GMAC128 and GMAC256)" - default n + default y help Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192 bit certification. @@ -453,14 +470,6 @@ menu "Wi-Fi Remote" help Enable WiFi Aware (NAN) feature. - config ESP_WIFI_ENABLE_WIFI_TX_STATS - bool "Enable Wi-Fi transmission statistics" - depends on SLAVE_SOC_WIFI_HE_SUPPORT - default "y" - help - Enable Wi-Fi transmission statistics. Total support 4 access category. Each access category - will use 346 bytes memory. - config ESP_WIFI_MBEDTLS_CRYPTO bool "Use MbedTLS crypto APIs" default y @@ -597,10 +606,18 @@ menu "Wi-Fi Remote" help Select this option to enable WPS registrar support in softAP mode. + config ESP_WIFI_ENABLE_WIFI_TX_STATS + bool "Enable Wi-Fi transmission statistics" + depends on SLAVE_SOC_WIFI_HE_SUPPORT + default n + help + Enable Wi-Fi transmission statistics. Total support 4 access category. Each access category + will use 346 bytes memory. + config ESP_WIFI_ENABLE_WIFI_RX_STATS bool "Enable Wi-Fi reception statistics" depends on SLAVE_SOC_WIFI_HE_SUPPORT - default "y" + default n help Enable Wi-Fi reception statistics. Total support 2 access category. Each access category will use 190 bytes memory. @@ -608,10 +625,47 @@ menu "Wi-Fi Remote" config ESP_WIFI_ENABLE_WIFI_RX_MU_STATS bool "Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics" depends on ESP_WIFI_ENABLE_WIFI_RX_STATS - default "y" + default n help Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics. Will use 10932 bytes memory. + config ESP_WIFI_TX_HETB_QUEUE_NUM + int "WiFi TX HE TB QUEUE number for STA HE TB PPDU transmission" + depends on SLAVE_SOC_WIFI_HE_SUPPORT + range 1 4 + default 3 + help + Set the maximum number of queue that can be aggregated by the STA in the A-MPDU carried in the + HE TB PPDU. + + config ESP_WIFI_ENABLE_DUMP_HESIGB + bool "Enable Wi-Fi dump HE-SIGB which is contained in DL HE MU PPDUs" + depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G + default "n" + help + Enable Wi-Fi dump HE-SIGB which is contained in DL HE MU PPDUs. + + config ESP_WIFI_ENABLE_DUMP_MU_CFO + bool "Enable Wi-Fi dump MU CFO" + depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G + default "n" + help + Enable Wi-Fi dump MU CFO. + + config ESP_WIFI_ENABLE_DUMP_CTRL_NDPA + bool "Enable Wi-Fi dump NDPA frames" + depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G + default "n" + help + Enable Wi-Fi dump NDPA frames. + + config ESP_WIFI_ENABLE_DUMP_CTRL_BFRP + bool "Enable Wi-Fi dump BFRP frames" + depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G + default "n" + help + Enable Wi-Fi dump BFRP frames. + menu "WPS Configuration Options" config ESP_WIFI_WPS_STRICT bool "Strictly validate all WPS attributes" diff --git a/components/esp_wifi_remote/esp_wifi_remote_weak.c b/components/esp_wifi_remote/esp_wifi_remote_weak.c index e78732119..96979dfd6 100644 --- a/components/esp_wifi_remote/esp_wifi_remote_weak.c +++ b/components/esp_wifi_remote/esp_wifi_remote_weak.c @@ -71,6 +71,16 @@ WEAK esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Boo LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); } +WEAK esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + WEAK esp_err_t esp_wifi_remote_scan_stop(void) { LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); @@ -266,6 +276,11 @@ WEAK esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config) LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); } +WEAK esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + WEAK esp_err_t esp_wifi_remote_set_csi(_Bool en) { LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); @@ -375,3 +390,43 @@ WEAK esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi) { LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); } + +WEAK esp_err_t esp_wifi_remote_set_band(wifi_band_t band) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_get_band(wifi_band_t *band) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} + +WEAK esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw) +{ + LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED); +} diff --git a/components/esp_wifi_remote/esp_wifi_with_remote.c b/components/esp_wifi_remote/esp_wifi_with_remote.c index c78aaf966..ad9764330 100644 --- a/components/esp_wifi_remote/esp_wifi_with_remote.c +++ b/components/esp_wifi_remote/esp_wifi_with_remote.c @@ -67,6 +67,16 @@ esp_err_t esp_wifi_scan_start(const wifi_scan_config_t *config, _Bool block) return esp_wifi_remote_scan_start(config, block); } +esp_err_t esp_wifi_set_scan_parameters(const wifi_scan_default_params_t *config) +{ + return esp_wifi_remote_set_scan_parameters(config); +} + +esp_err_t esp_wifi_get_scan_parameters(wifi_scan_default_params_t *config) +{ + return esp_wifi_remote_get_scan_parameters(config); +} + esp_err_t esp_wifi_scan_stop(void) { return esp_wifi_remote_scan_stop(); @@ -262,6 +272,11 @@ esp_err_t esp_wifi_set_csi_config(const wifi_csi_config_t *config) return esp_wifi_remote_set_csi_config(config); } +esp_err_t esp_wifi_get_csi_config(wifi_csi_config_t *config) +{ + return esp_wifi_remote_get_csi_config(config); +} + esp_err_t esp_wifi_set_csi(_Bool en) { return esp_wifi_remote_set_csi(en); @@ -371,3 +386,43 @@ esp_err_t esp_wifi_sta_get_rssi(int *rssi) { return esp_wifi_remote_sta_get_rssi(rssi); } + +esp_err_t esp_wifi_set_band(wifi_band_t band) +{ + return esp_wifi_remote_set_band(band); +} + +esp_err_t esp_wifi_get_band(wifi_band_t *band) +{ + return esp_wifi_remote_get_band(band); +} + +esp_err_t esp_wifi_set_band_mode(wifi_band_mode_t band_mode) +{ + return esp_wifi_remote_set_band_mode(band_mode); +} + +esp_err_t esp_wifi_get_band_mode(wifi_band_mode_t *band_mode) +{ + return esp_wifi_remote_get_band_mode(band_mode); +} + +esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols) +{ + return esp_wifi_remote_set_protocols(ifx, protocols); +} + +esp_err_t esp_wifi_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols) +{ + return esp_wifi_remote_get_protocols(ifx, protocols); +} + +esp_err_t esp_wifi_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw) +{ + return esp_wifi_remote_set_bandwidths(ifx, bw); +} + +esp_err_t esp_wifi_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw) +{ + return esp_wifi_remote_get_bandwidths(ifx, bw); +} diff --git a/components/esp_wifi_remote/include/esp_wifi_remote_api.h b/components/esp_wifi_remote/include/esp_wifi_remote_api.h index 2ddcd7ee2..9704c1560 100644 --- a/components/esp_wifi_remote/include/esp_wifi_remote_api.h +++ b/components/esp_wifi_remote/include/esp_wifi_remote_api.h @@ -17,6 +17,8 @@ esp_err_t esp_wifi_remote_disconnect(void); esp_err_t esp_wifi_remote_clear_fast_connect(void); esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid); esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block); +esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config); +esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config); esp_err_t esp_wifi_remote_scan_stop(void); esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number); esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records); @@ -56,6 +58,7 @@ esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask); esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq); esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx); esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config); +esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config); esp_err_t esp_wifi_remote_set_csi(_Bool en); int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface); esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec); @@ -78,3 +81,11 @@ esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid); esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode); esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled); esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi); +esp_err_t esp_wifi_remote_set_band(wifi_band_t band); +esp_err_t esp_wifi_remote_get_band(wifi_band_t *band); +esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode); +esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode); +esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols); +esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols); +esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw); +esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw); diff --git a/components/esp_wifi_remote/include/esp_wifi_types_native.h b/components/esp_wifi_remote/include/esp_wifi_types_native.h index 00047f899..4ae9c8025 100644 --- a/components/esp_wifi_remote/include/esp_wifi_types_native.h +++ b/components/esp_wifi_remote/include/esp_wifi_types_native.h @@ -18,7 +18,7 @@ extern "C" { #if CONFIG_SLAVE_IDF_TARGET_ESP32C2 #define ESP_WIFI_MAX_CONN_NUM (4) /**< max number of stations which can connect to ESP32C2 soft-AP */ -#elif CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C6 +#elif CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C6 || CONFIG_SLAVE_IDF_TARGET_ESP32C5 #define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */ #else #define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */ @@ -35,54 +35,54 @@ typedef esp_wifi_rxctrl_t wifi_pkt_rx_ctrl_t; #else /** @brief Received packet radio metadata header, this is the common header at the beginning of all promiscuous mode RX callback buffers */ typedef struct { - signed rssi:8; /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */ - unsigned rate:5; /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */ - unsigned :1; /**< reserved */ - unsigned sig_mode:2; /**< Protocol of the reveived packet, 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */ - unsigned :16; /**< reserved */ - unsigned mcs:7; /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */ - unsigned cwb:1; /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */ - unsigned :16; /**< reserved */ - unsigned smoothing:1; /**< Set to 1 indicates that channel estimate smoothing is recommended. + signed rssi: 8; /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */ + unsigned rate: 5; /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */ + unsigned : 1; /**< reserved */ + unsigned sig_mode: 2; /**< Protocol of the received packet, 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */ + unsigned : 16; /**< reserved */ + unsigned mcs: 7; /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */ + unsigned cwb: 1; /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */ + unsigned : 16; /**< reserved */ + unsigned smoothing: 1; /**< Set to 1 indicates that channel estimate smoothing is recommended. Set to 0 indicates that only per-carrierindependent (unsmoothed) channel estimate is recommended. */ - unsigned not_sounding:1; /**< Set to 0 indicates that PPDU is a sounding PPDU. Set to 1indicates that the PPDU is not a sounding PPDU. + unsigned not_sounding: 1; /**< Set to 0 indicates that PPDU is a sounding PPDU. Set to 1indicates that the PPDU is not a sounding PPDU. sounding PPDU is used for channel estimation by the request receiver */ - unsigned :1; /**< reserved */ - unsigned aggregation:1; /**< Aggregation. 0: MPDU packet; 1: AMPDU packet */ - unsigned stbc:2; /**< Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet */ - unsigned fec_coding:1; /**< Forward Error Correction(FEC). Flag is set for 11n packets which are LDPC */ - unsigned sgi:1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */ + unsigned : 1; /**< reserved */ + unsigned aggregation: 1; /**< Aggregation. 0: MPDU packet; 1: AMPDU packet */ + unsigned stbc: 2; /**< Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet */ + unsigned fec_coding: 1; /**< Forward Error Correction(FEC). Flag is set for 11n packets which are LDPC */ + unsigned sgi: 1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */ #if CONFIG_SLAVE_IDF_TARGET_ESP32 - signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/ + signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/ #elif CONFIG_SLAVE_IDF_TARGET_ESP32S2 || CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2 - unsigned :8; /**< reserved */ + unsigned : 8; /**< reserved */ #endif - unsigned ampdu_cnt:8; /**< the number of subframes aggregated in AMPDU */ - unsigned channel:4; /**< primary channel on which this packet is received */ - unsigned secondary_channel:4; /**< secondary channel on which this packet is received. 0: none; 1: above; 2: below */ - unsigned :8; /**< reserved */ - unsigned timestamp:32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */ - unsigned :32; /**< reserved */ + unsigned ampdu_cnt: 8; /**< the number of subframes aggregated in AMPDU */ + unsigned channel: 4; /**< primary channel on which this packet is received */ + unsigned secondary_channel: 4; /**< secondary channel on which this packet is received. 0: none; 1: above; 2: below */ + unsigned : 8; /**< reserved */ + unsigned timestamp: 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */ + unsigned : 32; /**< reserved */ #if CONFIG_SLAVE_IDF_TARGET_ESP32S2 - unsigned :32; /**< reserved */ + unsigned : 32; /**< reserved */ #elif CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2 - signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/ - unsigned :24; /**< reserved */ - unsigned :32; /**< reserved */ + signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/ + unsigned : 24; /**< reserved */ + unsigned : 32; /**< reserved */ #endif - unsigned :31; /**< reserved */ - unsigned ant:1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */ + unsigned : 31; /**< reserved */ + unsigned ant: 1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */ #if CONFIG_SLAVE_IDF_TARGET_ESP32S2 - signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/ - unsigned :24; /**< reserved */ + signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/ + unsigned : 24; /**< reserved */ #elif CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2 - unsigned :32; /**< reserved */ - unsigned :32; /**< reserved */ - unsigned :32; /**< reserved */ + unsigned : 32; /**< reserved */ + unsigned : 32; /**< reserved */ + unsigned : 32; /**< reserved */ #endif - unsigned sig_len:12; /**< length of packet including Frame Check Sequence(FCS) */ - unsigned :12; /**< reserved */ - unsigned rx_state:8; /**< state of the packet. 0: no error; others: error numbers which are not public */ + unsigned sig_len: 12; /**< length of packet including Frame Check Sequence(FCS) */ + unsigned : 12; /**< reserved */ + unsigned rx_state: 8; /**< state of the packet. 0: no error; others: error numbers which are not public */ } wifi_pkt_rx_ctrl_t; #endif @@ -105,7 +105,6 @@ typedef struct { } wifi_csi_config_t; #endif // !CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT - /** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback. */ typedef struct { @@ -121,12 +120,13 @@ typedef struct wifi_csi_info_t { wifi_pkt_rx_ctrl_t rx_ctrl;/**< received packet radio metadata header of the CSI data */ uint8_t mac[6]; /**< source MAC address of the CSI data */ uint8_t dmac[6]; /**< destination MAC address of the CSI data */ - bool first_word_invalid; /**< first four bytes of the CSI data is invalid or not, true indicates the first four bytes is invalid due to hardware limition */ + bool first_word_invalid; /**< first four bytes of the CSI data is invalid or not, true indicates the first four bytes is invalid due to hardware limitation */ int8_t *buf; /**< valid buffer of CSI data */ uint16_t len; /**< valid length of CSI data */ 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; #ifdef __cplusplus diff --git a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c index 117d4a0da..c490148bc 100644 --- a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c +++ b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/esp_hosted_mock.c @@ -67,6 +67,16 @@ esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool blo return ESP_OK; } +esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config) +{ + return ESP_OK; +} + esp_err_t esp_wifi_remote_scan_stop(void) { return ESP_OK; @@ -262,6 +272,11 @@ esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config) return ESP_OK; } +esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config) +{ + return ESP_OK; +} + esp_err_t esp_wifi_remote_set_csi(_Bool en) { return ESP_OK; @@ -371,3 +386,43 @@ esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi) { return ESP_OK; } + +esp_err_t esp_wifi_remote_set_band(wifi_band_t band) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_get_band(wifi_band_t *band) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw) +{ + return ESP_OK; +} + +esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw) +{ + return ESP_OK; +} diff --git a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h index 2ddcd7ee2..9704c1560 100644 --- a/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h +++ b/components/esp_wifi_remote/test/smoke_test/components/esp_hosted/include/esp_hosted_mock.h @@ -17,6 +17,8 @@ esp_err_t esp_wifi_remote_disconnect(void); esp_err_t esp_wifi_remote_clear_fast_connect(void); esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid); esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block); +esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config); +esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config); esp_err_t esp_wifi_remote_scan_stop(void); esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number); esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records); @@ -56,6 +58,7 @@ esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask); esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq); esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx); esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config); +esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config); esp_err_t esp_wifi_remote_set_csi(_Bool en); int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface); esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec); @@ -78,3 +81,11 @@ esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid); esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode); esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled); esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi); +esp_err_t esp_wifi_remote_set_band(wifi_band_t band); +esp_err_t esp_wifi_remote_get_band(wifi_band_t *band); +esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode); +esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode); +esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols); +esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols); +esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw); +esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw); diff --git a/components/esp_wifi_remote/test/smoke_test/main/all_wifi_calls.c b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_calls.c index 78ce3f592..a5a4e8bf5 100644 --- a/components/esp_wifi_remote/test/smoke_test/main/all_wifi_calls.c +++ b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_calls.c @@ -62,6 +62,16 @@ void run_all_wifi_apis(void) esp_wifi_scan_start(config, block); } + { + const wifi_scan_default_params_t *config = NULL; + esp_wifi_set_scan_parameters(config); + } + + { + wifi_scan_default_params_t *config = NULL; + esp_wifi_get_scan_parameters(config); + } + { esp_wifi_scan_stop(); } @@ -275,6 +285,11 @@ void run_all_wifi_apis(void) esp_wifi_set_csi_config(config); } + { + wifi_csi_config_t *config = NULL; + esp_wifi_get_csi_config(config); + } + { _Bool en = 0; esp_wifi_set_csi(en); @@ -388,4 +403,48 @@ void run_all_wifi_apis(void) esp_wifi_sta_get_rssi(rssi); } + { + wifi_band_t band = 0; + esp_wifi_set_band(band); + } + + { + wifi_band_t *band = NULL; + esp_wifi_get_band(band); + } + + { + wifi_band_mode_t band_mode = 0; + esp_wifi_set_band_mode(band_mode); + } + + { + wifi_band_mode_t *band_mode = NULL; + esp_wifi_get_band_mode(band_mode); + } + + { + wifi_interface_t ifx = 0; + wifi_protocols_t *protocols = NULL; + esp_wifi_set_protocols(ifx, protocols); + } + + { + wifi_interface_t ifx = 0; + wifi_protocols_t *protocols = NULL; + esp_wifi_get_protocols(ifx, protocols); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidths_t *bw = NULL; + esp_wifi_set_bandwidths(ifx, bw); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidths_t *bw = NULL; + esp_wifi_get_bandwidths(ifx, bw); + } + } diff --git a/components/esp_wifi_remote/test/smoke_test/main/all_wifi_remote_calls.c b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_remote_calls.c index fd2bea18f..8861531b8 100644 --- a/components/esp_wifi_remote/test/smoke_test/main/all_wifi_remote_calls.c +++ b/components/esp_wifi_remote/test/smoke_test/main/all_wifi_remote_calls.c @@ -62,6 +62,16 @@ void run_all_wifi_remote_apis(void) esp_wifi_remote_scan_start(config, block); } + { + const wifi_scan_default_params_t *config = NULL; + esp_wifi_remote_set_scan_parameters(config); + } + + { + wifi_scan_default_params_t *config = NULL; + esp_wifi_remote_get_scan_parameters(config); + } + { esp_wifi_remote_scan_stop(); } @@ -275,6 +285,11 @@ void run_all_wifi_remote_apis(void) esp_wifi_remote_set_csi_config(config); } + { + wifi_csi_config_t *config = NULL; + esp_wifi_remote_get_csi_config(config); + } + { _Bool en = 0; esp_wifi_remote_set_csi(en); @@ -388,4 +403,48 @@ void run_all_wifi_remote_apis(void) esp_wifi_remote_sta_get_rssi(rssi); } + { + wifi_band_t band = 0; + esp_wifi_remote_set_band(band); + } + + { + wifi_band_t *band = NULL; + esp_wifi_remote_get_band(band); + } + + { + wifi_band_mode_t band_mode = 0; + esp_wifi_remote_set_band_mode(band_mode); + } + + { + wifi_band_mode_t *band_mode = NULL; + esp_wifi_remote_get_band_mode(band_mode); + } + + { + wifi_interface_t ifx = 0; + wifi_protocols_t *protocols = NULL; + esp_wifi_remote_set_protocols(ifx, protocols); + } + + { + wifi_interface_t ifx = 0; + wifi_protocols_t *protocols = NULL; + esp_wifi_remote_get_protocols(ifx, protocols); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidths_t *bw = NULL; + esp_wifi_remote_set_bandwidths(ifx, bw); + } + + { + wifi_interface_t ifx = 0; + wifi_bandwidths_t *bw = NULL; + esp_wifi_remote_get_bandwidths(ifx, bw); + } + }