1 /* 2 * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef _ESP_WNM_H 8 #define _ESP_WNM_H 9 10 #include <stdbool.h> 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 /** 16 * enum btm_query_reason: Reason code for sending btm query 17 */ 18 enum btm_query_reason { 19 REASON_UNSPECIFIED = 0, 20 REASON_FRAME_LOSS = 1, 21 REASON_DELAY = 2, 22 REASON_BANDWIDTH = 3, 23 REASON_LOAD_BALANCE = 4, 24 REASON_RSSI = 5, 25 REASON_RETRANSMISSIONS = 6, 26 REASON_INTERFERENCE = 7, 27 REASON_GRAY_ZONE = 8, 28 REASON_PREMIUM_AP = 9, 29 }; 30 31 /** 32 * @brief Send bss transition query to connected AP 33 * 34 * @param query_reason: reason for sending query 35 * @param btm_candidates: btm candidates list if available 36 * @param cand_list: whether candidate list to be included from scan results available in supplicant's cache. 37 * 38 * @return 39 * - 0: success 40 * - -1: AP does not support BTM 41 * - -2: station not connected to AP 42 */ 43 int esp_wnm_send_bss_transition_mgmt_query(enum btm_query_reason query_reason, 44 const char *btm_candidates, 45 int cand_list); 46 47 /** 48 * @brief Check bss trasition capability of connected AP 49 * 50 * @return 51 * - true: AP supports BTM 52 * - false: AP does not support BTM or station not connected to AP 53 */ 54 bool esp_wnm_is_btm_supported_connection(void); 55 56 #ifdef __cplusplus 57 } 58 #endif 59 #endif 60