commit 28d3eed32e665d67f0769afcd5f07918a6328236
parent 736aadc75f23331bd0dc8c35c6925c8f381bbb06
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Fri, 31 Jul 2020 03:31:25 +0200
frame-xchg: Improve search for current frame in MLME notify
Since there may now be multiple frames-xchg record for each wdev, when
we receive the TX Status event, make sure we find the record who's radio
work has started, as indicated by fx->retry_cnt > 0. Otherwise we're
relying on the ordering of the frames in the "frame_xchgs" queue and
constant priority.
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/frame-xchg.c b/src/frame-xchg.c
@@ -1057,12 +1057,12 @@ static void frame_xchg_resp_cb(const struct mmpdu_header *mpdu,
frame_xchg_resp_handle(mpdu, body, body_len, rssi, user_data);
}
-static bool frame_xchg_match(const void *a, const void *b)
+static bool frame_xchg_match_running(const void *a, const void *b)
{
const struct frame_xchg_data *fx = a;
const uint64_t *wdev_id = b;
- return fx->wdev_id == *wdev_id;
+ return fx->retry_cnt > 0 && fx->wdev_id == *wdev_id;
}
/*
@@ -1225,7 +1225,8 @@ static void frame_xchg_mlme_notify(struct l_genl_msg *msg, void *user_data)
l_debug("Received %s", ack ? "an ACK" : "no ACK");
- fx = l_queue_find(frame_xchgs, frame_xchg_match, &wdev_id);
+ fx = l_queue_find(frame_xchgs, frame_xchg_match_running,
+ &wdev_id);
if (!fx)
return;