1 /* 2 * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef _ESP_RRM_H 8 #define _ESP_RRM_H 9 10 #include <stdbool.h> 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 /** 16 * @brief Callback function type to get neighbor report 17 * 18 * @param ctx: neighbor report context 19 * @param report: neighbor report 20 * @param report_len: neighbor report length 21 * 22 * @return 23 * - void 24 */ 25 typedef void (*neighbor_rep_request_cb)(void *ctx, const uint8_t *report, size_t report_len); 26 27 /** 28 * @brief Send Radio measurement neighbor report request to connected AP 29 * 30 * @param cb: callback function for neighbor report 31 * @param cb_ctx: callback context 32 * 33 * @return 34 * - 0: success 35 * - -1: AP does not support RRM 36 * - -2: station not connected to AP 37 */ 38 int esp_rrm_send_neighbor_rep_request(neighbor_rep_request_cb cb, 39 void *cb_ctx); 40 41 /** 42 * @brief Check RRM capability of connected AP 43 * 44 * @return 45 * - true: AP supports RRM 46 * - false: AP does not support RRM or station not connected to AP 47 */ 48 bool esp_rrm_is_rrm_supported_connection(void); 49 50 #ifdef __cplusplus 51 } 52 #endif 53 #endif 54