• Home
  • Raw
  • Download

Lines Matching refs:sme

65 	if (!index_within_array(groups, wpa_s->sme.sae_group_index))  in sme_set_sae_group()
69 int group = groups[wpa_s->sme.sae_group_index]; in sme_set_sae_group()
72 if (sae_set_group(&wpa_s->sme.sae, group) == 0) { in sme_set_sae_group()
74 wpa_s->sme.sae.group); in sme_set_sae_group()
77 wpa_s->sme.sae_group_index++; in sme_set_sae_group()
104 &wpa_s->sme.sae) < 0) { in sme_auth_build_sae_commit()
109 len = wpa_s->sme.sae_token ? wpabuf_len(wpa_s->sme.sae_token) : 0; in sme_auth_build_sae_commit()
116 sae_write_commit(&wpa_s->sme.sae, buf, wpa_s->sme.sae_token); in sme_auth_build_sae_commit()
132 sae_write_confirm(&wpa_s->sme.sae, buf); in sme_auth_build_sae_confirm()
172 if (sizeof(wpa_s->sme.assoc_req_ie) < in sme_auth_handle_rrm()
173 wpa_s->sme.assoc_req_ie_len + rrm_ie_len + 2) { in sme_auth_handle_rrm()
180 pos = wpa_s->sme.assoc_req_ie + wpa_s->sme.assoc_req_ie_len; in sme_auth_handle_rrm()
189 wpa_s->sme.assoc_req_ie_len += rrm_ie_len + 2; in sme_auth_handle_rrm()
235 if (wpa_s->sme.ssid_len != params.ssid_len || in sme_send_authentication()
236 os_memcmp(wpa_s->sme.ssid, params.ssid, params.ssid_len) != 0) in sme_send_authentication()
237 wpa_s->sme.prev_bssid_set = 0; in sme_send_authentication()
239 wpa_s->sme.freq = params.freq; in sme_send_authentication()
240 os_memcpy(wpa_s->sme.ssid, params.ssid, params.ssid_len); in sme_send_authentication()
241 wpa_s->sme.ssid_len = params.ssid_len; in sme_send_authentication()
262 wpa_s->sme.sae_pmksa_caching = 0; in sme_send_authentication()
307 wpa_s->sme.assoc_req_ie_len = sizeof(wpa_s->sme.assoc_req_ie); in sme_send_authentication()
309 wpa_s->sme.assoc_req_ie, in sme_send_authentication()
310 &wpa_s->sme.assoc_req_ie_len)) { in sme_send_authentication()
324 wpa_s->sme.assoc_req_ie_len = 0; in sme_send_authentication()
326 wpa_s->sme.assoc_req_ie_len = sizeof(wpa_s->sme.assoc_req_ie); in sme_send_authentication()
328 wpa_s->sme.assoc_req_ie, in sme_send_authentication()
329 &wpa_s->sme.assoc_req_ie_len)) { in sme_send_authentication()
341 sizeof(wpa_s->sme.assoc_req_ie)) { in sme_send_authentication()
342 wpa_s->sme.assoc_req_ie_len = wpabuf_len(wps_ie); in sme_send_authentication()
343 os_memcpy(wpa_s->sme.assoc_req_ie, wpabuf_head(wps_ie), in sme_send_authentication()
344 wpa_s->sme.assoc_req_ie_len); in sme_send_authentication()
346 wpa_s->sme.assoc_req_ie_len = 0; in sme_send_authentication()
352 wpa_s->sme.assoc_req_ie_len = 0; in sme_send_authentication()
366 if (wpa_s->sme.assoc_req_ie_len + 5 < in sme_send_authentication()
367 sizeof(wpa_s->sme.assoc_req_ie)) { in sme_send_authentication()
369 u8 *pos = wpa_s->sme.assoc_req_ie + in sme_send_authentication()
370 wpa_s->sme.assoc_req_ie_len; in sme_send_authentication()
377 wpa_s->sme.assoc_req_ie_len += 5; in sme_send_authentication()
380 if (wpa_s->sme.ft_used && in sme_send_authentication()
381 os_memcmp(md, wpa_s->sme.mobility_domain, 2) == 0 && in sme_send_authentication()
386 params.ie = wpa_s->sme.ft_ies; in sme_send_authentication()
387 params.ie_len = wpa_s->sme.ft_ies_len; in sme_send_authentication()
393 wpa_s->sme.mfp = wpas_get_ssid_pmf(wpa_s, ssid); in sme_send_authentication()
394 if (wpa_s->sme.mfp != NO_MGMT_FRAME_PROTECTION) { in sme_send_authentication()
402 wpa_s->sme.mfp = MGMT_FRAME_PROTECTION_REQUIRED; in sme_send_authentication()
412 pos = wpa_s->sme.assoc_req_ie + wpa_s->sme.assoc_req_ie_len; in sme_send_authentication()
413 len = sizeof(wpa_s->sme.assoc_req_ie) - in sme_send_authentication()
414 wpa_s->sme.assoc_req_ie_len; in sme_send_authentication()
418 wpa_s->sme.assoc_req_ie_len += res; in sme_send_authentication()
426 if (wpa_s->sme.assoc_req_ie_len + fst_ies_len <= in sme_send_authentication()
427 sizeof(wpa_s->sme.assoc_req_ie)) { in sme_send_authentication()
428 os_memcpy(wpa_s->sme.assoc_req_ie + in sme_send_authentication()
429 wpa_s->sme.assoc_req_ie_len, in sme_send_authentication()
432 wpa_s->sme.assoc_req_ie_len += fst_ies_len; in sme_send_authentication()
446 wpa_s->sme.assoc_req_ie + wpa_s->sme.assoc_req_ie_len, in sme_send_authentication()
447 sizeof(wpa_s->sme.assoc_req_ie) - in sme_send_authentication()
448 wpa_s->sme.assoc_req_ie_len); in sme_send_authentication()
450 wpa_s->sme.assoc_req_ie_len += len; in sme_send_authentication()
457 u8 *pos = wpa_s->sme.assoc_req_ie; in sme_send_authentication()
458 if (wpa_s->sme.assoc_req_ie_len > 0 && pos[0] == WLAN_EID_RSN) in sme_send_authentication()
461 wpa_s->sme.assoc_req_ie_len - in sme_send_authentication()
462 (pos - wpa_s->sme.assoc_req_ie)); in sme_send_authentication()
463 wpa_s->sme.assoc_req_ie_len += ext_capab_len; in sme_send_authentication()
477 len = sizeof(wpa_s->sme.assoc_req_ie) - in sme_send_authentication()
478 wpa_s->sme.assoc_req_ie_len; in sme_send_authentication()
480 os_memcpy(wpa_s->sme.assoc_req_ie + in sme_send_authentication()
481 wpa_s->sme.assoc_req_ie_len, in sme_send_authentication()
483 wpa_s->sme.assoc_req_ie_len += wpabuf_len(hs20); in sme_send_authentication()
494 len = sizeof(wpa_s->sme.assoc_req_ie) - in sme_send_authentication()
495 wpa_s->sme.assoc_req_ie_len; in sme_send_authentication()
497 os_memcpy(wpa_s->sme.assoc_req_ie + in sme_send_authentication()
498 wpa_s->sme.assoc_req_ie_len, in sme_send_authentication()
500 wpa_s->sme.assoc_req_ie_len += wpabuf_len(buf); in sme_send_authentication()
508 len = wpas_mbo_ie(wpa_s, wpa_s->sme.assoc_req_ie + in sme_send_authentication()
509 wpa_s->sme.assoc_req_ie_len, in sme_send_authentication()
510 sizeof(wpa_s->sme.assoc_req_ie) - in sme_send_authentication()
511 wpa_s->sme.assoc_req_ie_len); in sme_send_authentication()
513 wpa_s->sme.assoc_req_ie_len += len; in sme_send_authentication()
524 wpa_s->sme.sae_pmksa_caching = 1; in sme_send_authentication()
539 wpa_s->sme.sae.state = start ? SAE_COMMITTED : SAE_CONFIRMED; in sme_send_authentication()
594 wpa_s->sme.auth_alg = params.auth_alg; in sme_send_authentication()
674 cwork->sme = 1; in sme_authenticate()
677 wpa_s->sme.sae.state = SAE_NOTHING; in sme_authenticate()
678 wpa_s->sme.sae.send_confirm = 0; in sme_authenticate()
679 wpa_s->sme.sae_group_index = 0; in sme_authenticate()
700 wpa_s->sme.sae.state == SAE_COMMITTED && in sme_sae_auth()
718 if (sae_group_allowed(&wpa_s->sme.sae, groups, group) != in sme_sae_auth()
725 wpabuf_free(wpa_s->sme.sae_token); in sme_sae_auth()
726 wpa_s->sme.sae_token = wpabuf_alloc_copy(data + sizeof(le16), in sme_sae_auth()
735 wpa_s->sme.sae.state == SAE_COMMITTED && in sme_sae_auth()
738 wpa_s->sme.sae_group_index++; in sme_sae_auth()
759 if (wpa_s->sme.sae.state != SAE_COMMITTED) in sme_sae_auth()
763 res = sae_parse_commit(&wpa_s->sme.sae, data, len, NULL, NULL, in sme_sae_auth()
773 if (sae_process_commit(&wpa_s->sme.sae) < 0) { in sme_sae_auth()
779 wpabuf_free(wpa_s->sme.sae_token); in sme_sae_auth()
780 wpa_s->sme.sae_token = NULL; in sme_sae_auth()
786 if (wpa_s->sme.sae.state != SAE_CONFIRMED) in sme_sae_auth()
788 if (sae_check_confirm(&wpa_s->sme.sae, data, len) < 0) in sme_sae_auth()
790 wpa_s->sme.sae.state = SAE_ACCEPTED; in sme_sae_auth()
791 sae_clear_temp_data(&wpa_s->sme.sae); in sme_sae_auth()
848 wpa_sm_set_pmk(wpa_s->wpa, wpa_s->sme.sae.pmk, PMK_LEN, in sme_event_auth()
849 wpa_s->sme.sae.pmkid, wpa_s->pending_bssid); in sme_event_auth()
873 wpa_s->sme.auth_alg == data->auth.auth_type || in sme_event_auth()
944 params.ssid = wpa_s->sme.ssid; in sme_associate()
945 params.ssid_len = wpa_s->sme.ssid_len; in sme_associate()
946 params.freq.freq = wpa_s->sme.freq; in sme_associate()
949 params.wpa_ie = wpa_s->sme.assoc_req_ie_len ? in sme_associate()
950 wpa_s->sme.assoc_req_ie : NULL; in sme_associate()
951 params.wpa_ie_len = wpa_s->sme.assoc_req_ie_len; in sme_associate()
971 if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies) { in sme_associate()
972 params.wpa_ie = wpa_s->sme.ft_ies; in sme_associate()
973 params.wpa_ie_len = wpa_s->sme.ft_ies_len; in sme_associate()
977 params.mgmt_frame_protection = wpa_s->sme.mfp; in sme_associate()
979 if (wpa_s->sme.prev_bssid_set) in sme_associate()
980 params.prev_bssid = wpa_s->sme.prev_bssid; in sme_associate()
1036 os_free(wpa_s->sme.ft_ies); in sme_update_ft_ies()
1037 wpa_s->sme.ft_ies = NULL; in sme_update_ft_ies()
1038 wpa_s->sme.ft_ies_len = 0; in sme_update_ft_ies()
1039 wpa_s->sme.ft_used = 0; in sme_update_ft_ies()
1043 os_memcpy(wpa_s->sme.mobility_domain, md, MOBILITY_DOMAIN_ID_LEN); in sme_update_ft_ies()
1045 os_free(wpa_s->sme.ft_ies); in sme_update_ft_ies()
1046 wpa_s->sme.ft_ies = os_malloc(ies_len); in sme_update_ft_ies()
1047 if (wpa_s->sme.ft_ies == NULL) in sme_update_ft_ies()
1049 os_memcpy(wpa_s->sme.ft_ies, ies, ies_len); in sme_update_ft_ies()
1050 wpa_s->sme.ft_ies_len = ies_len; in sme_update_ft_ies()
1066 wpa_s->sme.prev_bssid_set = 0; in sme_deauth()
1087 if (wpa_s->sme.sae_pmksa_caching && wpa_s->current_ssid && in sme_event_assoc_reject()
1140 if (wpa_s->sme.prev_bssid_set) { in sme_event_disassoc()
1149 wpa_drv_deauthenticate(wpa_s, wpa_s->sme.prev_bssid, in sme_event_disassoc()
1209 wpa_s->sme.prev_bssid_set = 0; in sme_clear_on_disassoc()
1211 wpabuf_free(wpa_s->sme.sae_token); in sme_clear_on_disassoc()
1212 wpa_s->sme.sae_token = NULL; in sme_clear_on_disassoc()
1213 sae_clear_data(&wpa_s->sme.sae); in sme_clear_on_disassoc()
1216 if (wpa_s->sme.ft_ies) in sme_clear_on_disassoc()
1224 os_free(wpa_s->sme.ft_ies); in sme_deinit()
1225 wpa_s->sme.ft_ies = NULL; in sme_deinit()
1226 wpa_s->sme.ft_ies_len = 0; in sme_deinit()
1296 if (!wpa_s->sme.sched_obss_scan) in sme_proc_obss_scan()
1299 wpa_s->sme.sched_obss_scan = 0; in sme_proc_obss_scan()
1373 if (wpa_s->sme.ht_sec_chan == HT_SEC_CHAN_UNKNOWN && in wpa_obss_scan_freqs_list()
1383 wpa_s->sme.ht_sec_chan = HT_SEC_CHAN_ABOVE; in wpa_obss_scan_freqs_list()
1385 wpa_s->sme.ht_sec_chan = HT_SEC_CHAN_BELOW; in wpa_obss_scan_freqs_list()
1391 switch (wpa_s->sme.ht_sec_chan) { in wpa_obss_scan_freqs_list()
1445 wpa_s->sme.sched_obss_scan = 1; in sme_obss_scan_timeout()
1448 eloop_register_timeout(wpa_s->sme.obss_scan_int, 0, in sme_obss_scan_timeout()
1462 wpa_s->sme.sched_obss_scan = 0; in sme_sched_obss_scan()
1463 wpa_s->sme.ht_sec_chan = HT_SEC_CHAN_UNKNOWN; in sme_sched_obss_scan()
1505 wpa_s->sme.obss_scan_int = WPA_GET_LE16(ie + 6); in sme_sched_obss_scan()
1506 if (wpa_s->sme.obss_scan_int < 10) { in sme_sched_obss_scan()
1509 wpa_s->sme.obss_scan_int); in sme_sched_obss_scan()
1510 wpa_s->sme.obss_scan_int = 10; in sme_sched_obss_scan()
1513 wpa_s->sme.obss_scan_int); in sme_sched_obss_scan()
1514 eloop_register_timeout(wpa_s->sme.obss_scan_int, 0, in sme_sched_obss_scan()
1529 os_reltime_sub(&now, &wpa_s->sme.sa_query_start, &passed); in sme_check_sa_query_timeout()
1568 if (wpa_s->sme.sa_query_count > 0 && in sme_sa_query_timer()
1572 nbuf = os_realloc_array(wpa_s->sme.sa_query_trans_id, in sme_sa_query_timer()
1573 wpa_s->sme.sa_query_count + 1, in sme_sa_query_timer()
1577 if (wpa_s->sme.sa_query_count == 0) { in sme_sa_query_timer()
1579 os_get_reltime(&wpa_s->sme.sa_query_start); in sme_sa_query_timer()
1581 trans_id = nbuf + wpa_s->sme.sa_query_count * WLAN_SA_QUERY_TR_ID_LEN; in sme_sa_query_timer()
1582 wpa_s->sme.sa_query_trans_id = nbuf; in sme_sa_query_timer()
1583 wpa_s->sme.sa_query_count++; in sme_sa_query_timer()
1596 wpa_s->sme.sa_query_count); in sme_sa_query_timer()
1611 os_free(wpa_s->sme.sa_query_trans_id); in sme_stop_sa_query()
1612 wpa_s->sme.sa_query_trans_id = NULL; in sme_stop_sa_query()
1613 wpa_s->sme.sa_query_count = 0; in sme_stop_sa_query()
1633 if (wpa_s->sme.sa_query_count > 0) in sme_event_unprot_disconnect()
1637 if (wpa_s->sme.last_unprot_disconnect.sec && in sme_event_unprot_disconnect()
1638 !os_reltime_expired(&now, &wpa_s->sme.last_unprot_disconnect, 10)) in sme_event_unprot_disconnect()
1640 wpa_s->sme.last_unprot_disconnect = now; in sme_event_unprot_disconnect()
1653 if (wpa_s->sme.sa_query_trans_id == NULL || in sme_sa_query_rx()
1663 for (i = 0; i < wpa_s->sme.sa_query_count; i++) { in sme_sa_query_rx()
1664 if (os_memcmp(wpa_s->sme.sa_query_trans_id + in sme_sa_query_rx()
1670 if (i >= wpa_s->sme.sa_query_count) { in sme_sa_query_rx()