From: Jouni Malinen Date: Tue, 15 Feb 2022 14:15:41 +0000 (+0200) Subject: nl80211: Clear the last saved TX frame cookie on wait expiration X-Git-Tag: hostap_2_11~2234 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e6f59c7027a08dad4dd022da975502fd53857d1;p=thirdparty%2Fhostap.git nl80211: Clear the last saved TX frame cookie on wait expiration 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 --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 40b3e1b5c..ce5a25beb 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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 diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index fdd32679d..b06320049 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -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;