mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-12-16 02:43:47 +08:00
feat(wpa_supplicant): sync include and port files with idf@664bf793
This commit is contained in:
@@ -44,7 +44,9 @@ extern "C" {
|
||||
/* Crypto callback functions */
|
||||
const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
|
||||
/* Mesh crypto callback functions */
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
const mesh_crypto_funcs_t g_wifi_default_mesh_crypto_funcs;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Supplicant initialization
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Hardware crypto support Copyright 2017 Espressif Systems (Shanghai) PTE LTD
|
||||
// Hardware crypto support Copyright 2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -12,11 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef ESP_WPA2_H
|
||||
#define ESP_WPA2_H
|
||||
#ifndef _ESP_WPA2_H
|
||||
#define _ESP_WPA2_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "esp_wifi_crypto_types.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_wifi_crypto_types.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -78,10 +79,10 @@ typedef struct {
|
||||
.wps_type = type, \
|
||||
.crypto_funcs = &g_wifi_default_wps_crypto_funcs, \
|
||||
.factory_info = { \
|
||||
.manufacturer = "ESPRESSIF", \
|
||||
.model_number = "ESP8266", \
|
||||
.model_name = "ESPRESSIF IOT", \
|
||||
.device_name = "ESP STATION", \
|
||||
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(manufacturer, "ESPRESSIF") \
|
||||
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(model_number, "ESP8266") \
|
||||
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(model_name, "ESPRESSIF IOT") \
|
||||
ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(device_name, "ESP STATION") \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ void wpa_debug_close_file(void);
|
||||
*/
|
||||
void wpa_debug_print_timestamp(void);
|
||||
|
||||
#ifdef DEBUG_PRINT
|
||||
/**
|
||||
* wpa_printf - conditional printf
|
||||
* @level: priority level (MSG_*) of the message
|
||||
@@ -58,8 +59,17 @@ void wpa_debug_print_timestamp(void);
|
||||
*
|
||||
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
||||
*/
|
||||
//#define DEBUG_PRINT
|
||||
//#define MSG_PRINT
|
||||
#define wpa_printf(level,fmt, args...) ESP_LOG_LEVEL_LOCAL(level, TAG, fmt, ##args)
|
||||
|
||||
void wpa_dump_mem(char* desc, uint8_t *addr, uint16_t len);
|
||||
static inline void wpa_hexdump_ascii(int level, const char *title, const u8 *buf, size_t len)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf, size_t len)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* wpa_hexdump - conditional hex dump
|
||||
@@ -72,19 +82,6 @@ void wpa_debug_print_timestamp(void);
|
||||
* output may be directed to stdout, stderr, and/or syslog based on
|
||||
* configuration. The contents of buf is printed out has hex dump.
|
||||
*/
|
||||
#ifdef DEBUG_PRINT
|
||||
#define wpa_printf(level,fmt, args...) ESP_LOG_LEVEL_LOCAL(level, TAG, fmt, ##args)
|
||||
|
||||
static inline void wpa_hexdump_ascii(int level, const char *title, const u8 *buf, size_t len)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf, size_t len)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void wpa_hexdump(int level, const char *title, const u8 *buf, size_t len);
|
||||
|
||||
static inline void wpa_hexdump_buf(int level, const char *title,
|
||||
@@ -148,13 +145,14 @@ void wpa_hexdump_ascii(int level, const char *title, const u8 *buf,
|
||||
void wpa_hexdump_ascii_key(int level, const char *title, const u8 *buf,
|
||||
size_t len);
|
||||
#else
|
||||
#define wpa_printf(level,fmt, args...)
|
||||
#define wpa_hexdump(...)
|
||||
#define wpa_hexdump_buf(...)
|
||||
#define wpa_hexdump_key(...)
|
||||
#define wpa_hexdump_buf_key(...)
|
||||
#define wpa_hexdump_ascii(...)
|
||||
#define wpa_hexdump_ascii_key(...)
|
||||
#define wpa_printf(level,fmt, args...) do {} while(0)
|
||||
#define wpa_hexdump(...) do {} while(0)
|
||||
#define wpa_dump_mem(...) do {} while(0)
|
||||
#define wpa_hexdump_buf(...) do {} while(0)
|
||||
#define wpa_hexdump_key(...) do {} while(0)
|
||||
#define wpa_hexdump_buf_key(...) do {} while(0)
|
||||
#define wpa_hexdump_ascii(...) do {} while(0)
|
||||
#define wpa_hexdump_ascii_key(...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#define wpa_auth_logger
|
||||
|
||||
@@ -38,7 +38,7 @@ void wpabuf_free(struct wpabuf *buf);
|
||||
void * wpabuf_put(struct wpabuf *buf, size_t len);
|
||||
struct wpabuf * wpabuf_concat(struct wpabuf *a, struct wpabuf *b);
|
||||
struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len);
|
||||
void wpabuf_printf(struct wpabuf *buf, char *fmt, ...) PRINTF_FORMAT(2, 3);
|
||||
void wpabuf_printf(struct wpabuf *buf, const char *fmt, ...) PRINTF_FORMAT(2, 3);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user