Merge branch 'bugfix/add_header_files_for_wifi_os_adapter' into 'master'

Fix(esp_wifi):add missing stdbool.h and sdkconfig.h in wifi_os_adapter.h

Closes WIFI-6105

See merge request espressif/esp-idf!25669
This commit is contained in:
Jiang Jiang Jian
2023-11-13 22:46:44 +08:00
9 changed files with 38 additions and 30 deletions

View File

@@ -8,6 +8,10 @@
#define ESP_WIFI_OS_ADAPTER_H_ #define ESP_WIFI_OS_ADAPTER_H_
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "sdkconfig.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -14,6 +14,9 @@
During normal operation, you don't need to use any of these types or functions in this header. During normal operation, you don't need to use any of these types or functions in this header.
See esp_wifi.h & esp_wifi_types.h instead. See esp_wifi.h & esp_wifi_types.h instead.
*/ */
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -8,6 +8,7 @@
#define _ESP_WIFI_DEFAULT_H #define _ESP_WIFI_DEFAULT_H
#include "esp_netif.h" #include "esp_netif.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -1,11 +1,17 @@
/* /*
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_types.h"
#include "esp_netif_types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@@ -453,24 +453,26 @@ typedef struct {
signed rssi:8; /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */ 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 rate:5; /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */
unsigned :1; /**< reserved */ unsigned :1; /**< reserved */
unsigned sig_mode:2; /**< 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */ 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 :16; /**< reserved */
unsigned mcs:7; /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */ 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 cwb:1; /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */
unsigned :16; /**< reserved */ unsigned :16; /**< reserved */
unsigned smoothing:1; /**< reserved */ unsigned smoothing:1; /**< Set to 1 indicates that channel estimate smoothing is recommended.
unsigned not_sounding:1; /**< reserved */ 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.
sounding PPDU is used for channel estimation by the request receiver */
unsigned :1; /**< reserved */ unsigned :1; /**< reserved */
unsigned aggregation:1; /**< Aggregation. 0: MPDU packet; 1: AMPDU packet */ 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 stbc:2; /**< Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet */
unsigned fec_coding:1; /**< Flag is set for 11n packets which are LDPC */ 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 sgi:1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_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_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2 #elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2
unsigned :8; /**< reserved */ unsigned :8; /**< reserved */
#endif #endif
unsigned ampdu_cnt:8; /**< ampdu cnt */ unsigned ampdu_cnt:8; /**< the number of subframes aggregated in AMPDU */
unsigned channel:4; /**< primary channel on which this packet is received */ 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 secondary_channel:4; /**< secondary channel on which this packet is received. 0: none; 1: above; 2: below */
unsigned :8; /**< reserved */ unsigned :8; /**< reserved */
@@ -575,9 +577,12 @@ typedef struct {
wifi_pkt_rx_ctrl_t rx_ctrl;/**< received packet radio metadata header of the CSI data */ 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 mac[6]; /**< source MAC address of the CSI data */
uint8_t dmac[6]; /**< destination 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 */ 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 */
int8_t *buf; /**< buffer of CSI data */ int8_t *buf; /**< valid buffer of CSI data */
uint16_t len; /**< length 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 */
} wifi_csi_info_t; } wifi_csi_info_t;
/** /**

View File

@@ -1,20 +1,16 @@
// Copyright 2010-2017 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2010-2023 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SMARTCONFIG_ACK_H #ifndef SMARTCONFIG_ACK_H
#define SMARTCONFIG_ACK_H #define SMARTCONFIG_ACK_H
#include "esp_smartconfig.h"
#include "esp_err.h"
#include <stdint.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@@ -502,7 +502,6 @@ components/esp_system/test_eh_frame_parser/linker.ld
components/esp_system/ubsan.c components/esp_system/ubsan.c
components/esp_wifi/include/esp_private/esp_wifi_types_private.h components/esp_wifi/include/esp_private/esp_wifi_types_private.h
components/esp_wifi/include/esp_private/wifi_types.h components/esp_wifi/include/esp_private/wifi_types.h
components/esp_wifi/include/smartconfig_ack.h
components/esp_wifi/src/mesh_event.c components/esp_wifi/src/mesh_event.c
components/fatfs/diskio/diskio.c components/fatfs/diskio/diskio.c
components/fatfs/diskio/diskio_impl.h components/fatfs/diskio/diskio_impl.h

View File

@@ -88,7 +88,6 @@ components/esp_hw_support/include/esp_private/esp_memprot_internal.h
### Here are the files that use CONFIG_XXX values but don't include sdkconfig.h ### Here are the files that use CONFIG_XXX values but don't include sdkconfig.h
# #
components/esp_wifi/include/esp_private/wifi_os_adapter.h
components/esp_coex/include/private/esp_coexist_adapter.h components/esp_coex/include/private/esp_coexist_adapter.h
components/esp_coex/include/esp_coex_i154.h components/esp_coex/include/esp_coex_i154.h
### To be fixed: headers that rely on implicit inclusion ### To be fixed: headers that rely on implicit inclusion
@@ -110,10 +109,6 @@ components/esp_rom/include/esp32s2/rom/secure_boot.h
components/esp_rom/include/esp32s2/rom/opi_flash.h components/esp_rom/include/esp32s2/rom/opi_flash.h
components/esp_rom/include/esp32s2/rom/efuse.h components/esp_rom/include/esp32s2/rom/efuse.h
components/esp_ringbuf/include/freertos/ringbuf.h components/esp_ringbuf/include/freertos/ringbuf.h
components/esp_wifi/include/esp_wifi_crypto_types.h
components/esp_wifi/include/esp_wifi_netif.h
components/esp_wifi/include/smartconfig_ack.h
components/esp_wifi/include/esp_wifi_default.h
components/esp_netif/include/esp_netif_defaults.h components/esp_netif/include/esp_netif_defaults.h
components/esp_netif/include/esp_netif_net_stack.h components/esp_netif/include/esp_netif_net_stack.h
components/esp_netif/include/esp_netif_ppp.h components/esp_netif/include/esp_netif_ppp.h
@@ -121,7 +116,6 @@ components/protocomm/include/transports/protocomm_httpd.h
components/fatfs/src/diskio.h components/fatfs/src/diskio.h
components/fatfs/diskio/diskio_sdmmc.h components/fatfs/diskio/diskio_sdmmc.h
components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h
components/wifi_provisioning/include/wifi_provisioning/scheme_softap.h
components/usb/include/esp_private/usb_phy.h components/usb/include/esp_private/usb_phy.h
components/usb/include/usb/usb_types_stack.h components/usb/include/usb/usb_types_stack.h