IBSS RSN: Added couple of required WPA supplicant callback functions
This commit is contained in:
parent
8be1844071
commit
3146b2b961
2 changed files with 17 additions and 0 deletions
|
@ -31,6 +31,13 @@ static void ibss_rsn_free(struct ibss_rsn_peer *peer)
|
|||
}
|
||||
|
||||
|
||||
static void supp_set_state(void *ctx, wpa_states state)
|
||||
{
|
||||
struct ibss_rsn_peer *peer = ctx;
|
||||
peer->supp_state = state;
|
||||
}
|
||||
|
||||
|
||||
static int supp_ether_send(void *ctx, const u8 *dest, u16 proto, const u8 *buf,
|
||||
size_t len)
|
||||
{
|
||||
|
@ -99,6 +106,13 @@ static int supp_set_key(void *ctx, wpa_alg alg,
|
|||
}
|
||||
|
||||
|
||||
static void * supp_get_network_ctx(void *ctx)
|
||||
{
|
||||
struct ibss_rsn_peer *peer = ctx;
|
||||
return wpa_supplicant_get_ssid(peer->ibss_rsn->wpa_s);
|
||||
}
|
||||
|
||||
|
||||
static int supp_mlme_setprotection(void *ctx, const u8 *addr,
|
||||
int protection_type, int key_type)
|
||||
{
|
||||
|
@ -123,10 +137,12 @@ int ibss_rsn_supp_init(struct ibss_rsn_peer *peer, const u8 *own_addr,
|
|||
return -1;
|
||||
|
||||
ctx->ctx = peer;
|
||||
ctx->set_state = supp_set_state;
|
||||
ctx->ether_send = supp_ether_send;
|
||||
ctx->get_beacon_ie = supp_get_beacon_ie;
|
||||
ctx->alloc_eapol = supp_alloc_eapol;
|
||||
ctx->set_key = supp_set_key;
|
||||
ctx->get_network_ctx = supp_get_network_ctx;
|
||||
ctx->mlme_setprotection = supp_mlme_setprotection;
|
||||
ctx->cancel_auth_timeout = supp_cancel_auth_timeout;
|
||||
peer->supp = wpa_sm_init(ctx);
|
||||
|
|
|
@ -24,6 +24,7 @@ struct ibss_rsn_peer {
|
|||
u8 addr[ETH_ALEN];
|
||||
|
||||
struct wpa_sm *supp;
|
||||
wpa_states supp_state;
|
||||
|
||||
struct wpa_state_machine *auth;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue