developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 1 | From 761a5a50507b7af032ba35a08d8b3fa0a3b8991a Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: Howard Hsu <howard-yh.hsu@mediatek.com> |
| 3 | Date: Thu, 22 Sep 2022 16:08:09 +0800 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 4 | Subject: [PATCH 020/126] mtk: hostapd: Do not include HE capab IE if |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | associated sta's HE capab IE is invalid |
| 6 | |
| 7 | The parameter 'sta' passed to send_assoc_resp() might be NULL, so an |
| 8 | NULL check is necessary before access the 'sta'. |
| 9 | Only one such check was missed in this function, and this patch fixs it. |
| 10 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 11 | Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 12 | --- |
| 13 | src/ap/ieee802_11.c | 3 ++- |
| 14 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 17 | index 39b1bb4c7..18d5b8f79 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 18 | --- a/src/ap/ieee802_11.c |
| 19 | +++ b/src/ap/ieee802_11.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 20 | @@ -5007,7 +5007,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 21 | #endif /* CONFIG_IEEE80211AC */ |
| 22 | |
| 23 | #ifdef CONFIG_IEEE80211AX |
| 24 | - if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) { |
| 25 | + if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax && sta && |
| 26 | + sta->flags & WLAN_STA_HE) { |
| 27 | p = hostapd_eid_he_capab(hapd, p, IEEE80211_MODE_AP); |
| 28 | p = hostapd_eid_he_operation(hapd, p); |
| 29 | p = hostapd_eid_cca(hapd, p); |
| 30 | -- |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 31 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 32 | |