• Home
  • Raw
  • Download

Lines Matching refs:wpa_s

70 static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,  in wpas_conf_ap_vht()  argument
112 center_chan = wpas_p2p_get_vht80_center(wpa_s, mode, channel); in wpas_conf_ap_vht()
118 center_chan = wpas_p2p_get_vht160_center(wpa_s, mode, channel); in wpas_conf_ap_vht()
130 center_chan = wpas_p2p_get_vht160_center(wpa_s, mode, channel); in wpas_conf_ap_vht()
137 center_chan = wpas_p2p_get_vht80_center(wpa_s, mode, in wpas_conf_ap_vht()
165 wpa_supplicant_find_hw_mode(struct wpa_supplicant *wpa_s, in wpa_supplicant_find_hw_mode() argument
171 for (i = 0; i < wpa_s->hw.num_modes; i++) { in wpa_supplicant_find_hw_mode()
172 if (wpa_s->hw.modes[i].mode == hw_mode) { in wpa_supplicant_find_hw_mode()
173 mode = &wpa_s->hw.modes[i]; in wpa_supplicant_find_hw_mode()
182 int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, in wpa_supplicant_conf_ap_ht() argument
201 if (wpa_s->hw.modes) { in wpa_supplicant_conf_ap_ht()
209 mode = wpa_supplicant_find_hw_mode(wpa_s, conf->hw_mode); in wpa_supplicant_conf_ap_ht()
217 mode = wpa_supplicant_find_hw_mode(wpa_s, in wpa_supplicant_conf_ap_ht()
264 wpas_p2p_get_ht40_mode(wpa_s, mode, in wpa_supplicant_conf_ap_ht()
319 wpas_conf_ap_vht(wpa_s, ssid, conf, mode); in wpa_supplicant_conf_ap_ht()
327 for (iface = wpa_s->global->ifaces; iface; iface = iface->next) in wpa_supplicant_conf_ap_ht()
329 if (iface == wpa_s || in wpa_supplicant_conf_ap_ht()
351 static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s, in wpa_supplicant_conf_ap() argument
357 conf->driver = wpa_s->driver; in wpa_supplicant_conf_ap()
359 os_strlcpy(bss->iface, wpa_s->ifname, sizeof(bss->iface)); in wpa_supplicant_conf_ap()
361 if (wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf)) in wpa_supplicant_conf_ap()
379 if (ieee80211_is_dfs(ssid->frequency, wpa_s->hw.modes, in wpa_supplicant_conf_ap()
380 wpa_s->hw.num_modes) && wpa_s->conf->country[0]) { in wpa_supplicant_conf_ap()
383 conf->country[0] = wpa_s->conf->country[0]; in wpa_supplicant_conf_ap()
384 conf->country[1] = wpa_s->conf->country[1]; in wpa_supplicant_conf_ap()
423 bss->isolate = !wpa_s->conf->p2p_intra_bss; in wpa_supplicant_conf_ap()
424 bss->extended_key_id = wpa_s->conf->extended_key_id; in wpa_supplicant_conf_ap()
425 bss->force_per_enrollee_psk = wpa_s->global->p2p_per_sta_psk; in wpa_supplicant_conf_ap()
429 os_memcpy(bss->ip_addr_go, wpa_s->p2pdev->conf->ip_addr_go, 4); in wpa_supplicant_conf_ap()
430 os_memcpy(bss->ip_addr_mask, wpa_s->p2pdev->conf->ip_addr_mask, in wpa_supplicant_conf_ap()
433 wpa_s->p2pdev->conf->ip_addr_start, 4); in wpa_supplicant_conf_ap()
434 os_memcpy(bss->ip_addr_end, wpa_s->p2pdev->conf->ip_addr_end, in wpa_supplicant_conf_ap()
515 bss->sae_pwe = wpa_s->conf->sae_pwe; in wpa_supplicant_conf_ap()
518 if (wpa_s->conf->go_interworking) { in wpa_supplicant_conf_ap()
521 wpa_s->conf->go_access_network_type); in wpa_supplicant_conf_ap()
522 bss->interworking = wpa_s->conf->go_interworking; in wpa_supplicant_conf_ap()
523 bss->access_network_type = wpa_s->conf->go_access_network_type; in wpa_supplicant_conf_ap()
524 bss->internet = wpa_s->conf->go_internet; in wpa_supplicant_conf_ap()
525 if (wpa_s->conf->go_venue_group) { in wpa_supplicant_conf_ap()
528 wpa_s->conf->go_venue_group, in wpa_supplicant_conf_ap()
529 wpa_s->conf->go_venue_type); in wpa_supplicant_conf_ap()
530 bss->venue_group = wpa_s->conf->go_venue_group; in wpa_supplicant_conf_ap()
531 bss->venue_type = wpa_s->conf->go_venue_type; in wpa_supplicant_conf_ap()
541 else if (wpa_s->conf->dtim_period) in wpa_supplicant_conf_ap()
542 bss->dtim_period = wpa_s->conf->dtim_period; in wpa_supplicant_conf_ap()
546 else if (wpa_s->conf->beacon_int) in wpa_supplicant_conf_ap()
547 conf->beacon_int = wpa_s->conf->beacon_int; in wpa_supplicant_conf_ap()
552 if (wpa_s->conf->p2p_go_ctwindow > conf->beacon_int) { in wpa_supplicant_conf_ap()
555 wpa_s->conf->p2p_go_ctwindow, in wpa_supplicant_conf_ap()
559 conf->p2p_go_ctwindow = wpa_s->conf->p2p_go_ctwindow; in wpa_supplicant_conf_ap()
641 if (wpa_s->conf->config_methods) in wpa_supplicant_conf_ap()
642 bss->config_methods = os_strdup(wpa_s->conf->config_methods); in wpa_supplicant_conf_ap()
643 os_memcpy(bss->device_type, wpa_s->conf->device_type, in wpa_supplicant_conf_ap()
645 if (wpa_s->conf->device_name) { in wpa_supplicant_conf_ap()
646 bss->device_name = os_strdup(wpa_s->conf->device_name); in wpa_supplicant_conf_ap()
647 bss->friendly_name = os_strdup(wpa_s->conf->device_name); in wpa_supplicant_conf_ap()
649 if (wpa_s->conf->manufacturer) in wpa_supplicant_conf_ap()
650 bss->manufacturer = os_strdup(wpa_s->conf->manufacturer); in wpa_supplicant_conf_ap()
651 if (wpa_s->conf->model_name) in wpa_supplicant_conf_ap()
652 bss->model_name = os_strdup(wpa_s->conf->model_name); in wpa_supplicant_conf_ap()
653 if (wpa_s->conf->model_number) in wpa_supplicant_conf_ap()
654 bss->model_number = os_strdup(wpa_s->conf->model_number); in wpa_supplicant_conf_ap()
655 if (wpa_s->conf->serial_number) in wpa_supplicant_conf_ap()
656 bss->serial_number = os_strdup(wpa_s->conf->serial_number); in wpa_supplicant_conf_ap()
657 if (is_nil_uuid(wpa_s->conf->uuid)) in wpa_supplicant_conf_ap()
658 os_memcpy(bss->uuid, wpa_s->wps->uuid, WPS_UUID_LEN); in wpa_supplicant_conf_ap()
660 os_memcpy(bss->uuid, wpa_s->conf->uuid, WPS_UUID_LEN); in wpa_supplicant_conf_ap()
661 os_memcpy(bss->os_version, wpa_s->conf->os_version, 4); in wpa_supplicant_conf_ap()
662 bss->pbc_in_m1 = wpa_s->conf->pbc_in_m1; in wpa_supplicant_conf_ap()
668 if (wpa_s->max_stations && in wpa_supplicant_conf_ap()
669 wpa_s->max_stations < wpa_s->conf->max_num_sta) in wpa_supplicant_conf_ap()
670 bss->max_num_sta = wpa_s->max_stations; in wpa_supplicant_conf_ap()
672 bss->max_num_sta = wpa_s->conf->max_num_sta; in wpa_supplicant_conf_ap()
675 bss->isolate = wpa_s->conf->ap_isolate; in wpa_supplicant_conf_ap()
677 bss->disassoc_low_ack = wpa_s->conf->disassoc_low_ack; in wpa_supplicant_conf_ap()
679 if (wpa_s->conf->ap_vendor_elements) { in wpa_supplicant_conf_ap()
681 wpabuf_dup(wpa_s->conf->ap_vendor_elements); in wpa_supplicant_conf_ap()
684 bss->ftm_responder = wpa_s->conf->ftm_responder; in wpa_supplicant_conf_ap()
685 bss->ftm_initiator = wpa_s->conf->ftm_initiator; in wpa_supplicant_conf_ap()
696 struct wpa_supplicant *wpa_s = ctx; in ap_public_action_rx() local
704 wpas_p2p_rx_action(wpa_s, mgmt->da, mgmt->sa, mgmt->bssid, in ap_public_action_rx()
716 struct wpa_supplicant *wpa_s = ctx; in ap_wps_event_cb() local
721 if (wpa_s->p2pdev && wpa_s->p2pdev != wpa_s && in ap_wps_event_cb()
722 wpa_s == wpa_s->global->p2p_group_formation) { in ap_wps_event_cb()
728 wpa_msg(wpa_s->p2pdev, MSG_INFO, WPS_EVENT_FAIL in ap_wps_event_cb()
732 wpas_p2p_wps_failed(wpa_s, fail); in ap_wps_event_cb()
750 struct wpa_supplicant *wpa_s = ctx; in ap_new_psk_cb() local
751 if (wpa_s->ap_iface == NULL || wpa_s->current_ssid == NULL) in ap_new_psk_cb()
753 wpas_p2p_new_psk_cb(wpa_s, mac_addr, p2p_dev_addr, psk, psk_len); in ap_new_psk_cb()
761 struct wpa_supplicant *wpa_s = ctx; in ap_vendor_action_rx() local
767 wpas_p2p_rx_action(wpa_s, mgmt->da, mgmt->sa, mgmt->bssid, in ap_vendor_action_rx()
780 struct wpa_supplicant *wpa_s = ctx; in ap_probe_req_rx() local
783 if (wpa_s->ap_iface) in ap_probe_req_rx()
784 freq = wpa_s->ap_iface->freq; in ap_probe_req_rx()
786 return wpas_p2p_probe_req_rx(wpa_s, sa, da, bssid, ie, ie_len, in ap_probe_req_rx()
794 struct wpa_supplicant *wpa_s = ctx; in ap_wps_reg_success_cb() local
795 wpas_p2p_wps_success(wpa_s, mac_addr, 1); in ap_wps_reg_success_cb()
801 struct wpa_supplicant *wpa_s = ctx; in wpas_ap_configured_cb() local
804 hostapd_state_text(wpa_s->ap_iface->state)); in wpas_ap_configured_cb()
805 if (wpa_s->ap_iface->state == HAPD_IFACE_DISABLED) { in wpas_ap_configured_cb()
806 wpa_supplicant_ap_deinit(wpa_s); in wpas_ap_configured_cb()
810 if (wpa_s->current_ssid) { in wpas_ap_configured_cb()
813 acs = wpa_s->current_ssid->acs; in wpas_ap_configured_cb()
815 if (acs || (wpa_s->assoc_freq && wpa_s->ap_iface->freq && in wpas_ap_configured_cb()
816 wpa_s->assoc_freq != wpa_s->ap_iface->freq)) { in wpas_ap_configured_cb()
817 wpa_s->assoc_freq = wpa_s->ap_iface->freq; in wpas_ap_configured_cb()
818 wpa_s->current_ssid->frequency = wpa_s->ap_iface->freq; in wpas_ap_configured_cb()
822 wpa_supplicant_set_state(wpa_s, WPA_COMPLETED); in wpas_ap_configured_cb()
824 if (wpa_s->ap_configured_cb) in wpas_ap_configured_cb()
825 wpa_s->ap_configured_cb(wpa_s->ap_configured_cb_ctx, in wpas_ap_configured_cb()
826 wpa_s->ap_configured_cb_data); in wpas_ap_configured_cb()
830 int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s, in wpa_supplicant_create_ap() argument
843 wpa_supplicant_ap_deinit(wpa_s); in wpa_supplicant_create_ap()
881 wpa_s->key_mgmt = WPA_KEY_MGMT_PSK; in wpa_supplicant_create_ap()
883 wpa_s->key_mgmt = WPA_KEY_MGMT_NONE; in wpa_supplicant_create_ap()
884 params.key_mgmt_suite = wpa_s->key_mgmt; in wpa_supplicant_create_ap()
886 wpa_s->pairwise_cipher = wpa_pick_pairwise_cipher(ssid->pairwise_cipher, in wpa_supplicant_create_ap()
888 if (wpa_s->pairwise_cipher < 0) { in wpa_supplicant_create_ap()
893 params.pairwise_suite = wpa_s->pairwise_cipher; in wpa_supplicant_create_ap()
902 if (wpa_s->p2pdev->set_ap_uapsd) in wpa_supplicant_create_ap()
903 params.uapsd = wpa_s->p2pdev->ap_uapsd; in wpa_supplicant_create_ap()
904 else if (params.p2p && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_AP_UAPSD)) in wpa_supplicant_create_ap()
909 if (ieee80211_is_dfs(params.freq.freq, wpa_s->hw.modes, in wpa_supplicant_create_ap()
910 wpa_s->hw.num_modes)) in wpa_supplicant_create_ap()
914 wpa_drv_get_ext_capa(wpa_s, WPA_IF_P2P_GO); in wpa_supplicant_create_ap()
916 wpa_drv_get_ext_capa(wpa_s, WPA_IF_AP_BSS); in wpa_supplicant_create_ap()
918 if (wpa_drv_associate(wpa_s, &params) < 0) { in wpa_supplicant_create_ap()
919 wpa_msg(wpa_s, MSG_INFO, "Failed to start AP functionality"); in wpa_supplicant_create_ap()
923 wpa_s->ap_iface = hapd_iface = hostapd_alloc_iface(); in wpa_supplicant_create_ap()
926 hapd_iface->owner = wpa_s; in wpa_supplicant_create_ap()
927 hapd_iface->drv_flags = wpa_s->drv_flags; in wpa_supplicant_create_ap()
928 hapd_iface->probe_resp_offloads = wpa_s->probe_resp_offloads; in wpa_supplicant_create_ap()
929 hapd_iface->extended_capa = wpa_s->extended_capa; in wpa_supplicant_create_ap()
930 hapd_iface->extended_capa_mask = wpa_s->extended_capa_mask; in wpa_supplicant_create_ap()
931 hapd_iface->extended_capa_len = wpa_s->extended_capa_len; in wpa_supplicant_create_ap()
933 wpa_s->ap_iface->conf = conf = hostapd_config_defaults(); in wpa_supplicant_create_ap()
935 wpa_supplicant_ap_deinit(wpa_s); in wpa_supplicant_create_ap()
939 os_memcpy(wpa_s->ap_iface->conf->wmm_ac_params, in wpa_supplicant_create_ap()
940 wpa_s->conf->wmm_ac_params, in wpa_supplicant_create_ap()
941 sizeof(wpa_s->conf->wmm_ac_params)); in wpa_supplicant_create_ap()
943 os_memcpy(wpa_s->ap_iface->conf->tx_queue, wpa_s->conf->tx_queue, in wpa_supplicant_create_ap()
944 sizeof(wpa_s->conf->tx_queue)); in wpa_supplicant_create_ap()
951 if (wpa_supplicant_conf_ap(wpa_s, ssid, conf)) { in wpa_supplicant_create_ap()
953 wpa_supplicant_ap_deinit(wpa_s); in wpa_supplicant_create_ap()
969 wpa_supplicant_ap_deinit(wpa_s); in wpa_supplicant_create_ap()
978 wpa_supplicant_ap_deinit(wpa_s); in wpa_supplicant_create_ap()
982 hapd_iface->bss[i]->msg_ctx = wpa_s; in wpa_supplicant_create_ap()
983 hapd_iface->bss[i]->msg_ctx_parent = wpa_s->p2pdev; in wpa_supplicant_create_ap()
985 hapd_iface->bss[i]->public_action_cb_ctx = wpa_s; in wpa_supplicant_create_ap()
987 hapd_iface->bss[i]->vendor_action_cb_ctx = wpa_s; in wpa_supplicant_create_ap()
989 ap_probe_req_rx, wpa_s); in wpa_supplicant_create_ap()
991 hapd_iface->bss[i]->wps_reg_success_cb_ctx = wpa_s; in wpa_supplicant_create_ap()
993 hapd_iface->bss[i]->wps_event_cb_ctx = wpa_s; in wpa_supplicant_create_ap()
995 hapd_iface->bss[i]->sta_authorized_cb_ctx = wpa_s; in wpa_supplicant_create_ap()
998 hapd_iface->bss[i]->new_psk_cb_ctx = wpa_s; in wpa_supplicant_create_ap()
999 hapd_iface->bss[i]->p2p = wpa_s->global->p2p; in wpa_supplicant_create_ap()
1000 hapd_iface->bss[i]->p2p_group = wpas_p2p_group_init(wpa_s, in wpa_supplicant_create_ap()
1004 hapd_iface->bss[i]->setup_complete_cb_ctx = wpa_s; in wpa_supplicant_create_ap()
1007 wpa_s->ext_eapol_frame_io; in wpa_supplicant_create_ap()
1011 os_memcpy(hapd_iface->bss[0]->own_addr, wpa_s->own_addr, ETH_ALEN); in wpa_supplicant_create_ap()
1012 hapd_iface->bss[0]->driver = wpa_s->driver; in wpa_supplicant_create_ap()
1013 hapd_iface->bss[0]->drv_priv = wpa_s->drv_priv; in wpa_supplicant_create_ap()
1015 wpa_s->current_ssid = ssid; in wpa_supplicant_create_ap()
1016 eapol_sm_notify_config(wpa_s->eapol, NULL, NULL); in wpa_supplicant_create_ap()
1017 os_memcpy(wpa_s->bssid, wpa_s->own_addr, ETH_ALEN); in wpa_supplicant_create_ap()
1018 wpa_s->assoc_freq = ssid->frequency; in wpa_supplicant_create_ap()
1019 wpa_s->ap_iface->conf->enable_edmg = ssid->enable_edmg; in wpa_supplicant_create_ap()
1020 wpa_s->ap_iface->conf->edmg_channel = ssid->edmg_channel; in wpa_supplicant_create_ap()
1023 if (wpa_s->p2p_go_do_acs) { in wpa_supplicant_create_ap()
1024 wpa_s->ap_iface->conf->channel = 0; in wpa_supplicant_create_ap()
1025 wpa_s->ap_iface->conf->hw_mode = wpa_s->p2p_go_acs_band; in wpa_supplicant_create_ap()
1030 if (hostapd_setup_interface(wpa_s->ap_iface)) { in wpa_supplicant_create_ap()
1032 wpa_supplicant_ap_deinit(wpa_s); in wpa_supplicant_create_ap()
1040 void wpa_supplicant_ap_deinit(struct wpa_supplicant *wpa_s) in wpa_supplicant_ap_deinit() argument
1043 eloop_cancel_timeout(wpas_wps_ap_pin_timeout, wpa_s, NULL); in wpa_supplicant_ap_deinit()
1046 if (wpa_s->ap_iface == NULL) in wpa_supplicant_ap_deinit()
1049 wpa_s->current_ssid = NULL; in wpa_supplicant_ap_deinit()
1050 eapol_sm_notify_config(wpa_s->eapol, NULL, NULL); in wpa_supplicant_ap_deinit()
1051 wpa_s->assoc_freq = 0; in wpa_supplicant_ap_deinit()
1052 wpas_p2p_ap_deinit(wpa_s); in wpa_supplicant_ap_deinit()
1053 wpa_s->ap_iface->driver_ap_teardown = in wpa_supplicant_ap_deinit()
1054 !!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT); in wpa_supplicant_ap_deinit()
1056 hostapd_interface_deinit(wpa_s->ap_iface); in wpa_supplicant_ap_deinit()
1057 hostapd_interface_free(wpa_s->ap_iface); in wpa_supplicant_ap_deinit()
1058 wpa_s->ap_iface = NULL; in wpa_supplicant_ap_deinit()
1059 wpa_drv_deinit_ap(wpa_s); in wpa_supplicant_ap_deinit()
1060 wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_DISCONNECTED "bssid=" MACSTR in wpa_supplicant_ap_deinit()
1062 MAC2STR(wpa_s->own_addr), WLAN_REASON_DEAUTH_LEAVING); in wpa_supplicant_ap_deinit()
1070 struct wpa_supplicant *wpa_s = ctx; in ap_tx_status() local
1071 hostapd_tx_status(wpa_s->ap_iface->bss[0], addr, buf, len, ack); in ap_tx_status()
1080 struct wpa_supplicant *wpa_s = ctx; in ap_eapol_tx_status() local
1081 if (!wpa_s->ap_iface) in ap_eapol_tx_status()
1083 hostapd_tx_status(wpa_s->ap_iface->bss[0], dst, data, len, ack); in ap_eapol_tx_status()
1091 struct wpa_supplicant *wpa_s = ctx; in ap_client_poll_ok() local
1092 if (wpa_s->ap_iface) in ap_client_poll_ok()
1093 hostapd_client_poll_ok(wpa_s->ap_iface->bss[0], addr); in ap_client_poll_ok()
1101 struct wpa_supplicant *wpa_s = ctx; in ap_rx_from_unknown_sta() local
1102 ieee802_11_rx_from_unknown(wpa_s->ap_iface->bss[0], addr, wds); in ap_rx_from_unknown_sta()
1110 struct wpa_supplicant *wpa_s = ctx; in ap_mgmt_rx() local
1115 ieee802_11_mgmt(wpa_s->ap_iface->bss[0], rx_mgmt->frame, in ap_mgmt_rx()
1124 struct wpa_supplicant *wpa_s = ctx; in ap_mgmt_tx_cb() local
1125 ieee802_11_mgmt_cb(wpa_s->ap_iface->bss[0], buf, len, stype, ok); in ap_mgmt_tx_cb()
1130 void wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s, in wpa_supplicant_ap_rx_eapol() argument
1133 ieee802_1x_receive(wpa_s->ap_iface->bss[0], src_addr, buf, len); in wpa_supplicant_ap_rx_eapol()
1139 int wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid, in wpa_supplicant_ap_wps_pbc() argument
1142 if (!wpa_s->ap_iface) in wpa_supplicant_ap_wps_pbc()
1144 return hostapd_wps_button_pushed(wpa_s->ap_iface->bss[0], in wpa_supplicant_ap_wps_pbc()
1149 int wpa_supplicant_ap_wps_cancel(struct wpa_supplicant *wpa_s) in wpa_supplicant_ap_wps_cancel() argument
1154 if (!wpa_s->ap_iface || !wpa_s->ap_iface->bss[0]->wps) in wpa_supplicant_ap_wps_cancel()
1157 reg = wpa_s->ap_iface->bss[0]->wps->registrar; in wpa_supplicant_ap_wps_cancel()
1159 wps_sta = ap_for_each_sta(wpa_s->ap_iface->bss[0], in wpa_supplicant_ap_wps_cancel()
1179 int wpa_supplicant_ap_wps_pin(struct wpa_supplicant *wpa_s, const u8 *bssid, in wpa_supplicant_ap_wps_pin() argument
1185 if (!wpa_s->ap_iface) in wpa_supplicant_ap_wps_pin()
1203 ret = hostapd_wps_add_pin(wpa_s->ap_iface->bss[0], bssid, "any", pin, in wpa_supplicant_ap_wps_pin()
1213 struct wpa_supplicant *wpa_s = eloop_data; in wpas_wps_ap_pin_timeout() local
1215 wpas_wps_ap_pin_disable(wpa_s); in wpas_wps_ap_pin_timeout()
1219 static void wpas_wps_ap_pin_enable(struct wpa_supplicant *wpa_s, int timeout) in wpas_wps_ap_pin_enable() argument
1223 if (wpa_s->ap_iface == NULL) in wpas_wps_ap_pin_enable()
1225 hapd = wpa_s->ap_iface->bss[0]; in wpas_wps_ap_pin_enable()
1228 eloop_cancel_timeout(wpas_wps_ap_pin_timeout, wpa_s, NULL); in wpas_wps_ap_pin_enable()
1231 wpas_wps_ap_pin_timeout, wpa_s, NULL); in wpas_wps_ap_pin_enable()
1235 void wpas_wps_ap_pin_disable(struct wpa_supplicant *wpa_s) in wpas_wps_ap_pin_disable() argument
1239 if (wpa_s->ap_iface == NULL) in wpas_wps_ap_pin_disable()
1242 hapd = wpa_s->ap_iface->bss[0]; in wpas_wps_ap_pin_disable()
1245 eloop_cancel_timeout(wpas_wps_ap_pin_timeout, wpa_s, NULL); in wpas_wps_ap_pin_disable()
1249 const char * wpas_wps_ap_pin_random(struct wpa_supplicant *wpa_s, int timeout) in wpas_wps_ap_pin_random() argument
1255 if (wpa_s->ap_iface == NULL) in wpas_wps_ap_pin_random()
1257 hapd = wpa_s->ap_iface->bss[0]; in wpas_wps_ap_pin_random()
1265 wpas_wps_ap_pin_enable(wpa_s, timeout); in wpas_wps_ap_pin_random()
1271 const char * wpas_wps_ap_pin_get(struct wpa_supplicant *wpa_s) in wpas_wps_ap_pin_get() argument
1274 if (wpa_s->ap_iface == NULL) in wpas_wps_ap_pin_get()
1276 hapd = wpa_s->ap_iface->bss[0]; in wpas_wps_ap_pin_get()
1281 int wpas_wps_ap_pin_set(struct wpa_supplicant *wpa_s, const char *pin, in wpas_wps_ap_pin_set() argument
1288 if (wpa_s->ap_iface == NULL) in wpas_wps_ap_pin_set()
1290 hapd = wpa_s->ap_iface->bss[0]; in wpas_wps_ap_pin_set()
1298 wpas_wps_ap_pin_enable(wpa_s, timeout); in wpas_wps_ap_pin_set()
1304 void wpa_supplicant_ap_pwd_auth_fail(struct wpa_supplicant *wpa_s) in wpa_supplicant_ap_pwd_auth_fail() argument
1308 if (wpa_s->ap_iface == NULL) in wpa_supplicant_ap_pwd_auth_fail()
1310 hapd = wpa_s->ap_iface->bss[0]; in wpa_supplicant_ap_pwd_auth_fail()
1331 struct wpabuf * wpas_ap_wps_nfc_config_token(struct wpa_supplicant *wpa_s, in wpas_ap_wps_nfc_config_token() argument
1336 if (wpa_s->ap_iface == NULL) in wpas_ap_wps_nfc_config_token()
1338 hapd = wpa_s->ap_iface->bss[0]; in wpas_ap_wps_nfc_config_token()
1343 struct wpabuf * wpas_ap_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s, in wpas_ap_wps_nfc_handover_sel() argument
1348 if (wpa_s->ap_iface == NULL) in wpas_ap_wps_nfc_handover_sel()
1350 hapd = wpa_s->ap_iface->bss[0]; in wpas_ap_wps_nfc_handover_sel()
1355 int wpas_ap_wps_nfc_report_handover(struct wpa_supplicant *wpa_s, in wpas_ap_wps_nfc_report_handover() argument
1361 if (wpa_s->ap_iface == NULL) in wpas_ap_wps_nfc_report_handover()
1363 hapd = wpa_s->ap_iface->bss[0]; in wpas_ap_wps_nfc_report_handover()
1374 int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s, in ap_ctrl_iface_sta_first() argument
1379 if (wpa_s->ap_iface) in ap_ctrl_iface_sta_first()
1380 hapd = wpa_s->ap_iface->bss[0]; in ap_ctrl_iface_sta_first()
1381 else if (wpa_s->ifmsh) in ap_ctrl_iface_sta_first()
1382 hapd = wpa_s->ifmsh->bss[0]; in ap_ctrl_iface_sta_first()
1389 int ap_ctrl_iface_sta(struct wpa_supplicant *wpa_s, const char *txtaddr, in ap_ctrl_iface_sta() argument
1394 if (wpa_s->ap_iface) in ap_ctrl_iface_sta()
1395 hapd = wpa_s->ap_iface->bss[0]; in ap_ctrl_iface_sta()
1396 else if (wpa_s->ifmsh) in ap_ctrl_iface_sta()
1397 hapd = wpa_s->ifmsh->bss[0]; in ap_ctrl_iface_sta()
1404 int ap_ctrl_iface_sta_next(struct wpa_supplicant *wpa_s, const char *txtaddr, in ap_ctrl_iface_sta_next() argument
1409 if (wpa_s->ap_iface) in ap_ctrl_iface_sta_next()
1410 hapd = wpa_s->ap_iface->bss[0]; in ap_ctrl_iface_sta_next()
1411 else if (wpa_s->ifmsh) in ap_ctrl_iface_sta_next()
1412 hapd = wpa_s->ifmsh->bss[0]; in ap_ctrl_iface_sta_next()
1419 int ap_ctrl_iface_sta_disassociate(struct wpa_supplicant *wpa_s, in ap_ctrl_iface_sta_disassociate() argument
1422 if (wpa_s->ap_iface == NULL) in ap_ctrl_iface_sta_disassociate()
1424 return hostapd_ctrl_iface_disassociate(wpa_s->ap_iface->bss[0], in ap_ctrl_iface_sta_disassociate()
1429 int ap_ctrl_iface_sta_deauthenticate(struct wpa_supplicant *wpa_s, in ap_ctrl_iface_sta_deauthenticate() argument
1432 if (wpa_s->ap_iface == NULL) in ap_ctrl_iface_sta_deauthenticate()
1434 return hostapd_ctrl_iface_deauthenticate(wpa_s->ap_iface->bss[0], in ap_ctrl_iface_sta_deauthenticate()
1439 int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf, in ap_ctrl_iface_wpa_get_status() argument
1446 if (wpa_s->ap_iface == NULL) in ap_ctrl_iface_wpa_get_status()
1449 conf = wpa_s->ap_iface->bss[0]->conf; in ap_ctrl_iface_wpa_get_status()
1470 int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s) in wpa_supplicant_ap_update_beacon() argument
1472 struct hostapd_iface *iface = wpa_s->ap_iface; in wpa_supplicant_ap_update_beacon()
1473 struct wpa_ssid *ssid = wpa_s->current_ssid; in wpa_supplicant_ap_update_beacon()
1476 if (ssid == NULL || wpa_s->ap_iface == NULL || in wpa_supplicant_ap_update_beacon()
1499 int ap_switch_channel(struct wpa_supplicant *wpa_s, in ap_switch_channel() argument
1505 if (wpa_s->ap_iface) in ap_switch_channel()
1506 iface = wpa_s->ap_iface; in ap_switch_channel()
1507 else if (wpa_s->ifmsh) in ap_switch_channel()
1508 iface = wpa_s->ifmsh; in ap_switch_channel()
1521 int ap_ctrl_iface_chanswitch(struct wpa_supplicant *wpa_s, const char *pos) in ap_ctrl_iface_chanswitch() argument
1529 return ap_switch_channel(wpa_s, &settings); in ap_ctrl_iface_chanswitch()
1534 void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht, in wpas_ap_ch_switch() argument
1537 struct hostapd_iface *iface = wpa_s->ap_iface; in wpas_ap_ch_switch()
1540 iface = wpa_s->ifmsh; in wpas_ap_ch_switch()
1543 wpa_s->assoc_freq = freq; in wpas_ap_ch_switch()
1544 if (wpa_s->current_ssid) in wpas_ap_ch_switch()
1545 wpa_s->current_ssid->frequency = freq; in wpas_ap_ch_switch()
1551 int wpa_supplicant_ap_mac_addr_filter(struct wpa_supplicant *wpa_s, in wpa_supplicant_ap_mac_addr_filter() argument
1557 if (!wpa_s->ap_iface) in wpa_supplicant_ap_mac_addr_filter()
1566 hapd = wpa_s->ap_iface->bss[0]; in wpa_supplicant_ap_mac_addr_filter()
1593 int wpas_ap_wps_add_nfc_pw(struct wpa_supplicant *wpa_s, u16 pw_id, in wpas_ap_wps_add_nfc_pw() argument
1599 if (!wpa_s->ap_iface) in wpas_ap_wps_add_nfc_pw()
1601 hapd = wpa_s->ap_iface->bss[0]; in wpas_ap_wps_add_nfc_pw()
1604 if (wpa_s->p2pdev->conf->wps_nfc_dh_pubkey == NULL || in wpas_ap_wps_add_nfc_pw()
1605 wpa_s->p2pdev->conf->wps_nfc_dh_privkey == NULL) { in wpas_ap_wps_add_nfc_pw()
1614 wpa_s->p2pdev->conf->wps_nfc_dh_privkey); in wpas_ap_wps_add_nfc_pw()
1616 wpa_s->p2pdev->conf->wps_nfc_dh_pubkey); in wpas_ap_wps_add_nfc_pw()
1638 int wpas_ap_stop_ap(struct wpa_supplicant *wpa_s) in wpas_ap_stop_ap() argument
1642 if (!wpa_s->ap_iface) in wpas_ap_stop_ap()
1644 hapd = wpa_s->ap_iface->bss[0]; in wpas_ap_stop_ap()
1649 int wpas_ap_pmksa_cache_list(struct wpa_supplicant *wpa_s, char *buf, in wpas_ap_pmksa_cache_list() argument
1657 if (wpa_s->ap_iface) { in wpas_ap_pmksa_cache_list()
1664 for (i = 0; i < wpa_s->ap_iface->num_bss; i++) { in wpas_ap_pmksa_cache_list()
1666 wpa_s->ap_iface->bss[i], in wpas_ap_pmksa_cache_list()
1671 if (wpa_s->ifmsh) { in wpas_ap_pmksa_cache_list()
1679 wpa_s->ifmsh->bss[0], &buf[reply_len], in wpas_ap_pmksa_cache_list()
1687 void wpas_ap_pmksa_cache_flush(struct wpa_supplicant *wpa_s) in wpas_ap_pmksa_cache_flush() argument
1691 if (wpa_s->ap_iface) { in wpas_ap_pmksa_cache_flush()
1692 for (i = 0; i < wpa_s->ap_iface->num_bss; i++) in wpas_ap_pmksa_cache_flush()
1693 hostapd_ctrl_iface_pmksa_flush(wpa_s->ap_iface->bss[i]); in wpas_ap_pmksa_cache_flush()
1696 if (wpa_s->ifmsh) in wpas_ap_pmksa_cache_flush()
1697 hostapd_ctrl_iface_pmksa_flush(wpa_s->ifmsh->bss[0]); in wpas_ap_pmksa_cache_flush()
1704 int wpas_ap_pmksa_cache_list_mesh(struct wpa_supplicant *wpa_s, const u8 *addr, in wpas_ap_pmksa_cache_list_mesh() argument
1707 return hostapd_ctrl_iface_pmksa_list_mesh(wpa_s->ifmsh->bss[0], addr, in wpas_ap_pmksa_cache_list_mesh()
1712 int wpas_ap_pmksa_cache_add_external(struct wpa_supplicant *wpa_s, char *cmd) in wpas_ap_pmksa_cache_add_external() argument
1717 pmksa_cache = hostapd_ctrl_iface_pmksa_create_entry(wpa_s->own_addr, in wpas_ap_pmksa_cache_add_external()
1728 dl_list_add(&wpa_s->mesh_external_pmksa_cache, &entry->list); in wpas_ap_pmksa_cache_add_external()
1740 void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s, in wpas_ap_event_dfs_radar_detected() argument
1743 struct hostapd_iface *iface = wpa_s->ap_iface; in wpas_ap_event_dfs_radar_detected()
1746 iface = wpa_s->ifmsh; in wpas_ap_event_dfs_radar_detected()
1757 void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s, in wpas_ap_event_dfs_cac_started() argument
1760 struct hostapd_iface *iface = wpa_s->ap_iface; in wpas_ap_event_dfs_cac_started()
1763 iface = wpa_s->ifmsh; in wpas_ap_event_dfs_cac_started()
1773 void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s, in wpas_ap_event_dfs_cac_finished() argument
1776 struct hostapd_iface *iface = wpa_s->ap_iface; in wpas_ap_event_dfs_cac_finished()
1779 iface = wpa_s->ifmsh; in wpas_ap_event_dfs_cac_finished()
1789 void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s, in wpas_ap_event_dfs_cac_aborted() argument
1792 struct hostapd_iface *iface = wpa_s->ap_iface; in wpas_ap_event_dfs_cac_aborted()
1795 iface = wpa_s->ifmsh; in wpas_ap_event_dfs_cac_aborted()
1805 void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s, in wpas_ap_event_dfs_cac_nop_finished() argument
1808 struct hostapd_iface *iface = wpa_s->ap_iface; in wpas_ap_event_dfs_cac_nop_finished()
1811 iface = wpa_s->ifmsh; in wpas_ap_event_dfs_cac_nop_finished()
1822 void ap_periodic(struct wpa_supplicant *wpa_s) in ap_periodic() argument
1824 if (wpa_s->ap_iface) in ap_periodic()
1825 hostapd_periodic_iface(wpa_s->ap_iface); in ap_periodic()