3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

wiphy: expose the name property through DBus

This commit is contained in:
Tim Kourt 2017-02-21 14:11:22 -05:00 committed by Denis Kenzior
parent 04f4e8e0a3
commit 18886349df

View File

@ -703,6 +703,21 @@ static bool wiphy_property_get_vendor(struct l_dbus *dbus,
return true;
}
static bool wiphy_property_get_name(struct l_dbus *dbus,
struct l_dbus_message *message,
struct l_dbus_message_builder *builder,
void *user_data)
{
struct wiphy *wiphy = user_data;
if (!wiphy->name)
return false;
l_dbus_message_builder_append_basic(builder, 's', wiphy->name);
return true;
}
static void setup_wiphy_interface(struct l_dbus_interface *interface)
{
l_dbus_interface_property(interface, "Powered", 0, "b",
@ -712,6 +727,8 @@ static void setup_wiphy_interface(struct l_dbus_interface *interface)
wiphy_property_get_model, NULL);
l_dbus_interface_property(interface, "Vendor", 0, "s",
wiphy_property_get_vendor, NULL);
l_dbus_interface_property(interface, "Name", 0, "s",
wiphy_property_get_name, NULL);
}
bool wiphy_init(struct l_genl_family *in)