forked from immortalwrt/immortalwrt
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hostapd: backport upstream patch to fix setting BSS color
Without this patch, we get the following error: Mon Dec 23 11:35:44 2024 daemon.err hostapd: nl80211: kernel reports: integer out of range As updating hostapd would be too complex and requires further testing, we backport this simple upstream fix instead. Fixes: openwrt/openwrt#16680 Signed-off-by: Rany Hany <[email protected]> Link: openwrt/openwrt#17590 Signed-off-by: Petr Štetiar <[email protected]>
- Loading branch information
Showing
4 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...work/services/hostapd/patches/804-hostapd-Fix-clearing-up-settings-for-color-switch.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 161327f91d956771996c96ea1b6e4e1cb8dc074c Mon Sep 17 00:00:00 2001 | ||
From: Stone Zhang <[email protected]> | ||
Date: Mon, 14 Oct 2024 18:47:32 +0800 | ||
Subject: [PATCH] hostapd: Fix clearing up settings for color switch | ||
|
||
Settings for color switch (struct cca_settings settings) | ||
is used without zero clearing, which causes the member | ||
settings->ubpr->unsol_bcast_probe_resp_intervalettings | ||
to be a random value. It is againsts the NLA policy of | ||
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT and causes | ||
BSS color switch failure. | ||
|
||
Fixes: 654d2395dddf ("BSS coloring: Handling of collision events and triggering CCA") | ||
Signed-off-by: Stone Zhang <[email protected]> | ||
--- | ||
src/ap/hostapd.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
--- a/src/ap/hostapd.c | ||
+++ b/src/ap/hostapd.c | ||
@@ -4813,6 +4813,7 @@ static void hostapd_switch_color_timeout | ||
struct cca_settings settings; | ||
int ret; | ||
|
||
+ os_memset(&settings, 0, sizeof(settings)); | ||
hostapd_cleanup_cca_params(bss); | ||
bss->cca_color = r; | ||
bss->cca_count = 10; |