1
8
9
10
11
12
13
14
15
18
19
20
21
22
25
26
27
32
33
34
35
36
37
38
39
40
41
42
43
44
51
52
53
54
55
56
57
58
59
60
61
62
63
64
69
70
71
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
132
133
134
141
142
143
144
145
146
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/* ... */
#ifndef WPA_SUPPLICANT_I_H
#define WPA_SUPPLICANT_I_H
#include "drivers/driver.h"
#include "common/ieee802_11_defs.h"
/* ... */
struct rrm_data {
unsigned int rrm_used:1;
/* ... */
void (*notify_neighbor_rep)(void *ctx, const u8 *neighbor_rep, size_t len);
/* ... */
void *neighbor_rep_cb_ctx;
u8 next_neighbor_rep_token;
u8 token;
u8 dst_addr[ETH_ALEN];
}{ ... };
struct wpa_bss_tmp_disallowed {
struct dl_list list;
u8 bssid[ETH_ALEN];
#ifndef ESP_SUPPLICANT
int rssi_threshold;
#endif
}{ ... };
#define SSID_MAX_LEN 32
struct beacon_rep_data {
u8 token;
u8 last_indication;
struct wpa_driver_scan_params scan_params;
u8 ssid[SSID_MAX_LEN];
size_t ssid_len;
u8 bssid[ETH_ALEN];
enum beacon_report_detail report_detail;
struct bitfield *eids;
}{ ... };
enum scan_trigger_reason {
REASON_INVALID,
REASON_RRM_BEACON_REPORT,
REASON_WNM_BSS_TRANS_REQ,
}{ ... };
#ifdef CONFIG_SAE_PK
struct sae_pk_elems {
u8 *fils_pk;
u8 fils_pk_len;
u8 *fils_key_confirm;
u8 fils_key_confirm_len;
u8 *sae_pk;
u8 sae_pk_len;
}{ ... };
/* ... */#endif
struct wpa_supplicant {
int scanning;
enum scan_trigger_reason scan_reason;
u64 scan_start_tsf;
u8 tsf_bssid[ETH_ALEN];
struct wpa_bss *current_bss;
struct dl_list bss;
struct dl_list bss_id;
size_t num_bss;
unsigned int bss_update_idx;
unsigned int bss_next_id;
/* ... */
struct wpa_bss **last_scan_res;
unsigned int last_scan_res_used;
unsigned int last_scan_res_size;
struct os_reltime last_scan;
struct os_reltime scan_trigger_time, scan_start_time;
u8 next_scan_bssid[ETH_ALEN];
uint32_t type, subtype;
u8 next_scan_chan;
#ifdef CONFIG_WNM
int disable_btm;
unsigned int disable_mbo_oce;
u8 extend_caps[8];
u8 wnm_dialog_token;
u8 wnm_reply;
u8 wnm_num_neighbor_report;
u8 wnm_mode;
u16 wnm_dissoc_timer;
u8 wnm_bss_termination_duration[12];
struct neighbor_report *wnm_neighbor_report_elements;
struct os_reltime wnm_cand_valid_until;
#ifdef CONFIG_MBO
unsigned int wnm_mbo_trans_reason_present:1;
u8 wnm_mbo_transition_reason;
struct wpa_mbo_non_pref_channel {
enum mbo_non_pref_chan_reason reason;
u8 oper_class;
u8 chan;
u8 preference;
}{...} *non_pref_chan;
size_t non_pref_chan_num;
u8 mbo_wnm_token;
/* ... */
u8 enable_oce;
struct dl_list bss_tmp_disallowed;/* ... */
#endif /* ... */
#endif
#ifdef CONFIG_RRM
uint8_t rrm_ie[5];
struct rrm_data rrm;
struct beacon_rep_data beacon_rep_data;
struct os_reltime beacon_rep_scan;/* ... */
#endif
#ifdef CONFIG_SAE_PK
struct sae_pk_elems sae_pk_elems;
#endif
}{ ... };
struct non_pref_chan_s;
int wpas_mbo_ie(struct wpa_supplicant *wpa_s, u8 *buf, size_t len,
int add_oce_capa);
const u8 * mbo_attr_from_mbo_ie(const u8 *mbo_ie, enum mbo_attr_id attr);
const u8 * wpas_mbo_get_bss_attr(struct wpa_bss *bss, enum mbo_attr_id attr);
const u8 * mbo_get_attr_from_ies(const u8 *ies, size_t ies_len,
enum mbo_attr_id attr);
void wpas_mbo_scan_ie(struct wpa_supplicant *wpa_s, struct wpabuf *ie);
void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *ie,
size_t len);
size_t wpas_mbo_ie_bss_trans_reject(struct wpa_supplicant *wpa_s, u8 *pos,
size_t len,
enum mbo_transition_reject_reason reason);
void wpas_mbo_update_cell_capa(struct wpa_supplicant *wpa_s, u8 mbo_cell_capa);
struct wpabuf * mbo_build_anqp_buf(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, u32 mbo_subtypes);
void mbo_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, const u8 *sa,
const u8 *data, size_t slen);
void wpas_update_mbo_connect_params(struct wpa_supplicant *wpa_s);
int wpas_mbo_update_non_pref_chan(struct wpa_supplicant *wpa_s,
struct non_pref_chan_s *non_pref_chan);
/* ... */
#endif