blob: 60e5325d343105a0780dfb8a64dc8fbe6f110486 [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 016e41e3031fe6c2d5c12f29f47616f7a1b7dabf Mon Sep 17 00:00:00 2001
developer66e89bc2024-04-23 14:50:01 +08002From: Shayne Chen <shayne.chen@mediatek.com>
3Date: Mon, 18 Dec 2023 18:53:35 +0800
developer05f3b2b2024-08-19 19:17:34 +08004Subject: [PATCH 064/126] mtk: hostapd: update cookie only when noack is unset
developer66e89bc2024-04-23 14:50:01 +08005
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
developer05f3b2b2024-08-19 19:17:34 +080014index 7cb65a2bc..4b404f0bb 100644
developer66e89bc2024-04-23 14:50:01 +080015--- a/src/drivers/driver_nl80211.c
16+++ b/src/drivers/driver_nl80211.c
developer05f3b2b2024-08-19 19:17:34 +080017@@ -4485,7 +4485,7 @@ send_frame_cmd:
developer66e89bc2024-04-23 14:50:01 +080018 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;
developer05f3b2b2024-08-19 19:17:34 +080026@@ -9200,8 +9200,8 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
developer66e89bc2024-04-23 14:50:01 +080027 "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--
developer05f3b2b2024-08-19 19:17:34 +0800382.18.0
developer66e89bc2024-04-23 14:50:01 +080039