developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 1 | From 016e41e3031fe6c2d5c12f29f47616f7a1b7dabf Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Mon, 18 Dec 2023 18:53:35 +0800 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 064/126] mtk: hostapd: update cookie only when noack is unset |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | |
| 6 | This can prevent cookie unmatched problems during setup. |
| 7 | |
| 8 | Signed-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 | |
| 13 | diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 14 | index 7cb65a2bc..4b404f0bb 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 15 | --- a/src/drivers/driver_nl80211.c |
| 16 | +++ b/src/drivers/driver_nl80211.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 17 | @@ -4485,7 +4485,7 @@ send_frame_cmd: |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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; |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 26 | @@ -9200,8 +9200,8 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 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 | -- |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 38 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 39 | |