char *phase1;
unsigned char country_code[WIFI_COUNTRY_CODE_LEN];
GSList *bssid_list;
+ GSList *sec_list;
ieee80211_modes_e phy_mode;
connection_mode_e connection_mode;
char *connector;
#if defined TIZEN_EXT
unsigned char last_connected_bssid[WIFI_BSSID_LEN_MAX];
GHashTable *assoc_reject_table;
+ bool owe_transition_mode;
+ void *transition_mode_ssid;
+ int transition_mode_ssid_len;
+ unsigned char transition_mode_bssid[WIFI_BSSID_LEN_MAX];
+ bool roaming_progress;
+ char *roaming_cur_bssid;
+ char *roaming_dst_bssid;
+ int snr;
#endif
} wifi;
network->connecting = false;
ipconfig_ipv6 = __connman_service_get_ip6config(service);
+#if defined TIZEN_EXT
+ if (!ipconfig_ipv6)
+ goto err;
+#endif
err = __connman_ipconfig_address_add(ipconfig_ipv6);
if (err < 0)
goto err;
driver = NULL;
continue;
}
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
DBG("driver %p name %s", driver, driver->name);
if (driver->probe(network) == 0)
/**
* connman_network_create:
- * @identifier: network identifier (for example an unqiue name)
+ * @identifier: network identifier (for example an unique name)
*
* Allocate a new network and assign the #identifier to it.
*
int __connman_network_disconnect(struct connman_network *network)
{
int err = 0;
-
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
DBG("network %p", network);
remove_ipv4ll_timeout(network);
if (bssid == NULL)
return -EINVAL;
- DBG("network %p bssid %02x:%02x:%02x:%02x:%02x:%02x", network,
- bssid[0], bssid[1], bssid[2],
- bssid[3], bssid[4], bssid[5]);
+ if (network->connected)
+ return -EPERM;
+
+ if (!simplified_log)
+ DBG("network %p bssid %02x:%02x:%02x:%02x:%02x:%02x", network,
+ bssid[0], bssid[1], bssid[2],
+ bssid[3], bssid[4], bssid[5]);
for (;i < WIFI_BSSID_LEN_MAX;i++)
network->wifi.bssid[i] = bssid[i];
return (unsigned char *)network->wifi.bssid;
}
+int connman_network_set_transition_mode_bssid(struct connman_network *network,
+ const unsigned char *transition_mode_bssid)
+{
+ int i = 0;
+
+ if (transition_mode_bssid == NULL)
+ return -EINVAL;
+
+ for (;i < WIFI_BSSID_LEN_MAX;i++)
+ network->wifi.transition_mode_bssid[i] = transition_mode_bssid[i];
+
+ return 0;
+}
+
+unsigned char *connman_network_get_transition_mode_bssid(struct connman_network *network)
+{
+ return (unsigned char *)network->wifi.transition_mode_bssid;
+}
+
+bool connman_network_check_transition_mode(struct connman_network *network1, struct connman_network *network2)
+{
+
+ if (network1 == NULL || network2 == NULL)
+ return FALSE;
+
+ if (network1->wifi.owe_transition_mode == FALSE || network2->wifi.owe_transition_mode == FALSE)
+ return FALSE;
+
+ if ((memcmp(network1->wifi.bssid, network2->wifi.transition_mode_bssid, WIFI_BSSID_LEN_MAX) == 0)
+ && (memcmp(network1->wifi.transition_mode_bssid, network2->wifi.bssid, WIFI_BSSID_LEN_MAX) == 0))
+ return TRUE;
+ else
+ return FALSE;
+}
+
int connman_network_set_maxspeed(struct connman_network *network,
int maxspeed)
{
return 0;
}
+int connman_network_set_sec_list(struct connman_network *network,
+ GSList *sec_list)
+{
+ g_slist_free(network->wifi.sec_list);
+ network->wifi.sec_list = sec_list;
+
+ return 0;
+}
+
+void *connman_network_get_sec_list(struct connman_network *network)
+{
+ return network->wifi.sec_list;
+}
+
int connman_network_set_maxrate(struct connman_network *network,
unsigned int maxrate)
{
if (encryption_mode == NULL)
return -EINVAL;
- DBG("network %p encryption mode %s", network, encryption_mode);
+ if (!simplified_log)
+ DBG("network %p encryption mode %s", network, encryption_mode);
g_strlcpy(network->wifi.encryption_mode, encryption_mode,
WIFI_ENCYPTION_MODE_LEN_MAX);
if (country_code == NULL)
return -EINVAL;
- DBG("network %p Country Code %02x:%02x",network,
- country_code[0],country_code[1]);
+ if (!simplified_log)
+ DBG("network %p Country Code %02x:%02x",network,
+ country_code[0],country_code[1]);
for (; i < WIFI_COUNTRY_CODE_LEN; i++)
network->wifi.country_code[i] = country_code[i];
int connman_network_set_phy_mode(struct connman_network *network,
ieee80211_modes_e mode)
{
- DBG("network %p phy mode %d", network, mode);
+ if (!simplified_log)
+ DBG("network %p phy mode %d", network, mode);
network->wifi.phy_mode = mode;
return 0;
return network->wifi.assoc_reject_table;
}
+
+int connman_network_get_snr(struct connman_network *network)
+{
+ return network->wifi.snr;
+}
+
+void connman_network_set_snr(struct connman_network *network, int snr)
+{
+ network->wifi.snr = snr;
+}
#endif
int connman_network_set_nameservers(struct connman_network *network,
int connman_network_set_name(struct connman_network *network,
const char *name)
{
+#if defined TIZEN_EXT
+ if (!simplified_log)
+#endif
DBG("network %p name %s", network, name);
g_free(network->name);
} else if (g_str_equal(key, "WiFi.NetAccessKey")) {
g_free(network->wifi.net_access_key);
network->wifi.net_access_key = g_strdup(value);
+ } else if (g_str_equal(key, "WiFi.RoamingCurBSSID")) {
+ g_free(network->wifi.roaming_cur_bssid);
+ network->wifi.roaming_cur_bssid = g_strdup(value);
+ } else if (g_str_equal(key, "WiFi.RoamingDstBSSID")) {
+ g_free(network->wifi.roaming_dst_bssid);
+ network->wifi.roaming_dst_bssid = g_strdup(value);
#endif
} else {
return -EINVAL;
else if (g_str_equal(key, "WiFi.Mode"))
return network->wifi.mode;
else if (g_str_equal(key, "WiFi.Security"))
-#if defined TIZEN_EXT
- if (network->wifi.rsn_mode != true ||
- g_str_equal(network->wifi.security, "ieee8021x"))
- return network->wifi.security;
- else
- return "rsn";
-#else
return network->wifi.security;
-#endif
else if (g_str_equal(key, "WiFi.Passphrase"))
return network->wifi.passphrase;
else if (g_str_equal(key, "WiFi.EAP"))
return network->wifi.c_sign_key;
else if (g_str_equal(key, "WiFi.NetAccessKey"))
return network->wifi.net_access_key;
+ else if (g_str_equal(key, "WiFi.RoamingCurBSSID"))
+ return network->wifi.roaming_cur_bssid;
+ else if (g_str_equal(key, "WiFi.RoamingDstBSSID"))
+ return network->wifi.roaming_dst_bssid;
#endif
return NULL;
network->default_internet = value;
else if (g_strcmp0(key, "WiFi.HS20AP") == 0)
network->wifi.isHS20AP = value;
+ else if (g_strcmp0(key, "WiFi.TRANSITION_MODE") == 0)
+ network->wifi.owe_transition_mode = value;
+ else if (g_strcmp0(key, "WiFi.Roaming") == 0) {
+ network->wifi.roaming_progress = value;
+ }
#endif
return -EINVAL;
return network->default_internet;
else if (g_str_equal(key, "WiFi.HS20AP"))
return network->wifi.isHS20AP;
+ else if (g_str_equal(key, "WiFi.TRANSITION_MODE"))
+ return network->wifi.owe_transition_mode;
+ else if (g_str_equal(key, "WiFi.Roaming"))
+ return network->wifi.roaming_progress;
#endif
return false;
network->wifi.ssid_len = size;
} else
network->wifi.ssid_len = 0;
+#ifdef TIZEN_EXT
+ } else if (g_str_equal(key, "WiFi.TRANSITION_MODE_SSID")) {
+ g_free(network->wifi.transition_mode_ssid);
+ network->wifi.transition_mode_ssid = g_try_malloc(size);
+ if (network->wifi.transition_mode_ssid) {
+ memcpy(network->wifi.transition_mode_ssid, data, size);
+ network->wifi.transition_mode_ssid_len = size;
+ } else
+ network->wifi.transition_mode_ssid_len = 0;
+#endif
} else {
return -EINVAL;
}
if (size)
*size = network->wifi.ssid_len;
return network->wifi.ssid;
+#ifdef TIZEN_EXT
+ } else if (g_str_equal(key, "WiFi.TRANSITION_MODE_SSID")) {
+ if (size)
+ *size = network->wifi.transition_mode_ssid_len;
+ return network->wifi.transition_mode_ssid;
+#endif
}
-
return NULL;
}