blob: 650da0e7e66b7148acf58c5a7b175fd5ba2a9e4e [file] [log] [blame]
From 665bc7cb59b4383aab615fff82fa601c468a4634 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 084/104] 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 3d69c9c49..6d300c0c8 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4472,7 +4472,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;
@@ -9205,8 +9205,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.39.2