blob: 5a606dec075082465b0d4ff3a7f326419ac0c861 [file] [log] [blame]
From 198cde72f44444efc1036880cd038bd9c3534142 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 65/69] 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 17774cce0..7ba021578 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;
@@ -9194,8 +9194,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