1 /*
2 * wpa_supplicant - SME
3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
4 *
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
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,
28 struct disassoc_info *info);
29 void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s, const u8 *sa,
30 const u8 *da, u16 reason_code);
31 void sme_sa_query_rx(struct wpa_supplicant *wpa_s, const u8 *sa,
32 const u8 *data, size_t len);
33 void sme_state_changed(struct wpa_supplicant *wpa_s);
34 void sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
35 const u8 *prev_pending_bssid);
36 void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s);
37 void sme_deinit(struct wpa_supplicant *wpa_s);
38
39 int sme_proc_obss_scan(struct wpa_supplicant *wpa_s);
40 void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, int enable);
41
42 #else /* CONFIG_SME */
43
sme_authenticate(struct wpa_supplicant * wpa_s,struct wpa_bss * bss,struct wpa_ssid * ssid)44 static inline void sme_authenticate(struct wpa_supplicant *wpa_s,
45 struct wpa_bss *bss,
46 struct wpa_ssid *ssid)
47 {
48 }
49
sme_event_auth(struct wpa_supplicant * wpa_s,union wpa_event_data * data)50 static inline void sme_event_auth(struct wpa_supplicant *wpa_s,
51 union wpa_event_data *data)
52 {
53 }
54
sme_update_ft_ies(struct wpa_supplicant * wpa_s,const u8 * md,const u8 * ies,size_t ies_len)55 static inline int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
56 const u8 *ies, size_t ies_len)
57 {
58 return -1;
59 }
60
61
sme_event_assoc_reject(struct wpa_supplicant * wpa_s,union wpa_event_data * data)62 static inline void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
63 union wpa_event_data *data)
64 {
65 }
66
sme_event_auth_timed_out(struct wpa_supplicant * wpa_s,union wpa_event_data * data)67 static inline void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
68 union wpa_event_data *data)
69 {
70 }
71
sme_event_assoc_timed_out(struct wpa_supplicant * wpa_s,union wpa_event_data * data)72 static inline void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
73 union wpa_event_data *data)
74 {
75 }
76
sme_event_disassoc(struct wpa_supplicant * wpa_s,struct disassoc_info * info)77 static inline void sme_event_disassoc(struct wpa_supplicant *wpa_s,
78 struct disassoc_info *info)
79 {
80 }
81
sme_event_unprot_disconnect(struct wpa_supplicant * wpa_s,const u8 * sa,const u8 * da,u16 reason_code)82 static inline void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s,
83 const u8 *sa, const u8 *da,
84 u16 reason_code)
85 {
86 }
87
sme_state_changed(struct wpa_supplicant * wpa_s)88 static inline void sme_state_changed(struct wpa_supplicant *wpa_s)
89 {
90 }
91
92 static inline void
sme_disassoc_while_authenticating(struct wpa_supplicant * wpa_s,const u8 * prev_pending_bssid)93 sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
94 const u8 *prev_pending_bssid)
95 {
96 }
97
sme_clear_on_disassoc(struct wpa_supplicant * wpa_s)98 static inline void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s)
99 {
100 }
101
sme_deinit(struct wpa_supplicant * wpa_s)102 static inline void sme_deinit(struct wpa_supplicant *wpa_s)
103 {
104 }
105
sme_proc_obss_scan(struct wpa_supplicant * wpa_s)106 static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
107 {
108 return 0;
109 }
110
sme_sched_obss_scan(struct wpa_supplicant * wpa_s,int enable)111 static inline void sme_sched_obss_scan(struct wpa_supplicant *wpa_s,
112 int enable)
113 {
114 }
115
116 #endif /* CONFIG_SME */
117
118 #endif /* SME_H */
119