mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 17:59:25 +01:00
hwsim: add NoVirtualInterface option to DBus API
This was available with --no-interface but no such option existed for the DBus API.
This commit is contained in:
parent
cb76f219fb
commit
7b5f640931
@ -1707,6 +1707,7 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus *dbus,
|
|||||||
bool p2p = false;
|
bool p2p = false;
|
||||||
const char *disabled_iftypes = NULL;
|
const char *disabled_iftypes = NULL;
|
||||||
const char *disabled_ciphers = NULL;
|
const char *disabled_ciphers = NULL;
|
||||||
|
bool no_vif = false;
|
||||||
struct radio_info_rec *radio;
|
struct radio_info_rec *radio;
|
||||||
|
|
||||||
if (!l_dbus_message_get_arguments(message, "a{sv}", &dict))
|
if (!l_dbus_message_get_arguments(message, "a{sv}", &dict))
|
||||||
@ -1727,6 +1728,10 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus *dbus,
|
|||||||
else if (!strcmp(key, "CipherTypeDisable"))
|
else if (!strcmp(key, "CipherTypeDisable"))
|
||||||
ret = l_dbus_message_iter_get_variant(&variant, "s",
|
ret = l_dbus_message_iter_get_variant(&variant, "s",
|
||||||
&disabled_ciphers);
|
&disabled_ciphers);
|
||||||
|
else if (!strcmp(key, "NoVirtualInterface"))
|
||||||
|
ret = l_dbus_message_iter_get_variant(&variant, "b",
|
||||||
|
&no_vif);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
goto invalid;
|
goto invalid;
|
||||||
}
|
}
|
||||||
@ -1765,6 +1770,9 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus *dbus,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (no_vif)
|
||||||
|
l_genl_msg_append_attr(new_msg, HWSIM_ATTR_NO_VIF, 0, NULL);
|
||||||
|
|
||||||
radio = l_new(struct radio_info_rec, 1);
|
radio = l_new(struct radio_info_rec, 1);
|
||||||
radio->pending = l_dbus_message_ref(message);
|
radio->pending = l_dbus_message_ref(message);
|
||||||
radio->name = l_strdup(name);
|
radio->name = l_strdup(name);
|
||||||
|
Loading…
Reference in New Issue
Block a user