-
Notifications
You must be signed in to change notification settings - Fork 7.2k
/
esp_mbo.h
66 lines (59 loc) · 2.26 KB
/
esp_mbo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _ESP_MBO_H
#define _ESP_MBO_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Enumeration of reasons for a channel being non-preferred in a wireless network.
*
* This enumeration defines various reasons why a specific channel might be considered non-preferred
* in a wireless network configuration.
*/
enum non_pref_chan_reason {
NON_PREF_CHAN_REASON_UNSPECIFIED = 0, /**< Unspecified reason for non-preference */
NON_PREF_CHAN_REASON_RSSI = 1, /**< Non-preferred due to low RSSI (Received Signal Strength Indication) */
NON_PREF_CHAN_REASON_EXT_INTERFERENCE = 2, /**< Non-preferred due to external interference */
NON_PREF_CHAN_REASON_INT_INTERFERENCE = 3, /**< Non-preferred due to internal interference */
};
/**
* @brief Structure representing a non-preferred channel in a wireless network.
*
* This structure encapsulates information about a non-preferred channel
* including the reason for its non-preference, the operating class, channel number, and preference level.
*/
struct non_pref_chan {
enum non_pref_chan_reason reason; /**< Reason for the channel being non-preferred */
uint8_t oper_class; /**< Operating class of the channel */
uint8_t chan; /**< Channel number */
uint8_t preference; /**< Preference level of the channel */
};
/**
* @brief Structure representing a list of non-preferred channels in a wireless network.
*
* This structure encapsulates information about a list of non-preferred channels
* including the number of non-preferred channels and an array of structures
* representing individual non-preferred channels.
*/
struct non_pref_chan_s {
size_t non_pref_chan_num; /**< Number of non-preferred channels in the list */
struct non_pref_chan chan[]; /**< Array of structures representing individual non-preferred channels */
};
/**
* @brief Update channel preference for MBO IE
*
* @param non_pref_chan: Non preference channel list
*
* @return
* - 0: success else failure
*/
int esp_mbo_update_non_pref_chan(struct non_pref_chan_s *non_pref_chan);
#ifdef __cplusplus
}
#endif
#endif