Lines Matching refs:f

85 static struct wpa_ssid * wpa_config_read_network(FILE *f, int *line, int id)  in wpa_config_read_network()  argument
101 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) { in wpa_config_read_network()
160 static struct wpa_cred * wpa_config_read_cred(FILE *f, int *line, int id) in wpa_config_read_cred() argument
173 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) { in wpa_config_read_cred()
217 static struct wpa_config_blob * wpa_config_read_blob(FILE *f, int *line, in wpa_config_read_blob() argument
229 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) { in wpa_config_read_blob()
273 static int wpa_config_process_blob(struct wpa_config *config, FILE *f, in wpa_config_process_blob() argument
287 blob = wpa_config_read_blob(f, line, bname); in wpa_config_process_blob()
302 FILE *f; in wpa_config_read() local
330 f = fopen(name, "r"); in wpa_config_read()
331 if (f == NULL) { in wpa_config_read()
339 while (wpa_config_get_line(buf, sizeof(buf), f, &line, &pos)) { in wpa_config_read()
341 ssid = wpa_config_read_network(f, &line, id++); in wpa_config_read()
363 cred = wpa_config_read_cred(f, &line, cred_id++); in wpa_config_read()
378 if (wpa_config_process_blob(config, f, &line, pos + 12) in wpa_config_read()
394 fclose(f); in wpa_config_read()
415 static void write_str(FILE *f, const char *field, struct wpa_ssid *ssid) in write_str() argument
420 fprintf(f, "\t%s=%s\n", field, value); in write_str()
425 static void write_int(FILE *f, const char *field, int value, int def) in write_int() argument
429 fprintf(f, "\t%s=%d\n", field, value); in write_int()
433 static void write_bssid(FILE *f, struct wpa_ssid *ssid) in write_bssid() argument
438 fprintf(f, "\tbssid=%s\n", value); in write_bssid()
443 static void write_bssid_hint(FILE *f, struct wpa_ssid *ssid) in write_bssid_hint() argument
449 fprintf(f, "\tbssid_hint=%s\n", value); in write_bssid_hint()
454 static void write_psk(FILE *f, struct wpa_ssid *ssid) in write_psk() argument
464 fprintf(f, "\tpsk=%s\n", value); in write_psk()
469 static void write_proto(FILE *f, struct wpa_ssid *ssid) in write_proto() argument
480 fprintf(f, "\tproto=%s\n", value); in write_proto()
485 static void write_key_mgmt(FILE *f, struct wpa_ssid *ssid) in write_key_mgmt() argument
496 fprintf(f, "\tkey_mgmt=%s\n", value); in write_key_mgmt()
501 static void write_pairwise(FILE *f, struct wpa_ssid *ssid) in write_pairwise() argument
512 fprintf(f, "\tpairwise=%s\n", value); in write_pairwise()
517 static void write_group(FILE *f, struct wpa_ssid *ssid) in write_group() argument
528 fprintf(f, "\tgroup=%s\n", value); in write_group()
533 static void write_group_mgmt(FILE *f, struct wpa_ssid *ssid) in write_group_mgmt() argument
544 fprintf(f, "\tgroup_mgmt=%s\n", value); in write_group_mgmt()
549 static void write_auth_alg(FILE *f, struct wpa_ssid *ssid) in write_auth_alg() argument
560 fprintf(f, "\tauth_alg=%s\n", value); in write_auth_alg()
566 static void write_eap(FILE *f, struct wpa_ssid *ssid) in write_eap() argument
575 fprintf(f, "\teap=%s\n", value); in write_eap()
582 static void write_wep_key(FILE *f, int idx, struct wpa_ssid *ssid) in write_wep_key() argument
592 fprintf(f, "\t%s=%s\n", field, value); in write_wep_key()
601 static void write_go_p2p_dev_addr(FILE *f, struct wpa_ssid *ssid) in write_go_p2p_dev_addr() argument
606 fprintf(f, "\tgo_p2p_dev_addr=%s\n", value); in write_go_p2p_dev_addr()
610 static void write_p2p_client_list(FILE *f, struct wpa_ssid *ssid) in write_p2p_client_list() argument
615 fprintf(f, "\tp2p_client_list=%s\n", value); in write_p2p_client_list()
620 static void write_psk_list(FILE *f, struct wpa_ssid *ssid) in write_psk_list() argument
627 fprintf(f, "\tpsk_list=%s" MACSTR "-%s\n", in write_psk_list()
637 static void write_mka_cak(FILE *f, struct wpa_ssid *ssid) in write_mka_cak() argument
647 fprintf(f, "\tmka_cak=%s\n", value); in write_mka_cak()
652 static void write_mka_ckn(FILE *f, struct wpa_ssid *ssid) in write_mka_ckn() argument
662 fprintf(f, "\tmka_ckn=%s\n", value); in write_mka_ckn()
669 static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid) in wpa_config_write_network() argument
671 #define STR(t) write_str(f, #t, ssid) in wpa_config_write_network()
672 #define INT(t) write_int(f, #t, ssid->t, 0) in wpa_config_write_network()
673 #define INTe(t, m) write_int(f, #t, ssid->eap.m, 0) in wpa_config_write_network()
674 #define INT_DEF(t, def) write_int(f, #t, ssid->t, def) in wpa_config_write_network()
675 #define INT_DEFe(t, m, def) write_int(f, #t, ssid->eap.m, def) in wpa_config_write_network()
679 write_bssid(f, ssid); in wpa_config_write_network()
680 write_bssid_hint(f, ssid); in wpa_config_write_network()
681 write_str(f, "bssid_ignore", ssid); in wpa_config_write_network()
682 write_str(f, "bssid_accept", ssid); in wpa_config_write_network()
683 write_psk(f, ssid); in wpa_config_write_network()
687 write_int(f, "sae_pwe", ssid->sae_pwe, DEFAULT_SAE_PWE); in wpa_config_write_network()
688 write_proto(f, ssid); in wpa_config_write_network()
689 write_key_mgmt(f, ssid); in wpa_config_write_network()
691 write_pairwise(f, ssid); in wpa_config_write_network()
692 write_group(f, ssid); in wpa_config_write_network()
693 write_group_mgmt(f, ssid); in wpa_config_write_network()
694 write_auth_alg(f, ssid); in wpa_config_write_network()
699 write_eap(f, ssid); in wpa_config_write_network()
762 write_wep_key(f, i, ssid); in wpa_config_write_network()
786 write_int(f, "proactive_key_caching", ssid->proactive_key_caching, -1); in wpa_config_write_network()
799 write_int(f, "ieee80211w", ssid->ieee80211w, in wpa_config_write_network()
803 write_go_p2p_dev_addr(f, ssid); in wpa_config_write_network()
804 write_p2p_client_list(f, ssid); in wpa_config_write_network()
805 write_psk_list(f, ssid); in wpa_config_write_network()
812 write_mka_cak(f, ssid); in wpa_config_write_network()
813 write_mka_ckn(f, ssid); in wpa_config_write_network()
826 write_int(f, "mac_addr", ssid->mac_addr, -1); in wpa_config_write_network()
905 static void wpa_config_write_cred(FILE *f, struct wpa_cred *cred) in wpa_config_write_cred() argument
910 fprintf(f, "\tpriority=%d\n", cred->priority); in wpa_config_write_cred()
912 fprintf(f, "\tpcsc=%d\n", cred->pcsc); in wpa_config_write_cred()
914 fprintf(f, "\trealm=\"%s\"\n", cred->realm); in wpa_config_write_cred()
916 fprintf(f, "\tusername=\"%s\"\n", cred->username); in wpa_config_write_cred()
918 fprintf(f, "\tpassword=ext:%s\n", cred->password); in wpa_config_write_cred()
920 fprintf(f, "\tpassword=\"%s\"\n", cred->password); in wpa_config_write_cred()
922 fprintf(f, "\tca_cert=\"%s\"\n", cred->ca_cert); in wpa_config_write_cred()
924 fprintf(f, "\tclient_cert=\"%s\"\n", cred->client_cert); in wpa_config_write_cred()
926 fprintf(f, "\tprivate_key=\"%s\"\n", cred->private_key); in wpa_config_write_cred()
928 fprintf(f, "\tprivate_key_passwd=\"%s\"\n", in wpa_config_write_cred()
931 fprintf(f, "\timsi=\"%s\"\n", cred->imsi); in wpa_config_write_cred()
933 fprintf(f, "\tmilenage=\"%s\"\n", cred->milenage); in wpa_config_write_cred()
935 fprintf(f, "\tdomain=\"%s\"\n", cred->domain[i]); in wpa_config_write_cred()
937 fprintf(f, "\tdomain_suffix_match=\"%s\"\n", in wpa_config_write_cred()
944 fprintf(f, "\teap=%s\n", name); in wpa_config_write_cred()
947 fprintf(f, "\tphase1=\"%s\"\n", cred->phase1); in wpa_config_write_cred()
949 fprintf(f, "\tphase2=\"%s\"\n", cred->phase2); in wpa_config_write_cred()
954 fprintf(f, "\texcluded_ssid="); in wpa_config_write_cred()
956 fprintf(f, "%02x", e->ssid[j]); in wpa_config_write_cred()
957 fprintf(f, "\n"); in wpa_config_write_cred()
963 fprintf(f, "\troaming_partner=\"%s,%d,%u,%s\"\n", in wpa_config_write_cred()
969 fprintf(f, "\tupdate_identifier=%d\n", cred->update_identifier); in wpa_config_write_cred()
972 fprintf(f, "\tprovisioning_sp=\"%s\"\n", cred->provisioning_sp); in wpa_config_write_cred()
974 fprintf(f, "\tsp_priority=%d\n", cred->sp_priority); in wpa_config_write_cred()
977 fprintf(f, "\tmin_dl_bandwidth_home=%u\n", in wpa_config_write_cred()
980 fprintf(f, "\tmin_ul_bandwidth_home=%u\n", in wpa_config_write_cred()
983 fprintf(f, "\tmin_dl_bandwidth_roaming=%u\n", in wpa_config_write_cred()
986 fprintf(f, "\tmin_ul_bandwidth_roaming=%u\n", in wpa_config_write_cred()
990 fprintf(f, "\tmax_bss_load=%u\n", in wpa_config_write_cred()
994 fprintf(f, "\tocsp=%d\n", cred->ocsp); in wpa_config_write_cred()
1000 fprintf(f, "\treq_conn_capab=%u", in wpa_config_write_cred()
1006 fprintf(f, "%s%d", j > 0 ? "," : ":", in wpa_config_write_cred()
1010 fprintf(f, "\n"); in wpa_config_write_cred()
1017 fprintf(f, "\thome_ois=\""); in wpa_config_write_cred()
1020 fprintf(f, ","); in wpa_config_write_cred()
1022 fprintf(f, "%02x", in wpa_config_write_cred()
1025 fprintf(f, "\"\n"); in wpa_config_write_cred()
1031 fprintf(f, "\trequired_home_ois=\""); in wpa_config_write_cred()
1034 fprintf(f, ","); in wpa_config_write_cred()
1036 fprintf(f, "%02x", in wpa_config_write_cred()
1039 fprintf(f, "\"\n"); in wpa_config_write_cred()
1045 fprintf(f, "\troaming_consortiums=\""); in wpa_config_write_cred()
1048 fprintf(f, ","); in wpa_config_write_cred()
1050 fprintf(f, "%02x", in wpa_config_write_cred()
1053 fprintf(f, "\"\n"); in wpa_config_write_cred()
1057 fprintf(f, "\tsim_num=%d\n", cred->sim_num); in wpa_config_write_cred()
1060 fprintf(f, "\tengine=%d\n", cred->engine); in wpa_config_write_cred()
1062 fprintf(f, "\tengine_id=\"%s\"\n", cred->engine_id); in wpa_config_write_cred()
1064 fprintf(f, "\tkey_id=\"%s\"\n", cred->key_id); in wpa_config_write_cred()
1066 fprintf(f, "\tcert_id=\"%s\"\n", cred->cert_id); in wpa_config_write_cred()
1068 fprintf(f, "\tca_cert_id=\"%s\"\n", cred->ca_cert_id); in wpa_config_write_cred()
1071 fprintf(f, "\timsi_privacy_cert=\"%s\"\n", in wpa_config_write_cred()
1074 fprintf(f, "\timsi_privacy_attr=\"%s\"\n", in wpa_config_write_cred()
1080 static int wpa_config_write_blob(FILE *f, struct wpa_config_blob *blob) in wpa_config_write_blob() argument
1088 fprintf(f, "\nblob-base64-%s={\n%s}\n", blob->name, encoded); in wpa_config_write_blob()
1095 static void write_global_bin(FILE *f, const char *field, in write_global_bin() argument
1104 fprintf(f, "%s=", field); in write_global_bin()
1107 fprintf(f, "%02X", *pos++); in write_global_bin()
1108 fprintf(f, "\n"); in write_global_bin()
1112 static void wpa_config_write_global(FILE *f, struct wpa_config *config) in wpa_config_write_global() argument
1116 fprintf(f, "ctrl_interface=%s\n", config->ctrl_interface); in wpa_config_write_global()
1118 fprintf(f, "ctrl_interface_group=%s\n", in wpa_config_write_global()
1122 fprintf(f, "eapol_version=%d\n", config->eapol_version); in wpa_config_write_global()
1124 fprintf(f, "ap_scan=%d\n", config->ap_scan); in wpa_config_write_global()
1126 fprintf(f, "disable_scan_offload=%d\n", in wpa_config_write_global()
1129 fprintf(f, "fast_reauth=%d\n", config->fast_reauth); in wpa_config_write_global()
1132 fprintf(f, "opensc_engine_path=%s\n", in wpa_config_write_global()
1137 fprintf(f, "pkcs11_engine_path=%s\n", in wpa_config_write_global()
1142 fprintf(f, "pkcs11_module_path=%s\n", in wpa_config_write_global()
1146 fprintf(f, "openssl_ciphers=%s\n", config->openssl_ciphers); in wpa_config_write_global()
1148 fprintf(f, "pcsc_reader=%s\n", config->pcsc_reader); in wpa_config_write_global()
1150 fprintf(f, "pcsc_pin=%s\n", config->pcsc_pin); in wpa_config_write_global()
1152 fprintf(f, "driver_param=%s\n", config->driver_param); in wpa_config_write_global()
1154 fprintf(f, "dot11RSNAConfigPMKLifetime=%u\n", in wpa_config_write_global()
1157 fprintf(f, "dot11RSNAConfigPMKReauthThreshold=%u\n", in wpa_config_write_global()
1160 fprintf(f, "dot11RSNAConfigSATimeout=%u\n", in wpa_config_write_global()
1163 fprintf(f, "update_config=%d\n", config->update_config); in wpa_config_write_global()
1168 fprintf(f, "uuid=%s\n", buf); in wpa_config_write_global()
1171 fprintf(f, "auto_uuid=%d\n", config->auto_uuid); in wpa_config_write_global()
1173 fprintf(f, "device_name=%s\n", config->device_name); in wpa_config_write_global()
1175 fprintf(f, "manufacturer=%s\n", config->manufacturer); in wpa_config_write_global()
1177 fprintf(f, "model_name=%s\n", config->model_name); in wpa_config_write_global()
1179 fprintf(f, "model_number=%s\n", config->model_number); in wpa_config_write_global()
1181 fprintf(f, "serial_number=%s\n", config->serial_number); in wpa_config_write_global()
1187 fprintf(f, "device_type=%s\n", buf); in wpa_config_write_global()
1190 fprintf(f, "os_version=%08x\n", in wpa_config_write_global()
1193 fprintf(f, "config_methods=%s\n", config->config_methods); in wpa_config_write_global()
1195 fprintf(f, "wps_cred_processing=%d\n", in wpa_config_write_global()
1198 fprintf(f, "wps_cred_add_sae=%d\n", in wpa_config_write_global()
1204 fprintf(f, "wps_vendor_ext_m1="); in wpa_config_write_global()
1206 fprintf(f, "%02x", *p++); in wpa_config_write_global()
1207 fprintf(f, "\n"); in wpa_config_write_global()
1220 fprintf(f, "sec_device_type=%s\n", buf); in wpa_config_write_global()
1224 fprintf(f, "p2p_listen_reg_class=%d\n", in wpa_config_write_global()
1227 fprintf(f, "p2p_listen_channel=%d\n", in wpa_config_write_global()
1230 fprintf(f, "p2p_oper_reg_class=%d\n", in wpa_config_write_global()
1233 fprintf(f, "p2p_oper_channel=%d\n", config->p2p_oper_channel); in wpa_config_write_global()
1235 fprintf(f, "p2p_go_intent=%d\n", config->p2p_go_intent); in wpa_config_write_global()
1237 fprintf(f, "p2p_ssid_postfix=%s\n", config->p2p_ssid_postfix); in wpa_config_write_global()
1239 fprintf(f, "persistent_reconnect=%d\n", in wpa_config_write_global()
1242 fprintf(f, "p2p_intra_bss=%d\n", config->p2p_intra_bss); in wpa_config_write_global()
1244 fprintf(f, "p2p_group_idle=%d\n", config->p2p_group_idle); in wpa_config_write_global()
1246 fprintf(f, "p2p_passphrase_len=%u\n", in wpa_config_write_global()
1250 fprintf(f, "p2p_pref_chan="); in wpa_config_write_global()
1252 fprintf(f, "%s%u:%u", i > 0 ? "," : "", in wpa_config_write_global()
1256 fprintf(f, "\n"); in wpa_config_write_global()
1261 fprintf(f, "p2p_no_go_freq=%s\n", val); in wpa_config_write_global()
1266 fprintf(f, "p2p_add_cli_chan=%d\n", config->p2p_add_cli_chan); in wpa_config_write_global()
1269 fprintf(f, "p2p_optimize_listen_chan=%d\n", in wpa_config_write_global()
1272 fprintf(f, "p2p_go_ht40=%d\n", config->p2p_go_ht40); in wpa_config_write_global()
1274 fprintf(f, "p2p_go_vht=%d\n", config->p2p_go_vht); in wpa_config_write_global()
1276 fprintf(f, "p2p_go_he=%d\n", config->p2p_go_he); in wpa_config_write_global()
1278 fprintf(f, "p2p_go_edmg=%d\n", config->p2p_go_edmg); in wpa_config_write_global()
1280 fprintf(f, "p2p_go_ctwindow=%d\n", config->p2p_go_ctwindow); in wpa_config_write_global()
1282 fprintf(f, "p2p_disabled=%d\n", config->p2p_disabled); in wpa_config_write_global()
1284 fprintf(f, "p2p_no_group_iface=%d\n", in wpa_config_write_global()
1287 fprintf(f, "p2p_ignore_shared_freq=%d\n", in wpa_config_write_global()
1290 fprintf(f, "p2p_cli_probe=%d\n", config->p2p_cli_probe); in wpa_config_write_global()
1292 fprintf(f, "p2p_go_freq_change_policy=%u\n", in wpa_config_write_global()
1296 fprintf(f, "p2p_6ghz_disable=%d\n", config->p2p_6ghz_disable); in wpa_config_write_global()
1299 fprintf(f, "ip_addr_go=%u.%u.%u.%u\n", in wpa_config_write_global()
1303 fprintf(f, "ip_addr_mask=%u.%u.%u.%u\n", in wpa_config_write_global()
1307 fprintf(f, "ip_addr_start=%u.%u.%u.%u\n", in wpa_config_write_global()
1311 fprintf(f, "ip_addr_end=%u.%u.%u.%u\n", in wpa_config_write_global()
1316 fprintf(f, "country=%c%c\n", in wpa_config_write_global()
1320 fprintf(f, "bss_max_count=%u\n", config->bss_max_count); in wpa_config_write_global()
1322 fprintf(f, "bss_expiration_age=%u\n", in wpa_config_write_global()
1326 fprintf(f, "bss_expiration_scan_count=%u\n", in wpa_config_write_global()
1329 fprintf(f, "filter_ssids=%d\n", config->filter_ssids); in wpa_config_write_global()
1331 fprintf(f, "filter_rssi=%d\n", config->filter_rssi); in wpa_config_write_global()
1333 fprintf(f, "max_num_sta=%u\n", config->max_num_sta); in wpa_config_write_global()
1335 fprintf(f, "ap_isolate=%u\n", config->ap_isolate); in wpa_config_write_global()
1337 fprintf(f, "disassoc_low_ack=%d\n", config->disassoc_low_ack); in wpa_config_write_global()
1340 fprintf(f, "hs20=1\n"); in wpa_config_write_global()
1344 fprintf(f, "interworking=%d\n", config->interworking); in wpa_config_write_global()
1346 fprintf(f, "hessid=" MACSTR "\n", MAC2STR(config->hessid)); in wpa_config_write_global()
1348 fprintf(f, "access_network_type=%d\n", in wpa_config_write_global()
1351 fprintf(f, "go_interworking=%d\n", config->go_interworking); in wpa_config_write_global()
1353 fprintf(f, "go_access_network_type=%d\n", in wpa_config_write_global()
1356 fprintf(f, "go_internet=%d\n", config->go_internet); in wpa_config_write_global()
1358 fprintf(f, "go_venue_group=%d\n", config->go_venue_group); in wpa_config_write_global()
1360 fprintf(f, "go_venue_type=%d\n", config->go_venue_type); in wpa_config_write_global()
1363 fprintf(f, "pbc_in_m1=%d\n", config->pbc_in_m1); in wpa_config_write_global()
1366 fprintf(f, "wps_nfc_dev_pw_id=%d\n", in wpa_config_write_global()
1368 write_global_bin(f, "wps_nfc_dh_pubkey", in wpa_config_write_global()
1370 write_global_bin(f, "wps_nfc_dh_privkey", in wpa_config_write_global()
1372 write_global_bin(f, "wps_nfc_dev_pw", config->wps_nfc_dev_pw); in wpa_config_write_global()
1376 fprintf(f, "ext_password_backend=%s\n", in wpa_config_write_global()
1379 fprintf(f, "p2p_go_max_inactivity=%d\n", in wpa_config_write_global()
1382 fprintf(f, "auto_interworking=%d\n", in wpa_config_write_global()
1385 fprintf(f, "okc=%d\n", config->okc); in wpa_config_write_global()
1387 fprintf(f, "pmf=%d\n", config->pmf); in wpa_config_write_global()
1389 fprintf(f, "dtim_period=%d\n", config->dtim_period); in wpa_config_write_global()
1391 fprintf(f, "beacon_int=%d\n", config->beacon_int); in wpa_config_write_global()
1394 fprintf(f, "sae_check_mfp=%d\n", config->sae_check_mfp); in wpa_config_write_global()
1398 fprintf(f, "sae_groups="); in wpa_config_write_global()
1400 fprintf(f, "%s%d", i > 0 ? " " : "", in wpa_config_write_global()
1403 fprintf(f, "\n"); in wpa_config_write_global()
1407 fprintf(f, "sae_pwe=%d\n", config->sae_pwe); in wpa_config_write_global()
1410 fprintf(f, "sae_pmkid_in_assoc=%d\n", in wpa_config_write_global()
1417 fprintf(f, "ap_vendor_elements="); in wpa_config_write_global()
1419 fprintf(f, "%02x", *p++); in wpa_config_write_global()
1420 fprintf(f, "\n"); in wpa_config_write_global()
1429 fprintf(f, "ap_assocresp_elements="); in wpa_config_write_global()
1431 fprintf(f, "%02x", *p++); in wpa_config_write_global()
1432 fprintf(f, "\n"); in wpa_config_write_global()
1437 fprintf(f, "ignore_old_scan_res=%d\n", in wpa_config_write_global()
1442 fprintf(f, "freq_list="); in wpa_config_write_global()
1444 fprintf(f, "%s%d", i > 0 ? " " : "", in wpa_config_write_global()
1447 fprintf(f, "\n"); in wpa_config_write_global()
1451 fprintf(f, "initial_freq_list="); in wpa_config_write_global()
1453 fprintf(f, "%s%d", i > 0 ? " " : "", in wpa_config_write_global()
1456 fprintf(f, "\n"); in wpa_config_write_global()
1459 fprintf(f, "scan_cur_freq=%d\n", config->scan_cur_freq); in wpa_config_write_global()
1463 fprintf(f, "scan_res_valid_for_connect=%d\n", in wpa_config_write_global()
1467 fprintf(f, "sched_scan_interval=%u\n", in wpa_config_write_global()
1471 fprintf(f, "sched_scan_start_delay=%u\n", in wpa_config_write_global()
1475 fprintf(f, "external_sim=%d\n", config->external_sim); in wpa_config_write_global()
1478 fprintf(f, "tdls_external_control=%d\n", in wpa_config_write_global()
1482 fprintf(f, "wowlan_triggers=%s\n", in wpa_config_write_global()
1486 fprintf(f, "bgscan=\"%s\"\n", config->bgscan); in wpa_config_write_global()
1489 fprintf(f, "autoscan=%s\n", config->autoscan); in wpa_config_write_global()
1492 fprintf(f, "p2p_search_delay=%u\n", in wpa_config_write_global()
1496 fprintf(f, "mac_addr=%d\n", config->mac_addr); in wpa_config_write_global()
1499 fprintf(f, "rand_addr_lifetime=%u\n", in wpa_config_write_global()
1503 fprintf(f, "preassoc_mac_addr=%d\n", config->preassoc_mac_addr); in wpa_config_write_global()
1506 fprintf(f, "key_mgmt_offload=%d\n", config->key_mgmt_offload); in wpa_config_write_global()
1509 fprintf(f, "user_mpm=%d\n", config->user_mpm); in wpa_config_write_global()
1512 fprintf(f, "max_peer_links=%d\n", config->max_peer_links); in wpa_config_write_global()
1515 fprintf(f, "cert_in_cb=%d\n", config->cert_in_cb); in wpa_config_write_global()
1518 fprintf(f, "mesh_max_inactivity=%d\n", in wpa_config_write_global()
1522 fprintf(f, "mesh_fwding=%d\n", config->mesh_fwding); in wpa_config_write_global()
1526 fprintf(f, "dot11RSNASAERetransPeriod=%d\n", in wpa_config_write_global()
1530 fprintf(f, "passive_scan=%d\n", config->passive_scan); in wpa_config_write_global()
1533 fprintf(f, "reassoc_same_bss_optim=%d\n", in wpa_config_write_global()
1537 fprintf(f, "wps_priority=%d\n", config->wps_priority); in wpa_config_write_global()
1540 fprintf(f, "wpa_rsc_relaxation=%d\n", in wpa_config_write_global()
1544 fprintf(f, "sched_scan_plans=%s\n", config->sched_scan_plans); in wpa_config_write_global()
1548 fprintf(f, "non_pref_chan=%s\n", config->non_pref_chan); in wpa_config_write_global()
1550 fprintf(f, "mbo_cell_capa=%u\n", config->mbo_cell_capa); in wpa_config_write_global()
1553 fprintf(f, "disassoc_imminent_rssi_threshold=%d\n", in wpa_config_write_global()
1556 fprintf(f, "oce=%u\n", config->oce); in wpa_config_write_global()
1560 fprintf(f, "gas_address3=%d\n", config->gas_address3); in wpa_config_write_global()
1563 fprintf(f, "ftm_responder=%d\n", config->ftm_responder); in wpa_config_write_global()
1565 fprintf(f, "ftm_initiator=%d\n", config->ftm_initiator); in wpa_config_write_global()
1568 fprintf(f, "osu_dir=%s\n", config->osu_dir); in wpa_config_write_global()
1571 fprintf(f, "fst_group_id=%s\n", config->fst_group_id); in wpa_config_write_global()
1573 fprintf(f, "fst_priority=%d\n", config->fst_priority); in wpa_config_write_global()
1575 fprintf(f, "fst_llt=%d\n", config->fst_llt); in wpa_config_write_global()
1578 fprintf(f, "gas_rand_addr_lifetime=%u\n", in wpa_config_write_global()
1581 fprintf(f, "gas_rand_mac_addr=%d\n", config->gas_rand_mac_addr); in wpa_config_write_global()
1583 fprintf(f, "dpp_config_processing=%d\n", in wpa_config_write_global()
1586 fprintf(f, "dpp_name=%s\n", config->dpp_name); in wpa_config_write_global()
1588 fprintf(f, "dpp_mud_url=%s\n", config->dpp_mud_url); in wpa_config_write_global()
1590 fprintf(f, "dpp_extra_conf_req_name=%s\n", in wpa_config_write_global()
1593 fprintf(f, "dpp_extra_conf_req_value=%s\n", in wpa_config_write_global()
1596 fprintf(f, "dpp_connector_privacy_default=%d\n", in wpa_config_write_global()
1599 fprintf(f, "coloc_intf_reporting=%d\n", in wpa_config_write_global()
1602 fprintf(f, "p2p_device_random_mac_addr=%d\n", in wpa_config_write_global()
1605 fprintf(f, "p2p_device_persistent_mac_addr=" MACSTR "\n", in wpa_config_write_global()
1608 fprintf(f, "p2p_interface_random_mac_addr=%d\n", in wpa_config_write_global()
1611 fprintf(f, "disable_btm=1\n"); in wpa_config_write_global()
1613 fprintf(f, "extended_key_id=%d\n", in wpa_config_write_global()
1616 fprintf(f, "wowlan_disconnect_on_deinit=%d\n", in wpa_config_write_global()
1620 fprintf(f, "mld_force_single_link=1\n"); in wpa_config_write_global()
1622 fprintf(f, "mld_connect_band_pref=%d\n", in wpa_config_write_global()
1625 fprintf(f, "mld_connect_bssid_pref=" MACSTR "\n", in wpa_config_write_global()
1629 fprintf(f, "ft_prepend_pmkid=%d", config->ft_prepend_pmkid); in wpa_config_write_global()
1638 FILE *f; in wpa_config_write() local
1663 f = fopen(name, "w"); in wpa_config_write()
1664 if (f == NULL) { in wpa_config_write()
1670 wpa_config_write_global(f, config); in wpa_config_write()
1675 fprintf(f, "\ncred={\n"); in wpa_config_write()
1676 wpa_config_write_cred(f, cred); in wpa_config_write()
1677 fprintf(f, "}\n"); in wpa_config_write()
1690 fprintf(f, "\nnetwork={\n"); in wpa_config_write()
1691 wpa_config_write_network(f, ssid); in wpa_config_write()
1692 fprintf(f, "}\n"); in wpa_config_write()
1697 ret = wpa_config_write_blob(f, blob); in wpa_config_write()
1703 os_fdatasync(f); in wpa_config_write()
1705 fclose(f); in wpa_config_write()