Lines Matching refs:hapd

286 	struct hostapd_data *hapd = ctx;  in hostapd_wpa_auth_logger()  local
302 hostapd_logger(hapd, addr, HOSTAPD_MODULE_WPA, hlevel, "%s", txt); in hostapd_wpa_auth_logger()
310 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_disconnect() local
314 ap_sta_disconnect(hapd, NULL, addr, reason); in hostapd_wpa_auth_disconnect()
320 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_mic_failure_report() local
321 return michael_mic_failure(hapd, addr, 0); in hostapd_wpa_auth_mic_failure_report()
327 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_psk_failure_report() local
328 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR, in hostapd_wpa_auth_psk_failure_report()
336 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_set_eapol() local
337 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_set_eapol()
348 ieee802_1x_set_sta_authorized(hapd, sta, value); in hostapd_wpa_auth_set_eapol()
377 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_eapol() local
378 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_get_eapol()
397 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_psk() local
398 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_get_psk()
422 if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && in hostapd_wpa_auth_get_psk()
428 if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && sta) { in hostapd_wpa_auth_get_psk()
440 psk = hostapd_get_psk(hapd->conf, addr, p2p_dev_addr, prev_psk, in hostapd_wpa_auth_get_psk()
456 hapd->conf->ssid.ssid, in hostapd_wpa_auth_get_psk()
457 hapd->conf->ssid.ssid_len, 4096, in hostapd_wpa_auth_get_psk()
478 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_msk() local
483 sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_get_msk()
509 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_set_key() local
510 const char *ifname = hapd->conf->iface; in hostapd_wpa_auth_set_key()
513 ifname = hostapd_get_vlan_id_ifname(hapd->conf->vlan, vlan_id); in hostapd_wpa_auth_set_key()
515 if (!(hapd->iface->drv_flags & in hostapd_wpa_auth_set_key()
518 ifname = hapd->conf->iface; in hostapd_wpa_auth_set_key()
530 sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_set_key()
543 hapd->last_igtk_alg = alg; in hostapd_wpa_auth_set_key()
544 hapd->last_igtk_key_idx = idx; in hostapd_wpa_auth_set_key()
546 os_memcpy(hapd->last_igtk, key, key_len); in hostapd_wpa_auth_set_key()
547 hapd->last_igtk_len = key_len; in hostapd_wpa_auth_set_key()
549 hapd->last_bigtk_alg = alg; in hostapd_wpa_auth_set_key()
550 hapd->last_bigtk_key_idx = idx; in hostapd_wpa_auth_set_key()
552 os_memcpy(hapd->last_bigtk, key, key_len); in hostapd_wpa_auth_set_key()
553 hapd->last_bigtk_len = key_len; in hostapd_wpa_auth_set_key()
556 hapd->last_gtk_alg = alg; in hostapd_wpa_auth_set_key()
557 hapd->last_gtk_key_idx = idx; in hostapd_wpa_auth_set_key()
559 os_memcpy(hapd->last_gtk, key, key_len); in hostapd_wpa_auth_set_key()
560 hapd->last_gtk_len = key_len; in hostapd_wpa_auth_set_key()
563 return hostapd_drv_set_key(ifname, hapd, alg, addr, idx, vlan_id, 1, in hostapd_wpa_auth_set_key()
571 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_seqnum() local
575 if (hapd->conf->mld_ap && idx) in hostapd_wpa_auth_get_seqnum()
576 link_id = hapd->mld_link_id; in hostapd_wpa_auth_get_seqnum()
578 return hostapd_get_seqnum(hapd->conf->iface, hapd, addr, idx, link_id, in hostapd_wpa_auth_get_seqnum()
587 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_send_eapol() local
593 link_id = hapd->conf->mld_ap ? hapd->mld_link_id : -1; in hostapd_wpa_auth_send_eapol()
597 if (hapd->ext_eapol_frame_io) { in hostapd_wpa_auth_send_eapol()
604 wpa_msg(hapd->msg_ctx, MSG_INFO, "EAPOL-TX " MACSTR " %s", in hostapd_wpa_auth_send_eapol()
611 sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_send_eapol()
615 if (ap_sta_is_mld(hapd, sta) && in hostapd_wpa_auth_send_eapol()
621 return hostapd_drv_hapd_send_eapol(hapd, addr, data, data_len, in hostapd_wpa_auth_send_eapol()
628 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_sta_count() local
630 return hapd->num_sta; in hostapd_wpa_auth_get_sta_count()
638 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_for_each_sta() local
641 for (sta = hapd->sta_list; sta; sta = sta->next) { in hostapd_wpa_auth_for_each_sta()
671 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_for_each_auth() local
673 if (hapd->iface->interfaces == NULL || in hostapd_wpa_auth_for_each_auth()
674 hapd->iface->interfaces->for_each_interface == NULL) in hostapd_wpa_auth_for_each_auth()
678 return hapd->iface->interfaces->for_each_interface( in hostapd_wpa_auth_for_each_auth()
679 hapd->iface->interfaces, wpa_auth_iface_iter, &data); in hostapd_wpa_auth_for_each_auth()
694 struct hostapd_data *hapd = eloop_ctx; in hostapd_wpa_ft_rrb_rx_later() local
697 dl_list_for_each_safe(data, n, &hapd->l2_queue, in hostapd_wpa_ft_rrb_rx_later()
699 if (hapd->wpa_auth) { in hostapd_wpa_ft_rrb_rx_later()
700 wpa_ft_rrb_rx(hapd->wpa_auth, data->addr, in hostapd_wpa_ft_rrb_rx_later()
722 struct hostapd_data *hapd; in hostapd_wpa_auth_ft_iter() local
726 hapd = iface->bss[j]; in hostapd_wpa_auth_ft_iter()
727 if (hapd == idata->src_hapd || in hostapd_wpa_auth_ft_iter()
728 !hapd->wpa_auth || in hostapd_wpa_auth_ft_iter()
729 !ether_addr_equal(hapd->own_addr, idata->dst)) in hostapd_wpa_auth_ft_iter()
737 MAC2STR(hapd->own_addr), hapd->conf->iface); in hostapd_wpa_auth_ft_iter()
754 dl_list_add(&hapd->l2_queue, &data->list); in hostapd_wpa_auth_ft_iter()
757 hapd, NULL)) in hostapd_wpa_auth_ft_iter()
760 hapd, NULL); in hostapd_wpa_auth_ft_iter()
774 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_send_ether() local
779 if (hapd->ext_eapol_frame_io && proto == ETH_P_EAPOL) { in hostapd_wpa_auth_send_ether()
786 wpa_msg(hapd->msg_ctx, MSG_INFO, "EAPOL-TX " MACSTR " %s", in hostapd_wpa_auth_send_ether()
794 if (proto == ETH_P_RRB && hapd->iface->interfaces && in hostapd_wpa_auth_send_ether()
795 hapd->iface->interfaces->for_each_interface) { in hostapd_wpa_auth_send_ether()
798 idata.src_hapd = hapd; in hostapd_wpa_auth_send_ether()
802 res = hapd->iface->interfaces->for_each_interface( in hostapd_wpa_auth_send_ether()
803 hapd->iface->interfaces, hostapd_wpa_auth_ft_iter, in hostapd_wpa_auth_send_ether()
810 if (hapd->l2 == NULL) in hostapd_wpa_auth_send_ether()
817 os_memcpy(buf->h_source, hapd->own_addr, ETH_ALEN); in hostapd_wpa_auth_send_ether()
820 ret = l2_packet_send(hapd->l2, dst, proto, (u8 *) buf, in hostapd_wpa_auth_send_ether()
828 static struct eth_p_oui_ctx * hostapd_wpa_get_oui(struct hostapd_data *hapd, in hostapd_wpa_get_oui() argument
834 return hapd->oui_pull; in hostapd_wpa_get_oui()
836 return hapd->oui_resp; in hostapd_wpa_get_oui()
838 return hapd->oui_push; in hostapd_wpa_get_oui()
840 return hapd->oui_sreq; in hostapd_wpa_get_oui()
842 return hapd->oui_sresp; in hostapd_wpa_get_oui()
864 struct hostapd_data *hapd = eloop_ctx; in hostapd_oui_deliver_later() local
868 dl_list_for_each_safe(data, n, &hapd->l2_oui_queue, in hostapd_oui_deliver_later()
870 oui_ctx = hostapd_wpa_get_oui(hapd, data->oui_suffix); in hostapd_oui_deliver_later()
873 hapd->conf->iface, __func__, in hostapd_oui_deliver_later()
877 if (hapd->wpa_auth && oui_ctx) { in hostapd_oui_deliver_later()
901 struct hostapd_data *hapd, *src_hapd = idata->src_hapd; in hostapd_wpa_auth_oui_iter() local
905 hapd = iface->bss[j]; in hostapd_wpa_auth_oui_iter()
906 if (hapd == src_hapd) in hostapd_wpa_auth_oui_iter()
908 if (!wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt) || in hostapd_wpa_auth_oui_iter()
909 hapd->conf->ssid.ssid_len != in hostapd_wpa_auth_oui_iter()
911 os_memcmp(hapd->conf->ssid.ssid, in hostapd_wpa_auth_oui_iter()
913 hapd->conf->ssid.ssid_len) != 0 || in hostapd_wpa_auth_oui_iter()
914 os_memcmp(hapd->conf->mobility_domain, in hostapd_wpa_auth_oui_iter()
919 !ether_addr_equal(hapd->own_addr, idata->dst_addr)) in hostapd_wpa_auth_oui_iter()
935 src_hapd->conf->iface, hapd->conf->iface, in hostapd_wpa_auth_oui_iter()
945 dl_list_add_tail(&hapd->l2_oui_queue, &data->list); in hostapd_wpa_auth_oui_iter()
948 hapd, NULL)) in hostapd_wpa_auth_oui_iter()
951 hapd, NULL); in hostapd_wpa_auth_oui_iter()
970 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_send_oui() local
975 hapd->conf->iface, MAC2STR(dst), oui_suffix, in hostapd_wpa_auth_send_oui()
978 if (hapd->iface->interfaces && in hostapd_wpa_auth_send_oui()
979 hapd->iface->interfaces->for_each_interface) { in hostapd_wpa_auth_send_oui()
983 idata.src_hapd = hapd; in hostapd_wpa_auth_send_oui()
988 res = hapd->iface->interfaces->for_each_interface( in hostapd_wpa_auth_send_oui()
989 hapd->iface->interfaces, hostapd_wpa_auth_oui_iter, in hostapd_wpa_auth_send_oui()
996 oui_ctx = hostapd_wpa_get_oui(hapd, oui_suffix); in hostapd_wpa_auth_send_oui()
1000 return eth_p_oui_send(oui_ctx, hapd->own_addr, dst, data, data_len); in hostapd_wpa_auth_send_oui()
1009 struct hostapd_data *hapd = ctx; in hostapd_channel_info() local
1011 return hostapd_drv_channel_info(hapd, ci); in hostapd_channel_info()
1020 struct hostapd_data *hapd = ctx; in hostapd_store_ptksa() local
1022 ptksa_cache_add(hapd->ptksa, hapd->own_addr, addr, cipher, life_time, in hostapd_store_ptksa()
1029 struct hostapd_data *hapd = ctx; in hostapd_clear_ptksa() local
1031 ptksa_cache_flush(hapd->ptksa, addr, cipher); in hostapd_clear_ptksa()
1040 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_update_vlan() local
1043 sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_update_vlan()
1047 if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_VLAN_OFFLOAD)) { in hostapd_wpa_auth_update_vlan()
1053 if (!hostapd_vlan_valid(hapd->conf->vlan, &vlan_desc)) { in hostapd_wpa_auth_update_vlan()
1060 if (ap_sta_set_vlan(hapd, sta, &vlan_desc) < 0) { in hostapd_wpa_auth_update_vlan()
1074 ap_sta_bind_vlan(hapd, sta) < 0) in hostapd_wpa_auth_update_vlan()
1087 struct hostapd_data *hapd = ctx; in hostapd_get_sta_tx_params() local
1090 sta = ap_get_sta(hapd, addr); in hostapd_get_sta_tx_params()
1092 hostapd_wpa_auth_logger(hapd, addr, LOGGER_INFO, in hostapd_get_sta_tx_params()
1108 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_send_ft_action() local
1114 sta = ap_get_sta(hapd, dst); in hostapd_wpa_auth_send_ft_action()
1125 os_memcpy(m->sa, hapd->own_addr, ETH_ALEN); in hostapd_wpa_auth_send_ft_action()
1126 os_memcpy(m->bssid, hapd->own_addr, ETH_ALEN); in hostapd_wpa_auth_send_ft_action()
1129 res = hostapd_drv_send_mlme(hapd, (u8 *) m, mlen, 0, NULL, 0, 0); in hostapd_wpa_auth_send_ft_action()
1138 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_add_sta() local
1145 ret = hostapd_add_sta_node(hapd, sta_addr, WLAN_AUTH_FT); in hostapd_wpa_auth_add_sta()
1156 sta = ap_sta_add(hapd, sta_addr); in hostapd_wpa_auth_add_sta()
1168 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth, sta->addr, NULL); in hostapd_wpa_auth_add_sta()
1170 ap_free_sta(hapd, sta); in hostapd_wpa_auth_add_sta()
1181 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_add_sta_ft() local
1184 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_add_sta_ft()
1188 if (FULL_AP_CLIENT_STATE_SUPP(hapd->iface->drv_flags) && in hostapd_wpa_auth_add_sta_ft()
1190 !(hapd->conf->mesh & MESH_ENABLED) && !(sta->added_unassoc)) { in hostapd_wpa_auth_add_sta_ft()
1200 return ap_sta_re_add(hapd, sta); in hostapd_wpa_auth_add_sta_ft()
1210 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_set_vlan() local
1213 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_set_vlan()
1217 if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_VLAN_OFFLOAD)) { in hostapd_wpa_auth_set_vlan()
1219 !hostapd_vlan_valid(hapd->conf->vlan, vlan)) { in hostapd_wpa_auth_set_vlan()
1220 hostapd_logger(hapd, sta->addr, in hostapd_wpa_auth_set_vlan()
1229 if (ap_sta_set_vlan(hapd, sta, vlan) < 0) in hostapd_wpa_auth_set_vlan()
1238 ap_sta_bind_vlan(hapd, sta); in hostapd_wpa_auth_set_vlan()
1241 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, in hostapd_wpa_auth_set_vlan()
1251 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_vlan() local
1254 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_get_vlan()
1260 } else if ((hapd->iface->drv_flags & WPA_DRIVER_FLAGS_VLAN_OFFLOAD) && in hostapd_wpa_auth_get_vlan()
1276 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_set_identity() local
1279 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_set_identity()
1316 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_identity() local
1321 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_get_identity()
1346 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_set_radius_cui() local
1349 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_set_radius_cui()
1384 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_radius_cui() local
1390 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_get_radius_cui()
1417 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_set_session_timeout() local
1420 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_set_session_timeout()
1428 ap_sta_session_timeout(hapd, sta, session_timeout); in hostapd_wpa_auth_set_session_timeout()
1431 ap_sta_no_session_timeout(hapd, sta); in hostapd_wpa_auth_set_session_timeout()
1438 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_session_timeout() local
1442 sta = ap_get_sta(hapd, sta_addr); in hostapd_wpa_auth_get_session_timeout()
1461 struct hostapd_data *hapd = ctx; in hostapd_rrb_receive() local
1469 !ether_addr_equal(hapd->own_addr, ethhdr->h_dest)) in hostapd_rrb_receive()
1471 wpa_ft_rrb_rx(hapd->wpa_auth, ethhdr->h_source, buf + sizeof(*ethhdr), in hostapd_rrb_receive()
1480 struct hostapd_data *hapd = ctx; in hostapd_rrb_oui_receive() local
1485 !ether_addr_equal(hapd->own_addr, dst_addr)) in hostapd_rrb_oui_receive()
1487 wpa_ft_rrb_oui_rx(hapd->wpa_auth, src_addr, dst_addr, oui_suffix, buf, in hostapd_rrb_oui_receive()
1495 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_add_tspec() local
1496 return hostapd_add_tspec(hapd, sta_addr, tspec_ie, tspec_ielen); in hostapd_wpa_auth_add_tspec()
1501 static int hostapd_wpa_register_ft_oui(struct hostapd_data *hapd, in hostapd_wpa_register_ft_oui() argument
1504 hapd->oui_pull = eth_p_oui_register(hapd, ft_iface, in hostapd_wpa_register_ft_oui()
1506 hostapd_rrb_oui_receive, hapd); in hostapd_wpa_register_ft_oui()
1507 if (!hapd->oui_pull) in hostapd_wpa_register_ft_oui()
1510 hapd->oui_resp = eth_p_oui_register(hapd, ft_iface, in hostapd_wpa_register_ft_oui()
1512 hostapd_rrb_oui_receive, hapd); in hostapd_wpa_register_ft_oui()
1513 if (!hapd->oui_resp) in hostapd_wpa_register_ft_oui()
1516 hapd->oui_push = eth_p_oui_register(hapd, ft_iface, in hostapd_wpa_register_ft_oui()
1518 hostapd_rrb_oui_receive, hapd); in hostapd_wpa_register_ft_oui()
1519 if (!hapd->oui_push) in hostapd_wpa_register_ft_oui()
1522 hapd->oui_sreq = eth_p_oui_register(hapd, ft_iface, in hostapd_wpa_register_ft_oui()
1524 hostapd_rrb_oui_receive, hapd); in hostapd_wpa_register_ft_oui()
1525 if (!hapd->oui_sreq) in hostapd_wpa_register_ft_oui()
1528 hapd->oui_sresp = eth_p_oui_register(hapd, ft_iface, in hostapd_wpa_register_ft_oui()
1530 hostapd_rrb_oui_receive, hapd); in hostapd_wpa_register_ft_oui()
1531 if (!hapd->oui_sresp) in hostapd_wpa_register_ft_oui()
1538 static void hostapd_wpa_unregister_ft_oui(struct hostapd_data *hapd) in hostapd_wpa_unregister_ft_oui() argument
1540 eth_p_oui_unregister(hapd->oui_pull); in hostapd_wpa_unregister_ft_oui()
1541 hapd->oui_pull = NULL; in hostapd_wpa_unregister_ft_oui()
1542 eth_p_oui_unregister(hapd->oui_resp); in hostapd_wpa_unregister_ft_oui()
1543 hapd->oui_resp = NULL; in hostapd_wpa_unregister_ft_oui()
1544 eth_p_oui_unregister(hapd->oui_push); in hostapd_wpa_unregister_ft_oui()
1545 hapd->oui_push = NULL; in hostapd_wpa_unregister_ft_oui()
1546 eth_p_oui_unregister(hapd->oui_sreq); in hostapd_wpa_unregister_ft_oui()
1547 hapd->oui_sreq = NULL; in hostapd_wpa_unregister_ft_oui()
1548 eth_p_oui_unregister(hapd->oui_sresp); in hostapd_wpa_unregister_ft_oui()
1549 hapd->oui_sresp = NULL; in hostapd_wpa_unregister_ft_oui()
1559 struct hostapd_data *hapd = ctx; in hostapd_request_radius_psk() local
1565 hostapd_acl_req_radius_psk(hapd, addr, key_mgmt, anonce, eapol, in hostapd_request_radius_psk()
1576 struct hostapd_data *hapd = ctx; in hostapd_set_ltf_keyseed() local
1578 return hostapd_drv_set_secure_ranging_ctx(hapd, hapd->own_addr, in hostapd_set_ltf_keyseed()
1591 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_ml_key_info() local
1597 if (!hapd->conf->mld_ap || !hapd->iface || !hapd->iface->interfaces) in hostapd_wpa_auth_get_ml_key_info()
1609 if (hapd->mld_link_id == link_id) { in hostapd_wpa_auth_get_ml_key_info()
1610 wpa_auth_ml_get_key_info(hapd->wpa_auth, in hostapd_wpa_auth_get_ml_key_info()
1617 for_each_mld_link(bss, hapd) { in hostapd_wpa_auth_get_ml_key_info()
1618 if (bss == hapd || bss->mld_link_id != link_id) in hostapd_wpa_auth_get_ml_key_info()
1643 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_get_drv_flags() local
1646 *drv_flags = hapd->iface->drv_flags; in hostapd_wpa_auth_get_drv_flags()
1648 *drv_flags2 = hapd->iface->drv_flags2; in hostapd_wpa_auth_get_drv_flags()
1654 int hostapd_setup_wpa(struct hostapd_data *hapd) in hostapd_setup_wpa() argument
1713 hostapd_wpa_auth_conf(hapd->conf, hapd->iconf, &_conf); in hostapd_setup_wpa()
1714 _conf.msg_ctx = hapd->msg_ctx; in hostapd_setup_wpa()
1715 tx_bss = hostapd_mbssid_get_tx_bss(hapd); in hostapd_setup_wpa()
1716 if (tx_bss != hapd) in hostapd_setup_wpa()
1718 if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_EAPOL_TX_STATUS) in hostapd_setup_wpa()
1720 if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_MLME) in hostapd_setup_wpa()
1723 if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_WIRED) && in hostapd_setup_wpa()
1724 (hapd->conf->wpa_deny_ptk0_rekey == PTK0_REKEY_ALLOW_NEVER || in hostapd_setup_wpa()
1725 (hapd->conf->wpa_deny_ptk0_rekey == PTK0_REKEY_ALLOW_LOCAL_OK && in hostapd_setup_wpa()
1726 !(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_SAFE_PTK0_REKEYS)))) { in hostapd_setup_wpa()
1727 wpa_msg(hapd->msg_ctx, MSG_INFO, in hostapd_setup_wpa()
1733 (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_EXTENDED_KEY_ID)) in hostapd_setup_wpa()
1734 wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Extended Key ID supported"); in hostapd_setup_wpa()
1738 if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_BEACON_PROTECTION)) in hostapd_setup_wpa()
1742 if (!(hapd->iface->drv_flags2 & in hostapd_setup_wpa()
1748 !!(hapd->iface->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF_AP); in hostapd_setup_wpa()
1750 !!(hapd->iface->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_RTT_AP); in hostapd_setup_wpa()
1752 !!(hapd->iface->drv_flags2 & in hostapd_setup_wpa()
1760 if (hapd->conf->mld_ap) { in hostapd_setup_wpa()
1763 _conf.mld_addr = hapd->mld->mld_addr; in hostapd_setup_wpa()
1764 _conf.link_id = hapd->mld_link_id; in hostapd_setup_wpa()
1766 for_each_mld_link(lhapd, hapd) { in hostapd_setup_wpa()
1767 if (lhapd == hapd) in hostapd_setup_wpa()
1776 hapd->wpa_auth = wpa_init(hapd->own_addr, &_conf, &cb, hapd); in hostapd_setup_wpa()
1777 if (hapd->wpa_auth == NULL) { in hostapd_setup_wpa()
1782 if (hostapd_set_privacy(hapd, 1)) { in hostapd_setup_wpa()
1784 "for interface %s", hapd->conf->iface); in hostapd_setup_wpa()
1788 wpa_ie = wpa_auth_get_wpa_ie(hapd->wpa_auth, &wpa_ie_len); in hostapd_setup_wpa()
1789 if (hostapd_set_generic_elem(hapd, wpa_ie, wpa_ie_len)) { in hostapd_setup_wpa()
1795 if (rsn_preauth_iface_init(hapd)) { in hostapd_setup_wpa()
1801 if (!hapd->ptksa) in hostapd_setup_wpa()
1802 hapd->ptksa = ptksa_cache_init(); in hostapd_setup_wpa()
1803 if (!hapd->ptksa) { in hostapd_setup_wpa()
1809 if (!hostapd_drv_none(hapd) && in hostapd_setup_wpa()
1810 wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) { in hostapd_setup_wpa()
1813 ft_iface = hapd->conf->bridge[0] ? hapd->conf->bridge : in hostapd_setup_wpa()
1814 hapd->conf->iface; in hostapd_setup_wpa()
1815 hapd->l2 = l2_packet_init(ft_iface, NULL, ETH_P_RRB, in hostapd_setup_wpa()
1816 hostapd_rrb_receive, hapd, 1); in hostapd_setup_wpa()
1817 if (!hapd->l2) { in hostapd_setup_wpa()
1823 if (hostapd_wpa_register_ft_oui(hapd, ft_iface)) { in hostapd_setup_wpa()
1836 void hostapd_reconfig_wpa(struct hostapd_data *hapd) in hostapd_reconfig_wpa() argument
1839 hostapd_wpa_auth_conf(hapd->conf, hapd->iconf, &wpa_auth_conf); in hostapd_reconfig_wpa()
1840 wpa_reconfig(hapd->wpa_auth, &wpa_auth_conf); in hostapd_reconfig_wpa()
1844 void hostapd_deinit_wpa(struct hostapd_data *hapd) in hostapd_deinit_wpa() argument
1846 ieee80211_tkip_countermeasures_deinit(hapd); in hostapd_deinit_wpa()
1847 ptksa_cache_deinit(hapd->ptksa); in hostapd_deinit_wpa()
1848 hapd->ptksa = NULL; in hostapd_deinit_wpa()
1850 rsn_preauth_iface_deinit(hapd); in hostapd_deinit_wpa()
1851 if (hapd->wpa_auth) { in hostapd_deinit_wpa()
1852 wpa_deinit(hapd->wpa_auth); in hostapd_deinit_wpa()
1853 hapd->wpa_auth = NULL; in hostapd_deinit_wpa()
1855 if (hapd->drv_priv && hostapd_set_privacy(hapd, 0)) { in hostapd_deinit_wpa()
1858 hapd->conf->iface); in hostapd_deinit_wpa()
1861 if (hapd->drv_priv && in hostapd_deinit_wpa()
1862 hostapd_set_generic_elem(hapd, (u8 *) "", 0)) { in hostapd_deinit_wpa()
1865 hapd->conf->iface); in hostapd_deinit_wpa()
1868 ieee802_1x_deinit(hapd); in hostapd_deinit_wpa()
1871 eloop_cancel_timeout(hostapd_wpa_ft_rrb_rx_later, hapd, ELOOP_ALL_CTX); in hostapd_deinit_wpa()
1872 hostapd_wpa_ft_rrb_rx_later(hapd, NULL); /* flush without delivering */ in hostapd_deinit_wpa()
1873 eloop_cancel_timeout(hostapd_oui_deliver_later, hapd, ELOOP_ALL_CTX); in hostapd_deinit_wpa()
1874 hostapd_oui_deliver_later(hapd, NULL); /* flush without delivering */ in hostapd_deinit_wpa()
1875 l2_packet_deinit(hapd->l2); in hostapd_deinit_wpa()
1876 hapd->l2 = NULL; in hostapd_deinit_wpa()
1877 hostapd_wpa_unregister_ft_oui(hapd); in hostapd_deinit_wpa()
1881 forced_memzero(hapd->last_gtk, WPA_GTK_MAX_LEN); in hostapd_deinit_wpa()
1882 forced_memzero(hapd->last_igtk, WPA_IGTK_MAX_LEN); in hostapd_deinit_wpa()
1883 forced_memzero(hapd->last_bigtk, WPA_BIGTK_MAX_LEN); in hostapd_deinit_wpa()