blob: 1deaede818636fa6bb981ab8e632e4648c70a608 [file] [log] [blame]
From f9b54baaa5037a174963b2dc255a16e60a9cade8 Mon Sep 17 00:00:00 2001
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
Date: Tue, 27 Feb 2024 15:04:35 +0800
Subject: [PATCH 072/126] mtk: hostapd: specify link id for unicast DEAUTH
When deauthenticating the STA, hostapd should specifies the setup link
of the target STA so that the TX status of the DEAUTH can be forwarded
to the correct link (BSS).
(The original gerrit somehow disappears, so I commit it again)
(https://gerrit.mediatek.inc/c/gateway/WiFi7/mac80211/hostapd/+/8715613)
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
---
src/ap/ap_drv_ops.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index f51d5be8e..34c2ff211 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -896,7 +896,11 @@ int hostapd_drv_sta_deauth(struct hostapd_data *hapd,
if (hapd->conf->mld_ap) {
struct sta_info *sta = ap_get_sta(hapd, addr);
- link_id = hapd->mld_link_id;
+ if (sta)
+ link_id = sta->mld_assoc_link_id;
+ else
+ link_id = hapd->mld_link_id;
+
if (ap_sta_is_mld(hapd, sta))
own_addr = hapd->mld->mld_addr;
}
--
2.18.0