mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-02 11:27:48 +00:00
wifi: revert some tweaks that are causing stability issues
this will come back in 2.6 once stability is restored Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -1,67 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
[ "$ACTION" = add ] || exit
|
|
||||||
|
|
||||||
NPROCS="$(grep -c "^processor.*:" /proc/cpuinfo)"
|
|
||||||
[ "$NPROCS" -gt 1 ] || exit
|
|
||||||
|
|
||||||
PROC_MASK="$(( (1 << $NPROCS) - 1 ))"
|
|
||||||
|
|
||||||
find_irq_cpu() {
|
|
||||||
local dev="$1"
|
|
||||||
local match="$(grep -m 1 "$dev\$" /proc/interrupts)"
|
|
||||||
local cpu=0
|
|
||||||
|
|
||||||
[ -n "$match" ] && {
|
|
||||||
set -- $match
|
|
||||||
shift
|
|
||||||
for cur in `seq 1 $NPROCS`; do
|
|
||||||
[ "$1" -gt 0 ] && {
|
|
||||||
cpu=$(($cur - 1))
|
|
||||||
break
|
|
||||||
}
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "$cpu"
|
|
||||||
}
|
|
||||||
|
|
||||||
set_hex_val() {
|
|
||||||
local file="$1"
|
|
||||||
local val="$2"
|
|
||||||
val="$(printf %x "$val")"
|
|
||||||
[ -n "$DEBUG" ] && echo "$file = $val"
|
|
||||||
echo "$val" > "$file"
|
|
||||||
}
|
|
||||||
|
|
||||||
default_ps="$(uci get "network.@globals[0].default_ps")"
|
|
||||||
[ -n "$default_ps" -a "$default_ps" != 1 ] && exit 0
|
|
||||||
|
|
||||||
exec 512>/var/lock/smp_tune.lock
|
|
||||||
flock 512 || exit 1
|
|
||||||
|
|
||||||
for dev in /sys/class/net/*; do
|
|
||||||
[ -d "$dev" ] || continue
|
|
||||||
|
|
||||||
# ignore virtual interfaces
|
|
||||||
[ -n "$(ls "${dev}/" | grep '^lower_')" ] && continue
|
|
||||||
[ -d "${dev}/device" ] || continue
|
|
||||||
|
|
||||||
device="$(readlink "${dev}/device")"
|
|
||||||
device="$(basename "$device")"
|
|
||||||
irq_cpu="$(find_irq_cpu "$device")"
|
|
||||||
irq_cpu_mask="$((1 << $irq_cpu))"
|
|
||||||
|
|
||||||
for q in ${dev}/queues/rx-*; do
|
|
||||||
set_hex_val "$q/rps_cpus" "$(($PROC_MASK & ~$irq_cpu_mask))"
|
|
||||||
done
|
|
||||||
|
|
||||||
ntxq="$(ls -d ${dev}/queues/tx-* | wc -l)"
|
|
||||||
|
|
||||||
idx=$(($irq_cpu + 1))
|
|
||||||
for q in ${dev}/queues/tx-*; do
|
|
||||||
set_hex_val "$q/xps_cpus" "$((1 << $idx))"
|
|
||||||
let "idx = idx + 1"
|
|
||||||
[ "$idx" -ge "$NPROCS" ] && idx=0
|
|
||||||
done
|
|
||||||
done
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
|
||||||
|
|
||||||
START=80
|
|
||||||
|
|
||||||
set_affinity() {
|
|
||||||
local affinity=$1
|
|
||||||
local name=$2
|
|
||||||
local irq=`grep -E -m1 $name /proc/interrupts | cut -d ':' -f 1 | tail -n1 | tr -d ' '`
|
|
||||||
[ -n "$irq" ] && {
|
|
||||||
logger ath11k setting affinity for $name/$irq to $affinity
|
|
||||||
echo $affinity > /proc/irq/$irq/smp_affinity
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boot() {
|
|
||||||
. /lib/functions/system.sh
|
|
||||||
|
|
||||||
board=$(board_name)
|
|
||||||
case $board in
|
|
||||||
cig,wf196)
|
|
||||||
set_affinity 1 reo2host-destination-ring2
|
|
||||||
set_affinity 2 reo2host-destination-ring1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set_affinity 2 reo2host-destination-ring2
|
|
||||||
set_affinity 1 reo2host-destination-ring1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $board in
|
|
||||||
maple)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set_affinity 8 reo2host-destination-ring4
|
|
||||||
set_affinity 4 reo2host-destination-ring3
|
|
||||||
|
|
||||||
set_affinity 8 wbm2host-tx-completions-ring3
|
|
||||||
set_affinity 4 wbm2host-tx-completions-ring2
|
|
||||||
set_affinity 2 wbm2host-tx-completions-ring1
|
|
||||||
|
|
||||||
set_affinity 8 ppdu-end-interrupts-mac1
|
|
||||||
set_affinity 8 rxdma2host-monitor-status-ring-mac1
|
|
||||||
set_affinity 8 rxdma2host-monitor-destination-mac1
|
|
||||||
set_affinity 8 host2rxdma-monitor-ring1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
set_affinity 4 ppdu-end-interrupts-mac2
|
|
||||||
set_affinity 4 rxdma2host-monitor-status-ring-mac2
|
|
||||||
set_affinity 4 rxdma2host-monitor-destination-mac2
|
|
||||||
set_affinity 4 host2rxdma-monitor-ring2
|
|
||||||
|
|
||||||
set_affinity 2 ppdu-end-interrupts-mac3
|
|
||||||
set_affinity 2 rxdma2host-monitor-status-ring-mac3
|
|
||||||
set_affinity 2 rxdma2host-monitor-destination-mac3
|
|
||||||
set_affinity 2 host2rxdma-monitor-ring3
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
From fd65e5a95d08389444e8591a20538b3edece0e15 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
||||||
Date: Fri, 31 Jul 2020 19:26:16 +0300
|
|
||||||
Subject: [PATCH] net: bridge: clear bridge's private skb space on xmit
|
|
||||||
|
|
||||||
We need to clear all of the bridge private skb variables as they can be
|
|
||||||
stale due to the packet being recirculated through the stack and then
|
|
||||||
transmitted through the bridge device. Similar memset is already done on
|
|
||||||
bridge's input. We've seen cases where proxyarp_replied was 1 on routed
|
|
||||||
multicast packets transmitted through the bridge to ports with neigh
|
|
||||||
suppress which were getting dropped. Same thing can in theory happen with
|
|
||||||
the port isolation bit as well.
|
|
||||||
|
|
||||||
Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood")
|
|
||||||
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
||||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
---
|
|
||||||
net/bridge/br_device.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
|
|
||||||
index 8c7b78f8bc23..9a2fb4aa1a10 100644
|
|
||||||
--- a/net/bridge/br_device.c
|
|
||||||
+++ b/net/bridge/br_device.c
|
|
||||||
@@ -36,6 +36,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
||||||
const unsigned char *dest;
|
|
||||||
u16 vid = 0;
|
|
||||||
|
|
||||||
+ memset(skb->cb, 0, sizeof(struct br_input_skb_cb));
|
|
||||||
+
|
|
||||||
rcu_read_lock();
|
|
||||||
nf_ops = rcu_dereference(nf_br_ops);
|
|
||||||
if (nf_ops && nf_ops->br_dev_xmit_hook(skb)) {
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
21
feeds/wifi-ax/mac80211/patches/pending/214-no-encap.patch
Normal file
21
feeds/wifi-ax/mac80211/patches/pending/214-no-encap.patch
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c
|
||||||
|
===================================================================
|
||||||
|
--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/mac.c
|
||||||
|
+++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c
|
||||||
|
@@ -6590,6 +6590,7 @@ static int ath11k_mac_op_update_vif_offl
|
||||||
|
u32 param_id, param_value;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
+ return 0;
|
||||||
|
if (ab->nss.enabled && vif->type == NL80211_IFTYPE_AP_VLAN)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
@@ -6835,6 +6836,8 @@ static int ath11k_mac_op_add_interface(s
|
||||||
|
else
|
||||||
|
param_value = ATH11K_HW_TXRX_NATIVE_WIFI;
|
||||||
|
|
||||||
|
+ param_value = ATH11K_HW_TXRX_NATIVE_WIFI;
|
||||||
|
+
|
||||||
|
ret = ath11k_nss_vdev_set_cmd(arvif, NSS_WIFI_VDEV_ENCAP_TYPE_CMD, param_value);
|
||||||
|
|
||||||
|
if(ret) {
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
From 9bede53698b963280df8b7c3c85c052e66e9d548 Mon Sep 17 00:00:00 2001
|
|
||||||
From: John Crispin <john@phrozen.org>
|
|
||||||
Date: Thu, 17 Feb 2022 08:27:09 +0100
|
|
||||||
Subject: [PATCH] net: bridge: clear bridge's private skb space on xmit
|
|
||||||
|
|
||||||
We need to clear all of the bridge private skb variables as they can be
|
|
||||||
stale due to the packet being recirculated through the stack and then
|
|
||||||
transmitted through the bridge device. Similar memset is already done on
|
|
||||||
bridge's input. We've seen cases where proxyarp_replied was 1 on routed
|
|
||||||
multicast packets transmitted through the bridge to ports with neigh
|
|
||||||
suppress which were getting dropped. Same thing can in theory happen with
|
|
||||||
the port isolation bit as well.
|
|
||||||
|
|
||||||
Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood")
|
|
||||||
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
||||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
---
|
|
||||||
...r-bridge-s-private-skb-space-on-xmit.patch | 36 +++++++++++++++++++
|
|
||||||
1 file changed, 36 insertions(+)
|
|
||||||
create mode 100644 target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch
|
|
||||||
|
|
||||||
diff --git a/target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch b/target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000..20f71569da
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch
|
|
||||||
@@ -0,0 +1,36 @@
|
|
||||||
+From fd65e5a95d08389444e8591a20538b3edece0e15 Mon Sep 17 00:00:00 2001
|
|
||||||
+From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
||||||
+Date: Fri, 31 Jul 2020 19:26:16 +0300
|
|
||||||
+Subject: [PATCH] net: bridge: clear bridge's private skb space on xmit
|
|
||||||
+
|
|
||||||
+We need to clear all of the bridge private skb variables as they can be
|
|
||||||
+stale due to the packet being recirculated through the stack and then
|
|
||||||
+transmitted through the bridge device. Similar memset is already done on
|
|
||||||
+bridge's input. We've seen cases where proxyarp_replied was 1 on routed
|
|
||||||
+multicast packets transmitted through the bridge to ports with neigh
|
|
||||||
+suppress which were getting dropped. Same thing can in theory happen with
|
|
||||||
+the port isolation bit as well.
|
|
||||||
+
|
|
||||||
+Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood")
|
|
||||||
+Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
||||||
+Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
+---
|
|
||||||
+ net/bridge/br_device.c | 2 ++
|
|
||||||
+ 1 file changed, 2 insertions(+)
|
|
||||||
+
|
|
||||||
+diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
|
|
||||||
+index 8c7b78f8bc23..9a2fb4aa1a10 100644
|
|
||||||
+--- a/net/bridge/br_device.c
|
|
||||||
++++ b/net/bridge/br_device.c
|
|
||||||
+@@ -36,6 +36,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
||||||
+ const unsigned char *dest;
|
|
||||||
+ u16 vid = 0;
|
|
||||||
+
|
|
||||||
++ memset(skb->cb, 0, sizeof(struct br_input_skb_cb));
|
|
||||||
++
|
|
||||||
+ rcu_read_lock();
|
|
||||||
+ nf_ops = rcu_dereference(nf_br_ops);
|
|
||||||
+ if (nf_ops && nf_ops->br_dev_xmit_hook(skb)) {
|
|
||||||
+--
|
|
||||||
+2.25.1
|
|
||||||
+
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user