nl80211: Do not store no-wait TX frame cookies to be cancelled

If the TX frame operation does not request any wait time, there is not
going to be any pending wait that could be cancelled later. As such,
there is no need to store the cookie value for these cases. This removes
unnecessary cancel-TX-wait operations that would result in some extra
latency and confusing debug log entries.

This was found with the following hwsim test case sequence where the
second test was failing due to the extra latency and this commit gets
rid of that failure:
rrm_ftm_range_req_timeout dpp_qr_code_auth_neg_chan

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-02-16 21:09:57 +02:00 committed by Jouni Malinen
parent 64008a1ee8
commit 42944de69b

View file

@ -8164,6 +8164,11 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
if (save_cookie)
drv->send_frame_cookie = no_ack ? (u64) -1 : cookie;
if (!wait) {
/* There is no need to store this cookie since there
* is no wait that could be canceled later. */
goto fail;
}
if (drv->num_send_frame_cookies == MAX_SEND_FRAME_COOKIES) {
wpa_printf(MSG_DEBUG,
"nl80211: Drop oldest pending send frame cookie 0x%llx",