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;