mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-18 10:31:09 +00:00
fix(esp_wifi): Support for esp_wifi_remote
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#if CONFIG_SOC_WIFI_HE_SUPPORT
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
@@ -201,3 +204,5 @@ esp_err_t esp_wifi_sta_set_bss_color_collision_detection(int threshold, int dura
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CONFIG_SOC_WIFI_HE_SUPPORT
|
||||
|
||||
@@ -183,6 +183,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
|
||||
extern wifi_osi_funcs_t g_wifi_osi_funcs;
|
||||
|
||||
#define WIFI_INIT_CONFIG_MAGIC 0x1F2F3F4F
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -13,6 +13,19 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef ESP_WIFI_MAX_CONN_NUM
|
||||
// Number of maximum wifi connection may be undefined if we have no native wifi support on this target
|
||||
// and at the same time there's no native interface injected by the wifi_remote component.
|
||||
// In this case, we just let the header compilable, since no wifi API could be used (let's make a sanity check)
|
||||
#if !CONFIG_SOC_WIFI_SUPPORTED && !CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||
#define ESP_WIFI_MAX_CONN_NUM (15)
|
||||
typedef struct wifi_sta_list_t wifi_sta_list_t;
|
||||
#else
|
||||
#error WiFi header mismatch! Please make sure you use the correct version of WiFi API
|
||||
#endif
|
||||
#endif // ESP_WIFI_MAX_CONN_NUM
|
||||
|
||||
/**
|
||||
* @brief station list structure
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#ifndef __ESP_WIFI_TYPES_H__
|
||||
#define __ESP_WIFI_TYPES_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_event_base.h"
|
||||
#include "esp_interface.h"
|
||||
|
||||
@@ -430,6 +433,15 @@ typedef struct {
|
||||
uint8_t payload[0]; /**< Payload. Length is equal to value in 'length' field, minus 4. */
|
||||
} vendor_ie_data_t;
|
||||
|
||||
/**
|
||||
* @brief Forward declare the Rx ctrl packet struct, as it is TARGET dependent and will be defined
|
||||
* in the "native" wifi types (types tightly coupled to wifi-lib implementation)
|
||||
*/
|
||||
typedef struct wifi_pkt_rx_ctrl_t wifi_pkt_rx_ctrl_t;
|
||||
|
||||
/**
|
||||
* @brief Rx Control Packet alias used in wifi-lib implementation
|
||||
*/
|
||||
typedef struct wifi_pkt_rx_ctrl_t esp_wifi_rxctrl_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_wifi_types_generic.h"
|
||||
#if CONFIG_SOC_WIFI_HE_SUPPORT
|
||||
#include "esp_wifi_he_types.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32C2
|
||||
#define ESP_WIFI_MAX_CONN_NUM (4) /**< max number of stations which can connect to ESP32C2 soft-AP */
|
||||
@@ -78,20 +82,11 @@ typedef struct wifi_pkt_rx_ctrl_t{
|
||||
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
|
||||
|
||||
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
|
||||
*/
|
||||
typedef struct {
|
||||
wifi_pkt_rx_ctrl_t rx_ctrl; /**< metadata header */
|
||||
uint8_t payload[0]; /**< Data or management payload. Length of payload is described by rx_ctrl.sig_len. Type of content determined by packet type argument of callback. */
|
||||
} wifi_promiscuous_pkt_t;
|
||||
|
||||
/**
|
||||
* @brief Channel state information(CSI) configuration type
|
||||
*
|
||||
*/
|
||||
#if !CONFIG_SOC_WIFI_HE_SUPPORT
|
||||
typedef struct wifi_csi_config_t{
|
||||
bool lltf_en; /**< enable to receive legacy long training field(lltf) data. Default enabled */
|
||||
bool htltf_en; /**< enable to receive HT long training field(htltf) data. Default enabled */
|
||||
@@ -106,6 +101,13 @@ typedef struct wifi_csi_config_t{
|
||||
|
||||
typedef wifi_pkt_rx_ctrl_t esp_wifi_rxctrl_t;
|
||||
|
||||
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
|
||||
*/
|
||||
typedef struct {
|
||||
wifi_pkt_rx_ctrl_t rx_ctrl; /**< metadata header */
|
||||
uint8_t payload[0]; /**< Data or management payload. Length of payload is described by rx_ctrl.sig_len. Type of content determined by packet type argument of callback. */
|
||||
} wifi_promiscuous_pkt_t;
|
||||
|
||||
/**
|
||||
* @brief CSI data type
|
||||
*
|
||||
@@ -121,3 +123,7 @@ typedef struct wifi_csi_info_t {
|
||||
uint8_t *payload; /**< payload of the wifi packet */
|
||||
uint16_t payload_len; /**< payload len of the wifi packet */
|
||||
} wifi_csi_info_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user