Lines Matching refs:hapd

68 int hostapd_build_ap_extra_ies(struct hostapd_data *hapd,  in hostapd_build_ap_extra_ies()  argument
80 pos = hostapd_eid_rm_enabled_capab(hapd, pos, sizeof(buf)); in hostapd_build_ap_extra_ies()
87 pos = hostapd_eid_time_adv(hapd, pos); in hostapd_build_ap_extra_ies()
90 pos = hostapd_eid_time_zone(hapd, pos); in hostapd_build_ap_extra_ies()
95 pos = hostapd_eid_ext_capab(hapd, pos, false); in hostapd_build_ap_extra_ies()
98 pos = hostapd_eid_interworking(hapd, pos); in hostapd_build_ap_extra_ies()
99 pos = hostapd_eid_adv_proto(hapd, pos); in hostapd_build_ap_extra_ies()
100 pos = hostapd_eid_roaming_consortium(hapd, pos); in hostapd_build_ap_extra_ies()
106 if (add_buf(&beacon, hapd->iface->fst_ies) < 0 || in hostapd_build_ap_extra_ies()
107 add_buf(&proberesp, hapd->iface->fst_ies) < 0 || in hostapd_build_ap_extra_ies()
108 add_buf(&assocresp, hapd->iface->fst_ies) < 0) in hostapd_build_ap_extra_ies()
113 pos = hostapd_eid_fils_indic(hapd, buf, 0); in hostapd_build_ap_extra_ies()
119 pos = hostapd_eid_rsnxe(hapd, buf, sizeof(buf)); in hostapd_build_ap_extra_ies()
123 if (add_buf(&beacon, hapd->wps_beacon_ie) < 0 || in hostapd_build_ap_extra_ies()
124 add_buf(&proberesp, hapd->wps_probe_resp_ie) < 0) in hostapd_build_ap_extra_ies()
128 if (add_buf(&beacon, hapd->p2p_beacon_ie) < 0 || in hostapd_build_ap_extra_ies()
129 add_buf(&proberesp, hapd->p2p_probe_resp_ie) < 0) in hostapd_build_ap_extra_ies()
134 if (hapd->conf->p2p & P2P_MANAGE) { in hostapd_build_ap_extra_ies()
138 p = hostapd_eid_p2p_manage(hapd, start); in hostapd_build_ap_extra_ies()
145 p = hostapd_eid_p2p_manage(hapd, start); in hostapd_build_ap_extra_ies()
152 if (hapd->conf->wps_state) { in hostapd_build_ap_extra_ies()
160 if (hapd->conf->p2p & P2P_MANAGE) { in hostapd_build_ap_extra_ies()
164 p = hostapd_eid_p2p_manage(hapd, start); in hostapd_build_ap_extra_ies()
171 if (hapd->p2p_group) { in hostapd_build_ap_extra_ies()
173 a = p2p_group_assoc_resp_ie(hapd->p2p_group, P2P_SC_SUCCESS); in hostapd_build_ap_extra_ies()
180 pos = hostapd_eid_hs20_indication(hapd, buf); in hostapd_build_ap_extra_ies()
185 pos = hostapd_eid_osen(hapd, buf); in hostapd_build_ap_extra_ies()
192 if (hapd->conf->mbo_enabled || in hostapd_build_ap_extra_ies()
193 OCE_STA_CFON_ENABLED(hapd) || OCE_AP_ENABLED(hapd)) { in hostapd_build_ap_extra_ies()
194 pos = hostapd_eid_mbo(hapd, buf, sizeof(buf)); in hostapd_build_ap_extra_ies()
203 pos = hostapd_eid_owe_trans(hapd, buf, sizeof(buf)); in hostapd_build_ap_extra_ies()
209 add_buf(&beacon, hapd->conf->vendor_elements); in hostapd_build_ap_extra_ies()
210 add_buf(&proberesp, hapd->conf->vendor_elements); in hostapd_build_ap_extra_ies()
212 add_buf(&proberesp, hapd->conf->presp_elements); in hostapd_build_ap_extra_ies()
214 add_buf(&assocresp, hapd->conf->assocresp_elements); in hostapd_build_ap_extra_ies()
230 void hostapd_free_ap_extra_ies(struct hostapd_data *hapd, in hostapd_free_ap_extra_ies() argument
241 int hostapd_reset_ap_wps_ie(struct hostapd_data *hapd) in hostapd_reset_ap_wps_ie() argument
243 if (hapd->driver == NULL || hapd->driver->set_ap_wps_ie == NULL) in hostapd_reset_ap_wps_ie()
246 return hapd->driver->set_ap_wps_ie(hapd->drv_priv, NULL, NULL, NULL); in hostapd_reset_ap_wps_ie()
250 int hostapd_set_ap_wps_ie(struct hostapd_data *hapd) in hostapd_set_ap_wps_ie() argument
255 if (hapd->driver == NULL || hapd->driver->set_ap_wps_ie == NULL) in hostapd_set_ap_wps_ie()
258 if (hostapd_build_ap_extra_ies(hapd, &beacon, &proberesp, &assocresp) < in hostapd_set_ap_wps_ie()
262 ret = hapd->driver->set_ap_wps_ie(hapd->drv_priv, beacon, proberesp, in hostapd_set_ap_wps_ie()
265 hostapd_free_ap_extra_ies(hapd, beacon, proberesp, assocresp); in hostapd_set_ap_wps_ie()
271 bool hostapd_sta_is_link_sta(struct hostapd_data *hapd, in hostapd_sta_is_link_sta() argument
275 if (ap_sta_is_mld(hapd, sta) && in hostapd_sta_is_link_sta()
276 sta->mld_assoc_link_id != hapd->mld_link_id) in hostapd_sta_is_link_sta()
284 int hostapd_set_authorized(struct hostapd_data *hapd, in hostapd_set_authorized() argument
293 if (hostapd_sta_is_link_sta(hapd, sta)) { in hostapd_set_authorized()
301 return hostapd_sta_set_flags(hapd, sta->addr, in hostapd_set_authorized()
307 return hostapd_sta_set_flags(hapd, sta->addr, in hostapd_set_authorized()
313 int hostapd_set_sta_flags(struct hostapd_data *hapd, struct sta_info *sta) in hostapd_set_sta_flags() argument
328 if (hostapd_sta_is_link_sta(hapd, sta)) { in hostapd_set_sta_flags()
337 return hostapd_sta_set_flags(hapd, sta->addr, total_flags, in hostapd_set_sta_flags()
342 int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname, in hostapd_set_drv_ieee8021x() argument
350 params.wpa = hapd->conf->wpa; in hostapd_set_drv_ieee8021x()
351 params.ieee802_1x = hapd->conf->ieee802_1x; in hostapd_set_drv_ieee8021x()
352 params.wpa_group = hapd->conf->wpa_group; in hostapd_set_drv_ieee8021x()
353 if ((hapd->conf->wpa & (WPA_PROTO_WPA | WPA_PROTO_RSN)) == in hostapd_set_drv_ieee8021x()
355 params.wpa_pairwise = hapd->conf->wpa_pairwise | in hostapd_set_drv_ieee8021x()
356 hapd->conf->rsn_pairwise; in hostapd_set_drv_ieee8021x()
357 else if (hapd->conf->wpa & WPA_PROTO_RSN) in hostapd_set_drv_ieee8021x()
358 params.wpa_pairwise = hapd->conf->rsn_pairwise; in hostapd_set_drv_ieee8021x()
359 else if (hapd->conf->wpa & WPA_PROTO_WPA) in hostapd_set_drv_ieee8021x()
360 params.wpa_pairwise = hapd->conf->wpa_pairwise; in hostapd_set_drv_ieee8021x()
361 params.wpa_key_mgmt = hapd->conf->wpa_key_mgmt; in hostapd_set_drv_ieee8021x()
362 params.rsn_preauth = hapd->conf->rsn_preauth; in hostapd_set_drv_ieee8021x()
363 params.ieee80211w = hapd->conf->ieee80211w; in hostapd_set_drv_ieee8021x()
365 return hostapd_set_ieee8021x(hapd, &params); in hostapd_set_drv_ieee8021x()
369 int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname) in hostapd_vlan_if_add() argument
373 return hostapd_if_add(hapd, WPA_IF_AP_VLAN, ifname, hapd->own_addr, in hostapd_vlan_if_add()
378 int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname) in hostapd_vlan_if_remove() argument
380 return hostapd_if_remove(hapd, WPA_IF_AP_VLAN, ifname); in hostapd_vlan_if_remove()
384 int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, in hostapd_set_wds_sta() argument
389 if (hapd->driver == NULL || hapd->driver->set_wds_sta == NULL) in hostapd_set_wds_sta()
391 if (hapd->conf->wds_bridge[0]) in hostapd_set_wds_sta()
392 bridge = hapd->conf->wds_bridge; in hostapd_set_wds_sta()
393 else if (hapd->conf->bridge[0]) in hostapd_set_wds_sta()
394 bridge = hapd->conf->bridge; in hostapd_set_wds_sta()
395 return hapd->driver->set_wds_sta(hapd->drv_priv, addr, aid, val, in hostapd_set_wds_sta()
400 int hostapd_add_sta_node(struct hostapd_data *hapd, const u8 *addr, in hostapd_add_sta_node() argument
403 if (hapd->driver == NULL || hapd->driver->add_sta_node == NULL) in hostapd_add_sta_node()
405 return hapd->driver->add_sta_node(hapd->drv_priv, addr, auth_alg); in hostapd_add_sta_node()
409 int hostapd_sta_auth(struct hostapd_data *hapd, const u8 *addr, in hostapd_sta_auth() argument
417 if (hapd->driver == NULL || hapd->driver->sta_auth == NULL) in hostapd_sta_auth()
423 sta = ap_get_sta(hapd, addr); in hostapd_sta_auth()
442 params.own_addr = hapd->own_addr; in hostapd_sta_auth()
449 return hapd->driver->sta_auth(hapd->drv_priv, &params); in hostapd_sta_auth()
453 int hostapd_sta_assoc(struct hostapd_data *hapd, const u8 *addr, in hostapd_sta_assoc() argument
456 if (hapd->driver == NULL || hapd->driver->sta_assoc == NULL) in hostapd_sta_assoc()
458 return hapd->driver->sta_assoc(hapd->drv_priv, hapd->own_addr, addr, in hostapd_sta_assoc()
463 int hostapd_sta_add(struct hostapd_data *hapd, in hostapd_sta_add() argument
479 if (hapd->driver == NULL) in hostapd_sta_add()
481 if (hapd->driver->sta_add == NULL) in hostapd_sta_add()
511 if (hapd->conf->mld_ap) { in hostapd_sta_add()
512 params.mld_link_id = hapd->mld_link_id; in hostapd_sta_add()
518 return hapd->driver->sta_add(hapd->drv_priv, &params); in hostapd_sta_add()
522 int hostapd_add_tspec(struct hostapd_data *hapd, const u8 *addr, in hostapd_add_tspec() argument
525 if (hapd->driver == NULL || hapd->driver->add_tspec == NULL) in hostapd_add_tspec()
527 return hapd->driver->add_tspec(hapd->drv_priv, addr, tspec_ie, in hostapd_add_tspec()
532 int hostapd_set_privacy(struct hostapd_data *hapd, int enabled) in hostapd_set_privacy() argument
534 if (hapd->driver == NULL || hapd->driver->set_privacy == NULL) in hostapd_set_privacy()
536 return hapd->driver->set_privacy(hapd->drv_priv, enabled); in hostapd_set_privacy()
540 int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem, in hostapd_set_generic_elem() argument
543 if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL) in hostapd_set_generic_elem()
545 return hapd->driver->set_generic_elem(hapd->drv_priv, elem, elem_len); in hostapd_set_generic_elem()
549 int hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len) in hostapd_get_ssid() argument
551 if (hapd->driver == NULL || hapd->driver->hapd_get_ssid == NULL) in hostapd_get_ssid()
553 return hapd->driver->hapd_get_ssid(hapd->drv_priv, buf, len); in hostapd_get_ssid()
557 int hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len) in hostapd_set_ssid() argument
559 if (hapd->driver == NULL || hapd->driver->hapd_set_ssid == NULL) in hostapd_set_ssid()
561 return hapd->driver->hapd_set_ssid(hapd->drv_priv, buf, len); in hostapd_set_ssid()
565 int hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type type, in hostapd_if_add() argument
570 if (hapd->driver == NULL || hapd->driver->if_add == NULL) in hostapd_if_add()
572 return hapd->driver->if_add(hapd->drv_priv, type, ifname, addr, in hostapd_if_add()
579 int hostapd_if_link_remove(struct hostapd_data *hapd, in hostapd_if_link_remove() argument
583 if (!hapd->driver || !hapd->drv_priv || !hapd->driver->link_remove) in hostapd_if_link_remove()
586 return hapd->driver->link_remove(hapd->drv_priv, type, ifname, in hostapd_if_link_remove()
587 hapd->mld_link_id); in hostapd_if_link_remove()
592 int hostapd_if_remove(struct hostapd_data *hapd, enum wpa_driver_if_type type, in hostapd_if_remove() argument
595 if (hapd->driver == NULL || hapd->drv_priv == NULL || in hostapd_if_remove()
596 hapd->driver->if_remove == NULL) in hostapd_if_remove()
600 if (hapd->conf->mld_ap) in hostapd_if_remove()
601 return hostapd_if_link_remove(hapd, type, ifname, in hostapd_if_remove()
602 hapd->mld_link_id); in hostapd_if_remove()
605 return hapd->driver->if_remove(hapd->drv_priv, type, ifname); in hostapd_if_remove()
609 int hostapd_set_ieee8021x(struct hostapd_data *hapd, in hostapd_set_ieee8021x() argument
612 if (hapd->driver == NULL || hapd->driver->set_ieee8021x == NULL) in hostapd_set_ieee8021x()
614 return hapd->driver->set_ieee8021x(hapd->drv_priv, params); in hostapd_set_ieee8021x()
618 int hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd, in hostapd_get_seqnum() argument
621 if (hapd->driver == NULL || hapd->driver->get_seqnum == NULL) in hostapd_get_seqnum()
623 return hapd->driver->get_seqnum(ifname, hapd->drv_priv, addr, idx, in hostapd_get_seqnum()
628 int hostapd_flush(struct hostapd_data *hapd) in hostapd_flush() argument
632 if (hapd->driver == NULL || hapd->driver->flush == NULL) in hostapd_flush()
636 if (hapd->conf && hapd->conf->mld_ap) in hostapd_flush()
637 link_id = hapd->mld_link_id; in hostapd_flush()
640 return hapd->driver->flush(hapd->drv_priv, link_id); in hostapd_flush()
644 int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode, in hostapd_set_freq() argument
652 struct hostapd_hw_modes *cmode = hapd->iface->current_mode; in hostapd_set_freq()
664 NULL, hostapd_get_punct_bitmap(hapd))) in hostapd_set_freq()
667 if (hapd->driver == NULL) in hostapd_set_freq()
669 if (hapd->driver->set_freq == NULL) in hostapd_set_freq()
675 if (hapd->conf->mld_ap) { in hostapd_set_freq()
676 data.link_id = hapd->mld_link_id; in hostapd_set_freq()
682 return hapd->driver->set_freq(hapd->drv_priv, &data); in hostapd_set_freq()
685 int hostapd_set_rts(struct hostapd_data *hapd, int rts) in hostapd_set_rts() argument
687 if (hapd->driver == NULL || hapd->driver->set_rts == NULL) in hostapd_set_rts()
689 return hapd->driver->set_rts(hapd->drv_priv, rts); in hostapd_set_rts()
693 int hostapd_set_frag(struct hostapd_data *hapd, int frag) in hostapd_set_frag() argument
695 if (hapd->driver == NULL || hapd->driver->set_frag == NULL) in hostapd_set_frag()
697 return hapd->driver->set_frag(hapd->drv_priv, frag); in hostapd_set_frag()
701 int hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr, in hostapd_sta_set_flags() argument
704 if (!hapd->driver || !hapd->drv_priv || !hapd->driver->sta_set_flags) in hostapd_sta_set_flags()
706 return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags, in hostapd_sta_set_flags()
711 int hostapd_sta_set_airtime_weight(struct hostapd_data *hapd, const u8 *addr, in hostapd_sta_set_airtime_weight() argument
714 if (!hapd->driver || !hapd->driver->sta_set_airtime_weight) in hostapd_sta_set_airtime_weight()
716 return hapd->driver->sta_set_airtime_weight(hapd->drv_priv, addr, in hostapd_sta_set_airtime_weight()
721 int hostapd_set_country(struct hostapd_data *hapd, const char *country) in hostapd_set_country() argument
723 if (hapd->driver == NULL || in hostapd_set_country()
724 hapd->driver->set_country == NULL) in hostapd_set_country()
726 return hapd->driver->set_country(hapd->drv_priv, country); in hostapd_set_country()
730 int hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs, in hostapd_set_tx_queue_params() argument
735 if (hapd->driver == NULL || hapd->driver->set_tx_queue_params == NULL) in hostapd_set_tx_queue_params()
739 if (hapd->conf->mld_ap) in hostapd_set_tx_queue_params()
740 link_id = hapd->mld_link_id; in hostapd_set_tx_queue_params()
743 return hapd->driver->set_tx_queue_params(hapd->drv_priv, queue, aifs, in hostapd_set_tx_queue_params()
750 hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes, in hostapd_get_hw_feature_data() argument
753 if (!hapd->driver || !hapd->driver->get_hw_feature_data || in hostapd_get_hw_feature_data()
754 !hapd->drv_priv) in hostapd_get_hw_feature_data()
756 return hapd->driver->get_hw_feature_data(hapd->drv_priv, num_modes, in hostapd_get_hw_feature_data()
761 int hostapd_driver_commit(struct hostapd_data *hapd) in hostapd_driver_commit() argument
763 if (hapd->driver == NULL || hapd->driver->commit == NULL) in hostapd_driver_commit()
765 return hapd->driver->commit(hapd->drv_priv); in hostapd_driver_commit()
769 int hostapd_drv_none(struct hostapd_data *hapd) in hostapd_drv_none() argument
771 return hapd->driver && os_strcmp(hapd->driver->name, "none") == 0; in hostapd_drv_none()
775 bool hostapd_drv_nl80211(struct hostapd_data *hapd) in hostapd_drv_nl80211() argument
777 return hapd->driver && os_strcmp(hapd->driver->name, "nl80211") == 0; in hostapd_drv_nl80211()
781 int hostapd_driver_scan(struct hostapd_data *hapd, in hostapd_driver_scan() argument
784 if (hapd->driver && hapd->driver->scan2) in hostapd_driver_scan()
785 return hapd->driver->scan2(hapd->drv_priv, params); in hostapd_driver_scan()
791 struct hostapd_data *hapd) in hostapd_driver_get_scan_results() argument
793 if (hapd->driver && hapd->driver->get_scan_results) in hostapd_driver_get_scan_results()
794 return hapd->driver->get_scan_results(hapd->drv_priv, NULL); in hostapd_driver_get_scan_results()
795 if (hapd->driver && hapd->driver->get_scan_results2) in hostapd_driver_get_scan_results()
796 return hapd->driver->get_scan_results2(hapd->drv_priv); in hostapd_driver_get_scan_results()
801 int hostapd_driver_set_noa(struct hostapd_data *hapd, u8 count, int start, in hostapd_driver_set_noa() argument
804 if (hapd->driver && hapd->driver->set_noa) in hostapd_driver_set_noa()
805 return hapd->driver->set_noa(hapd->drv_priv, count, start, in hostapd_driver_set_noa()
811 int hostapd_drv_set_key(const char *ifname, struct hostapd_data *hapd, in hostapd_drv_set_key() argument
819 if (hapd->driver == NULL || hapd->driver->set_key == NULL) in hostapd_drv_set_key()
837 if (hapd->conf->mld_ap && !(key_flag & KEY_FLAG_PAIRWISE)) in hostapd_drv_set_key()
838 params.link_id = hapd->mld_link_id; in hostapd_drv_set_key()
841 return hapd->driver->set_key(hapd->drv_priv, &params); in hostapd_drv_set_key()
845 int hostapd_drv_send_mlme(struct hostapd_data *hapd, in hostapd_drv_send_mlme() argument
853 if (hapd->conf->mld_ap) in hostapd_drv_send_mlme()
854 link_id = hapd->mld_link_id; in hostapd_drv_send_mlme()
857 if (!hapd->driver || !hapd->driver->send_mlme || !hapd->drv_priv) in hostapd_drv_send_mlme()
859 return hapd->driver->send_mlme(hapd->drv_priv, msg, len, noack, 0, in hostapd_drv_send_mlme()
865 int hostapd_drv_sta_deauth(struct hostapd_data *hapd, in hostapd_drv_sta_deauth() argument
869 const u8 *own_addr = hapd->own_addr; in hostapd_drv_sta_deauth()
872 if (hapd->conf->mld_ap) { in hostapd_drv_sta_deauth()
873 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_drv_sta_deauth()
875 link_id = hapd->mld_link_id; in hostapd_drv_sta_deauth()
876 if (ap_sta_is_mld(hapd, sta)) in hostapd_drv_sta_deauth()
877 own_addr = hapd->mld->mld_addr; in hostapd_drv_sta_deauth()
881 if (!hapd->driver || !hapd->driver->sta_deauth || !hapd->drv_priv) in hostapd_drv_sta_deauth()
883 return hapd->driver->sta_deauth(hapd->drv_priv, own_addr, addr, in hostapd_drv_sta_deauth()
888 int hostapd_drv_sta_disassoc(struct hostapd_data *hapd, in hostapd_drv_sta_disassoc() argument
891 const u8 *own_addr = hapd->own_addr; in hostapd_drv_sta_disassoc()
894 if (hapd->conf->mld_ap) { in hostapd_drv_sta_disassoc()
895 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_drv_sta_disassoc()
897 if (ap_sta_is_mld(hapd, sta)) in hostapd_drv_sta_disassoc()
898 own_addr = hapd->mld->mld_addr; in hostapd_drv_sta_disassoc()
902 if (!hapd->driver || !hapd->driver->sta_disassoc || !hapd->drv_priv) in hostapd_drv_sta_disassoc()
904 return hapd->driver->sta_disassoc(hapd->drv_priv, own_addr, addr, in hostapd_drv_sta_disassoc()
909 int hostapd_drv_wnm_oper(struct hostapd_data *hapd, enum wnm_oper oper, in hostapd_drv_wnm_oper() argument
912 if (hapd->driver == NULL || hapd->driver->wnm_oper == NULL) in hostapd_drv_wnm_oper()
914 return hapd->driver->wnm_oper(hapd->drv_priv, oper, peer, buf, in hostapd_drv_wnm_oper()
919 static int hapd_drv_send_action(struct hostapd_data *hapd, unsigned int freq, in hapd_drv_send_action() argument
923 const u8 *own_addr = hapd->own_addr; in hapd_drv_send_action()
930 if (!hapd->driver || !hapd->driver->send_action || !hapd->drv_priv) in hapd_drv_send_action()
932 bssid = hapd->own_addr; in hapd_drv_send_action()
939 sta = ap_get_sta(hapd, dst); in hapd_drv_send_action()
952 } else if (hapd->conf->mld_ap) { in hapd_drv_send_action()
953 sta = ap_get_sta(hapd, dst); in hapd_drv_send_action()
955 if (ap_sta_is_mld(hapd, sta)) { in hapd_drv_send_action()
956 own_addr = hapd->mld->mld_addr; in hapd_drv_send_action()
962 return hapd->driver->send_action(hapd->drv_priv, freq, wait, dst, in hapd_drv_send_action()
967 int hostapd_drv_send_action(struct hostapd_data *hapd, unsigned int freq, in hostapd_drv_send_action() argument
971 return hapd_drv_send_action(hapd, freq, wait, dst, data, len, false); in hostapd_drv_send_action()
975 int hostapd_drv_send_action_addr3_ap(struct hostapd_data *hapd, in hostapd_drv_send_action_addr3_ap() argument
980 return hapd_drv_send_action(hapd, freq, wait, dst, data, len, true); in hostapd_drv_send_action_addr3_ap()
992 struct hostapd_data *hapd = iface->bss[0]; in hostapd_start_dfs_cac() local
997 if (!hapd->driver || !hapd->driver->start_dfs_cac || !cmode) in hostapd_start_dfs_cac()
1015 hostapd_get_punct_bitmap(hapd))) { in hostapd_start_dfs_cac()
1021 res = hapd->driver->start_dfs_cac(hapd->drv_priv, &data); in hostapd_start_dfs_cac()
1034 int hostapd_drv_set_qos_map(struct hostapd_data *hapd, in hostapd_drv_set_qos_map() argument
1037 if (!hapd->driver || !hapd->driver->set_qos_map || !hapd->drv_priv || in hostapd_drv_set_qos_map()
1038 !(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_QOS_MAPPING)) in hostapd_drv_set_qos_map()
1040 return hapd->driver->set_qos_map(hapd->drv_priv, qos_map_set, in hostapd_drv_set_qos_map()
1045 void hostapd_get_hw_mode_any_channels(struct hostapd_data *hapd, in hostapd_get_hw_mode_any_channels() argument
1057 (hapd->iface->conf->acs_freq_list.num && in hostapd_get_hw_mode_any_channels()
1059 &hapd->iface->conf->acs_freq_list, in hostapd_get_hw_mode_any_channels()
1063 (!hapd->iface->conf->acs_freq_list_present && in hostapd_get_hw_mode_any_channels()
1064 hapd->iface->conf->acs_ch_list.num && in hostapd_get_hw_mode_any_channels()
1066 &hapd->iface->conf->acs_ch_list, in hostapd_get_hw_mode_any_channels()
1070 ((hapd->iface->conf->acs_exclude_6ghz_non_psc && in hostapd_get_hw_mode_any_channels()
1072 (!hapd->iface->conf->ieee80211ax && in hostapd_get_hw_mode_any_channels()
1073 !hapd->iface->conf->ieee80211be))) in hostapd_get_hw_mode_any_channels()
1076 !(hapd->iface->conf->acs_exclude_dfs && in hostapd_get_hw_mode_any_channels()
1078 !(chan->max_tx_power < hapd->iface->conf->min_tx_power)) in hostapd_get_hw_mode_any_channels()
1085 hapd->iface->is_no_ir = is_no_ir; in hostapd_get_hw_mode_any_channels()
1091 struct hostapd_data *hapd = iface->bss[0]; in hostapd_get_ext_capa() local
1093 if (!hapd->driver || !hapd->driver->get_ext_capab) in hostapd_get_ext_capa()
1096 hapd->driver->get_ext_capab(hapd->drv_priv, WPA_IF_AP_BSS, in hostapd_get_ext_capa()
1105 struct hostapd_data *hapd = iface->bss[0]; in hostapd_get_mld_capa() local
1107 if (!hapd->driver || !hapd->driver->get_mld_capab) in hostapd_get_mld_capa()
1110 hapd->driver->get_mld_capab(hapd->drv_priv, WPA_IF_AP_BSS, in hostapd_get_mld_capa()
1121 int hostapd_drv_do_acs(struct hostapd_data *hapd) in hostapd_drv_do_acs() argument
1129 if (hapd->driver == NULL || hapd->driver->do_acs == NULL) in hostapd_drv_do_acs()
1133 params.hw_mode = hapd->iface->conf->hw_mode; in hostapd_drv_do_acs()
1136 if (hapd->conf->mld_ap && hapd->iconf->ieee80211be && in hostapd_drv_do_acs()
1137 !hapd->conf->disable_11be) in hostapd_drv_do_acs()
1138 params.link_id = hapd->mld_link_id; in hostapd_drv_do_acs()
1145 if (hapd->iface->conf->acs_freq_list_present) in hostapd_drv_do_acs()
1146 acs_ch_list_all = !hapd->iface->conf->acs_freq_list.num; in hostapd_drv_do_acs()
1148 acs_ch_list_all = !hapd->iface->conf->acs_ch_list.num; in hostapd_drv_do_acs()
1150 if (hapd->iface->current_mode) in hostapd_drv_do_acs()
1151 selected_mode = hapd->iface->current_mode->mode; in hostapd_drv_do_acs()
1155 for (i = 0; i < hapd->iface->num_hw_features; i++) { in hostapd_drv_do_acs()
1156 mode = &hapd->iface->hw_features[i]; in hostapd_drv_do_acs()
1160 hostapd_get_hw_mode_any_channels(hapd, mode, acs_ch_list_all, in hostapd_drv_do_acs()
1164 if (!freq_list && hapd->iface->is_no_ir) { in hostapd_drv_do_acs()
1171 params.edmg_enabled = hapd->iface->conf->enable_edmg; in hostapd_drv_do_acs()
1173 params.ht_enabled = !!(hapd->iface->conf->ieee80211n); in hostapd_drv_do_acs()
1174 params.ht40_enabled = !!(hapd->iface->conf->ht_capab & in hostapd_drv_do_acs()
1176 params.vht_enabled = !!(hapd->iface->conf->ieee80211ac); in hostapd_drv_do_acs()
1177 params.eht_enabled = !!(hapd->iface->conf->ieee80211be); in hostapd_drv_do_acs()
1179 if (hapd->iface->conf->ieee80211n && params.ht40_enabled) in hostapd_drv_do_acs()
1184 if ((hapd->iface->conf->ieee80211be || in hostapd_drv_do_acs()
1185 hapd->iface->conf->ieee80211ax || in hostapd_drv_do_acs()
1186 hapd->iface->conf->ieee80211ac) && in hostapd_drv_do_acs()
1190 oper_chwidth = hostapd_get_oper_chwidth(hapd->iface->conf); in hostapd_drv_do_acs()
1200 if (hapd->iface->conf->op_class) in hostapd_drv_do_acs()
1202 hapd->iface->conf->op_class); in hostapd_drv_do_acs()
1203 ret = hapd->driver->do_acs(hapd->drv_priv, &params); in hostapd_drv_do_acs()
1210 int hostapd_drv_update_dh_ie(struct hostapd_data *hapd, const u8 *peer, in hostapd_drv_update_dh_ie() argument
1213 if (!hapd->driver || !hapd->driver->update_dh_ie || !hapd->drv_priv) in hostapd_drv_update_dh_ie()
1215 return hapd->driver->update_dh_ie(hapd->drv_priv, peer, reason_code, in hostapd_drv_update_dh_ie()
1220 int hostapd_drv_dpp_listen(struct hostapd_data *hapd, bool enable) in hostapd_drv_dpp_listen() argument
1222 if (!hapd->driver || !hapd->driver->dpp_listen || !hapd->drv_priv) in hostapd_drv_dpp_listen()
1224 return hapd->driver->dpp_listen(hapd->drv_priv, enable); in hostapd_drv_dpp_listen()
1229 int hostapd_drv_set_secure_ranging_ctx(struct hostapd_data *hapd, in hostapd_drv_set_secure_ranging_ctx() argument
1237 if (!hapd->driver || !hapd->driver->set_secure_ranging_ctx) in hostapd_drv_set_secure_ranging_ctx()
1250 return hapd->driver->set_secure_ranging_ctx(hapd->drv_priv, &params); in hostapd_drv_set_secure_ranging_ctx()