diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/network.c | 21 | ||||
-rwxr-xr-x | src/service.c | 4 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/network.c b/src/network.c index cf746829..f67dbb68 100755 --- a/src/network.c +++ b/src/network.c @@ -97,6 +97,8 @@ struct connman_network { unsigned char bssid[WIFI_BSSID_LEN_MAX]; unsigned int maxrate; unsigned int isHS20AP; + unsigned int keymgmt; + char *keymgmt_type; bool rsn_selected; #endif } wifi; @@ -1941,6 +1943,25 @@ unsigned int connman_network_get_is_hs20AP(struct connman_network *network) return network->wifi.isHS20AP; } + +int connman_network_set_keymgmt(struct connman_network *network, + unsigned int keymgmt) +{ + if (network == NULL) + return 0; + + network->wifi.keymgmt = keymgmt; + + return 0; +} + +unsigned int connman_network_get_keymgmt(struct connman_network *network) +{ + if (network == NULL) + return 0; + + return network->wifi.keymgmt; +} #endif int connman_network_set_nameservers(struct connman_network *network, diff --git a/src/service.c b/src/service.c index 2baf8716..1fbcc74f 100755 --- a/src/service.c +++ b/src/service.c @@ -2727,6 +2727,7 @@ static void append_wifi_ext_info(DBusMessageIter *dict, char *bssid_str = bssid_buff; unsigned char *bssid; unsigned int maxrate; + unsigned int keymgmt; uint16_t frequency; const char *enc_mode; gboolean passpoint; @@ -2736,6 +2737,7 @@ static void append_wifi_ext_info(DBusMessageIter *dict, frequency = connman_network_get_frequency(network); enc_mode = connman_network_get_enc_mode(network); passpoint = connman_network_get_is_hs20AP(network); + keymgmt = connman_network_get_keymgmt(network); snprintf(bssid_str, WIFI_BSSID_STR_LEN, "%02x:%02x:%02x:%02x:%02x:%02x", bssid[0], bssid[1], bssid[2], @@ -2751,6 +2753,8 @@ static void append_wifi_ext_info(DBusMessageIter *dict, DBUS_TYPE_STRING, &enc_mode); connman_dbus_dict_append_basic(dict, "Passpoint", DBUS_TYPE_BOOLEAN, &passpoint); + connman_dbus_dict_append_basic(dict, "Keymgmt", + DBUS_TYPE_UINT32, &keymgmt); } #endif |