developer | f9b0021 | 2023-07-31 12:27:06 +0800 | [diff] [blame^] | 1 | From ad503bc69ccedcc7272d85ad9ebb2a5653853a15 Mon Sep 17 00:00:00 2001 |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 2 | From: MeiChia Chiu <meichia.chiu@mediatek.com> |
| 3 | Date: Tue, 17 Jan 2023 13:25:18 +0800 |
developer | f9b0021 | 2023-07-31 12:27:06 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 14/35] hostapd: mtk: Add the broadcast destination address of |
developer | d8126d1 | 2023-02-17 11:50:45 +0800 | [diff] [blame] | 5 | Probe Response frame on 6 GHz |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 6 | |
| 7 | According to IEEE 802.11ax 26.17.2.3.2, |
| 8 | if a 6 GHz AP receives a Probe Request frame and responds with a Probe Response frame, |
| 9 | the Address 1 field of the Probe Response frame shall be set to the broadcast address, |
| 10 | unless the AP is not indicating its actual SSID in the SSID element of its Beacon frames. |
| 11 | |
| 12 | Without this, hostapd fill the Address 1 feild of the Probe Response frame |
| 13 | with the source address from Probe Request frame on 6 GHz. |
| 14 | Fix this to use broadcast address instead. |
| 15 | |
| 16 | Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com> |
| 17 | --- |
| 18 | src/ap/beacon.c | 9 +++++++-- |
| 19 | 1 file changed, 7 insertions(+), 2 deletions(-) |
| 20 | |
| 21 | diff --git a/src/ap/beacon.c b/src/ap/beacon.c |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 22 | index 1a26f11..f3ea5c2 100644 |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 23 | --- a/src/ap/beacon.c |
| 24 | +++ b/src/ap/beacon.c |
| 25 | @@ -1156,8 +1156,13 @@ void handle_probe_req(struct hostapd_data *hapd, |
| 26 | wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, RX_PROBE_REQUEST "sa=" MACSTR |
| 27 | " signal=%d", MAC2STR(mgmt->sa), ssi_signal); |
| 28 | |
| 29 | - resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL, |
| 30 | - &resp_len, false); |
| 31 | + if (is_6ghz_op_class(hapd->iconf->op_class) && |
| 32 | + is_broadcast_ether_addr(mgmt->da)) |
| 33 | + resp = hostapd_gen_probe_resp(hapd, NULL, elems.p2p != NULL, |
| 34 | + &resp_len, true); |
| 35 | + else |
| 36 | + resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL, |
| 37 | + &resp_len, false); |
| 38 | if (resp == NULL) |
| 39 | return; |
| 40 | |
| 41 | -- |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 42 | 2.18.0 |
developer | 092b55c | 2023-01-18 18:20:58 +0800 | [diff] [blame] | 43 | |