xref: /freebsd/contrib/wpa/wpa_supplicant/sme.h (revision a90b9d0159070121c221b966469c3e36d912bf82)
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 			    const u8 **link_bssids);
24 void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
25 			      union wpa_event_data *data);
26 void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
27 			       union wpa_event_data *data);
28 void sme_event_disassoc(struct wpa_supplicant *wpa_s,
29 			struct disassoc_info *info);
30 void sme_event_unprot_disconnect(struct wpa_supplicant *wpa_s, const u8 *sa,
31 				 const u8 *da, u16 reason_code);
32 void sme_event_ch_switch(struct wpa_supplicant *wpa_s);
33 void sme_sa_query_rx(struct wpa_supplicant *wpa_s, const u8 *da, const u8 *sa,
34 		     const u8 *data, size_t len);
35 void sme_state_changed(struct wpa_supplicant *wpa_s);
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 void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
42 			       union wpa_event_data *data);
43 void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
44 			       const u8 *auth_frame, size_t len);
45 
46 #else /* CONFIG_SME */
47 
sme_authenticate(struct wpa_supplicant * wpa_s,struct wpa_bss * bss,struct wpa_ssid * ssid)48 static inline void sme_authenticate(struct wpa_supplicant *wpa_s,
49 				    struct wpa_bss *bss,
50 				    struct wpa_ssid *ssid)
51 {
52 }
53 
sme_event_auth(struct wpa_supplicant * wpa_s,union wpa_event_data * data)54 static inline void sme_event_auth(struct wpa_supplicant *wpa_s,
55 				  union wpa_event_data *data)
56 {
57 }
58 
sme_update_ft_ies(struct wpa_supplicant * wpa_s,const u8 * md,const u8 * ies,size_t ies_len)59 static inline int sme_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
60 				    const u8 *ies, size_t ies_len)
61 {
62 	return -1;
63 }
64 
65 
sme_event_assoc_reject(struct wpa_supplicant * wpa_s,union wpa_event_data * data,const u8 ** link_bssids)66 static inline void sme_event_assoc_reject(struct wpa_supplicant *wpa_s,
67 					  union wpa_event_data *data,
68 					  const u8 **link_bssids)
69 {
70 }
71 
sme_event_auth_timed_out(struct wpa_supplicant * wpa_s,union wpa_event_data * data)72 static inline void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s,
73 					    union wpa_event_data *data)
74 {
75 }
76 
sme_event_assoc_timed_out(struct wpa_supplicant * wpa_s,union wpa_event_data * data)77 static inline void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s,
78 					     union wpa_event_data *data)
79 {
80 }
81 
sme_event_disassoc(struct wpa_supplicant * wpa_s,struct disassoc_info * info)82 static inline void sme_event_disassoc(struct wpa_supplicant *wpa_s,
83 				      struct disassoc_info *info)
84 {
85 }
86 
sme_event_unprot_disconnect(struct wpa_supplicant * wpa_s,const u8 * sa,const u8 * da,u16 reason_code)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 
sme_event_ch_switch(struct wpa_supplicant * wpa_s)93 static inline void sme_event_ch_switch(struct wpa_supplicant *wpa_s)
94 {
95 }
96 
sme_state_changed(struct wpa_supplicant * wpa_s)97 static inline void sme_state_changed(struct wpa_supplicant *wpa_s)
98 {
99 }
100 
sme_clear_on_disassoc(struct wpa_supplicant * wpa_s)101 static inline void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s)
102 {
103 }
104 
sme_deinit(struct wpa_supplicant * wpa_s)105 static inline void sme_deinit(struct wpa_supplicant *wpa_s)
106 {
107 }
108 
sme_proc_obss_scan(struct wpa_supplicant * wpa_s)109 static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
110 {
111 	return 0;
112 }
113 
sme_sched_obss_scan(struct wpa_supplicant * wpa_s,int enable)114 static inline void sme_sched_obss_scan(struct wpa_supplicant *wpa_s,
115 				       int enable)
116 {
117 }
118 
sme_external_auth_trigger(struct wpa_supplicant * wpa_s,union wpa_event_data * data)119 static inline void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
120 					     union wpa_event_data *data)
121 {
122 }
123 
sme_external_auth_mgmt_rx(struct wpa_supplicant * wpa_s,const u8 * auth_frame,size_t len)124 static inline void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s,
125 					     const u8 *auth_frame, size_t len)
126 {
127 }
128 
129 #endif /* CONFIG_SME */
130 
131 #endif /* SME_H */
132