mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-17 17:44:06 +00:00
wlan-ap: wifi: fix channel select when using ACS
merged from upstream Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
This commit is contained in:
parent
b0afd96d17
commit
4d21297a32
@ -0,0 +1,63 @@
|
|||||||
|
From 14b75a6c0720558f4fe08b6b45542ffbd0728ff3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||||
|
Date: Fri, 13 May 2022 16:35:04 +0800
|
||||||
|
Subject: [PATCH] wifi: fix channel select when using ACS
|
||||||
|
|
||||||
|
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||||
|
---
|
||||||
|
.../800-fix-ap-sta-channel-setup-failed.patch | 29 +++++++++++++++++++
|
||||||
|
.../files/lib/netifd/wireless/mac80211.sh | 2 +-
|
||||||
|
2 files changed, 30 insertions(+), 1 deletion(-)
|
||||||
|
create mode 100644 feeds/wifi-ax/hostapd/patches/800-fix-ap-sta-channel-setup-failed.patch
|
||||||
|
|
||||||
|
diff --git a/feeds/wifi-ax/hostapd/patches/800-fix-ap-sta-channel-setup-failed.patch b/feeds/wifi-ax/hostapd/patches/800-fix-ap-sta-channel-setup-failed.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..de7a6115
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/feeds/wifi-ax/hostapd/patches/800-fix-ap-sta-channel-setup-failed.patch
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
|
||||||
|
+index ad2aebf..355b4a8 100644
|
||||||
|
+--- a/src/common/hw_features_common.c
|
||||||
|
++++ b/src/common/hw_features_common.c
|
||||||
|
+@@ -615,9 +615,21 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
|
||||||
|
+ center_segment0 == channel - 6)
|
||||||
|
+ data->center_freq1 = 5000 + center_segment0 * 5;
|
||||||
|
+ else {
|
||||||
|
+- wpa_printf(MSG_ERROR,
|
||||||
|
+- "Wrong coupling between HT and VHT/HE channel setting");
|
||||||
|
+- return -1;
|
||||||
|
++ if (channel <= 48)
|
||||||
|
++ center_segment0 = 42;
|
||||||
|
++ else if (channel <= 64)
|
||||||
|
++ center_segment0 = 58;
|
||||||
|
++ else if (channel <= 112)
|
||||||
|
++ center_segment0 = 106;
|
||||||
|
++ else if (channel <= 128)
|
||||||
|
++ center_segment0 = 122;
|
||||||
|
++ else if (channel <= 144)
|
||||||
|
++ center_segment0 = 138;
|
||||||
|
++ else if (channel <= 161)
|
||||||
|
++ center_segment0 = 155;
|
||||||
|
++ else if (channel <= 177)
|
||||||
|
++ center_segment0 = 171;
|
||||||
|
++ data->center_freq1 = 5000 + center_segment0 * 5;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
diff --git a/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh b/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||||
|
index 5db55170..5be94573 100644
|
||||||
|
--- a/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||||
|
+++ b/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||||
|
@@ -132,7 +132,7 @@ mac80211_hostapd_setup_base() {
|
||||||
|
|
||||||
|
json_select config
|
||||||
|
|
||||||
|
- [ "$auto_channel" -gt 0 ] && channel=acs_survey
|
||||||
|
+ [ "$auto_channel" -gt 0 ] && channel=0
|
||||||
|
|
||||||
|
[ "$auto_channel" -gt 0 ] && json_get_vars acs_exclude_dfs
|
||||||
|
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user