3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

hwsim: Don't handle netlink events in command mode

Don't handle the hwsim netlink events we use to track radios and
interfaces if we're not in daemon mode.  This quiets dbus errors when
using hwsim through the command line.
This commit is contained in:
Andrew Zaborowski 2017-03-14 00:51:19 +01:00 committed by Denis Kenzior
parent 10d96e5c19
commit 48b90febf1

View File

@ -2051,19 +2051,9 @@ error:
static void hwsim_ready(void *user_data)
{
struct l_genl_msg *msg;
int ret;
size_t msg_size;
uint32_t radio_id;
ret = l_genl_family_register(hwsim, "config", hwsim_config,
NULL, NULL);
if (!ret) {
fprintf(stderr, "Failed to create hwsim config listener\n");
exit_status = EXIT_FAILURE;
l_main_quit();
return;
}
switch (action) {
case ACTION_LIST:
msg = l_genl_msg_new_sized(HWSIM_CMD_GET_RADIO,
@ -2135,6 +2125,12 @@ static void hwsim_ready(void *user_data)
if (!setup_dbus_hwsim())
goto error;
if (!l_genl_family_register(hwsim, "config", hwsim_config,
NULL, NULL)) {
l_error("Failed to create hwsim config listener\n");
goto error;
}
l_genl_family_set_watches(nl80211, nl80211_ready, NULL,
NULL, NULL);