blob: 60e5325d343105a0780dfb8a64dc8fbe6f110486 [file] [log] [blame]
From 016e41e3031fe6c2d5c12f29f47616f7a1b7dabf Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Mon, 18 Dec 2023 18:53:35 +0800
Subject: [PATCH 064/126] mtk: hostapd: update cookie only when noack is unset
This can prevent cookie unmatched problems during setup.
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
src/drivers/driver_nl80211.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 7cb65a2bc..4b404f0bb 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4485,7 +4485,7 @@ send_frame_cmd:
res = nl80211_send_frame_cmd(bss, freq, wait_time, data, data_len,
use_cookie, no_cck, noack, offchanok,
csa_offs, csa_offs_len, link_id);
- if (!res)
+ if (!res && !noack)
drv->send_frame_link_id = link_id;
return res;
@@ -9200,8 +9200,8 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
"cookie 0x%llx", no_ack ? " (no ACK)" : "",
(long long unsigned int) cookie);
- if (save_cookie)
- drv->send_frame_cookie = no_ack ? (u64) -1 : cookie;
+ if (save_cookie && !no_ack)
+ drv->send_frame_cookie = cookie;
if (!wait) {
/* There is no need to store this cookie since there
--
2.18.0