mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 05:39:24 +01:00
offchannel: Use roc id in offchannel_cancel lookup
Instead of looking up by wdev, lookup by the ID itself. We shouldn't ever have more than one info per wdev in the queue but looking up the _exact_ info structure doesn't hurt in case things change in the future.
This commit is contained in:
parent
ef27f87dbe
commit
0a502562c3
@ -65,6 +65,14 @@ static bool match_wdev(const void *a, const void *user_data)
|
|||||||
return info->wdev_id == *wdev_id;
|
return info->wdev_id == *wdev_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool match_id(const void *a, const void *user_data)
|
||||||
|
{
|
||||||
|
const struct offchannel_info *info = a;
|
||||||
|
uint32_t id = L_PTR_TO_UINT(user_data);
|
||||||
|
|
||||||
|
return id == info->work.id;
|
||||||
|
}
|
||||||
|
|
||||||
static void offchannel_cancel_roc(struct offchannel_info *info)
|
static void offchannel_cancel_roc(struct offchannel_info *info)
|
||||||
{
|
{
|
||||||
struct l_genl_msg *msg;
|
struct l_genl_msg *msg;
|
||||||
@ -191,7 +199,8 @@ void offchannel_cancel(uint64_t wdev_id, uint32_t id)
|
|||||||
else if (ret == false)
|
else if (ret == false)
|
||||||
goto work_done;
|
goto work_done;
|
||||||
|
|
||||||
info = l_queue_find(offchannel_list, match_wdev, &wdev_id);
|
|
||||||
|
info = l_queue_find(offchannel_list, match_id, L_UINT_TO_PTR(id));
|
||||||
if (!info)
|
if (!info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user