mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-01 19:07:47 +00:00
ucentral: development update
* fix missing mac80211 script update * fix ecw5410 * update iwinfo Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
39
backports/0036-iwinfo-update-to-latest-git-HEAD.patch
Normal file
39
backports/0036-iwinfo-update-to-latest-git-HEAD.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From c90fec205137d8d8c1197722a39d5c700ae3f6b1 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Mon, 21 Jun 2021 12:53:28 +0200
|
||||
Subject: [PATCH 02/36] iwinfo: update to latest git HEAD
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
package/network/utils/iwinfo/Makefile | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
|
||||
index 3454d615a9..b7c8370bba 100644
|
||||
--- a/package/network/utils/iwinfo/Makefile
|
||||
+++ b/package/network/utils/iwinfo/Makefile
|
||||
@@ -11,9 +11,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
|
||||
-PKG_SOURCE_DATE:=2021-01-31
|
||||
-PKG_SOURCE_VERSION:=4a32b33e9606f1bc1125f4bc24b0581349e55f2e
|
||||
-PKG_MIRROR_HASH:=414e5d150efaadba21103e66f862be66a94dcf83c16a2850f7c05051a9b0739d
|
||||
+PKG_SOURCE_DATE:=2021-06-09
|
||||
+PKG_SOURCE_VERSION:=c0414642fead263a4a6a686ad3cb7e965ec8a23a
|
||||
+PKG_MIRROR_HASH:=c5686bbae86753c53db03a686b034bbb80d31107cc359ebd8522ea1c82db35ea
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -25,7 +25,7 @@ PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_PACKAGE_kmod-brcm-wl-mimo \
|
||||
CONFIG_PACKAGE_kmod-cfg80211
|
||||
|
||||
-IWINFO_ABI_VERSION:=20210106
|
||||
+IWINFO_ABI_VERSION:=20210430
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
From a0b37fadd8e757780a4c7cdb71af97b94f6c572a Mon Sep 17 00:00:00 2001
|
||||
From 8cbdd62c20daadf82ac2058a85523bb7454f390b Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 27 May 2021 13:25:03 +0200
|
||||
Subject: [PATCH 04/38] mac80211: update to latest HEAD
|
||||
Subject: [PATCH 01/36] mac80211: update to latest HEAD
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
package/kernel/mac80211/Makefile | 21 +-
|
||||
package/kernel/mac80211/ath.mk | 13 +-
|
||||
package/kernel/mac80211/broadcom.mk | 4 +-
|
||||
.../files/lib/netifd/wireless/mac80211.sh | 197 +++--
|
||||
.../mac80211/files/lib/wifi/mac80211.sh | 105 ++-
|
||||
.../mac80211/files/lib/netifd/mac80211.sh | 36 -
|
||||
.../files/lib/netifd/wireless/mac80211.sh | 200 +++--
|
||||
.../mac80211/files/lib/wifi/mac80211.sh | 110 ++-
|
||||
package/kernel/mac80211/mac80211.sh.diff | 58 ++
|
||||
.../patches/ath/402-ath_regd_optional.patch | 2 +-
|
||||
...itting-to-stations-in-dynamic-SMPS-m.patch | 49 --
|
||||
@@ -86,7 +87,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
...11-minstrel_ht-fix-sample-time-check.patch | 23 +
|
||||
...iwlwifi-specific-workaround-that-bro.patch | 51 ++
|
||||
.../500-mac80211_configure_antenna_gain.patch | 24 +-
|
||||
81 files changed, 1544 insertions(+), 1317 deletions(-)
|
||||
82 files changed, 1547 insertions(+), 1358 deletions(-)
|
||||
delete mode 100644 package/kernel/mac80211/files/lib/netifd/mac80211.sh
|
||||
create mode 100644 package/kernel/mac80211/mac80211.sh.diff
|
||||
delete mode 100644 package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch
|
||||
rename package/kernel/mac80211/patches/{ath => ath10k}/080-ath10k_thermal_config.patch (97%)
|
||||
@@ -307,11 +309,61 @@ index fb576c5809..473bbf597c 100644
|
||||
A => A-PHY
|
||||
AG => Dual A-PHY G-PHY
|
||||
G => G-PHY
|
||||
diff --git a/package/kernel/mac80211/files/lib/netifd/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/mac80211.sh
|
||||
deleted file mode 100644
|
||||
index 92e5c0e395..0000000000
|
||||
--- a/package/kernel/mac80211/files/lib/netifd/mac80211.sh
|
||||
+++ /dev/null
|
||||
@@ -1,36 +0,0 @@
|
||||
-mac80211_phy_to_path() {
|
||||
- local phy="$1"
|
||||
-
|
||||
- [ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${phy} ] || return
|
||||
-
|
||||
- local path="$(readlink -f /sys/class/ieee80211/${phy}/device)"
|
||||
- [ -n "$path" ] || return
|
||||
-
|
||||
- path="${path##/sys/devices/}"
|
||||
- case "$path" in
|
||||
- platform*/pci*) path="${path##platform/}";;
|
||||
- esac
|
||||
-
|
||||
- local p
|
||||
- local seq=""
|
||||
- for p in $(ls /sys/class/ieee80211/$phy/device/ieee80211); do
|
||||
- [ "$p" = "$phy" ] && {
|
||||
- echo "$path${seq:++$seq}"
|
||||
- break
|
||||
- }
|
||||
-
|
||||
- seq=$((${seq:-0} + 1))
|
||||
- done
|
||||
-}
|
||||
-
|
||||
-mac80211_path_to_phy() {
|
||||
- local path="$1"
|
||||
-
|
||||
- local p
|
||||
- for p in $(ls /sys/class/ieee80211); do
|
||||
- local cur="$(mac80211_phy_to_path "$p")"
|
||||
- case "$cur" in
|
||||
- *$path) echo "$p"; return;;
|
||||
- esac
|
||||
- done
|
||||
-}
|
||||
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
index 92c56afd24..f30632cb92 100644
|
||||
index 92c56afd24..d92f6605de 100644
|
||||
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
@@ -26,7 +26,6 @@ drv_mac80211_init_device_config() {
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
. /lib/netifd/netifd-wireless.sh
|
||||
. /lib/netifd/hostapd.sh
|
||||
-. /lib/netifd/mac80211.sh
|
||||
|
||||
init_wireless_driver "$@"
|
||||
|
||||
@@ -26,7 +25,6 @@ drv_mac80211_init_device_config() {
|
||||
hostapd_common_add_device_config
|
||||
|
||||
config_add_string path phy 'macaddr:macaddr'
|
||||
@@ -319,7 +371,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
config_add_string tx_burst
|
||||
config_add_string distance
|
||||
config_add_int beacon_int chanbw frag rts
|
||||
@@ -44,11 +43,24 @@ drv_mac80211_init_device_config() {
|
||||
@@ -44,11 +42,24 @@ drv_mac80211_init_device_config() {
|
||||
su_beamformee \
|
||||
mu_beamformer \
|
||||
mu_beamformee \
|
||||
@@ -346,7 +398,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
config_add_boolean \
|
||||
ldpc \
|
||||
greenfield \
|
||||
@@ -96,6 +108,23 @@ mac80211_add_capabilities() {
|
||||
@@ -96,6 +107,23 @@ mac80211_add_capabilities() {
|
||||
export -n -- "$__var=$__out"
|
||||
}
|
||||
|
||||
@@ -370,7 +422,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
mac80211_hostapd_setup_base() {
|
||||
local phy="$1"
|
||||
|
||||
@@ -195,12 +224,14 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -195,12 +223,14 @@ mac80211_hostapd_setup_base() {
|
||||
enable_ac=0
|
||||
vht_oper_chwidth=0
|
||||
vht_center_seg0=
|
||||
@@ -386,7 +438,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
1) idx=$(($channel + 2));;
|
||||
0) idx=$(($channel - 2));;
|
||||
esac
|
||||
@@ -208,7 +239,7 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -208,7 +238,7 @@ mac80211_hostapd_setup_base() {
|
||||
vht_center_seg0=$idx
|
||||
;;
|
||||
VHT80|HE80)
|
||||
@@ -395,7 +447,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
1) idx=$(($channel + 6));;
|
||||
2) idx=$(($channel + 2));;
|
||||
3) idx=$(($channel - 2));;
|
||||
@@ -219,15 +250,35 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -219,15 +249,35 @@ mac80211_hostapd_setup_base() {
|
||||
vht_center_seg0=$idx
|
||||
;;
|
||||
VHT160|HE160)
|
||||
@@ -435,7 +487,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
[ "$hwmode" = "a" ] || enable_ac=0
|
||||
|
||||
if [ "$enable_ac" != "0" ]; then
|
||||
@@ -337,16 +388,62 @@ mac80211_hostapd_setup_base() {
|
||||
@@ -337,16 +387,62 @@ mac80211_hostapd_setup_base() {
|
||||
esac
|
||||
|
||||
if [ "$enable_ax" != "0" ]; then
|
||||
@@ -501,7 +553,16 @@ index 92c56afd24..f30632cb92 100644
|
||||
fi
|
||||
|
||||
hostapd_prepare_device_config "$hostapd_conf_file" nl80211
|
||||
@@ -689,14 +786,8 @@ mac80211_prepare_iw_htmode() {
|
||||
@@ -449,7 +545,7 @@ mac80211_generate_mac() {
|
||||
find_phy() {
|
||||
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
|
||||
[ -n "$path" ] && {
|
||||
- phy="$(mac80211_path_to_phy "$path")"
|
||||
+ phy="$(iwinfo nl80211 phyname "path=$path")"
|
||||
[ -n "$phy" ] && return 0
|
||||
}
|
||||
[ -n "$macaddr" ] && {
|
||||
@@ -689,14 +785,8 @@ mac80211_prepare_iw_htmode() {
|
||||
case "$htmode" in
|
||||
VHT20|HT20) iw_htmode=HT20;;
|
||||
HT40*|VHT40|VHT160)
|
||||
@@ -518,7 +579,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
case "$htmode" in
|
||||
HT40+) iw_htmode="HT40+";;
|
||||
HT40-) iw_htmode="HT40-";;
|
||||
@@ -709,6 +800,12 @@ mac80211_prepare_iw_htmode() {
|
||||
@@ -709,6 +799,12 @@ mac80211_prepare_iw_htmode() {
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -531,7 +592,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
esac
|
||||
[ "$auto_channel" -gt 0 ] && iw_htmode="HT40+"
|
||||
;;
|
||||
@@ -818,7 +915,6 @@ mac80211_setup_vif() {
|
||||
@@ -818,7 +914,6 @@ mac80211_setup_vif() {
|
||||
mesh)
|
||||
wireless_vif_parse_encryption
|
||||
[ -z "$htmode" ] && htmode="NOHT";
|
||||
@@ -539,7 +600,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ] || chan_is_dfs "$phy" "$channel"; then
|
||||
mac80211_setup_supplicant $vif_enable || failed=1
|
||||
else
|
||||
@@ -832,7 +928,6 @@ mac80211_setup_vif() {
|
||||
@@ -832,7 +927,6 @@ mac80211_setup_vif() {
|
||||
adhoc)
|
||||
wireless_vif_parse_encryption
|
||||
if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ]; then
|
||||
@@ -547,7 +608,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
mac80211_setup_supplicant_noctl $vif_enable || failed=1
|
||||
else
|
||||
mac80211_setup_adhoc $vif_enable
|
||||
@@ -849,9 +944,29 @@ mac80211_setup_vif() {
|
||||
@@ -849,9 +943,29 @@ mac80211_setup_vif() {
|
||||
|
||||
get_freq() {
|
||||
local phy="$1"
|
||||
@@ -579,7 +640,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
|
||||
chan_is_dfs() {
|
||||
local phy="$1"
|
||||
@@ -921,13 +1036,6 @@ drv_mac80211_setup() {
|
||||
@@ -921,13 +1035,6 @@ drv_mac80211_setup() {
|
||||
local found
|
||||
|
||||
for wdev in $(list_phy_interfaces "$phy"); do
|
||||
@@ -593,7 +654,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
if [ "$found" = "0" ]; then
|
||||
ip link set dev "$wdev" down
|
||||
iw dev "$wdev" del
|
||||
@@ -935,7 +1043,7 @@ drv_mac80211_setup() {
|
||||
@@ -935,7 +1042,7 @@ drv_mac80211_setup() {
|
||||
done
|
||||
|
||||
# convert channel to frequency
|
||||
@@ -602,7 +663,7 @@ index 92c56afd24..f30632cb92 100644
|
||||
|
||||
[ -n "$country" ] && {
|
||||
iw reg get | grep -q "^country $country:" || {
|
||||
@@ -992,33 +1100,24 @@ drv_mac80211_setup() {
|
||||
@@ -992,33 +1099,24 @@ drv_mac80211_setup() {
|
||||
for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif
|
||||
NEWAPLIST=
|
||||
for_each_interface "ap" mac80211_prepare_vif
|
||||
@@ -645,10 +706,25 @@ index 92c56afd24..f30632cb92 100644
|
||||
ret="$?"
|
||||
[ "$ret" != 0 -o -z "$hostapd_res" ] && {
|
||||
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
index 3e99f06693..0763da8fd8 100644
|
||||
index 3e99f06693..6aa46b0c74 100644
|
||||
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
@@ -57,6 +57,85 @@ check_mac80211_device() {
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
-. /lib/netifd/mac80211.sh
|
||||
|
||||
append DRIVERS "mac80211"
|
||||
|
||||
@@ -11,7 +10,7 @@ lookup_phy() {
|
||||
local devpath
|
||||
config_get devpath "$device" path
|
||||
[ -n "$devpath" ] && {
|
||||
- phy="$(mac80211_path_to_phy "$devpath")"
|
||||
+ phy="$(iwinfo nl80211 phyname "path=$devpath")"
|
||||
[ -n "$phy" ] && return
|
||||
}
|
||||
|
||||
@@ -57,6 +56,85 @@ check_mac80211_device() {
|
||||
[ "$phy" = "$dev" ] && found=1
|
||||
}
|
||||
|
||||
@@ -665,7 +741,7 @@ index 3e99f06693..0763da8fd8 100644
|
||||
+ if (channel) {
|
||||
+ mode="NOHT"
|
||||
+ if (ht) mode="HT20"
|
||||
+ if (vht) mode="VHT80"
|
||||
+ if (vht && band != "1:") mode="VHT80"
|
||||
+ if (he) mode="HE80"
|
||||
+ if (he && band == "1:") mode="HE20"
|
||||
+ sub("\\[", "", channel)
|
||||
@@ -687,7 +763,7 @@ index 3e99f06693..0763da8fd8 100644
|
||||
+ ht=1
|
||||
+}
|
||||
+
|
||||
+$0 ~ "VHT Capabilities:" {
|
||||
+$0 ~ "VHT Capabilities" {
|
||||
+ vht=1
|
||||
+}
|
||||
+
|
||||
@@ -734,7 +810,7 @@ index 3e99f06693..0763da8fd8 100644
|
||||
detect_mac80211() {
|
||||
devidx=0
|
||||
config_load wireless
|
||||
@@ -75,26 +154,12 @@ detect_mac80211() {
|
||||
@@ -75,28 +153,14 @@ detect_mac80211() {
|
||||
config_foreach check_mac80211_device wifi-device
|
||||
[ "$found" -gt 0 ] && continue
|
||||
|
||||
@@ -758,13 +834,16 @@ index 3e99f06693..0763da8fd8 100644
|
||||
- channel=$(iw phy "$dev" info | grep '\* 5.... MHz \[' | grep '(disabled)' -v -m 1 | sed 's/[^[]*\[\|\|\].*//g')
|
||||
- iw phy "$dev" info | grep -q 'Capabilities:' && htmode="HT20"
|
||||
- }
|
||||
-
|
||||
- [ -n "$htmode" ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode"
|
||||
+ get_band_defaults "$dev"
|
||||
|
||||
path="$(mac80211_phy_to_path "$dev")"
|
||||
- [ -n "$htmode" ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode"
|
||||
-
|
||||
- path="$(mac80211_phy_to_path "$dev")"
|
||||
+ path="$(iwinfo nl80211 path "$dev")"
|
||||
if [ -n "$path" ]; then
|
||||
@@ -106,10 +171,10 @@ detect_mac80211() {
|
||||
dev_id="set wireless.radio${devidx}.path='$path'"
|
||||
else
|
||||
@@ -106,10 +170,10 @@ detect_mac80211() {
|
||||
uci -q batch <<-EOF
|
||||
set wireless.radio${devidx}=wifi-device
|
||||
set wireless.radio${devidx}.type=mac80211
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
mac80211_phy_to_path() {
|
||||
local phy="$1"
|
||||
|
||||
[ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${phy} ] || return
|
||||
|
||||
local path="$(readlink -f /sys/class/ieee80211/${phy}/device)"
|
||||
[ -n "$path" ] || return
|
||||
|
||||
path="${path##/sys/devices/}"
|
||||
case "$path" in
|
||||
platform*/pci*) path="${path##platform/}";;
|
||||
esac
|
||||
|
||||
local p
|
||||
local seq=""
|
||||
for p in $(ls /sys/class/ieee80211/$phy/device/ieee80211); do
|
||||
[ "$p" = "$phy" ] && {
|
||||
echo "$path${seq:++$seq}"
|
||||
break
|
||||
}
|
||||
|
||||
seq=$((${seq:-0} + 1))
|
||||
done
|
||||
}
|
||||
|
||||
mac80211_path_to_phy() {
|
||||
local path="$1"
|
||||
|
||||
local p
|
||||
for p in $(ls /sys/class/ieee80211); do
|
||||
local cur="$(mac80211_phy_to_path "$p")"
|
||||
case "$cur" in
|
||||
*$path) echo "$p"; return;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
. /lib/netifd/netifd-wireless.sh
|
||||
. /lib/netifd/hostapd.sh
|
||||
. /lib/netifd/mac80211.sh
|
||||
|
||||
init_wireless_driver "$@"
|
||||
|
||||
@@ -546,7 +545,7 @@ mac80211_generate_mac() {
|
||||
find_phy() {
|
||||
[ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
|
||||
[ -n "$path" ] && {
|
||||
phy="$(mac80211_path_to_phy "$path")"
|
||||
phy="$(iwinfo nl80211 phyname "path=$path")"
|
||||
[ -n "$phy" ] && return 0
|
||||
}
|
||||
[ -n "$macaddr" ] && {
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
[ -d "/sys/class/net/wlan0" ] && {
|
||||
echo e > /sys/class/net/wlan0/queues/rx-0/rps_cpus
|
||||
echo 0 > /sys/class/net/wlan0/queues/tx-0/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan0/queues/tx-1/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan0/queues/tx-2/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan0/queues/tx-3/xps_cpus
|
||||
}
|
||||
[ -d "/sys/class/net/wlan1" ] && {
|
||||
echo e > /sys/class/net/wlan1/queues/rx-0/rps_cpus
|
||||
echo 0 > /sys/class/net/wlan1/queues/tx-0/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan1/queues/tx-1/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan1/queues/tx-2/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan1/queues/tx-3/xps_cpus
|
||||
}
|
||||
[ -d "/sys/class/net/wlan2" ] && {
|
||||
echo e > /sys/class/net/wlan2/queues/rx-0/rps_cpus
|
||||
echo 0 > /sys/class/net/wlan2/queues/tx-0/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan2/queues/tx-1/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan2/queues/tx-2/xps_cpus
|
||||
echo 0 > /sys/class/net/wlan2/queues/tx-3/xps_cpus
|
||||
}
|
||||
|
||||
[ -d "/proc/sys/dev/nss/n2hcfg/" ] && echo 2048 > /proc/sys/dev/nss/n2hcfg/n2h_queue_limit_core0
|
||||
[ -d "/proc/sys/dev/nss/n2hcfg/" ] && echo 2048 > /proc/sys/dev/nss/n2hcfg/n2h_queue_limit_core1
|
||||
|
||||
[ -d "/proc/sys/dev/nss/rps/" ] && echo 14 > /proc/sys/dev/nss/rps/hash_bitmap
|
||||
@@ -1,73 +0,0 @@
|
||||
#!/bin/sh
|
||||
enable_affinity_hk_cp01_c1() {
|
||||
|
||||
#assign 4 rx interrupts to each cores
|
||||
irq_affinity_num=`grep -E -m1 'reo2host-destination-ring4' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 8 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'reo2host-destination-ring3' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 4 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'reo2host-destination-ring2' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 2 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'reo2host-destination-ring1' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 1 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
|
||||
#assign 3 tcl completions to 3 CPUs
|
||||
irq_affinity_num=`grep -E -m1 'wbm2host-tx-completions-ring3' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 4 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'wbm2host-tx-completions-ring2' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 2 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'wbm2host-tx-completions-ring1' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 1 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
}
|
||||
|
||||
enable_affinity_hk10() {
|
||||
# Enable smp affinity for PCIE attach
|
||||
#pci 0
|
||||
|
||||
#assign 3 tcl completions to CPUs except 0 (CPU0 is used by other sub systems)
|
||||
irq_affinity_num=`grep -E -m1 'pci0_wbm2host_tx_completions_ring1' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 2 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci0_wbm2host_tx_completions_ring2' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 4 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci0_wbm2host_tx_completions_ring3' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 8 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
|
||||
#assign lmac,reo err,release interrupts are mapped to one core alone
|
||||
irq_affinity_num=`grep -E -m1 'pci0_lmac_reo_misc_irq' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 8 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
|
||||
#assign 4 rx interrupts to each cores
|
||||
irq_affinity_num=`grep -E -m1 'pci0_reo2host_destination_ring1' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 1 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci0_reo2host_destination_ring2' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 2 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci0_reo2host_destination_ring3' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 4 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci0_reo2host_destination_ring4' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 8 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
|
||||
#pci 1
|
||||
#assign 3 tcl completions to all CPUs except 0 (CPU0 is used by other sub systems)
|
||||
irq_affinity_num=`grep -E -m1 'pci1_wbm2host_tx_completions_ring1' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 2 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci1_wbm2host_tx_completions_ring2' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 4 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci1_wbm2host_tx_completions_ring3' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 8 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
|
||||
#assign lmac,reo err,release interrupts are mapped to one core alone
|
||||
irq_affinity_num=`grep -E -m1 'pci1_lmac_reo_misc_irq' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 8 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
|
||||
#assign 4 rx interrupts to each cores
|
||||
irq_affinity_num=`grep -E -m1 'pci1_reo2host_destination_ring1' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 1 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci1_reo2host_destination_ring2' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 2 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci1_reo2host_destination_ring3' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 4 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
irq_affinity_num=`grep -E -m1 'pci1_reo2host_destination_ring4' /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
||||
[ -n "$irq_affinity_num" ] && echo 8 > /proc/irq/$irq_affinity_num/smp_affinity
|
||||
}
|
||||
|
||||
enable_affinity_hk_cp01_c1
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
. /lib/netifd/mac80211.sh
|
||||
|
||||
append DRIVERS "mac80211"
|
||||
|
||||
@@ -11,7 +10,7 @@ lookup_phy() {
|
||||
local devpath
|
||||
config_get devpath "$device" path
|
||||
[ -n "$devpath" ] && {
|
||||
phy="$(mac80211_path_to_phy "$devpath")"
|
||||
phy="$(iwinfo nl80211 phyname "path=$devpath")"
|
||||
[ -n "$phy" ] && return
|
||||
}
|
||||
|
||||
@@ -70,7 +69,7 @@ BEGIN {
|
||||
if (channel) {
|
||||
mode="NOHT"
|
||||
if (ht) mode="HT20"
|
||||
if (vht) mode="VHT80"
|
||||
if (vht && band != "1:") mode="VHT80"
|
||||
if (he) mode="HE80"
|
||||
if (he && band == "1:") mode="HE20"
|
||||
sub("\\[", "", channel)
|
||||
@@ -92,7 +91,7 @@ $0 ~ "Capabilities:" {
|
||||
ht=1
|
||||
}
|
||||
|
||||
$0 ~ "VHT Capabilities:" {
|
||||
$0 ~ "VHT Capabilities" {
|
||||
vht=1
|
||||
}
|
||||
|
||||
@@ -161,7 +160,7 @@ detect_mac80211() {
|
||||
|
||||
get_band_defaults "$dev"
|
||||
|
||||
path="$(mac80211_phy_to_path "$dev")"
|
||||
path="$(iwinfo nl80211 path "$dev")"
|
||||
if [ -n "$path" ]; then
|
||||
dev_id="set wireless.radio${devidx}.path='$path'"
|
||||
else
|
||||
|
||||
@@ -1,18 +1,45 @@
|
||||
From 1cfbebfc9cf3fea769474ab92b3ffeaf9e8a7169 Mon Sep 17 00:00:00 2001
|
||||
From c353cb2e5dca581a31fc2641cc99fbb37202f223 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 17 Jun 2021 16:13:40 +0200
|
||||
Subject: [PATCH] ipq806x: simplify ecw5410 dts
|
||||
Subject: [PATCH 34/36] ipq806x: simplify ecw5410 dts
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../arm/boot/dts/qcom-ipq8068-ecw5410.dts | 67 ++++++++++---------
|
||||
1 file changed, 34 insertions(+), 33 deletions(-)
|
||||
.../arm/boot/dts/qcom-ipq8068-ecw5410.dts | 83 +++++++++++--------
|
||||
target/linux/ipq806x/image/Makefile | 2 +-
|
||||
2 files changed, 49 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts
|
||||
index 712910c261..cd5255fea8 100644
|
||||
index 712910c261..e87ef16b9a 100644
|
||||
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts
|
||||
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts
|
||||
@@ -259,39 +259,6 @@
|
||||
@@ -95,6 +95,16 @@
|
||||
gpios = <&qcom_pinmux 59 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ i2c-gpio {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ compatible = "i2c-gpio";
|
||||
+ gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>, /* sda */
|
||||
+ <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>; /* scl */
|
||||
+ i2c-gpio,delay-us = <5>;
|
||||
+ };
|
||||
};
|
||||
|
||||
|
||||
@@ -124,7 +134,7 @@
|
||||
|
||||
led_pins: led_pins {
|
||||
mux {
|
||||
- pins = "gpio16", "gpio23", "gpio24", "gpio26",
|
||||
+ pins = "gpio6", "gpio7", "gpio16", "gpio23", "gpio24", "gpio26",
|
||||
"gpio28", "gpio59";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
@@ -259,39 +269,6 @@
|
||||
};
|
||||
|
||||
&soc {
|
||||
@@ -52,7 +79,17 @@ index 712910c261..cd5255fea8 100644
|
||||
mdio1: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
#address-cells = <1>;
|
||||
@@ -314,6 +281,40 @@
|
||||
@@ -306,14 +283,50 @@
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
+ reset-gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
+ reset-gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -93,6 +130,28 @@ index 712910c261..cd5255fea8 100644
|
||||
&gmac2 {
|
||||
status = "okay";
|
||||
|
||||
@@ -328,7 +341,7 @@
|
||||
status = "okay";
|
||||
|
||||
qcom,id = <3>;
|
||||
- mdiobus = <&mdio1>;
|
||||
+ mdiobus = <&mdio0>;
|
||||
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy0>;
|
||||
diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
|
||||
index 3bc60fa931..d620f0eb70 100644
|
||||
--- a/target/linux/ipq806x/image/Makefile
|
||||
+++ b/target/linux/ipq806x/image/Makefile
|
||||
@@ -142,7 +142,7 @@ define Device/edgecore_ecw5410
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS_CONFIG := config@v2.0-ap160
|
||||
- DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
|
||||
+ DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410 kmod-i2c-gpio
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5410
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user