wpa.h revision fb79edc9df1f20461e90e478363d207348213d35
17d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)/* 27d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) * wpa_supplicant - WPA definitions 37d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi> 47d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) * 57d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) * This software may be distributed under the terms of the BSD license. 67d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) * See README for more details. 77d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) */ 87d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 97d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#ifndef WPA_H 107d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#define WPA_H 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 12e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch#include "common/defs.h" 137d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#include "common/eapol_common.h" 147d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#include "common/wpa_common.h" 15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "common/ieee802_11_defs.h" 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)struct wpa_sm; 187d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)struct eapol_sm; 197d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)struct wpa_config_blob; 207d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 217d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)struct wpa_sm_ctx { 227d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void *ctx; /* pointer to arbitrary upper level context */ 237d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void *msg_ctx; /* upper level context for wpa_msg() calls */ 247d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 257d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void (*set_state)(void *ctx, enum wpa_states state); 267d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) enum wpa_states (*get_state)(void *ctx); 277d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void (*deauthenticate)(void * ctx, int reason_code); 287d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*set_key)(void *ctx, enum wpa_alg alg, 297d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *addr, int key_idx, int set_tx, 307d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *seq, size_t seq_len, 317d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *key, size_t key_len); 327d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void * (*get_network_ctx)(void *ctx); 337d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*get_bssid)(void *ctx, u8 *bssid); 347d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*ether_send)(void *ctx, const u8 *dest, u16 proto, const u8 *buf, 357d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t len); 367d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*get_beacon_ie)(void *ctx); 377d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void (*cancel_auth_timeout)(void *ctx); 387d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) u8 * (*alloc_eapol)(void *ctx, u8 type, const void *data, u16 data_len, 397d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t *msg_len, void **data_pos); 407d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*add_pmkid)(void *ctx, const u8 *bssid, const u8 *pmkid); 417d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*remove_pmkid)(void *ctx, const u8 *bssid, const u8 *pmkid); 427d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void (*set_config_blob)(void *ctx, struct wpa_config_blob *blob); 437d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const struct wpa_config_blob * (*get_config_blob)(void *ctx, 44e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch const char *name); 45e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int (*mlme_setprotection)(void *ctx, const u8 *addr, 46e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int protection_type, int key_type); 47e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int (*update_ft_ies)(void *ctx, const u8 *md, const u8 *ies, 48e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch size_t ies_len); 49e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int (*send_ft_action)(void *ctx, u8 action, const u8 *target_ap, 507d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *ies, size_t ies_len); 517d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*mark_authenticated)(void *ctx, const u8 *target_ap); 527d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#ifdef CONFIG_TDLS 537d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*tdls_get_capa)(void *ctx, int *tdls_supported, 547d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int *tdls_ext_setup); 557d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int (*send_tdls_mgmt)(void *ctx, const u8 *dst, 567d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) u8 action_code, u8 dialog_token, 577d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) u16 status_code, const u8 *buf, size_t len); 58e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int (*tdls_oper)(void *ctx, int oper, const u8 *peer); 59e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int (*tdls_peer_addset)(void *ctx, const u8 *addr, int add, u16 aid, 60e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch u16 capability, const u8 *supp_rates, 61e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch size_t supp_rates_len, 627d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const struct ieee80211_ht_capabilities *ht_capab, 637d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const struct ieee80211_vht_capabilities *vht_capab, 64e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch u8 qosinfo, const u8 *ext_capab, 657d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t ext_capab_len); 667d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#endif /* CONFIG_TDLS */ 677d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void (*set_rekey_offload)(void *ctx, const u8 *kek, const u8 *kck, 687d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *replay_ctr); 697d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)}; 707d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 717d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 727d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)enum wpa_sm_conf_params { 737d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) RSNA_PMK_LIFETIME /* dot11RSNAConfigPMKLifetime */, 747d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) RSNA_PMK_REAUTH_THRESHOLD /* dot11RSNAConfigPMKReauthThreshold */, 757d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) RSNA_SA_TIMEOUT /* dot11RSNAConfigSATimeout */, 767d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) WPA_PARAM_PROTO, 777d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) WPA_PARAM_PAIRWISE, 787d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) WPA_PARAM_GROUP, 797d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) WPA_PARAM_KEY_MGMT, 807d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) WPA_PARAM_MGMT_GROUP, 817d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) WPA_PARAM_RSN_ENABLED, 827d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) WPA_PARAM_MFP 837d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)}; 847d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 857d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)struct rsn_supp_config { 867d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void *network_ctx; 877d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int peerkey_enabled; 887d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int allowed_pairwise_cipher; /* bitfield of WPA_CIPHER_* */ 89e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int proactive_key_caching; 90e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch int eap_workaround; 91e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch void *eap_conf_ctx; 92e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch const u8 *ssid; 937d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t ssid_len; 947d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int wpa_ptk_rekey; 957d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)}; 967d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 97e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch#ifndef CONFIG_NO_WPA 98e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch 997d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)struct wpa_sm * wpa_sm_init(struct wpa_sm_ctx *ctx); 1007d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_deinit(struct wpa_sm *sm); 1017d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid); 1027d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_notify_disassoc(struct wpa_sm *sm); 1037d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_set_pmk(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len); 104e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdochvoid wpa_sm_set_pmk_from_pmksa(struct wpa_sm *sm); 105e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdochvoid wpa_sm_set_fast_reauth(struct wpa_sm *sm, int fast_reauth); 106e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdochvoid wpa_sm_set_scard_ctx(struct wpa_sm *sm, void *scard_ctx); 1077d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config); 1087d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_set_own_addr(struct wpa_sm *sm, const u8 *addr); 1097d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_set_ifname(struct wpa_sm *sm, const char *ifname, 1107d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const char *bridge_ifname); 1117d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_set_eapol(struct wpa_sm *sm, struct eapol_sm *eapol); 1127d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_set_assoc_wpa_ie(struct wpa_sm *sm, const u8 *ie, size_t len); 1137d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_set_assoc_wpa_ie_default(struct wpa_sm *sm, u8 *wpa_ie, 1147d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t *wpa_ie_len); 1157d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_set_ap_wpa_ie(struct wpa_sm *sm, const u8 *ie, size_t len); 1167d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_set_ap_rsn_ie(struct wpa_sm *sm, const u8 *ie, size_t len); 1177d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_get_mib(struct wpa_sm *sm, char *buf, size_t buflen); 1187d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1197d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_set_param(struct wpa_sm *sm, enum wpa_sm_conf_params param, 1207d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) unsigned int value); 1217d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)unsigned int wpa_sm_get_param(struct wpa_sm *sm, 1227d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) enum wpa_sm_conf_params param); 1237d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1247d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_get_status(struct wpa_sm *sm, char *buf, size_t buflen, 1257d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int verbose); 1267d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_pmf_enabled(struct wpa_sm *sm); 1275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1287d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_key_request(struct wpa_sm *sm, int error, int pairwise); 1297d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1307d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len, 1317d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) struct wpa_ie_data *data); 1327d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1337d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_aborted_cached(struct wpa_sm *sm); 1347d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_addr, 1357d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *buf, size_t len); 1365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int wpa_sm_parse_own_wpa_ie(struct wpa_sm *sm, struct wpa_ie_data *data); 1377d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_pmksa_cache_list(struct wpa_sm *sm, char *buf, size_t len); 1387d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_drop_sa(struct wpa_sm *sm); 1397d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_has_ptk(struct wpa_sm *sm); 1407d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1417d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_update_replay_ctr(struct wpa_sm *sm, const u8 *replay_ctr); 1427d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1437d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, void *network_ctx); 1447d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#else /* CONFIG_NO_WPA */ 1467d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1477d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline struct wpa_sm * wpa_sm_init(struct wpa_sm_ctx *ctx) 1487d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1497d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return (struct wpa_sm *) 1; 1507d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1517d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1527d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_deinit(struct wpa_sm *sm) 1537d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1547d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1557d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1567d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) 1577d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1587d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1597d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1607d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_notify_disassoc(struct wpa_sm *sm) 1617d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1627d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1637d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1647d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_set_pmk(struct wpa_sm *sm, const u8 *pmk, 1657d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t pmk_len) 1667d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1677d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1687d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 169a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles)static inline void wpa_sm_set_pmk_from_pmksa(struct wpa_sm *sm) 170a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles){ 171f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} 172cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 173effb81e5f8246d0db0270817048dc992db66e9fbBen Murdochstatic inline void wpa_sm_set_fast_reauth(struct wpa_sm *sm, int fast_reauth) 174effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch{ 175a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 1767d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1777d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_set_scard_ctx(struct wpa_sm *sm, void *scard_ctx) 1787d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1797d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1807d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1817d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_set_config(struct wpa_sm *sm, 1827d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) struct rsn_supp_config *config) 1837d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1847d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1857d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1867d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_set_own_addr(struct wpa_sm *sm, const u8 *addr) 1877d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1887d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1897d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1907d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_set_ifname(struct wpa_sm *sm, const char *ifname, 1917d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const char *bridge_ifname) 1927d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1937d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1947d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1957d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_set_eapol(struct wpa_sm *sm, struct eapol_sm *eapol) 1967d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 1977d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 1987d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 1997d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_set_assoc_wpa_ie(struct wpa_sm *sm, const u8 *ie, 2007d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t len) 2017d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2023551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) return -1; 2037d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2047d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2057d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_set_assoc_wpa_ie_default(struct wpa_sm *sm, 2067d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) u8 *wpa_ie, 2077d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t *wpa_ie_len) 2087d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2097d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2107d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2117d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2127d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_set_ap_wpa_ie(struct wpa_sm *sm, const u8 *ie, 2137d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t len) 2147d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2157d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2167d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2177d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2183551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)static inline int wpa_sm_set_ap_rsn_ie(struct wpa_sm *sm, const u8 *ie, 2197d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t len) 2203551c9c881056c480085172ff9840cab31610854Torne (Richard Coles){ 2217d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2227d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2237d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2247d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_get_mib(struct wpa_sm *sm, char *buf, size_t buflen) 2257d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2267d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 2277d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2287d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2297d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_set_param(struct wpa_sm *sm, 2307d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) enum wpa_sm_conf_params param, 2317d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) unsigned int value) 2327d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2337d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2347d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2357d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2367d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline unsigned int wpa_sm_get_param(struct wpa_sm *sm, 2377d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) enum wpa_sm_conf_params param) 2387d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2397d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 2407d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2417d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2427d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_get_status(struct wpa_sm *sm, char *buf, 2437d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t buflen, int verbose) 2447d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2457d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 2467d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2473551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) 2487d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_pmf_enabled(struct wpa_sm *sm) 2493551c9c881056c480085172ff9840cab31610854Torne (Richard Coles){ 2507d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 2517d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2527d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2537d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_key_request(struct wpa_sm *sm, int error, 2547d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int pairwise) 2557d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2567d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2577d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2587d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len, 2597d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) struct wpa_ie_data *data) 2607d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2617d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2627d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2637d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2647d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_aborted_cached(struct wpa_sm *sm) 2657d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2667d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2677d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2687d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_addr, 2697d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *buf, size_t len) 2707d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2717d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2727d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2737d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2747d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_parse_own_wpa_ie(struct wpa_sm *sm, 2757d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) struct wpa_ie_data *data) 2767d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2777d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2783551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)} 2797d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2803551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)static inline int wpa_sm_pmksa_cache_list(struct wpa_sm *sm, char *buf, 281e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch size_t len) 2827d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2837d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 2847d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2857d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2867d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_drop_sa(struct wpa_sm *sm) 2877d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2887d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2897d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2907d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_has_ptk(struct wpa_sm *sm) 2917d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2927d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 2937d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2947d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 2957d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_update_replay_ctr(struct wpa_sm *sm, 2967d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *replay_ctr) 2977d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 2987d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 2997d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3007d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, 3017d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) void *network_ctx) 3027d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3037d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3047d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3057d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#endif /* CONFIG_NO_WPA */ 3067d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3077d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#ifdef CONFIG_PEERKEY 3087d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_stkstart(struct wpa_sm *sm, const u8 *peer); 3097d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_rx_eapol_peerkey(struct wpa_sm *sm, const u8 *src_addr, 3107d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *buf, size_t len); 3117d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#else /* CONFIG_PEERKEY */ 3127d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_stkstart(struct wpa_sm *sm, const u8 *peer) 3137d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3147d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 3157d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3167d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3177d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_sm_rx_eapol_peerkey(struct wpa_sm *sm, const u8 *src_addr, 3187d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *buf, size_t len) 3197d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3207d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 3217d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3227d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#endif /* CONFIG_PEERKEY */ 3237d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3247d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#ifdef CONFIG_IEEE80211R 3257d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3267d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_sm_set_ft_params(struct wpa_sm *sm, const u8 *ies, size_t ies_len); 3277d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_ft_prepare_auth_request(struct wpa_sm *sm, const u8 *mdie); 3283551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)int wpa_ft_process_response(struct wpa_sm *sm, const u8 *ies, size_t ies_len, 3297d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int ft_action, const u8 *target_ap, 3307d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *ric_ies, size_t ric_ies_len); 3317d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_ft_is_completed(struct wpa_sm *sm); 3327d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_reset_ft_completed(struct wpa_sm *sm); 3337d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, 3347d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) size_t ies_len, const u8 *src_addr); 3357d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_ft_start_over_ds(struct wpa_sm *sm, const u8 *target_ap, 3363551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) const u8 *mdie); 3377d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3387d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#else /* CONFIG_IEEE80211R */ 3397d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3407d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int 3417d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)wpa_sm_set_ft_params(struct wpa_sm *sm, const u8 *ies, size_t ies_len) 3427d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3437d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 3443551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)} 3457d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3467d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int wpa_ft_prepare_auth_request(struct wpa_sm *sm, 3477d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *mdie) 3487d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3497d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 3507d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3513551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) 3527d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int 3537d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)wpa_ft_process_response(struct wpa_sm *sm, const u8 *ies, size_t ies_len, 3547d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) int ft_action, const u8 *target_ap) 3557d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3567d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 3577d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3587d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3593551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)static inline int wpa_ft_is_completed(struct wpa_sm *sm) 3607d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3617d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return 0; 3627d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3637d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3647d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline void wpa_reset_ft_completed(struct wpa_sm *sm) 3657d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3667d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3677d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3687d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)static inline int 3697d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, size_t ies_len, 3707d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) const u8 *src_addr) 3717d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles){ 3727d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) return -1; 3737d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} 3747d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3757d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#endif /* CONFIG_IEEE80211R */ 3767d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3777d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3787d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)/* tdls.c */ 3797d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_tdls_ap_ies(struct wpa_sm *sm, const u8 *ies, size_t len); 3807d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_tdls_assoc_resp_ies(struct wpa_sm *sm, const u8 *ies, size_t len); 3817d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr); 3827d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_tdls_remove(struct wpa_sm *sm, const u8 *addr); 3837d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_tdls_send_teardown(struct wpa_sm *sm, const u8 *addr, u16 reason_code); 3847d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_tdls_teardown_link(struct wpa_sm *sm, const u8 *addr, u16 reason_code); 3853551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)int wpa_tdls_send_discovery_request(struct wpa_sm *sm, const u8 *addr); 3867d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_tdls_init(struct wpa_sm *sm); 3877d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_tdls_teardown_peers(struct wpa_sm *sm); 3887d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_tdls_deinit(struct wpa_sm *sm); 3897d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_tdls_enable(struct wpa_sm *sm, int enabled); 3907d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)void wpa_tdls_disable_link(struct wpa_sm *sm, const u8 *addr); 3917d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)const char * wpa_tdls_get_link_status(struct wpa_sm *sm, const u8 *addr); 3927d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_tdls_is_external_setup(struct wpa_sm *sm); 3937d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3947d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf); 3957d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 3967d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#endif /* WPA_H */ 3977d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)