Lines Matching defs:wpa_s
33 struct wpa_supplicant *wpa_s = eloop_ctx;
41 wpa_msg(wpa_s, MSG_INFO, MESH_SAE_AUTH_FAILURE "addr=" MACSTR,
44 mesh_rsn_auth_sae_sta(wpa_s, sta);
46 hapd = wpa_s->ifmsh->bss[0];
54 wpa_mesh_set_plink_state(wpa_s, sta, PLINK_BLOCKED);
56 wpa_msg(wpa_s, MSG_INFO, MESH_SAE_AUTH_BLOCKED "addr="
82 struct hostapd_data *hapd = mesh_rsn->wpa_s->ifmsh->bss[0];
121 return wpa_drv_set_key(mesh_rsn->wpa_s, -1, alg, addr, idx,
132 if (mesh_rsn->wpa_s->current_ssid->mode != WPAS_MODE_MESH)
135 hapd = mesh_rsn->wpa_s->ifmsh->bss[0];
138 eloop_cancel_timeout(mesh_auth_timer, mesh_rsn->wpa_s, sta);
140 mesh_mpm_auth_peer(mesh_rsn->wpa_s, addr);
153 hapd = rsn->wpa_s->ifmsh->bss[0];
215 wpa_drv_set_key(rsn->wpa_s, -1,
226 wpa_drv_set_key(rsn->wpa_s, -1, wpa_cipher_to_alg(rsn->group_cipher),
246 struct mesh_rsn *mesh_rsn_auth_init(struct wpa_supplicant *wpa_s,
250 struct hostapd_data *bss = wpa_s->ifmsh->bss[0];
260 mesh_rsn->wpa_s = wpa_s;
265 if (__mesh_rsn_auth_init(mesh_rsn, wpa_s->own_addr,
275 while ((entry = dl_list_last(&wpa_s->mesh_external_pmksa_cache,
294 wpa_supplicant_rsn_supp_set_config(wpa_s, wpa_s->current_ssid);
313 static int mesh_rsn_sae_group(struct wpa_supplicant *wpa_s,
316 int *groups = wpa_s->ifmsh->bss[0]->conf->sae_groups;
319 if (!index_within_array(groups, wpa_s->mesh_rsn->sae_group_index))
323 int group = groups[wpa_s->mesh_rsn->sae_group_index];
328 wpa_dbg(wpa_s, MSG_DEBUG, "SME: Selected SAE group %d",
332 wpa_s->mesh_rsn->sae_group_index++;
339 static int mesh_rsn_build_sae_commit(struct wpa_supplicant *wpa_s,
349 wpa_msg(wpa_s, MSG_DEBUG, "SAE: No password available");
353 if (mesh_rsn_sae_group(wpa_s, sta->sae) < 0) {
354 wpa_msg(wpa_s, MSG_DEBUG, "SAE: Failed to select group");
363 return sae_prepare_commit(wpa_s->own_addr, sta->addr,
370 int mesh_rsn_auth_sae_sta(struct wpa_supplicant *wpa_s,
373 struct hostapd_data *hapd = wpa_s->ifmsh->bss[0];
374 struct wpa_ssid *ssid = wpa_s->current_ssid;
380 wpa_msg(wpa_s, MSG_DEBUG,
415 if (mesh_rsn_build_sae_commit(wpa_s, ssid, sta))
418 wpa_msg(wpa_s, MSG_DEBUG,
426 eloop_cancel_timeout(mesh_auth_timer, wpa_s, sta);
429 wpa_s, sta);
443 u8 *myaddr = rsn->wpa_s->own_addr;
473 int mesh_rsn_derive_mtk(struct wpa_supplicant *wpa_s, struct sta_info *sta)
477 u8 *myaddr = wpa_s->own_addr;
527 sta->mtk_len = wpa_cipher_key_len(wpa_s->mesh_rsn->pairwise_cipher);
535 void mesh_rsn_init_ampe_sta(struct wpa_supplicant *wpa_s, struct sta_info *sta)
542 mesh_rsn_derive_aek(wpa_s->mesh_rsn, sta);
558 const u8 *aad[] = { rsn->wpa_s->own_addr, sta->addr, cat };
604 wpa_drv_get_seqnum(rsn->wpa_s, NULL, rsn->mgtk_key_id, pos);
617 wpa_drv_get_seqnum(rsn->wpa_s, NULL, rsn->igtk_key_id, pos);
646 int mesh_rsn_process_ampe(struct wpa_supplicant *wpa_s, struct sta_info *sta,
658 const u8 *aad[] = { sta->addr, wpa_s->own_addr, cat };
664 struct hostapd_data *hapd = wpa_s->ifmsh->bss[0];
671 mesh_rsn_auth_sae_sta(wpa_s, sta);
677 wpa_msg(wpa_s, MSG_DEBUG,
683 wpa_msg(wpa_s, MSG_DEBUG, "Mesh RSN: missing mic ie");
693 wpa_msg(wpa_s, MSG_DEBUG, "Mesh RSN: missing ampe ie");
724 wpa_msg(wpa_s, MSG_DEBUG, "Mesh RSN: invalid ampe ie");
734 wpa_msg(wpa_s, MSG_DEBUG, "Mesh RSN: invalid peer nonce");
771 key_len = wpa_cipher_key_len(wpa_s->mesh_rsn->group_cipher);
773 wpa_dbg(wpa_s, MSG_DEBUG, "mesh: Truncated AMPE element");
795 key_len = wpa_cipher_key_len(wpa_s->mesh_rsn->mgmt_group_cipher);