X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Ftechnology.c;h=05ec0c0c0f928d3adc8dbce8bb25be283f8dee5f;hb=48e25ec7f60ffcba067708732298fd85a2b3ed47;hp=6604599e854ac6aa9b7d186fa928c35a3f319101;hpb=bf7dbf8354f076ec768ae24e61d6fb1e46c623af;p=platform%2Fupstream%2Fconnman.git diff --git a/src/technology.c b/src/technology.c index 6604599..05ec0c0 100644 --- a/src/technology.c +++ b/src/technology.c @@ -98,6 +98,9 @@ struct connman_technology { #if defined TIZEN_EXT_WIFI_MESH DBusMessage *mesh_dbus_msg; #endif +#if defined TIZEN_EXT + bool is_5_0_ghz_supported; +#endif }; static GSList *driver_list = NULL; @@ -394,6 +397,16 @@ bool connman_technology_get_wifi_tethering(const char **ssid, return true; } +#if defined TIZEN_EXT +void connman_techonology_wifi_set_5ghz_supported(struct connman_technology *wifi_technology, + bool is_5_0_ghz_supported) +{ + DBG(""); + + wifi_technology->is_5_0_ghz_supported = is_5_0_ghz_supported; +} +#endif + static void free_rfkill(gpointer data) { struct connman_rfkill *rfkill = data; @@ -1410,6 +1423,33 @@ static DBusMessage *specific_scan(DBusConnection *conn, DBusMessage *msg, void * return NULL; } +#if defined TIZEN_EXT +static DBusMessage *get_5ghz_supported(DBusConnection *conn, DBusMessage *msg, void *data) +{ + DBusMessage *reply; + DBusMessageIter iter, dict; + struct connman_technology *technology = data; + dbus_bool_t supported = technology->is_5_0_ghz_supported; + + 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); + connman_dbus_dict_append_basic(&dict, "Is5GhzSupported", + DBUS_TYPE_BOOLEAN, + &supported); + + connman_dbus_dict_close(&iter, &dict); + + return reply; +} +#endif + static DBusMessage *get_scan_state(DBusConnection *conn, DBusMessage *msg, void *data) { DBusMessage *reply; @@ -1923,6 +1963,8 @@ static const GDBusMethodTable technology_methods[] = { NULL, specific_scan) }, { GDBUS_METHOD("GetScanState", NULL, GDBUS_ARGS({ "scan_state", "a{sv}" }), get_scan_state) }, + { GDBUS_METHOD("Get5GhzSupported", NULL, GDBUS_ARGS({ "supported", "a{sv}" }), + get_5ghz_supported) }, #endif #if defined TIZEN_EXT_WIFI_MESH { GDBUS_ASYNC_METHOD("MeshCommands",