WPS: Add WPS-FAIL ctrl_interface event for hostapd
[libeap.git] / wpa_supplicant / config_file.c
index 07dc197..0f343fd 100644 (file)
@@ -654,6 +654,29 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
                fprintf(f, "wps_cred_processing=%d\n",
                        config->wps_cred_processing);
 #endif /* CONFIG_WPS */
+#ifdef CONFIG_P2P
+       if (config->p2p_listen_reg_class)
+               fprintf(f, "p2p_listen_reg_class=%u\n",
+                       config->p2p_listen_reg_class);
+       if (config->p2p_listen_channel)
+               fprintf(f, "p2p_listen_channel=%u\n",
+                       config->p2p_listen_channel);
+       if (config->p2p_oper_reg_class)
+               fprintf(f, "p2p_oper_reg_class=%u\n",
+                       config->p2p_oper_reg_class);
+       if (config->p2p_oper_channel)
+               fprintf(f, "p2p_oper_channel=%u\n", config->p2p_oper_channel);
+       if (config->p2p_go_intent != DEFAULT_P2P_GO_INTENT)
+               fprintf(f, "p2p_go_intent=%u\n", config->p2p_go_intent);
+       if (config->p2p_ssid_postfix)
+               fprintf(f, "p2p_ssid_postfix=%s\n", config->p2p_ssid_postfix);
+       if (config->persistent_reconnect)
+               fprintf(f, "persistent_reconnect=%u\n",
+                       config->persistent_reconnect);
+       if (config->p2p_intra_bss != DEFAULT_P2P_INTRA_BSS)
+               fprintf(f, "p2p_intra_bss=%u\n", config->p2p_intra_bss);
+
+#endif /* CONFIG_P2P */
        if (config->country[0] && config->country[1]) {
                fprintf(f, "country=%c%c\n",
                        config->country[0], config->country[1]);
@@ -688,8 +711,8 @@ int wpa_config_write(const char *name, struct wpa_config *config)
        wpa_config_write_global(f, config);
 
        for (ssid = config->ssid; ssid; ssid = ssid->next) {
-               if (ssid->key_mgmt == WPA_KEY_MGMT_WPS)
-                       continue; /* do not save temporary WPS networks */
+               if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary)
+                       continue; /* do not save temporary networks */
                fprintf(f, "\nnetwork={\n");
                wpa_config_write_network(f, ssid);
                fprintf(f, "}\n");