]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Indicate EVENT_TX_WAIT_EXPIRE on match-saved
authorJouni Malinen <j@w1.fi>
Sat, 2 Mar 2024 17:34:17 +0000 (19:34 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 2 Mar 2024 17:39:49 +0000 (19:39 +0200)
The event indicating expiration of an offchannel TX is useful for cases
where the wait is for a frame that was explicitly requested to have the
pending cookie to be saved.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211_event.c

index 38a5fe1b94bedc790c8590ffa5470e6dfc4edbd4..02c6eae4962783ba48e9d0b000bc283ba5ea08fb 100644 (file)
@@ -3736,8 +3736,11 @@ static void nl80211_frame_wait_cancel(struct wpa_driver_nl80211_data *drv,
                   (long long unsigned int) cookie,
                   match ? " (match)" : "",
                   drv->send_frame_cookie == cookie ? " (match-saved)" : "");
-       if (drv->send_frame_cookie == cookie)
+       if (drv->send_frame_cookie == cookie) {
                drv->send_frame_cookie = (u64) -1;
+               if (!match)
+                       goto send_event;
+       }
        if (!match)
                return;
 
@@ -3747,6 +3750,7 @@ static void nl80211_frame_wait_cancel(struct wpa_driver_nl80211_data *drv,
                           (drv->num_send_frame_cookies - i - 1) * sizeof(u64));
        drv->num_send_frame_cookies--;
 
+send_event:
        wpa_supplicant_event(drv->ctx, EVENT_TX_WAIT_EXPIRE, NULL);
 }