xref: /freebsd/contrib/wpa/wpa_supplicant/mesh_mpm.h (revision 780fb4a2fa9a9aee5ac48a60b790f567c0dc13e9)
15b9c547cSRui Paulo /*
25b9c547cSRui Paulo  * WPA Supplicant - Basic mesh peer management
35b9c547cSRui Paulo  * Copyright (c) 2013-2014, cozybit, Inc.  All rights reserved.
45b9c547cSRui Paulo  *
55b9c547cSRui Paulo  * This software may be distributed under the terms of the BSD license.
65b9c547cSRui Paulo  * See README for more details.
75b9c547cSRui Paulo  */
85b9c547cSRui Paulo 
95b9c547cSRui Paulo #ifndef MESH_MPM_H
105b9c547cSRui Paulo #define MESH_MPM_H
115b9c547cSRui Paulo 
125b9c547cSRui Paulo /* notify MPM of new mesh peer to be inserted in MPM and driver */
135b9c547cSRui Paulo void wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
145b9c547cSRui Paulo 			    struct ieee802_11_elems *elems);
155b9c547cSRui Paulo void mesh_mpm_deinit(struct wpa_supplicant *wpa_s, struct hostapd_iface *ifmsh);
165b9c547cSRui Paulo void mesh_mpm_auth_peer(struct wpa_supplicant *wpa_s, const u8 *addr);
17*780fb4a2SCy Schubert void mesh_mpm_free_sta(struct hostapd_data *hapd, struct sta_info *sta);
185b9c547cSRui Paulo void wpa_mesh_set_plink_state(struct wpa_supplicant *wpa_s,
195b9c547cSRui Paulo 			      struct sta_info *sta,
205b9c547cSRui Paulo 			      enum mesh_plink_state state);
21*780fb4a2SCy Schubert int mesh_mpm_close_peer(struct wpa_supplicant *wpa_s, const u8 *addr);
22*780fb4a2SCy Schubert int mesh_mpm_connect_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
23*780fb4a2SCy Schubert 			  int duration);
245b9c547cSRui Paulo 
255b9c547cSRui Paulo #ifdef CONFIG_MESH
265b9c547cSRui Paulo 
275b9c547cSRui Paulo void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s,
285b9c547cSRui Paulo 			const struct ieee80211_mgmt *mgmt, size_t len);
295b9c547cSRui Paulo void mesh_mpm_mgmt_rx(struct wpa_supplicant *wpa_s, struct rx_mgmt *rx_mgmt);
305b9c547cSRui Paulo 
315b9c547cSRui Paulo #else /* CONFIG_MESH */
325b9c547cSRui Paulo 
mesh_mpm_action_rx(struct wpa_supplicant * wpa_s,const struct ieee80211_mgmt * mgmt,size_t len)335b9c547cSRui Paulo static inline void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s,
345b9c547cSRui Paulo 				      const struct ieee80211_mgmt *mgmt,
355b9c547cSRui Paulo 				      size_t len)
365b9c547cSRui Paulo {
375b9c547cSRui Paulo }
385b9c547cSRui Paulo 
mesh_mpm_mgmt_rx(struct wpa_supplicant * wpa_s,struct rx_mgmt * rx_mgmt)395b9c547cSRui Paulo static inline void mesh_mpm_mgmt_rx(struct wpa_supplicant *wpa_s,
405b9c547cSRui Paulo 				    struct rx_mgmt *rx_mgmt)
415b9c547cSRui Paulo {
425b9c547cSRui Paulo }
435b9c547cSRui Paulo 
445b9c547cSRui Paulo #endif /* CONFIG_MESH */
455b9c547cSRui Paulo 
465b9c547cSRui Paulo #endif /* MESH_MPM_H */
47