Network blocks are disabled during a WPS provisioning step and 10
seconds after this to allow the newly provisioned network to be
selected. The disabled=1 flag gets written to the configuration file
when the credential is added since it happens during this process.
Update the file again after the networks have been re-enabled to avoid
leaving the configuration file into state that is not consistent with
the running configuration.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
static void wpas_wps_reenable_networks(struct wpa_supplicant *wpa_s)
{
struct wpa_ssid *ssid;
+ int changed = 0;
eloop_cancel_timeout(wpas_wps_reenable_networks_cb, wpa_s, NULL);
ssid->disabled_for_connect = 0;
ssid->disabled = 0;
wpas_notify_network_enabled_changed(wpa_s, ssid);
+ changed++;
}
}
+
+ if (changed) {
+#ifndef CONFIG_NO_CONFIG_WRITE
+ if (wpa_s->conf->update_config &&
+ wpa_config_write(wpa_s->confname, wpa_s->conf)) {
+ wpa_printf(MSG_DEBUG, "WPS: Failed to update "
+ "configuration");
+ }
+#endif /* CONFIG_NO_CONFIG_WRITE */
+ }
}