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

frame-xchg: Add new groups to watch_groups list

I forgot to actually add new groups being created in
frame_watch_group_get to the watch_groups queue, meaning that we'd
re-create the group every time a new watch was added to the group.
This commit is contained in:
Andrew Zaborowski 2020-02-07 12:39:11 +01:00 committed by Denis Kenzior
parent 16cc2386f1
commit 053c1ca2a2

View File

@ -258,16 +258,19 @@ err:
static struct watch_group *frame_watch_group_get(uint64_t wdev_id, uint32_t id)
{
const struct l_queue_entry *entry;
struct watch_group *group;
for (entry = l_queue_get_entries(watch_groups); entry;
entry = entry->next) {
struct watch_group *group = entry->data;
group = entry->data;
if (group->id == id && (id == 0 || group->wdev_id == wdev_id))
return group;
}
return frame_watch_group_new(wdev_id, id);
group = frame_watch_group_new(wdev_id, id);
l_queue_push_tail(watch_groups, group);
return group;
}
static void frame_watch_register_cb(struct l_genl_msg *msg, void *user_data)