mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +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:
parent
10d96e5c19
commit
48b90febf1
@ -2051,19 +2051,9 @@ error:
|
|||||||
static void hwsim_ready(void *user_data)
|
static void hwsim_ready(void *user_data)
|
||||||
{
|
{
|
||||||
struct l_genl_msg *msg;
|
struct l_genl_msg *msg;
|
||||||
int ret;
|
|
||||||
size_t msg_size;
|
size_t msg_size;
|
||||||
uint32_t radio_id;
|
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) {
|
switch (action) {
|
||||||
case ACTION_LIST:
|
case ACTION_LIST:
|
||||||
msg = l_genl_msg_new_sized(HWSIM_CMD_GET_RADIO,
|
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())
|
if (!setup_dbus_hwsim())
|
||||||
goto error;
|
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,
|
l_genl_family_set_watches(nl80211, nl80211_ready, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user