Lines Matching refs:hapd

34 static const char * sae_get_password(struct hostapd_data *hapd,  in sae_get_password()  argument
43 password = hapd->conf->ssid.wpa_passphrase; in sae_get_password()
44 pt = hapd->conf->ssid.pt; in sae_get_password()
55 static struct wpabuf *auth_build_sae_commit(struct hostapd_data *hapd, in auth_build_sae_commit() argument
69 if (rx_id && hapd->conf->sae_pwe != SAE_PWE_FORCE_HUNT_AND_PECK) in auth_build_sae_commit()
76 password = sae_get_password(hapd, sta, rx_id, &pt); in auth_build_sae_commit()
83 sae_prepare_commit_pt(sta->sae, pt, hapd->own_addr, sta->addr, in auth_build_sae_commit()
89 sae_prepare_commit(hapd->own_addr, sta->addr, in auth_build_sae_commit()
111 static struct wpabuf *auth_build_sae_confirm(struct hostapd_data *hapd, in auth_build_sae_confirm() argument
130 static int auth_sae_send_commit(struct hostapd_data *hapd, in auth_sae_send_commit() argument
138 data = auth_build_sae_commit(hapd, sta, update, status_code); in auth_sae_send_commit()
156 reply_res = esp_send_sae_auth_reply(hapd, sta->addr, bssid, WLAN_AUTH_SAE, 1, in auth_sae_send_commit()
166 static int auth_sae_send_confirm(struct hostapd_data *hapd, in auth_sae_send_confirm() argument
173 data = auth_build_sae_confirm(hapd, sta); in auth_sae_send_confirm()
182 reply_res = esp_send_sae_auth_reply(hapd, sta->addr, bssid, WLAN_AUTH_SAE, 2, in auth_sae_send_confirm()
193 static int use_sae_anti_clogging(struct hostapd_data *hapd) in use_sae_anti_clogging() argument
198 if (hapd->conf->sae_anti_clogging_threshold == 0) { in use_sae_anti_clogging()
202 for (sta = hapd->sta_list; sta; sta = sta->next) { in use_sae_anti_clogging()
208 if (open >= hapd->conf->sae_anti_clogging_threshold) { in use_sae_anti_clogging()
216 if (open + dl_list_len(&hapd->sae_commit_queue) >= in use_sae_anti_clogging()
217 hapd->conf->sae_anti_clogging_threshold) { in use_sae_anti_clogging()
225 static int sae_check_big_sync(struct hostapd_data *hapd, struct sta_info *sta) in sae_check_big_sync() argument
227 if (sta->sae->sync > hapd->conf->sae_sync) { in sae_check_big_sync()
236 void sae_accept_sta(struct hostapd_data *hapd, struct sta_info *sta) in sae_accept_sta() argument
246 wpa_auth_pmksa_add_sae(hapd->wpa_auth, sta->addr, in sae_accept_sta()
251 static int sae_sm_step(struct hostapd_data *hapd, struct sta_info *sta, in sae_sm_step() argument
273 ret = auth_sae_send_commit(hapd, sta, bssid, in sae_sm_step()
297 ret = auth_sae_send_confirm(hapd, sta, bssid); in sae_sm_step()
309 ret = auth_sae_send_confirm(hapd, sta, bssid); in sae_sm_step()
321 return sae_sm_step(hapd, sta, bssid, auth_transaction, in sae_sm_step()
327 if (sae_check_big_sync(hapd, sta)) { in sae_sm_step()
332 ret = auth_sae_send_commit(hapd, sta, bssid, 1, in sae_sm_step()
343 ret = auth_sae_send_confirm(hapd, sta, bssid); in sae_sm_step()
350 sae_accept_sta(hapd, sta); in sae_sm_step()
356 ret = auth_sae_send_commit(hapd, sta, bssid, 1, in sae_sm_step()
369 if (sae_check_big_sync(hapd, sta)) { in sae_sm_step()
374 ret = auth_sae_send_confirm(hapd, sta, bssid); in sae_sm_step()
390 static int sae_status_success(struct hostapd_data *hapd, u16 status_code) in sae_status_success() argument
392 enum sae_pwe sae_pwe = hapd->conf->sae_pwe; in sae_status_success()
405 static int sae_is_group_enabled(struct hostapd_data *hapd, int group) in sae_is_group_enabled() argument
424 static int check_sae_rejected_groups(struct hostapd_data *hapd, in check_sae_rejected_groups() argument
453 enabled = sae_is_group_enabled(hapd, group); in check_sae_rejected_groups()
464 int handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta, in handle_auth_sae() argument
470 int *groups = hapd->conf->sae_groups; in handle_auth_sae()
481 !sae_status_success(hapd, status)) { in handle_auth_sae()
500 if (!sae_status_success(hapd, status)) { in handle_auth_sae()
547 check_comeback_token(hapd->comeback_key, in handle_auth_sae()
548 hapd->comeback_pending_idx, sta->addr, in handle_auth_sae()
557 if (check_sae_rejected_groups(hapd, sta->sae)) { in handle_auth_sae()
566 if (!token && use_sae_anti_clogging(hapd) && !allow_reuse) { in handle_auth_sae()
577 &hapd->last_comeback_key_update, in handle_auth_sae()
578 hapd->comeback_key, in handle_auth_sae()
579 hapd->comeback_idx, in handle_auth_sae()
580 hapd->comeback_pending_idx, in handle_auth_sae()
581 sizeof(hapd->comeback_pending_idx), in handle_auth_sae()
593 resp = sae_sm_step(hapd, sta, bssid, auth_transaction, in handle_auth_sae()
631 resp = sae_sm_step(hapd, sta, bssid, auth_transaction, in handle_auth_sae()
653 esp_send_sae_auth_reply(hapd, bssid, bssid, WLAN_AUTH_SAE, in handle_auth_sae()
667 int auth_sae_queue(struct hostapd_data *hapd, in auth_sae_queue() argument
673 queue_len = dl_list_len(&hapd->sae_commit_queue); in auth_sae_queue()
700 dl_list_for_each(q2, &hapd->sae_commit_queue, in auth_sae_queue()
714 dl_list_add_tail(&hapd->sae_commit_queue, &q->list); in auth_sae_queue()