Lines Matching refs:params

104 static int hapd_get_eap_config(struct wifi_connect_req_params *params,  in hapd_get_eap_config()  argument
110 if (params->security == hapd_eap_config[index].type) { in hapd_get_eap_config()
118 params->security); in hapd_get_eap_config()
126 struct wifi_connect_req_params *params, struct hostapd_eap_user **pnew_user) in hapd_process_eap_user_phase1() argument
138 if (params->eap_ver >= 0) { in hapd_process_eap_user_phase1()
139 user->force_version = params->eap_ver; in hapd_process_eap_user_phase1()
142 if (hapd_get_eap_config(params, &eap_cfg)) { in hapd_process_eap_user_phase1()
168 static int hapd_process_eap_user(struct wifi_connect_req_params *params, in hapd_process_eap_user() argument
172 int i, nusers = params->nusers; in hapd_process_eap_user()
177 if (hapd_get_eap_config(params, &eap_cfg)) { in hapd_process_eap_user()
182 tail = hapd_process_eap_user_phase1(params, &user_list); in hapd_process_eap_user()
198 if (params->eap_ver >= 0) { in hapd_process_eap_user()
199 user->force_version = params->eap_ver; in hapd_process_eap_user()
202 identity = params->identities[i]; in hapd_process_eap_user()
203 password = params->passwords[i]; in hapd_process_eap_user()
231 if (params->security == WIFI_SECURITY_TYPE_EAP_TTLS_MSCHAPV2) { in hapd_process_eap_user()
264 struct wifi_connect_req_params *params) in hapd_process_enterprise_config() argument
270 if (process_cipher_config(params, &cipher_config)) { in hapd_process_enterprise_config()
336 if (!hostapd_cli_cmd_v("set private_key_passwd %s", params->key_passwd)) { in hapd_process_enterprise_config()
340 if (hapd_process_eap_user(params, iface->bss[0]->conf)) { in hapd_process_enterprise_config()
373 static int hapd_config_chan_center_seg0(struct wifi_connect_req_params *params) in hapd_config_chan_center_seg0() argument
387 switch (params->bandwidth) { in hapd_config_chan_center_seg0()
390 center_freq_seg0_idx = params->channel; in hapd_config_chan_center_seg0()
408 if (params->bandwidth != WIFI_FREQ_BANDWIDTH_20MHZ) { in hapd_config_chan_center_seg0()
409 chan_idx = params->channel; in hapd_config_chan_center_seg0()
440 struct wifi_connect_req_params *params) in hapd_config_network() argument
444 if (!hostapd_cli_cmd_v("set ssid %s", params->ssid)) { in hapd_config_network()
448 if (params->channel == 0) { in hapd_config_network()
449 if (params->band == 0) { in hapd_config_network()
453 } else if (params->band == 1) { in hapd_config_network()
458 wpa_printf(MSG_ERROR, "Invalid band %d", params->band); in hapd_config_network()
461 } else if (params->channel > 14) { in hapd_config_network()
471 if (!hostapd_cli_cmd_v("set channel %d", params->channel)) { in hapd_config_network()
475 ret = hapd_config_chan_center_seg0(params); in hapd_config_network()
480 if (params->security != WIFI_SECURITY_TYPE_NONE) { in hapd_config_network()
481 if (params->security == WIFI_SECURITY_TYPE_WPA_PSK) { in hapd_config_network()
488 if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) { in hapd_config_network()
494 } else if (params->security == WIFI_SECURITY_TYPE_PSK) { in hapd_config_network()
501 if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) { in hapd_config_network()
507 } else if (params->security == WIFI_SECURITY_TYPE_PSK_SHA256) { in hapd_config_network()
514 if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) { in hapd_config_network()
520 } else if (params->security == WIFI_SECURITY_TYPE_SAE_HNP || in hapd_config_network()
521 params->security == WIFI_SECURITY_TYPE_SAE_H2E || in hapd_config_network()
522 params->security == WIFI_SECURITY_TYPE_SAE_AUTO) { in hapd_config_network()
530 params->sae_password ? params->sae_password : in hapd_config_network()
531 params->psk)) { in hapd_config_network()
537 if (params->security == WIFI_SECURITY_TYPE_SAE_H2E || in hapd_config_network()
538 params->security == WIFI_SECURITY_TYPE_SAE_AUTO) { in hapd_config_network()
540 (params->security == WIFI_SECURITY_TYPE_SAE_H2E) in hapd_config_network()
546 } else if (params->security == WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL) { in hapd_config_network()
555 if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) { in hapd_config_network()
560 params->sae_password ? params->sae_password in hapd_config_network()
561 : params->psk)) { in hapd_config_network()
572 } else if (params->security == WIFI_SECURITY_TYPE_DPP) { in hapd_config_network()
579 if (!hostapd_cli_cmd_v("set wpa_passphrase %s", params->psk)) { in hapd_config_network()
592 } else if (is_eap_valid_security(params->security)) { in hapd_config_network()
593 if (hapd_process_enterprise_config(iface, params)) { in hapd_config_network()
599 params->security); in hapd_config_network()
609 if (!hostapd_cli_cmd_v("set ieee80211w %d", params->mfp)) { in hapd_config_network()
613 if (!hostapd_cli_cmd_v("set ignore_broadcast_ssid %d", params->ignore_broadcast_ssid)) { in hapd_config_network()
622 static int set_ap_config_params(const struct device *dev, struct wifi_ap_config_params *params) in set_ap_config_params() argument
630 return wifi_mgmt_api->ap_config_params(dev, params); in set_ap_config_params()
633 int hostapd_ap_config_params(const struct device *dev, struct wifi_ap_config_params *params) in hostapd_ap_config_params() argument
638 ret = set_ap_config_params(dev, params); in hostapd_ap_config_params()
659 if (params->type & WIFI_AP_CONFIG_PARAM_MAX_NUM_STA) { in hostapd_ap_config_params()
660 if (!hostapd_cli_cmd_v("set max_num_sta %d", params->max_num_sta)) { in hostapd_ap_config_params()
665 wpa_printf(MSG_INFO, "Set maximum number of stations: %d", params->max_num_sta); in hostapd_ap_config_params()
668 if (params->type & WIFI_AP_CONFIG_PARAM_HT_CAPAB) { in hostapd_ap_config_params()
669 if (!hostapd_cli_cmd_v("set ht_capab %s", params->ht_capab)) { in hostapd_ap_config_params()
674 wpa_printf(MSG_INFO, "Set HT capabilities: %s", params->ht_capab); in hostapd_ap_config_params()
677 if (params->type & WIFI_AP_CONFIG_PARAM_VHT_CAPAB) { in hostapd_ap_config_params()
678 if (!hostapd_cli_cmd_v("set vht_capab %s", params->vht_capab)) { in hostapd_ap_config_params()
683 wpa_printf(MSG_INFO, "Set VHT capabilities: %s", params->vht_capab); in hostapd_ap_config_params()
800 static int hapd_ap_wps_pin(const struct device *dev, struct wifi_wps_config_params *params) in hapd_ap_wps_pin() argument
822 if (params->oper == WIFI_WPS_PIN_GET) { in hapd_ap_wps_pin()
823 if (zephyr_hostapd_cli_cmd_resp(get_pin_cmd, params->pin)) { in hapd_ap_wps_pin()
826 } else if (params->oper == WIFI_WPS_PIN_SET) { in hapd_ap_wps_pin()
827 if (!hostapd_cli_cmd_v("wps_check_pin %s", params->pin)) { in hapd_ap_wps_pin()
831 if (!hostapd_cli_cmd_v("wps_pin any %s %d", params->pin, WPS_PIN_EXPIRE_TIME)) { in hapd_ap_wps_pin()
835 wpa_printf(MSG_ERROR, "Error wps pin operation : %d", params->oper); in hapd_ap_wps_pin()
846 int hostapd_ap_wps_config(const struct device *dev, struct wifi_wps_config_params *params) in hostapd_ap_wps_config() argument
850 if (params->oper == WIFI_WPS_PBC) { in hostapd_ap_wps_config()
852 } else if (params->oper == WIFI_WPS_PIN_GET || params->oper == WIFI_WPS_PIN_SET) { in hostapd_ap_wps_config()
853 ret = hapd_ap_wps_pin(dev, params); in hostapd_ap_wps_config()
861 struct wifi_connect_req_params *params) in hostapd_ap_enable() argument
875 ret = set_ap_bandwidth(dev, params->bandwidth); in hostapd_ap_enable()
898 ret = hapd_config_network(iface, params); in hostapd_ap_enable()
1002 int hostapd_dpp_dispatch(const struct device *dev, struct wifi_dpp_params *params) in hostapd_dpp_dispatch() argument
1007 if (params == NULL) { in hostapd_dpp_dispatch()
1017 ret = dpp_params_to_cmd(params, cmd, SUPPLICANT_DPP_CMD_BUF_SIZE - 2); in hostapd_dpp_dispatch()
1024 if (zephyr_hostapd_cli_cmd_resp(cmd, params->resp)) { in hostapd_dpp_dispatch()