blob: 42d5a8317c7864570e9c53a5dca5e0b22253c614 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * wpa_supplicant - SME
3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#ifndef SME_H
10#define SME_H
11
12#ifdef CONFIG_SME
13
14void sme_authenticate(struct wpa_supplicant *wpa_s,
15 struct wpa_bss *bss, struct wpa_ssid *ssid);
16void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
17 const u8 *bssid, u16 auth_type);
18void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data);
19int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
20 const u8 *ies, size_t ies_len);
21void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
22 union wpa_event_data *data);
23void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
24 union wpa_event_data *data);
25void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
26 union wpa_event_data *data);
27void sme_event_disassoc(struct wpa_supplicant *wpa_s,
Dmitry Shmidtc2ebb4b2013-07-24 12:57:51 -070028 struct disassoc_info *info);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070029void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s, const u8 *sa,
30 const u8 *da, u16 reason_code);
Hai Shalom74f70d42019-02-11 14:42:39 -080031void sme_event_ch_switch(struct wpa_supplicant *wpa_s);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070032void sme_sa_query_rx(struct wpa_supplicant *wpa_s, const u8 *sa,
33 const u8 *data, size_t len);
34void sme_state_changed(struct wpa_supplicant *wpa_s);
35void sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
36 const u8 *prev_pending_bssid);
Dmitry Shmidtfb45fd52015-01-05 13:08:17 -080037void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070038void sme_deinit(struct wpa_supplicant *wpa_s);
39
Ahmed ElArabawy0ff61c52019-12-26 12:38:39 -080040int sme_proc_obss_scan(struct wpa_supplicant *wpa_s,
41 struct wpa_scan_results *scan_res);
Dmitry Shmidt04949592012-07-19 12:16:46 -070042void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, int enable);
Roshan Pius3a1667e2018-07-03 15:17:14 -070043void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
44 union wpa_event_data *data);
45void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
46 const u8 *auth_frame, size_t len);
Dmitry Shmidt04949592012-07-19 12:16:46 -070047
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070048#else /* CONFIG_SME */
49
50static inline void sme_authenticate(struct wpa_supplicant *wpa_s,
51 struct wpa_bss *bss,
52 struct wpa_ssid *ssid)
53{
54}
55
56static inline void sme_event_auth(struct wpa_supplicant *wpa_s,
57 union wpa_event_data *data)
58{
59}
60
61static inline int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
62 const u8 *ies, size_t ies_len)
63{
64 return -1;
65}
66
67
68static inline void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
69 union wpa_event_data *data)
70{
71}
72
73static inline void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
74 union wpa_event_data *data)
75{
76}
77
78static inline void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
79 union wpa_event_data *data)
80{
81}
82
83static inline void sme_event_disassoc(struct wpa_supplicant *wpa_s,
Dmitry Shmidtc2ebb4b2013-07-24 12:57:51 -070084 struct disassoc_info *info)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070085{
86}
87
88static inline void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s,
89 const u8 *sa, const u8 *da,
90 u16 reason_code)
91{
92}
93
Hai Shalom74f70d42019-02-11 14:42:39 -080094static inline void sme_event_ch_switch(struct wpa_supplicant *wpa_s)
95{
96}
97
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070098static inline void sme_state_changed(struct wpa_supplicant *wpa_s)
99{
100}
101
102static inline void
103sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
104 const u8 *prev_pending_bssid)
105{
106}
107
Dmitry Shmidtfb45fd52015-01-05 13:08:17 -0800108static inline void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s)
109{
110}
111
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700112static inline void sme_deinit(struct wpa_supplicant *wpa_s)
113{
114}
115
Ahmed ElArabawy0ff61c52019-12-26 12:38:39 -0800116static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s,
117 struct wpa_scan_results *scan_res)
Dmitry Shmidt04949592012-07-19 12:16:46 -0700118{
119 return 0;
120}
121
122static inline void sme_sched_obss_scan(struct wpa_supplicant *wpa_s,
123 int enable)
124{
125}
126
Roshan Pius3a1667e2018-07-03 15:17:14 -0700127static inline void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
128 union wpa_event_data *data)
129{
130}
131
132static inline void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
133 const u8 *auth_frame, size_t len)
134{
135}
136
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700137#endif /* CONFIG_SME */
138
139#endif /* SME_H */