2021-09-29 10:37:59 +05:30
|
|
|
/*
|
2020-07-27 14:41:40 +05:30
|
|
|
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
2020-11-12 13:48:24 +05:30
|
|
|
*
|
2021-09-29 10:37:59 +05:30
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2020-11-12 13:48:24 +05:30
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ESP_COMMON_I_H
|
|
|
|
#define ESP_COMMON_I_H
|
|
|
|
|
|
|
|
#include "utils/includes.h"
|
|
|
|
|
|
|
|
struct wpa_funcs;
|
2020-07-27 14:41:40 +05:30
|
|
|
extern struct wpa_supplicant g_wpa_supp;
|
2020-11-12 13:48:24 +05:30
|
|
|
|
2020-07-27 14:41:40 +05:30
|
|
|
#ifdef CONFIG_WPA_11KV_SUPPORT
|
2020-11-12 13:48:24 +05:30
|
|
|
struct ieee_mgmt_frame {
|
|
|
|
u8 sender[ETH_ALEN];
|
|
|
|
u8 channel;
|
|
|
|
u32 rssi;
|
|
|
|
size_t len;
|
|
|
|
u8 payload[0];
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t id;
|
|
|
|
uint32_t data;
|
|
|
|
} supplicant_event_t;
|
|
|
|
|
|
|
|
#define SUPPLICANT_API_LOCK() xSemaphoreTakeRecursive(s_supplicant_api_lock, portMAX_DELAY)
|
|
|
|
#define SUPPLICANT_API_UNLOCK() xSemaphoreGiveRecursive(s_supplicant_api_lock)
|
|
|
|
|
|
|
|
#define SUPPLICANT_TASK_STACK_SIZE (6144 + TASK_STACK_SIZE_ADD)
|
|
|
|
enum SIG_SUPPLICANT {
|
|
|
|
SIG_SUPPLICANT_RX_ACTION,
|
|
|
|
SIG_SUPPLICANT_SCAN_DONE,
|
|
|
|
SIG_SUPPLICANT_DEL_TASK,
|
|
|
|
SIG_SUPPLICANT_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
int esp_supplicant_post_evt(uint32_t evt_id, uint32_t data);
|
|
|
|
void esp_get_tx_power(uint8_t *tx_power);
|
2020-07-27 14:41:40 +05:30
|
|
|
#ifdef CONFIG_MBO
|
|
|
|
bool mbo_bss_profile_match(u8 *bssid);
|
|
|
|
#endif
|
|
|
|
#endif
|
2021-11-10 11:48:00 +05:30
|
|
|
int esp_supplicant_common_init(struct wpa_funcs *wpa_cb);
|
2021-05-25 10:54:57 +05:30
|
|
|
void esp_supplicant_common_deinit(void);
|
2021-09-29 10:37:59 +05:30
|
|
|
void esp_set_scan_ie(void);
|
2020-07-27 14:41:40 +05:30
|
|
|
void esp_set_assoc_ie(uint8_t *bssid, const u8 *ies, size_t ies_len, bool add_mdie);
|
2020-11-12 13:48:24 +05:30
|
|
|
#endif
|