2022-08-03 02:05:44 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2020-11-12 03:18:24 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ESP_WNM_H
|
|
|
|
#define _ESP_WNM_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* enum btm_query_reason: Reason code for sending btm query
|
|
|
|
*/
|
|
|
|
enum btm_query_reason {
|
|
|
|
REASON_UNSPECIFIED = 0,
|
|
|
|
REASON_FRAME_LOSS = 1,
|
|
|
|
REASON_DELAY = 2,
|
|
|
|
REASON_QOS_CAPACITY = 3,
|
|
|
|
REASON_FIRST_ASSOC = 4,
|
|
|
|
REASON_LOAD_BALALNCE = 5,
|
|
|
|
REASON_BETTER_AP = 6,
|
|
|
|
REASON_CURRENT_DEAUTH = 7,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Send bss transition query to connected AP
|
|
|
|
*
|
|
|
|
* @param query_reason: reason for sending query
|
|
|
|
* @param btm_candidates: btm candidates list if available
|
|
|
|
* @param cand_list: whether candidate list to be included from scan results available in supplicant's cache.
|
|
|
|
*
|
|
|
|
* @return
|
2022-08-03 02:05:44 -04:00
|
|
|
* - 0: success
|
|
|
|
* - -1: AP does not support BTM
|
|
|
|
* - -2: station not connected to AP
|
2020-11-12 03:18:24 -05:00
|
|
|
*/
|
|
|
|
int esp_wnm_send_bss_transition_mgmt_query(enum btm_query_reason query_reason,
|
|
|
|
const char *btm_candidates,
|
|
|
|
int cand_list);
|
|
|
|
|
2022-08-03 02:05:44 -04:00
|
|
|
/**
|
|
|
|
* @brief Check bss trasition capability of connected AP
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* - true: AP supports BTM
|
|
|
|
* - false: AP does not support BTM or station not connected to AP
|
|
|
|
*/
|
|
|
|
bool esp_wnm_is_btm_supported_connection(void);
|
2020-11-12 03:18:24 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|