]> git.ipfire.org Git - thirdparty/hostap.git/blame - wpa_supplicant/mlme.h
P2P: Allow access to group members
[thirdparty/hostap.git] / wpa_supplicant / mlme.h
CommitLineData
6fc6879b
JM
1/*
2 * WPA Supplicant - Client mode MLME
3 * Copyright (c) 2003-2007, 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
20struct wpa_supplicant;
21
245519e0
JM
22struct ieee80211_rx_status {
23 int freq;
24 int channel;
25 int ssi;
26};
27
6fc6879b
JM
28#ifdef CONFIG_CLIENT_MLME
29
30int ieee80211_sta_init(struct wpa_supplicant *wpa_s);
31void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s);
d009a9da
JM
32int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
33 struct wpa_driver_scan_params *params);
6fc6879b
JM
34int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s, u16 reason);
35int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s, u16 reason);
36int ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
37 struct wpa_driver_associate_params *params);
38int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s, u8 *ssid,
39 size_t *len);
6fc6879b
JM
40void ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
41 struct ieee80211_rx_status *rx_status);
42struct wpa_scan_results *
43ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s);
44int ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
45 const u8 *ies, size_t ies_len);
46int ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
47 const u8 *target_ap,
48 const u8 *ies, size_t ies_len);
6fc6879b
JM
49
50#else /* CONFIG_CLIENT_MLME */
51
52static inline int ieee80211_sta_init(struct wpa_supplicant *wpa_s)
53{
54 return 0;
55}
56
57static inline void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s)
58{
59}
60
61static inline int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
d009a9da 62 struct wpa_driver_scan_params *params)
6fc6879b
JM
63{
64 return -1;
65}
66
67static inline int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s,
68 u16 reason)
69{
70 return -1;
71}
72
73static inline int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s,
74 u16 reason)
75{
76 return -1;
77}
78
79static inline int
80ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
81 struct wpa_driver_associate_params *params)
82{
83 return -1;
84}
85
86static inline int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s,
87 u8 *ssid, size_t *len)
88{
89 return -1;
90}
91
6fc6879b
JM
92static inline void
93ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
94 struct ieee80211_rx_status *rx_status)
95{
96}
97
98static inline struct wpa_scan_results *
99ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s)
100{
101 return NULL;
102}
103
104static inline int
105ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
106 const u8 *ies, size_t ies_len)
107{
108 return -1;
109}
110
111static inline int
112ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
113 const u8 *target_ap,
114 const u8 *ies, size_t ies_len)
115{
116 return -1;
117}
118
6fc6879b
JM
119#endif /* CONFIG_CLIENT_MLME */
120
121#endif /* MLME_H */