Lines Matching refs:hapd
27 struct hostapd_data *hapd = eloop_data; in hostapd_lci_rep_timeout_handler() local
30 hapd->lci_req_token); in hostapd_lci_rep_timeout_handler()
31 hapd->lci_req_active = 0; in hostapd_lci_rep_timeout_handler()
35 static void hostapd_handle_lci_report(struct hostapd_data *hapd, u8 token, in hostapd_handle_lci_report() argument
38 if (!hapd->lci_req_active || hapd->lci_req_token != token) { in hostapd_handle_lci_report()
43 hapd->lci_req_active = 0; in hostapd_handle_lci_report()
44 eloop_cancel_timeout(hostapd_lci_rep_timeout_handler, hapd, NULL); in hostapd_handle_lci_report()
51 struct hostapd_data *hapd = eloop_data; in hostapd_range_rep_timeout_handler() local
54 hapd->range_req_token); in hostapd_range_rep_timeout_handler()
55 hapd->range_req_active = 0; in hostapd_range_rep_timeout_handler()
59 static void hostapd_handle_range_report(struct hostapd_data *hapd, u8 token, in hostapd_handle_range_report() argument
62 if (!hapd->range_req_active || hapd->range_req_token != token) { in hostapd_handle_range_report()
68 hapd->range_req_active = 0; in hostapd_handle_range_report()
69 eloop_cancel_timeout(hostapd_range_rep_timeout_handler, hapd, NULL); in hostapd_handle_range_report()
74 static void hostapd_handle_beacon_report(struct hostapd_data *hapd, in hostapd_handle_beacon_report() argument
90 wpa_msg(hapd->msg_ctx, MSG_INFO, BEACON_RESP_RX MACSTR " %u %02x %s", in hostapd_handle_beacon_report()
95 static void hostapd_handle_radio_msmt_report(struct hostapd_data *hapd, in hostapd_handle_radio_msmt_report() argument
118 hostapd_handle_lci_report(hapd, token, ie + 2, ie[1]); in hostapd_handle_radio_msmt_report()
121 hostapd_handle_range_report(hapd, token, ie + 2, ie[1]); in hostapd_handle_radio_msmt_report()
124 hostapd_handle_beacon_report(hapd, mgmt->sa, token, in hostapd_handle_radio_msmt_report()
199 static void hostapd_send_nei_report_resp(struct hostapd_data *hapd, in hostapd_send_nei_report_resp() argument
221 dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry, in hostapd_send_nei_report_resp()
272 hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr, in hostapd_send_nei_report_resp()
278 static void hostapd_handle_nei_report_req(struct hostapd_data *hapd, in hostapd_handle_nei_report_req() argument
290 if (!(hapd->conf->radio_measurements[0] & in hostapd_handle_nei_report_req()
305 ssid.ssid_len = hapd->conf->ssid.ssid_len; in hostapd_handle_nei_report_req()
306 os_memcpy(ssid.ssid, hapd->conf->ssid.ssid, ssid.ssid_len); in hostapd_handle_nei_report_req()
332 hostapd_send_nei_report_resp(hapd, mgmt->sa, token, &ssid, lci, civic, in hostapd_handle_nei_report_req()
337 void hostapd_handle_radio_measurement(struct hostapd_data *hapd, in hostapd_handle_radio_measurement() argument
354 hostapd_handle_radio_msmt_report(hapd, buf, len); in hostapd_handle_radio_measurement()
357 hostapd_handle_nei_report_req(hapd, buf, len); in hostapd_handle_radio_measurement()
367 int hostapd_send_lci_req(struct hostapd_data *hapd, const u8 *addr) in hostapd_send_lci_req() argument
370 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_send_lci_req()
385 if (hapd->lci_req_active) { in hostapd_send_lci_req()
388 hapd->lci_req_active = 0; in hostapd_send_lci_req()
389 eloop_cancel_timeout(hostapd_lci_rep_timeout_handler, hapd, in hostapd_send_lci_req()
398 hapd->lci_req_token++; in hostapd_send_lci_req()
400 if (!hapd->lci_req_token) in hostapd_send_lci_req()
401 hapd->lci_req_token++; in hostapd_send_lci_req()
405 wpabuf_put_u8(buf, hapd->lci_req_token); in hostapd_send_lci_req()
425 ret = hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr, in hostapd_send_lci_req()
431 hapd->lci_req_active = 1; in hostapd_send_lci_req()
434 hostapd_lci_rep_timeout_handler, hapd, NULL); in hostapd_send_lci_req()
440 int hostapd_send_range_req(struct hostapd_data *hapd, const u8 *addr, in hostapd_send_range_req() argument
459 sta = ap_get_sta(hapd, addr); in hostapd_send_range_req()
472 if (hapd->range_req_active) { in hostapd_send_range_req()
475 hapd->range_req_active = 0; in hostapd_send_range_req()
476 eloop_cancel_timeout(hostapd_range_rep_timeout_handler, hapd, in hostapd_send_range_req()
485 hapd->range_req_token++; in hostapd_send_range_req()
486 if (!hapd->range_req_token) /* For wraparounds */ in hostapd_send_range_req()
487 hapd->range_req_token++; in hostapd_send_range_req()
492 wpabuf_put_u8(buf, hapd->range_req_token); /* Dialog Token */ in hostapd_send_range_req()
521 nr = hostapd_neighbor_get(hapd, responders + ETH_ALEN * i, in hostapd_send_range_req()
544 ret = hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr, in hostapd_send_range_req()
550 hapd->range_req_active = 1; in hostapd_send_range_req()
553 hostapd_range_rep_timeout_handler, hapd, NULL); in hostapd_send_range_req()
559 void hostapd_clean_rrm(struct hostapd_data *hapd) in hostapd_clean_rrm() argument
561 hostapd_free_neighbor_db(hapd); in hostapd_clean_rrm()
562 eloop_cancel_timeout(hostapd_lci_rep_timeout_handler, hapd, NULL); in hostapd_clean_rrm()
563 hapd->lci_req_active = 0; in hostapd_clean_rrm()
564 eloop_cancel_timeout(hostapd_range_rep_timeout_handler, hapd, NULL); in hostapd_clean_rrm()
565 hapd->range_req_active = 0; in hostapd_clean_rrm()
569 int hostapd_send_beacon_req(struct hostapd_data *hapd, const u8 *addr, in hostapd_send_beacon_req() argument
573 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_send_beacon_req()
638 hapd->beacon_req_token++; in hostapd_send_beacon_req()
639 if (!hapd->beacon_req_token) in hostapd_send_beacon_req()
640 hapd->beacon_req_token++; in hostapd_send_beacon_req()
644 wpabuf_put_u8(buf, hapd->beacon_req_token); in hostapd_send_beacon_req()
655 ret = hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr, in hostapd_send_beacon_req()
661 return hapd->beacon_req_token; in hostapd_send_beacon_req()
665 void hostapd_rrm_beacon_req_tx_status(struct hostapd_data *hapd, in hostapd_rrm_beacon_req_tx_status() argument
671 wpa_msg(hapd->msg_ctx, MSG_INFO, BEACON_REQ_TX_STATUS MACSTR in hostapd_rrm_beacon_req_tx_status()