#include "common.h"
#include "config.h"
#include "wpa_supplicant_i.h"
+#include "driver_i.h"
#include "ctrl_iface_dbus.h"
#include "ctrl_iface_dbus_handlers.h"
#include "eap_peer/eap_methods.h"
* Try to get the wpa_supplicant record for this iface, return
* an error if we already control it.
*/
- if (wpa_supplicant_get_iface(global, iface.ifname) != 0) {
+ if (wpa_supplicant_get_iface(global, iface.ifname) != NULL) {
reply = dbus_message_new_error(message,
WPAS_ERROR_EXISTS_ERROR,
"wpa_supplicant already "
goto error;
}
+ ie = wpa_scan_get_vendor_ie(res, WPS_IE_VENDOR_TYPE);
+ if (ie) {
+ if (!wpa_dbus_dict_append_byte_array(&iter_dict, "wpsie",
+ (const char *) ie,
+ ie[1] + 2))
+ goto error;
+ }
+
if (res->freq) {
if (!wpa_dbus_dict_append_int32(&iter_dict, "frequency",
res->freq))
if (!wpa_dbus_dict_append_uint16(&iter_dict, "capabilities",
res->caps))
goto error;
- if (!wpa_dbus_dict_append_int32(&iter_dict, "quality", res->qual))
+ if (!(res->flags & WPA_SCAN_QUAL_INVALID) &&
+ !wpa_dbus_dict_append_int32(&iter_dict, "quality", res->qual))
goto error;
- if (!wpa_dbus_dict_append_int32(&iter_dict, "noise", res->noise))
+ if (!(res->flags & WPA_SCAN_NOISE_INVALID) &&
+ !wpa_dbus_dict_append_int32(&iter_dict, "noise", res->noise))
goto error;
- if (!wpa_dbus_dict_append_int32(&iter_dict, "level", res->level))
+ if (!(res->flags & WPA_SCAN_LEVEL_INVALID) &&
+ !wpa_dbus_dict_append_int32(&iter_dict, "level", res->level))
goto error;
if (!wpa_dbus_dict_append_int32(&iter_dict, "maxrate",
- wpa_scan_get_max_rate(res)))
+ wpa_scan_get_max_rate(res) * 500000))
goto error;
if (!wpa_dbus_dict_close_write(&iter, &iter_dict))
wpa_dbus_dict_entry_clear(&entry);
}
+#ifdef EAP_TLS_OPENSSL
os_free(wpa_s->conf->opensc_engine_path);
wpa_s->conf->opensc_engine_path = opensc_engine_path;
os_free(wpa_s->conf->pkcs11_engine_path);
wpa_s->conf->pkcs11_engine_path = pkcs11_engine_path;
os_free(wpa_s->conf->pkcs11_module_path);
wpa_s->conf->pkcs11_module_path = pkcs11_module_path;
+#endif /* EAP_TLS_OPENSSL */
eapol_sm_deinit(wpa_s->eapol);
wpa_supplicant_init_eapol(wpa_s);
/**
* wpas_dbus_iface_set_blobs - Store named binary blobs (ie, for certificates)
* @message: Pointer to incoming dbus message
- * @global: %wpa_supplicant global data structure
+ * @wpa_s: %wpa_supplicant data structure
* Returns: A dbus message containing a UINT32 indicating success (1) or
* failure (0)
*
/**
* wpas_dbus_iface_remove_blob - Remove named binary blobs
* @message: Pointer to incoming dbus message
- * @global: %wpa_supplicant global data structure
+ * @wpa_s: %wpa_supplicant data structure
* Returns: A dbus message containing a UINT32 indicating success (1) or
* failure (0)
*