blob: 9f6f5eb2acd53b617324ad0c105a7b3784f3546c [file] [log] [blame]
The Android Open Source Project845e0122009-03-03 19:31:34 -08001/*
2 * WPA Supplicant - Client mode MLME
3 * Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2004, Instant802 Networks, Inc.
5 * Copyright (c) 2005-2006, Devicescape Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Alternatively, this software may be distributed under the terms of BSD
12 * license.
13 *
14 * See README and COPYING for more details.
15 */
16
17#ifndef MLME_H
18#define MLME_H
19
20#ifdef CONFIG_CLIENT_MLME
21
22int ieee80211_sta_init(struct wpa_supplicant *wpa_s);
23void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s);
24int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s, const u8 *ssid,
25 size_t ssid_len);
26int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s, u16 reason);
27int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s, u16 reason);
28int ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
29 struct wpa_driver_associate_params *params);
30int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s, u8 *ssid,
31 size_t *len);
32void ieee80211_sta_free_hw_features(struct wpa_hw_modes *hw_features,
33 size_t num_hw_features);
34void ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
35 struct ieee80211_rx_status *rx_status);
36int ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s,
37 struct wpa_scan_result *results,
38 size_t max_size);
39
40#else /* CONFIG_CLIENT_MLME */
41
42static inline int ieee80211_sta_init(struct wpa_supplicant *wpa_s)
43{
44 return 0;
45}
46
47static inline void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s)
48{
49}
50
51static inline int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
52 const u8 *ssid, size_t ssid_len)
53{
54 return -1;
55}
56
57static inline int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s,
58 u16 reason)
59{
60 return -1;
61}
62
63static inline int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s,
64 u16 reason)
65{
66 return -1;
67}
68
69static inline int
70ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
71 struct wpa_driver_associate_params *params)
72{
73 return -1;
74}
75
76static inline int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s,
77 u8 *ssid, size_t *len)
78{
79 return -1;
80}
81
82static inline void
83ieee80211_sta_free_hw_features(struct wpa_hw_modes *hw_features,
84 size_t num_hw_features)
85{
86}
87
88static inline void
89ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
90 struct ieee80211_rx_status *rx_status)
91{
92}
93
94static inline int
95ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s,
96 struct wpa_scan_result *results,
97 size_t max_size)
98{
99 return -1;
100}
101
102#endif /* CONFIG_CLIENT_MLME */
103
104#endif /* MLME_H */