Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * wpa_supplicant - SME |
| 3 | * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi> |
| 4 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef SME_H |
| 10 | #define SME_H |
| 11 | |
| 12 | #ifdef CONFIG_SME |
| 13 | |
| 14 | void sme_authenticate(struct wpa_supplicant *wpa_s, |
| 15 | struct wpa_bss *bss, struct wpa_ssid *ssid); |
| 16 | void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode, |
| 17 | const u8 *bssid, u16 auth_type); |
| 18 | void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data); |
| 19 | int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md, |
| 20 | const u8 *ies, size_t ies_len); |
| 21 | void sme_event_assoc_reject(struct wpa_supplicant *wpa_s, |
| 22 | union wpa_event_data *data); |
| 23 | void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s, |
| 24 | union wpa_event_data *data); |
| 25 | void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s, |
| 26 | union wpa_event_data *data); |
| 27 | void sme_event_disassoc(struct wpa_supplicant *wpa_s, |
Dmitry Shmidt | c2ebb4b | 2013-07-24 12:57:51 -0700 | [diff] [blame] | 28 | struct disassoc_info *info); |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 29 | void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s, const u8 *sa, |
| 30 | const u8 *da, u16 reason_code); |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 31 | void sme_event_ch_switch(struct wpa_supplicant *wpa_s); |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 32 | void sme_sa_query_rx(struct wpa_supplicant *wpa_s, const u8 *da, const u8 *sa, |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 33 | const u8 *data, size_t len); |
| 34 | void sme_state_changed(struct wpa_supplicant *wpa_s); |
| 35 | void sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s, |
| 36 | const u8 *prev_pending_bssid); |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 37 | void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s); |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 38 | void sme_deinit(struct wpa_supplicant *wpa_s); |
| 39 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 40 | int sme_proc_obss_scan(struct wpa_supplicant *wpa_s); |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 41 | void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, int enable); |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 42 | void sme_external_auth_trigger(struct wpa_supplicant *wpa_s, |
| 43 | union wpa_event_data *data); |
| 44 | void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s, |
| 45 | const u8 *auth_frame, size_t len); |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 46 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 47 | #else /* CONFIG_SME */ |
| 48 | |
| 49 | static inline void sme_authenticate(struct wpa_supplicant *wpa_s, |
| 50 | struct wpa_bss *bss, |
| 51 | struct wpa_ssid *ssid) |
| 52 | { |
| 53 | } |
| 54 | |
| 55 | static inline void sme_event_auth(struct wpa_supplicant *wpa_s, |
| 56 | union wpa_event_data *data) |
| 57 | { |
| 58 | } |
| 59 | |
| 60 | static inline int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md, |
| 61 | const u8 *ies, size_t ies_len) |
| 62 | { |
| 63 | return -1; |
| 64 | } |
| 65 | |
| 66 | |
| 67 | static inline void sme_event_assoc_reject(struct wpa_supplicant *wpa_s, |
| 68 | union wpa_event_data *data) |
| 69 | { |
| 70 | } |
| 71 | |
| 72 | static inline void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s, |
| 73 | union wpa_event_data *data) |
| 74 | { |
| 75 | } |
| 76 | |
| 77 | static inline void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s, |
| 78 | union wpa_event_data *data) |
| 79 | { |
| 80 | } |
| 81 | |
| 82 | static inline void sme_event_disassoc(struct wpa_supplicant *wpa_s, |
Dmitry Shmidt | c2ebb4b | 2013-07-24 12:57:51 -0700 | [diff] [blame] | 83 | struct disassoc_info *info) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 84 | { |
| 85 | } |
| 86 | |
| 87 | static inline void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s, |
| 88 | const u8 *sa, const u8 *da, |
| 89 | u16 reason_code) |
| 90 | { |
| 91 | } |
| 92 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 93 | static inline void sme_event_ch_switch(struct wpa_supplicant *wpa_s) |
| 94 | { |
| 95 | } |
| 96 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 97 | static inline void sme_state_changed(struct wpa_supplicant *wpa_s) |
| 98 | { |
| 99 | } |
| 100 | |
| 101 | static inline void |
| 102 | sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s, |
| 103 | const u8 *prev_pending_bssid) |
| 104 | { |
| 105 | } |
| 106 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 107 | static inline void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s) |
| 108 | { |
| 109 | } |
| 110 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 111 | static inline void sme_deinit(struct wpa_supplicant *wpa_s) |
| 112 | { |
| 113 | } |
| 114 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 115 | static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s) |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 116 | { |
| 117 | return 0; |
| 118 | } |
| 119 | |
| 120 | static inline void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, |
| 121 | int enable) |
| 122 | { |
| 123 | } |
| 124 | |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 125 | static inline void sme_external_auth_trigger(struct wpa_supplicant *wpa_s, |
| 126 | union wpa_event_data *data) |
| 127 | { |
| 128 | } |
| 129 | |
| 130 | static inline void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s, |
| 131 | const u8 *auth_frame, size_t len) |
| 132 | { |
| 133 | } |
| 134 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 135 | #endif /* CONFIG_SME */ |
| 136 | |
| 137 | #endif /* SME_H */ |