summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorWei Zhang <wei.zhang@oss.qualcomm.com>2026-05-27 01:59:58 -0700
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-05-31 03:08:56 -0700
commitfeb24a676b01c4f594fd2509756f006a3d84de22 (patch)
treeb24045ee3203fda28878c8ae61e1438b8bfd1207 /meta-oe
parente63ecd6b7c552ee7a46086cb182ca36a0ee07941 (diff)
downloadmeta-openembedded-feb24a676b01c4f594fd2509756f006a3d84de22.tar.gz
hostapd: Fix clearing settings for color switch
cca_settings is used without zero initialization, which may introduce random values and result in invalid nl80211 attributes. Without this fix, BSS color switch may fail completely and the feature becomes non-functional. Initialize the structure before use. Signed-off-by: Wei Zhang <wei.zhang@oss.qualcomm.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd/0002-hostapd-Fix-clearing-up-settings-for-color-switch.patch34
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd/0002-hostapd-Fix-clearing-up-settings-for-color-switch.patch b/meta-oe/recipes-connectivity/hostapd/hostapd/0002-hostapd-Fix-clearing-up-settings-for-color-switch.patch
new file mode 100644
index 0000000000..5d6cce3f14
--- /dev/null
+++ b/meta-oe/recipes-connectivity/hostapd/hostapd/0002-hostapd-Fix-clearing-up-settings-for-color-switch.patch
@@ -0,0 +1,34 @@
1From 161327f91d956771996c96ea1b6e4e1cb8dc074c Mon Sep 17 00:00:00 2001
2From: Stone Zhang <quic_stonez@quicinc.com>
3Date: Mon, 14 Oct 2024 18:47:32 +0800
4Subject: [PATCH] hostapd: Fix clearing up settings for color switch
5
6Settings for color switch (struct cca_settings settings)
7is used without zero clearing, which causes the member
8settings->ubpr->unsol_bcast_probe_resp_intervalettings
9to be a random value. It is againsts the NLA policy of
10NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT and causes
11BSS color switch failure.
12
13Fixes: 654d2395dddf ("BSS coloring: Handling of collision events and triggering CCA")
14Signed-off-by: Stone Zhang <quic_stonez@quicinc.com>
15Upstream-Status: Backport [https://w1.fi/cgit/hostap.git/commit/?id=161327f91d956771996c96ea1b6e4e1cb8dc074c]
16---
17 src/ap/hostapd.c | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
21index 5ba2cab2c..90e93b6dc 100644
22--- a/src/ap/hostapd.c
23+++ b/src/ap/hostapd.c
24@@ -4768,6 +4768,7 @@ static void hostapd_switch_color_timeout_handler(void *eloop_data,
25 struct cca_settings settings;
26 int ret;
27
28+ os_memset(&settings, 0, sizeof(settings));
29 hostapd_cleanup_cca_params(bss);
30 bss->cca_color = r;
31 bss->cca_count = 10;
32--
332.45.2
34
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb b/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb
index a6f7122847..ce1c145fd7 100644
--- a/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb
+++ b/meta-oe/recipes-connectivity/hostapd/hostapd_2.11.bb
@@ -9,6 +9,7 @@ DEPENDS = "libnl openssl"
9SRC_URI = " \ 9SRC_URI = " \
10 http://w1.fi/releases/hostapd-${PV}.tar.gz \ 10 http://w1.fi/releases/hostapd-${PV}.tar.gz \
11 file://0001-Include-base64-for-hostapd-CONFIG_SAE_PK-builds.patch \ 11 file://0001-Include-base64-for-hostapd-CONFIG_SAE_PK-builds.patch \
12 file://0002-hostapd-Fix-clearing-up-settings-for-color-switch.patch \
12 file://defconfig \ 13 file://defconfig \
13 file://init \ 14 file://init \
14 file://hostapd.service \ 15 file://hostapd.service \