summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2018-11-06 10:38:29 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2018-11-06 10:38:29 +0000
commitbf7dbf8354f076ec768ae24e61d6fb1e46c623af (patch)
tree69162a64189dd08a7d4198cd3aa03c047645b09d /src
parent271ae828d35c8814e18b3de80cb835513640c0db (diff)
parent3c5d316b64f60ee6fb7b2bb85c22fad385cb0f91 (diff)
downloadconnman-bf7dbf8354f076ec768ae24e61d6fb1e46c623af.tar.gz
connman-bf7dbf8354f076ec768ae24e61d6fb1e46c623af.tar.bz2
connman-bf7dbf8354f076ec768ae24e61d6fb1e46c623af.zip
Diffstat (limited to 'src')
-rw-r--r--src/connman.h1
-rwxr-xr-xsrc/network.c30
-rw-r--r--src/service.c4
3 files changed, 35 insertions, 0 deletions
diff --git a/src/connman.h b/src/connman.h
index 905467e8..610f63bc 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -26,6 +26,7 @@
#define CONNMAN_API_SUBJECT_TO_CHANGE
#if defined TIZEN_EXT
#define WIFI_COUNTRY_CODE_LEN 2
+#define WIFI_PHY_MODE_LEN 18
#endif
#include <connman/dbus.h>
diff --git a/src/network.c b/src/network.c
index 85eb0fdd..b7103683 100755
--- a/src/network.c
+++ b/src/network.c
@@ -122,6 +122,8 @@ struct connman_network {
char *phase1;
unsigned char country_code[WIFI_COUNTRY_CODE_LEN];
GSList *bssid_list;
+ ieee80211_modes_e phy_mode;
+ connection_mode_e connection_mode;
#endif
} wifi;
@@ -2130,6 +2132,34 @@ int connman_network_set_bssid_list(struct connman_network *network,
return 0;
}
+int connman_network_set_phy_mode(struct connman_network *network,
+ ieee80211_modes_e mode)
+{
+ DBG("network %p phy mode %d", network, mode);
+ network->wifi.phy_mode = mode;
+
+ return 0;
+}
+
+ieee80211_modes_e connman_network_get_phy_mode(struct connman_network *network)
+{
+ return network->wifi.phy_mode;
+}
+
+int connman_network_set_connection_mode(struct connman_network *network,
+ connection_mode_e mode)
+{
+ DBG("network %p connection mode %d", network, mode);
+ network->wifi.connection_mode = mode;
+
+ return 0;
+}
+
+connection_mode_e connman_network_get_connection_mode(struct connman_network *network)
+{
+ return network->wifi.connection_mode;
+}
+
void *connman_network_get_bssid_list(struct connman_network *network)
{
return network->wifi.bssid_list;
diff --git a/src/service.c b/src/service.c
index ea61f324..777db8f5 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3262,6 +3262,7 @@ static void append_wifi_ext_info(DBusMessageIter *dict,
char country_code_buff[WIFI_COUNTRY_CODE_LEN + 1] = {0,};
char *country_code_str = country_code_buff;
unsigned char *country_code;
+ uint16_t connection_mode;
ssid = connman_network_get_blob(network, "WiFi.SSID", &ssid_len);
bssid = connman_network_get_bssid(network);
@@ -3272,6 +3273,7 @@ static void append_wifi_ext_info(DBusMessageIter *dict,
passpoint = connman_network_get_bool(network, "WiFi.HS20AP");
keymgmt = connman_network_get_keymgmt(network);
country_code = connman_network_get_countrycode(network);
+ connection_mode = connman_network_get_connection_mode(network);
snprintf(bssid_str, WIFI_BSSID_STR_LEN, "%02x:%02x:%02x:%02x:%02x:%02x",
bssid[0], bssid[1], bssid[2],
@@ -3299,6 +3301,8 @@ static void append_wifi_ext_info(DBusMessageIter *dict,
DBUS_TYPE_UINT32, &keymgmt);
connman_dbus_dict_append_basic(dict, "Country", DBUS_TYPE_STRING,
&country_code_str);
+ connman_dbus_dict_append_basic(dict, "ConnMode",
+ DBUS_TYPE_UINT16, &connection_mode);
str = connman_network_get_string(network, "WiFi.Security");
if (str != NULL && g_str_equal(str, "ieee8021x") == TRUE) {