*/
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <vconf.h>
#include <vconf-keys.h>
#include "neterror.h"
#include "wifi-eap.h"
#include "wifi-wps.h"
+#include "wifi-bssid-scan.h"
#include "wifi-power.h"
#include "wifi-state.h"
#include "wifi-agent.h"
#include "wifi-config.h"
#include "wifi-tdls.h"
-#if defined TIZEN_WLAN_BOARD_SPRD
#define SPRD_CP2_FIRMWARE_PATH "/usr/bin/cp2-downloader"
static int is_wifi_firmware_downloaded = FALSE;
-#endif
static Wifi *wifi_object = NULL;
static NetConnmanAgent *connman_agent_object = NULL;
if (mac_addr != NULL) {
if (strlen(mac_addr) == 0)
netconfig_set_mac_address_from_file();
- g_free(mac_addr);
+ free(mac_addr);
}
}
g_dbus_connection_call_finish(conn, res, &error);
if (error != NULL) {
ERR("WiFi Connection Error [%s]", error->message);
+ /* No need to emit WiFiConnectFail signal if Connection is
+ * in progress */
+ if (error->code == G_IO_ERROR_TIMED_OUT) {
+ g_error_free(error);
+ DBG("WiFi Connection in Progress");
+ netconfig_gdbus_pending_call_unref();
+ return;
+ }
g_error_free(error);
if (netconfig_dbus_emit_signal(NULL, NETCONFIG_WIFI_PATH,
NETCONFIG_WIFI_INTERFACE, "WiFiConnectFail",
return;
}
-#if defined TIZEN_WLAN_BOARD_SPRD
int wifi_firmware_download(void)
{
int rv = 0;
return 0;
}
-#endif
void wifi_object_create_and_init(void)
{
/* WIFI scan */
g_signal_connect(wifi_object, "handle-request-specific-scan",
G_CALLBACK(handle_request_specific_scan), NULL);
- g_signal_connect(wifi_object, "handle-request-wps-scan",
- G_CALLBACK(handle_request_wps_scan), NULL);
+ g_signal_connect(wifi_object, "handle-request-bssid-scan",
+ G_CALLBACK(handle_request_bssid_scan), NULL);
+ g_signal_connect(wifi_object, "handle-get-bssid-list",
+ G_CALLBACK(handle_get_bssid_list), NULL);
+
+ /* WPS Connect */
+ g_signal_connect(wifi_object, "handle-request-wps-connect",
+ G_CALLBACK(handle_request_wps_connect), NULL);
+ g_signal_connect(wifi_object, "handle-request-wps-cancel",
+ G_CALLBACK(handle_request_wps_cancel), NULL);
/* WIFI direct */
g_signal_connect(wifi_object, "handle-launch-direct",
g_signal_connect(wifi_object, "handle-delete-eap-config",
G_CALLBACK(handle_delete_eap_config), NULL);
+ /* VSIE methods */
+ g_signal_connect(wifi_object, "handle-add-vsie",
+ G_CALLBACK(handle_add_vsie), NULL);
+ g_signal_connect(wifi_object, "handle-get-vsie",
+ G_CALLBACK(handle_get_vsie), NULL);
+ g_signal_connect(wifi_object, "handle-remove-vsie",
+ G_CALLBACK(handle_remove_vsie), NULL);
+
/* WIFI configuration */
g_signal_connect(wifi_object, "handle-save-configuration",
G_CALLBACK(handle_save_configuration), NULL);
g_signal_connect(wifi_object, "handle-pause-bgscan",
G_CALLBACK(handle_pause_bgscan), NULL);
+ /*Auto Scan Mode */
+ g_signal_connect(wifi_object, "handle-get-autoscan",
+ G_CALLBACK(handle_get_autoscan), NULL);
+ g_signal_connect(wifi_object, "handle-get-autoscanmode",
+ G_CALLBACK(handle_get_autoscanmode), NULL);
+
/* Passpoint */
g_signal_connect(wifi_object, "handle-set-passpoint",
G_CALLBACK(handle_set_passpoint), NULL);
G_CALLBACK(handle_tdls_disconnect), NULL);
g_signal_connect(wifi_object, "handle-tdls-connected-peer",
G_CALLBACK(handle_tdls_connected_peer), NULL);
+ g_signal_connect(wifi_object, "handle-tdls-discover",
+ G_CALLBACK(handle_tdls_discover), NULL);
+ g_signal_connect(wifi_object, "handle-tdls-connect",
+ G_CALLBACK(handle_tdls_connect), NULL);
+ g_signal_connect(wifi_object, "handle-tdls-channel-switch",
+ G_CALLBACK(handle_tdls_channel_switch), NULL);
+ g_signal_connect(wifi_object, "handle-tdls-cancel-channel-switch",
+ G_CALLBACK(handle_tdls_cancel_channel_switch), NULL);
if (!g_dbus_interface_skeleton_export(interface_wifi, connection,
NETCONFIG_WIFI_PATH, NULL)) {