]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Clear the last saved TX frame cookie on wait expiration
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 15 Feb 2022 14:15:41 +0000 (16:15 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 15 Feb 2022 14:24:43 +0000 (16:24 +0200)
drv->send_frame_cookies[] was already cleared, but
dev->send_frame_cookie was not. This resulted in unnecessary attempts of
canceling the TX wait for a wait that had already expired. While this
does not really result in real issues, it is cleaner to get rid of the
error messages from the debug log by skipping the unnecessary
operations.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211_event.c

index 40b3e1b5c5ed7139d960a4c79d5b1206f5f06e62..ce5a25beb15e65ac84a3bac2208581aa26c26d10 100644 (file)
@@ -8294,7 +8294,8 @@ static void wpa_driver_nl80211_send_action_cancel_wait(void *priv)
        u64 cookie;
 
        /* Cancel the last pending TX cookie */
-       nl80211_frame_wait_cancel(bss, drv->send_frame_cookie);
+       if (drv->send_frame_cookie != (u64) -1)
+               nl80211_frame_wait_cancel(bss, drv->send_frame_cookie);
 
        /*
         * Cancel the other pending TX cookies, if any. This is needed since
index fdd32679d1195105e449ffb38a7f82c5d185618b..b0632004950af1e9ded631d024f0709e8fd47269 100644 (file)
@@ -2880,9 +2880,12 @@ static void nl80211_frame_wait_cancel(struct wpa_driver_nl80211_data *drv,
                }
        }
        wpa_printf(MSG_DEBUG,
-                  "nl80211: TX frame wait expired for cookie 0x%llx%s",
+                  "nl80211: TX frame wait expired for cookie 0x%llx%s%s",
                   (long long unsigned int) cookie,
-                  match ? " (match)" : "");
+                  match ? " (match)" : "",
+                  drv->send_frame_cookie == cookie ? " (match-saved)" : "");
+       if (drv->send_frame_cookie == cookie)
+               drv->send_frame_cookie = (u64) -1;
        if (!match)
                return;