Lines Matching +full:auto +full:- +full:negotiation

5  * SPDX-License-Identifier: Apache-2.0
57 return "WPA2-PSK"; in wifi_security_txt()
59 return "WPA2-PSK-SHA256"; in wifi_security_txt()
61 return "WPA3-SAE-HNP"; in wifi_security_txt()
63 return "WPA3-SAE-H2E"; in wifi_security_txt()
65 return "WPA3-SAE-AUTO"; in wifi_security_txt()
69 return "EAP-TLS"; in wifi_security_txt()
73 return "WPA-PSK"; in wifi_security_txt()
79 return "EAP-PEAP-MSCHAPV2"; in wifi_security_txt()
81 return "EAP-PEAP-GTC"; in wifi_security_txt()
83 return "EAP-TTLS-MSCHAPV2"; in wifi_security_txt()
85 return "EAP-PEAP-TLS"; in wifi_security_txt()
87 return "EAP-TLS-SHA256"; in wifi_security_txt()
89 return "FT-PSK"; in wifi_security_txt()
91 return "FT-SAE"; in wifi_security_txt()
93 return "FT-EAP"; in wifi_security_txt()
95 return "FT-EAP-SHA384"; in wifi_security_txt()
264 return "TWT individual negotiation"; in wifi_twt_negotiation_type_txt()
266 return "TWT broadcast negotiation"; in wifi_twt_negotiation_type_txt()
268 return "TWT wake TBTT negotiation"; in wifi_twt_negotiation_type_txt()
326 (struct net_wifi_mgmt_offload *) dev->api; in get_wifi_api()
331 return nm->ops; in get_wifi_api()
334 return off_api ? off_api->wifi_mgmt_api : NULL; in get_wifi_api()
346 if (wifi_mgmt_api == NULL || wifi_mgmt_api->connect == NULL) { in wifi_connect()
347 return -ENOTSUP; in wifi_connect()
350 LOG_HEXDUMP_DBG(params->ssid, params->ssid_length, "ssid"); in wifi_connect()
351 LOG_HEXDUMP_DBG(params->psk, params->psk_length, "psk"); in wifi_connect()
352 if (params->sae_password) { in wifi_connect()
353 LOG_HEXDUMP_DBG(params->sae_password, params->sae_password_length, "sae"); in wifi_connect()
355 NET_DBG("ch %u sec %u", params->channel, params->security); in wifi_connect()
357 if ((params->security > WIFI_SECURITY_TYPE_MAX) || in wifi_connect()
358 (params->ssid_length > WIFI_SSID_MAX_LEN) || in wifi_connect()
359 (params->ssid_length == 0U) || in wifi_connect()
360 ((params->security == WIFI_SECURITY_TYPE_PSK || in wifi_connect()
361 params->security == WIFI_SECURITY_TYPE_WPA_PSK || in wifi_connect()
362 params->security == WIFI_SECURITY_TYPE_PSK_SHA256 || in wifi_connect()
363 params->security == WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL) && in wifi_connect()
364 ((params->psk_length < 8) || (params->psk_length > 64) || in wifi_connect()
365 (params->psk_length == 0U) || !params->psk)) || in wifi_connect()
366 ((params->security == WIFI_SECURITY_TYPE_SAE_HNP || in wifi_connect()
367 params->security == WIFI_SECURITY_TYPE_SAE_H2E || in wifi_connect()
368 params->security == WIFI_SECURITY_TYPE_SAE_AUTO) && in wifi_connect()
369 ((params->psk_length == 0U) || !params->psk) && in wifi_connect()
370 ((params->sae_password_length == 0U) || !params->sae_password)) || in wifi_connect()
371 ((params->channel != WIFI_CHANNEL_ANY) && in wifi_connect()
372 (params->channel > WIFI_CHANNEL_MAX)) || in wifi_connect()
373 !params->ssid) { in wifi_connect()
374 return -EINVAL; in wifi_connect()
379 roaming_params.is_11r_used = params->ft_used; in wifi_connect()
382 return wifi_mgmt_api->connect(dev, params); in wifi_connect()
418 if (wifi_mgmt_api == NULL || wifi_mgmt_api->scan == NULL) { in wifi_scan()
419 return -ENOTSUP; in wifi_scan()
428 params->scan_type = WIFI_SCAN_TYPE_PASSIVE; in wifi_scan()
431 return wifi_mgmt_api->scan(dev, params, scan_result_cb); in wifi_scan()
442 if (wifi_mgmt_api == NULL || wifi_mgmt_api->disconnect == NULL) { in wifi_disconnect()
443 return -ENOTSUP; in wifi_disconnect()
446 return wifi_mgmt_api->disconnect(dev); in wifi_disconnect()
481 return -ENOTSUP; in wifi_start_roaming()
484 if (wifi_mgmt_api->start_11r_roaming == NULL) { in wifi_start_roaming()
485 return -ENOTSUP; in wifi_start_roaming()
488 return wifi_mgmt_api->start_11r_roaming(dev); in wifi_start_roaming()
491 if (wifi_mgmt_api->send_11k_neighbor_request == NULL) { in wifi_start_roaming()
492 return -ENOTSUP; in wifi_start_roaming()
495 return wifi_mgmt_api->send_11k_neighbor_request(dev, NULL); in wifi_start_roaming()
496 } else if (wifi_mgmt_api->bss_ext_capab && in wifi_start_roaming()
497 wifi_mgmt_api->bss_ext_capab(dev, WIFI_EXT_CAPAB_BSS_TRANSITION)) { in wifi_start_roaming()
498 if (wifi_mgmt_api->btm_query) { in wifi_start_roaming()
499 return wifi_mgmt_api->btm_query(dev, 0x10); in wifi_start_roaming()
501 return -ENOTSUP; in wifi_start_roaming()
503 } else if (wifi_mgmt_api->legacy_roam) { in wifi_start_roaming()
504 return wifi_mgmt_api->legacy_roam(dev); in wifi_start_roaming()
506 return -ENOTSUP; in wifi_start_roaming()
527 if (wifi_mgmt_api == NULL || wifi_mgmt_api->candidate_scan == NULL) { in wifi_neighbor_rep_complete()
528 return -ENOTSUP; in wifi_neighbor_rep_complete()
531 return wifi_mgmt_api->candidate_scan(dev, &params); in wifi_neighbor_rep_complete()
576 len = strnlen(bssid, sizeof(bssid) - 1); in wifi_mgmt_raise_neighbor_rep_recv_event()
582 len = strnlen(bssid_info, sizeof(bssid_info) - 1); in wifi_mgmt_raise_neighbor_rep_recv_event()
598 LOG_INF("Failed to Parse Neighbor Report - Skipping entry\n"); in wifi_mgmt_raise_neighbor_rep_recv_event()
611 if (wifi_mgmt_api == NULL || wifi_mgmt_api->ap_enable == NULL) { in wifi_ap_enable()
612 return -ENOTSUP; in wifi_ap_enable()
615 return wifi_mgmt_api->ap_enable(dev, params); in wifi_ap_enable()
626 if (wifi_mgmt_api == NULL || wifi_mgmt_api->ap_disable == NULL) { in wifi_ap_disable()
627 return -ENOTSUP; in wifi_ap_disable()
630 return wifi_mgmt_api->ap_disable(dev); in wifi_ap_disable()
643 return -ENODEV; in wifi_ap_sta_disconnect()
646 if (wifi_mgmt_api == NULL || wifi_mgmt_api->ap_sta_disconnect == NULL) { in wifi_ap_sta_disconnect()
647 return -ENOTSUP; in wifi_ap_sta_disconnect()
651 return -EINVAL; in wifi_ap_sta_disconnect()
654 return wifi_mgmt_api->ap_sta_disconnect(dev, mac); in wifi_ap_sta_disconnect()
667 return -ENODEV; in wifi_ap_config_params()
671 wifi_mgmt_api->ap_config_params == NULL) { in wifi_ap_config_params()
672 return -ENOTSUP; in wifi_ap_config_params()
676 return -EINVAL; in wifi_ap_config_params()
679 if (params->type & WIFI_AP_CONFIG_PARAM_MAX_NUM_STA) { in wifi_ap_config_params()
680 if (params->max_num_sta > CONFIG_WIFI_MGMT_AP_MAX_NUM_STA) { in wifi_ap_config_params()
683 params->max_num_sta, CONFIG_WIFI_MGMT_AP_MAX_NUM_STA); in wifi_ap_config_params()
684 return -EINVAL; in wifi_ap_config_params()
688 return wifi_mgmt_api->ap_config_params(dev, params); in wifi_ap_config_params()
700 if (wifi_mgmt_api == NULL || wifi_mgmt_api->set_rts_threshold == NULL) { in wifi_ap_set_rts_threshold()
701 return -ENOTSUP; in wifi_ap_set_rts_threshold()
705 return -EINVAL; in wifi_ap_set_rts_threshold()
708 return wifi_mgmt_api->set_rts_threshold(dev, *rts_threshold); in wifi_ap_set_rts_threshold()
720 if (wifi_mgmt_api == NULL || wifi_mgmt_api->iface_status == NULL) { in wifi_iface_status()
721 return -ENOTSUP; in wifi_iface_status()
725 return -EINVAL; in wifi_iface_status()
728 return wifi_mgmt_api->iface_status(dev, status); in wifi_iface_status()
748 if (wifi_mgmt_api == NULL || wifi_mgmt_api->get_stats == NULL) { in wifi_iface_stats()
749 return -ENOTSUP; in wifi_iface_stats()
753 return -EINVAL; in wifi_iface_stats()
756 return wifi_mgmt_api->get_stats(dev, stats); in wifi_iface_stats()
766 if (wifi_mgmt_api == NULL || wifi_mgmt_api->reset_stats == NULL) { in wifi_iface_stats_reset()
767 return -ENOTSUP; in wifi_iface_stats_reset()
770 return wifi_mgmt_api->reset_stats(dev); in wifi_iface_stats_reset()
782 if (wifi_mgmt_api == NULL || wifi_mgmt_api->cfg_11k == NULL) { in wifi_11k_cfg()
783 return -ENOTSUP; in wifi_11k_cfg()
787 if (params->oper == WIFI_MGMT_SET) { in wifi_11k_cfg()
788 roaming_params.is_11k_enabled = params->enable_11k; in wifi_11k_cfg()
792 return wifi_mgmt_api->cfg_11k(dev, params); in wifi_11k_cfg()
804 if (wifi_mgmt_api == NULL || wifi_mgmt_api->send_11k_neighbor_request == NULL) { in wifi_11k_neighbor_request()
805 return -ENOTSUP; in wifi_11k_neighbor_request()
808 return wifi_mgmt_api->send_11k_neighbor_request(dev, params); in wifi_11k_neighbor_request()
822 if (wifi_mgmt_api == NULL || wifi_mgmt_api->set_power_save == NULL) { in wifi_set_power_save()
823 return -ENOTSUP; in wifi_set_power_save()
826 switch (ps_params->type) { in wifi_set_power_save()
831 ps_params->fail_reason = in wifi_set_power_save()
833 return -EIO; in wifi_set_power_save()
837 ps_params->fail_reason = in wifi_set_power_save()
839 return -ENOTSUP; in wifi_set_power_save()
847 if (ps_params->exit_strategy > WIFI_PS_EXIT_MAX) { in wifi_set_power_save()
848 ps_params->fail_reason = in wifi_set_power_save()
850 return -EINVAL; in wifi_set_power_save()
854 ps_params->fail_reason = in wifi_set_power_save()
856 return -ENOTSUP; in wifi_set_power_save()
859 return wifi_mgmt_api->set_power_save(dev, ps_params); in wifi_set_power_save()
871 if (wifi_mgmt_api == NULL || wifi_mgmt_api->get_power_save_config == NULL) { in wifi_get_power_save_config()
872 return -ENOTSUP; in wifi_get_power_save_config()
876 return -EINVAL; in wifi_get_power_save_config()
879 return wifi_mgmt_api->get_power_save_config(dev, ps_config); in wifi_get_power_save_config()
892 if (wifi_mgmt_api == NULL || wifi_mgmt_api->set_twt == NULL) { in wifi_set_twt()
893 twt_params->fail_reason = in wifi_set_twt()
895 return -ENOTSUP; in wifi_set_twt()
898 if (twt_params->operation == WIFI_TWT_TEARDOWN) { in wifi_set_twt()
899 return wifi_mgmt_api->set_twt(dev, twt_params); in wifi_set_twt()
904 twt_params->fail_reason = in wifi_set_twt()
910 twt_params->fail_reason = in wifi_set_twt()
918 twt_params->fail_reason = in wifi_set_twt()
928 twt_params->fail_reason = in wifi_set_twt()
934 twt_params->fail_reason = in wifi_set_twt()
939 return wifi_mgmt_api->set_twt(dev, twt_params); in wifi_set_twt()
941 return -ENOEXEC; in wifi_set_twt()
955 if (wifi_mgmt_api == NULL || wifi_mgmt_api->set_btwt == NULL) { in wifi_set_btwt()
956 twt_params->fail_reason = in wifi_set_btwt()
958 return -ENOTSUP; in wifi_set_btwt()
963 twt_params->fail_reason = in wifi_set_btwt()
968 return wifi_mgmt_api->set_btwt(dev, twt_params); in wifi_set_btwt()
970 return -ENOEXEC; in wifi_set_btwt()
990 if (wifi_mgmt_api == NULL || wifi_mgmt_api->reg_domain == NULL) { in wifi_reg_domain()
991 return -ENOTSUP; in wifi_reg_domain()
995 return -EINVAL; in wifi_reg_domain()
998 return wifi_mgmt_api->reg_domain(dev, reg_domain); in wifi_reg_domain()
1019 return -ENODEV; in wifi_mode()
1022 if (wifi_mgmt_api == NULL || wifi_mgmt_api->mode == NULL) { in wifi_mode()
1023 return -ENOTSUP; in wifi_mode()
1026 return wifi_mgmt_api->mode(dev, mode_info); in wifi_mode()
1039 return -ENODEV; in wifi_packet_filter()
1042 if (wifi_mgmt_api == NULL || wifi_mgmt_api->filter == NULL) { in wifi_packet_filter()
1043 return -ENOTSUP; in wifi_packet_filter()
1046 return wifi_mgmt_api->filter(dev, filter_info); in wifi_packet_filter()
1059 return -ENODEV; in wifi_channel()
1062 if (wifi_mgmt_api == NULL || wifi_mgmt_api->channel == NULL) { in wifi_channel()
1063 return -ENOTSUP; in wifi_channel()
1066 return wifi_mgmt_api->channel(dev, channel_info); in wifi_channel()
1078 if (wifi_mgmt_api == NULL || wifi_mgmt_api->get_version == NULL) { in wifi_get_version()
1079 return -ENOTSUP; in wifi_get_version()
1082 return wifi_mgmt_api->get_version(dev, ver_params); in wifi_get_version()
1094 if (wifi_mgmt_api == NULL || wifi_mgmt_api->btm_query == NULL) { in wifi_btm_query()
1095 return -ENOTSUP; in wifi_btm_query()
1100 return wifi_mgmt_api->btm_query(dev, query_reason); in wifi_btm_query()
1103 return -EINVAL; in wifi_btm_query()
1116 if (wifi_mgmt_api == NULL || wifi_mgmt_api->get_conn_params == NULL) { in wifi_get_connection_params()
1117 return -ENOTSUP; in wifi_get_connection_params()
1120 return wifi_mgmt_api->get_conn_params(dev, conn_params); in wifi_get_connection_params()
1131 if (wifi_mgmt_api == NULL || wifi_mgmt_api->wps_config == NULL) { in wifi_wps_config()
1132 return -ENOTSUP; in wifi_wps_config()
1135 return wifi_mgmt_api->wps_config(dev, params); in wifi_wps_config()
1147 if (wifi_mgmt_api == NULL || wifi_mgmt_api->set_rts_threshold == NULL) { in wifi_set_rts_threshold()
1148 return -ENOTSUP; in wifi_set_rts_threshold()
1152 return -EINVAL; in wifi_set_rts_threshold()
1155 return wifi_mgmt_api->set_rts_threshold(dev, *rts_threshold); in wifi_set_rts_threshold()
1168 if (wifi_mgmt_api == NULL || wifi_mgmt_api->dpp_dispatch == NULL) { in wifi_dpp()
1169 return -ENOTSUP; in wifi_dpp()
1172 return wifi_mgmt_api->dpp_dispatch(dev, params); in wifi_dpp()
1185 if (wifi_mgmt_api == NULL || wifi_mgmt_api->pmksa_flush == NULL) { in wifi_pmksa_flush()
1186 return -ENOTSUP; in wifi_pmksa_flush()
1189 return wifi_mgmt_api->pmksa_flush(dev); in wifi_pmksa_flush()
1201 if (wifi_mgmt_api == NULL || wifi_mgmt_api->get_rts_threshold == NULL) { in wifi_get_rts_threshold()
1202 return -ENOTSUP; in wifi_get_rts_threshold()
1206 return -EINVAL; in wifi_get_rts_threshold()
1209 return wifi_mgmt_api->get_rts_threshold(dev, rts_threshold); in wifi_get_rts_threshold()
1222 if (wifi_mgmt_api == NULL || wifi_mgmt_api->enterprise_creds == NULL) { in wifi_set_enterprise_creds()
1223 return -ENOTSUP; in wifi_set_enterprise_creds()
1226 return wifi_mgmt_api->enterprise_creds(dev, params); in wifi_set_enterprise_creds()
1236 if (raw_scan_result->frame_length > CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH) { in wifi_mgmt_raise_raw_scan_result_event()
1239 raw_scan_result->frame_length, in wifi_mgmt_raise_raw_scan_result_event()
1318 ssid = (char *)k_malloc(creds->header.ssid_len + 1); in __stored_creds_to_params()
1321 ret = -ENOMEM; in __stored_creds_to_params()
1325 memset(ssid, 0, creds->header.ssid_len + 1); in __stored_creds_to_params()
1326 ret = snprintf(ssid, creds->header.ssid_len + 1, "%s", creds->header.ssid); in __stored_creds_to_params()
1327 if (ret > creds->header.ssid_len) { in __stored_creds_to_params()
1329 ret = -EINVAL; in __stored_creds_to_params()
1333 params->ssid = ssid; in __stored_creds_to_params()
1334 params->ssid_length = creds->header.ssid_len; in __stored_creds_to_params()
1337 if (creds->password_len > 0) { in __stored_creds_to_params()
1338 psk = (char *)k_malloc(creds->password_len + 1); in __stored_creds_to_params()
1341 ret = -ENOMEM; in __stored_creds_to_params()
1345 memset(psk, 0, creds->password_len + 1); in __stored_creds_to_params()
1346 ret = snprintf(psk, creds->password_len + 1, "%s", creds->password); in __stored_creds_to_params()
1347 if (ret > creds->password_len) { in __stored_creds_to_params()
1349 ret = -EINVAL; in __stored_creds_to_params()
1353 params->psk = psk; in __stored_creds_to_params()
1354 params->psk_length = creds->password_len; in __stored_creds_to_params()
1358 params->security = creds->header.type; in __stored_creds_to_params()
1360 /* If channel is set to 0 we default to ANY. 0 is not a valid Wi-Fi channel. */ in __stored_creds_to_params()
1361 params->channel = (creds->header.channel != 0) ? creds->header.channel : WIFI_CHANNEL_ANY; in __stored_creds_to_params()
1362 params->timeout = (creds->header.timeout != 0) in __stored_creds_to_params()
1363 ? creds->header.timeout in __stored_creds_to_params()
1367 if (creds->header.type > WIFI_SECURITY_TYPE_MAX) { in __stored_creds_to_params()
1368 params->security = WIFI_SECURITY_TYPE_NONE; in __stored_creds_to_params()
1371 if (creds->header.flags & WIFI_CREDENTIALS_FLAG_2_4GHz) { in __stored_creds_to_params()
1372 params->band = WIFI_FREQ_BAND_2_4_GHZ; in __stored_creds_to_params()
1373 } else if (creds->header.flags & WIFI_CREDENTIALS_FLAG_5GHz) { in __stored_creds_to_params()
1374 params->band = WIFI_FREQ_BAND_5_GHZ; in __stored_creds_to_params()
1376 params->band = WIFI_FREQ_BAND_UNKNOWN; in __stored_creds_to_params()
1380 if (creds->header.flags & WIFI_CREDENTIALS_FLAG_MFP_DISABLED) { in __stored_creds_to_params()
1381 params->mfp = WIFI_MFP_DISABLE; in __stored_creds_to_params()
1382 } else if (creds->header.flags & WIFI_CREDENTIALS_FLAG_MFP_REQUIRED) { in __stored_creds_to_params()
1383 params->mfp = WIFI_MFP_REQUIRED; in __stored_creds_to_params()
1385 params->mfp = WIFI_MFP_OPTIONAL; in __stored_creds_to_params()
1409 return "WPA-PSK"; in wpa_supp_security_txt()
1411 return "WPA-PSK-SHA256"; in wpa_supp_security_txt()
1427 ret = -ENOEXEC; in add_network_from_credentials_struct_personal()
1435 return -ENOEXEC; in add_network_from_credentials_struct_personal()