| From 52a1775318c9926a1dbf4f7c563e95b5be3c9bd6 Mon Sep 17 00:00:00 2001 |
| From: MeiChia Chiu <meichia.chiu@mediatek.com> |
| Date: Tue, 17 Jan 2023 13:25:18 +0800 |
| Subject: [PATCH 13/15] hostapd: mtk: Add the broadcast destination address of |
| Probe Response frame on 6 GHz |
| |
| According to IEEE 802.11ax 26.17.2.3.2, |
| if a 6 GHz AP receives a Probe Request frame and responds with a Probe Response frame, |
| the Address 1 field of the Probe Response frame shall be set to the broadcast address, |
| unless the AP is not indicating its actual SSID in the SSID element of its Beacon frames. |
| |
| Without this, hostapd fill the Address 1 feild of the Probe Response frame |
| with the source address from Probe Request frame on 6 GHz. |
| Fix this to use broadcast address instead. |
| |
| Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com> |
| --- |
| src/ap/beacon.c | 9 +++++++-- |
| 1 file changed, 7 insertions(+), 2 deletions(-) |
| |
| diff --git a/src/ap/beacon.c b/src/ap/beacon.c |
| index 1a26f11ff..f3ea5c277 100644 |
| --- a/src/ap/beacon.c |
| +++ b/src/ap/beacon.c |
| @@ -1156,8 +1156,13 @@ void handle_probe_req(struct hostapd_data *hapd, |
| wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, RX_PROBE_REQUEST "sa=" MACSTR |
| " signal=%d", MAC2STR(mgmt->sa), ssi_signal); |
| |
| - resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL, |
| - &resp_len, false); |
| + if (is_6ghz_op_class(hapd->iconf->op_class) && |
| + is_broadcast_ether_addr(mgmt->da)) |
| + resp = hostapd_gen_probe_resp(hapd, NULL, elems.p2p != NULL, |
| + &resp_len, true); |
| + else |
| + resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL, |
| + &resp_len, false); |
| if (resp == NULL) |
| return; |
| |
| -- |
| 2.25.1 |
| |