blob: 650da0e7e66b7148acf58c5a7b175fd5ba2a9e4e [file] [log] [blame]
developer66e89bc2024-04-23 14:50:01 +08001From 665bc7cb59b4383aab615fff82fa601c468a4634 Mon Sep 17 00:00:00 2001
2From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Mon, 18 Dec 2023 18:53:35 +0800
4Subject: [PATCH 084/104] mtk: hostapd: update cookie only when noack is unset
5
6This can prevent cookie unmatched problems during setup.
7
8Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
9---
10 src/drivers/driver_nl80211.c | 6 +++---
11 1 file changed, 3 insertions(+), 3 deletions(-)
12
13diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
14index 3d69c9c49..6d300c0c8 100644
15--- a/src/drivers/driver_nl80211.c
16+++ b/src/drivers/driver_nl80211.c
17@@ -4472,7 +4472,7 @@ send_frame_cmd:
18 res = nl80211_send_frame_cmd(bss, freq, wait_time, data, data_len,
19 use_cookie, no_cck, noack, offchanok,
20 csa_offs, csa_offs_len, link_id);
21- if (!res)
22+ if (!res && !noack)
23 drv->send_frame_link_id = link_id;
24
25 return res;
26@@ -9205,8 +9205,8 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
27 "cookie 0x%llx", no_ack ? " (no ACK)" : "",
28 (long long unsigned int) cookie);
29
30- if (save_cookie)
31- drv->send_frame_cookie = no_ack ? (u64) -1 : cookie;
32+ if (save_cookie && !no_ack)
33+ drv->send_frame_cookie = cookie;
34
35 if (!wait) {
36 /* There is no need to store this cookie since there
37--
382.39.2
39