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