summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgsupplicant/gsupplicant.h1
-rwxr-xr-xgsupplicant/supplicant.c52
-rwxr-xr-xinclude/device.h3
-rwxr-xr-xplugins/wifi.c12
-rw-r--r--src/connman-robot.conf1
-rw-r--r--src/connman.conf1
-rwxr-xr-xsrc/device.c12
-rw-r--r--src/technology.c37
8 files changed, 104 insertions, 15 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index 7f8a7a48..f49ad803 100755
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -427,6 +427,7 @@ void *g_supplicant_interface_get_data(GSupplicantInterface *interface);
const char *g_supplicant_interface_get_ifname(GSupplicantInterface *interface);
#if defined TIZEN_EXT
bool g_supplicant_interface_get_is_5_0_ghz_supported(GSupplicantInterface *interface);
+bool g_supplicant_interface_get_is_6_0_ghz_supported(GSupplicantInterface *interface);
unsigned char *g_supplicant_interface_get_add_network_bssid(GSupplicantInterface *interface);
typedef void (*GSupplicantMacPolicyCallback) (int result, unsigned int policy, void *user_data);
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index fce4f7b3..0f44766d 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -265,6 +265,7 @@ struct _GSupplicantInterface {
struct added_network_information network_info;
#if defined TIZEN_EXT
dbus_bool_t is_5_0_Ghz_supported;
+ dbus_bool_t is_6_0_Ghz_supported;
int disconnect_reason;
#endif
#if defined TIZEN_EXT
@@ -1314,6 +1315,11 @@ static void interface_capability(const char *key, DBusMessageIter *iter,
dbus_message_iter_get_basic(iter, &is_5_0_Ghz_supported);
interface->is_5_0_Ghz_supported = is_5_0_Ghz_supported;
+ } else if (g_strcmp0(key, "Is6GhzSupported") == 0) {
+ dbus_bool_t is_6_0_Ghz_supported;
+
+ dbus_message_iter_get_basic(iter, &is_6_0_Ghz_supported);
+ interface->is_6_0_Ghz_supported = is_6_0_Ghz_supported;
#endif
} else
SUPPLICANT_DBG("key %s type %c",
@@ -1425,11 +1431,19 @@ const char *g_supplicant_interface_get_ifname(GSupplicantInterface *interface)
bool g_supplicant_interface_get_is_5_0_ghz_supported(GSupplicantInterface *interface)
{
if (!interface)
- return NULL;
+ return false;
return interface->is_5_0_Ghz_supported;
}
+bool g_supplicant_interface_get_is_6_0_ghz_supported(GSupplicantInterface *interface)
+{
+ if (!interface)
+ return false;
+
+ return interface->is_6_0_Ghz_supported;
+}
+
unsigned char *g_supplicant_interface_get_add_network_bssid(GSupplicantInterface *interface)
{
if (!interface)
@@ -2454,9 +2468,16 @@ static void merge_network(GSupplicantNetwork *network)
g_string_append_printf(str, "_mesh");
#endif
+#if defined TIZEN_EXT
+ if (g_strcmp0(key_mgmt, "WPA-PSK") == 0)
+ g_string_append_printf(str, "_psk");
+ else if (g_strcmp0(key_mgmt, "SAE") == 0)
+ g_string_append_printf(str, "_sae");
+#else
if ((g_strcmp0(key_mgmt, "WPA-PSK") == 0) ||
(g_strcmp0(key_mgmt, "SAE") == 0))
g_string_append_printf(str, "_psk");
+#endif
#if defined TIZEN_EXT
else if (g_strcmp0(key_mgmt, "WPA-EAP") == 0)
g_string_append_printf(str, "_ieee8021x");
@@ -2657,6 +2678,7 @@ static void update_network_with_best_bss(GSupplicantNetwork *network,
network->signal = best_bss->signal;
network->frequency = best_bss->frequency;
+ network->phy_mode = best_bss->phy_mode;
network->best_bss = best_bss;
}
@@ -3530,6 +3552,8 @@ static void update_signal(gpointer key, gpointer value,
if (!network->best_bss || (network->best_bss == bss)) {
if (bss->signal > network->signal) {
network->signal = bss->signal;
+ network->frequency = bss->frequency;
+ network->phy_mode = bss->phy_mode;
network->best_bss = bss;
}
return;
@@ -3615,10 +3639,10 @@ static void interface_current_bss(GSupplicantInterface *interface,
struct g_supplicant_bss *bss;
const char *path;
#if defined TIZEN_EXT
- char bssid_buff1[WIFI_BSSID_STR_LEN] = {0,};
- char bssid_buff2[WIFI_BSSID_STR_LEN] = {0,};
- char *bssid_str1 = bssid_buff1;
- char *bssid_str2 = bssid_buff2;
+ char curr_bssid_buff[WIFI_BSSID_STR_LEN] = {0,};
+ char best_bssid_buff[WIFI_BSSID_STR_LEN] = {0,};
+ char *curr_bssid_str = curr_bssid_buff;
+ char *best_bssid_str = best_bssid_buff;
gboolean update = FALSE;
#endif
@@ -3640,14 +3664,15 @@ static void interface_current_bss(GSupplicantInterface *interface,
interface->current_network = network;
#if defined TIZEN_EXT
- snprintf(bssid_str1, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(bss->bssid));
- snprintf(bssid_str2, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(network->best_bss->bssid));
+ snprintf(curr_bssid_str, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(bss->bssid));
+ snprintf(best_bssid_str, WIFI_BSSID_STR_LEN, MACSTR, MAC2STR(network->best_bss->bssid));
SUPPLICANT_DBG("current network [%p], Passed bss %s, best bss %s",
- interface->current_network, bssid_str1, bssid_str2);
+ interface->current_network, curr_bssid_str, best_bssid_str);
if (network->frequency != bss->frequency) {
network->frequency = bss->frequency;
+ network->phy_mode = bss->phy_mode;
update = TRUE;
}
#endif
@@ -4445,7 +4470,8 @@ static void signal_bss_changed(const char *path, DBusMessageIter *iter)
supplicant_dbus_property_foreach(iter, bss_property, bss);
#if defined TIZEN_EXT
- if (network->interface->state != G_SUPPLICANT_STATE_COMPLETED) {
+ if (network->interface->state != G_SUPPLICANT_STATE_COMPLETED &&
+ bss == network->best_bss) {
network->frequency = bss->frequency;
network->phy_mode = bss->phy_mode;
}
@@ -7369,12 +7395,6 @@ static void add_network_security_net_access_key(DBusMessageIter *dict, GSupplica
static void add_network_ieee80211w(DBusMessageIter *dict, GSupplicantSSID *ssid,
GSupplicantMfpOptions ieee80211w)
{
-#if defined TIZEN_EXT
- if (ssid->security != G_SUPPLICANT_SECURITY_OWE
- && ssid->security != G_SUPPLICANT_SECURITY_PSK_SHA256
- && ssid->security != G_SUPPLICANT_SECURITY_DPP)
- return;
-#endif
supplicant_dbus_dict_append_basic(dict, "ieee80211w", DBUS_TYPE_UINT32,
&ieee80211w);
}
@@ -7454,6 +7474,8 @@ static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid)
add_network_ieee80211w(dict, ssid, ieee80211w);
}
add_network_security_psk(dict, ssid);
+ add_network_security_ciphers(dict, ssid);
+ add_network_security_proto(dict, ssid);
break;
case G_SUPPLICANT_SECURITY_OWE:
key_mgmt = "OWE";
diff --git a/include/device.h b/include/device.h
index 8cc8ccef..acbd1d54 100755
--- a/include/device.h
+++ b/include/device.h
@@ -118,7 +118,10 @@ void connman_device_set_max_scan_ssids(struct connman_device *device,
int connman_device_get_max_scan_ssids(struct connman_device *device);
void connman_device_set_wifi_5ghz_supported(struct connman_device *device,
bool is_5_0_ghz_supported);
+void connman_device_set_wifi_6ghz_supported(struct connman_device *device,
+ bool is_6_0_ghz_supported);
bool connman_device_get_wifi_5ghz_supported(struct connman_device *device);
+bool connman_device_get_wifi_6ghz_supported(struct connman_device *device);
#endif
int connman_device_remove_network(struct connman_device *device,
struct connman_network *network);
diff --git a/plugins/wifi.c b/plugins/wifi.c
index befc7e2a..36e22620 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2718,7 +2718,17 @@ static void interface_create_callback(int result,
wifi->interface = interface;
g_supplicant_interface_set_data(interface, wifi);
+#ifdef TIZEN_EXT
+ if (interface && wifi->device &&
+ !connman_device_get_wifi_5ghz_supported(wifi->device) &&
+ !connman_device_get_wifi_6ghz_supported(wifi->device)) {
+ bool is_5_0_ghz_supported = g_supplicant_interface_get_is_5_0_ghz_supported(interface);
+ bool is_6_0_ghz_supported = g_supplicant_interface_get_is_6_0_ghz_supported(interface);
+ connman_device_set_wifi_5ghz_supported(wifi->device, is_5_0_ghz_supported);
+ connman_device_set_wifi_6ghz_supported(wifi->device, is_6_0_ghz_supported);
+ }
+#endif
if (g_supplicant_interface_get_ready(interface)) {
wifi->interface_ready = true;
finalize_interface_creation(wifi);
@@ -4485,6 +4495,7 @@ static void interface_added(GSupplicantInterface *interface)
#if defined TIZEN_EXT
bool is_5_0_ghz_supported = g_supplicant_interface_get_is_5_0_ghz_supported(interface);
+ bool is_6_0_ghz_supported = g_supplicant_interface_get_is_6_0_ghz_supported(interface);
#endif
struct wifi_data *wifi;
@@ -4512,6 +4523,7 @@ static void interface_added(GSupplicantInterface *interface)
connman_device_set_powered(wifi->device, true);
#if defined TIZEN_EXT
connman_device_set_wifi_5ghz_supported(wifi->device, is_5_0_ghz_supported);
+ connman_device_set_wifi_6ghz_supported(wifi->device, is_6_0_ghz_supported);
/* Max number of SSIDs supported by wlan chipset that can be scanned */
int max_scan_ssids = g_supplicant_interface_get_max_scan_ssids(interface);
connman_device_set_max_scan_ssids(wifi->device, max_scan_ssids);
diff --git a/src/connman-robot.conf b/src/connman-robot.conf
index b089f404..f123c25e 100644
--- a/src/connman-robot.conf
+++ b/src/connman-robot.conf
@@ -15,6 +15,7 @@
<allow send_destination="net.connman" send_type="signal"/>
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="GetScanState" />
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="Get5GhzSupported" />
+ <allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="Get6GHzSupported" />
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="GetMaxScanSsid" />
<allow send_destination="net.connman" send_interface="net.connman.Manager" send_member="GetTechnologies" />
diff --git a/src/connman.conf b/src/connman.conf
index 94f4a46d..2d51f0d0 100644
--- a/src/connman.conf
+++ b/src/connman.conf
@@ -15,6 +15,7 @@
<allow send_destination="net.connman" send_type="signal"/>
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="GetScanState" />
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="Get5GhzSupported" />
+ <allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="Get6GHzSupported" />
<allow send_destination="net.connman" send_interface="net.connman.Technology" send_member="GetMaxScanSsid" />
<check send_destination="net.connman" send_interface="net.connman.Manager" send_member="GetTechnologies" privilege="http://tizen.org/privilege/network.get" />
diff --git a/src/device.c b/src/device.c
index 51169001..1e3924b9 100755
--- a/src/device.c
+++ b/src/device.c
@@ -82,6 +82,7 @@ struct connman_device {
*/
int max_scan_ssids;
bool is_5_0_ghz_supported;
+ bool is_6_0_ghz_supported;
unsigned int mac_policy;
unsigned int preassoc_mac_policy;
unsigned int random_mac_lifetime;
@@ -1281,10 +1282,21 @@ void connman_device_set_wifi_5ghz_supported(struct connman_device *device,
device->is_5_0_ghz_supported = is_5_0_ghz_supported;
}
+void connman_device_set_wifi_6ghz_supported(struct connman_device *device,
+ bool is_6_0_ghz_supported)
+{
+ device->is_6_0_ghz_supported = is_6_0_ghz_supported;
+}
+
bool connman_device_get_wifi_5ghz_supported(struct connman_device *device)
{
return device->is_5_0_ghz_supported;
}
+
+bool connman_device_get_wifi_6ghz_supported(struct connman_device *device)
+{
+ return device->is_6_0_ghz_supported;
+}
#endif
/**
diff --git a/src/technology.c b/src/technology.c
index 44cd1169..4cc540bb 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -2104,6 +2104,41 @@ static DBusMessage *get_5ghz_supported(DBusConnection *conn, DBusMessage *msg, v
return reply;
}
+static DBusMessage *get_6ghz_supported(DBusConnection *conn, DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ DBusMessageIter iter, dict;
+ GSList *list;
+ struct connman_technology *technology = data;
+ dbus_bool_t supported = false;
+ const char *ifname = NULL;
+
+ DBG("technology %p", technology);
+
+ reply = dbus_message_new_method_return(msg);
+ if (!reply)
+ return NULL;
+
+ dbus_message_iter_init_append(reply, &iter);
+ connman_dbus_dict_open(&iter, &dict);
+
+ for (list = technology->device_list; list; list = list->next) {
+ struct connman_device *device = list->data;
+
+ supported = connman_device_get_wifi_6ghz_supported(device);
+ ifname = connman_device_get_string(device, "Interface");
+
+ DBG("ifname %s supported : %d", ifname, supported);
+ connman_dbus_dict_append_basic(&dict, ifname,
+ DBUS_TYPE_BOOLEAN,
+ &supported);
+ }
+
+ connman_dbus_dict_close(&iter, &dict);
+
+ return reply;
+}
+
static DBusMessage *get_scan_state(DBusConnection *conn, DBusMessage *msg, void *data)
{
DBusMessage *reply;
@@ -2882,6 +2917,8 @@ static const GDBusMethodTable technology_methods[] = {
get_scan_state) },
{ GDBUS_METHOD("Get5GhzSupported", NULL, GDBUS_ARGS({ "supported", "a{sv}" }),
get_5ghz_supported) },
+ { GDBUS_METHOD("Get6GHzSupported", NULL, GDBUS_ARGS({ "supported", "a{sv}" }),
+ get_6ghz_supported) },
{ GDBUS_METHOD("GetMaxScanSsid", NULL, GDBUS_ARGS({ "maxscanssid", "a{sv}" }),
get_max_scan_ssid) },
{ GDBUS_ASYNC_METHOD("SetDevicePower",