mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-18 08:32:33 +01:00
wiphy: expose the name property through DBus
This commit is contained in:
parent
04f4e8e0a3
commit
18886349df
17
src/wiphy.c
17
src/wiphy.c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user