3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-24 06:52:37 +01:00

eapol: Add eapol_cancel

This commit is contained in:
Denis Kenzior 2015-03-29 20:58:40 -05:00
parent cf3681efbe
commit 9f17b71375
2 changed files with 20 additions and 0 deletions

View File

@ -514,6 +514,25 @@ void eapol_start(uint32_t ifindex, struct eapol_sm *sm)
l_queue_push_head(state_machines, sm); l_queue_push_head(state_machines, sm);
} }
static bool eapol_sm_ifindex_match(void *data, void *user_data)
{
struct eapol_sm *sm = data;
uint32_t ifindex = L_PTR_TO_UINT(user_data);
if (sm->ifindex != ifindex)
return false;
eapol_sm_free(sm);
return false;
}
void eapol_cancel(uint32_t ifindex)
{
l_queue_foreach_remove(state_machines, eapol_sm_ifindex_match,
L_UINT_TO_PTR(ifindex));
}
static void eapol_handle_ptk_1_of_4(uint32_t ifindex, struct eapol_sm *sm, static void eapol_handle_ptk_1_of_4(uint32_t ifindex, struct eapol_sm *sm,
const struct eapol_key *ek, const struct eapol_key *ek,
void *user_data) void *user_data)

View File

@ -164,6 +164,7 @@ void eapol_sm_set_user_data(struct eapol_sm *sm, void *user_data);
struct l_io *eapol_open_pae(uint32_t index); struct l_io *eapol_open_pae(uint32_t index);
void eapol_start(uint32_t ifindex, struct eapol_sm *sm); void eapol_start(uint32_t ifindex, struct eapol_sm *sm);
void eapol_cancel(uint32_t ifindex);
bool eapol_init(); bool eapol_init();
bool eapol_exit(); bool eapol_exit();