Compare commits

...

9 Commits

Author SHA1 Message Date
John Crispin
e3b1fe36e5 hostapd: enable CONFIG_ERP
This caused local EAP to not work on wifi-qsdk targets.

Fixes: WIFI-7203
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 11:16:02 +01:00
John Crispin
5af7e1e7d8 ucode: add tool to read out the max clients an AP can handle per phy
Fixes: WIFI-7197
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 10:52:40 +01:00
John Crispin
057ebb8660 ucentral-schema: update to latest HEAD
1c46544 5G was not allowing specific 20MHz channels and would fall back to ACS

Fixes: WIFI-7179
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-28 10:08:43 +01:00
John Crispin
17fe72c6e9 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>
2022-02-25 17:34:27 +01:00
John Crispin
834ff2fe4f certificates: improve the code loading sqsh certificates
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-23 07:54:22 +01:00
John Crispin
ce3849e131 ipq40xx: revert an upstream patch causing problem with ea8300 eth ports
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-23 07:54:00 +01:00
John Crispin
66640cdd1a ipq807x: add cig wf196 to the CI builds
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 16:33:52 +01:00
John Crispin
300924a4be hostapd: fix syntax error inside hostapd.sh
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 15:13:28 +01:00
John Crispin
8fb088bcc8 ucentral-schema: update to latest HEAD
b3ce69e wifiscan: allow bandwith override
6d59acc trace: improve tracing code

Fixes: WIFI-7167
Fixes: WIFI-7168
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 08:59:48 +01:00
15 changed files with 116 additions and 243 deletions

View File

@@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: ['actiontec_web7200', 'cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf160d', 'cig_wf808', 'cybertan_eww622-a1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'indio_um-305ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4' ]
target: ['actiontec_web7200', 'cig_wf188n', 'cig_wf194c', 'cig_wf194c4', 'cig_wf196', 'cig_wf160d', 'cig_wf808', 'cybertan_eww622-a1', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4', 'hfcl_ion4xe', 'hfcl_ion4xi', 'indio_um-305ac', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'tp-link_ec420-g1', 'tplink_ex227', 'tplink_ex228', 'tplink_ex447', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4' ]
steps:
- uses: actions/checkout@v2

View File

@@ -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

View File

@@ -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
}

View File

@@ -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

View File

@@ -7,12 +7,15 @@ boot() {
. /lib/functions.sh
mkdir -p /certificates /etc/ucentral/
local mtd=$(find_mtd_index certificates)
[ -n "$mtd" -a -f /sys/class/mtd/mtd$mtd/oobsize ] && ubiattach -p /dev/mtd$mtd
if [ -n "$(ubinfo -a | grep certificates)" ]; then
[ -e /dev/ubi0 ] && mount -t ubifs ubi0:certificates /certificates
[ -e /dev/ubi1 ] && mount -t ubifs ubi1:certificates /certificates
else
if [ "$(head -c 4 /dev/mtd$mtd)" == "hsqs" ]; then
mount -t squashfs /dev/mtdblock$mtd /certificates
else
[ -n "$mtd" -a -f /sys/class/mtd/mtd$mtd/oobsize ] && ubiattach -p /dev/mtd$mtd
if [ -n "$(ubinfo -a | grep certificates)" ]; then
[ -e /dev/ubi0 ] && mount -t ubifs ubi0:certificates /certificates
[ -e /dev/ubi1 ] && mount -t ubifs ubi1:certificates /certificates
fi
fi
[ -f /certificates/dev-id ] && {
cp /certificates/*.pem /etc/ucentral/

View File

@@ -6,7 +6,7 @@ PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/blogic/ucentral-schema.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-01-17
PKG_SOURCE_VERSION:=b8fdfb157fdb85b69e5456f84992a1a70e33ad7a
PKG_SOURCE_VERSION:=1c4654498b0fbb36f158d1370d3a283d984e746b
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -0,0 +1,13 @@
#!/bin/sh
n=$1
shift
if [ $n -eq 0]; then
tcpdump $@
else
tcpdump $@ &
x=$!
sleep $n
kill $x
fi

View File

@@ -0,0 +1,16 @@
#!/usr/bin/ucode -R
let nl = require("nl80211");
let def = nl.const;
function phy_get() {
let res = nl.request(def.NL80211_CMD_GET_WIPHY, def.NLM_F_DUMP, { split_wiphy_dump: true });
if (res === false)
warn("Unable to lookup phys: " + nl.error() + "\n");
return res;
}
let phys = phy_get();
printf("%d\n", phys[0].max_ap_assoc);

View File

@@ -1,15 +1,15 @@
From 1c89014c7c0e68e1eeb851ea538fb67a57988dd4 Mon Sep 17 00:00:00 2001
From eac420899717e2d23f6d13304bd67278a7e91730 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 20 Jan 2022 10:48:35 +0100
Subject: [PATCH 1/2] fixes
---
lib/nl80211.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++----
lib/nl80211.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++----
lib/rtnl.c | 1 +
2 files changed, 69 insertions(+), 5 deletions(-)
2 files changed, 71 insertions(+), 6 deletions(-)
diff --git a/lib/nl80211.c b/lib/nl80211.c
index fc24fb8..e308ebc 100644
index fc24fb8..1d0871a 100644
--- a/lib/nl80211.c
+++ b/lib/nl80211.c
@@ -45,6 +45,8 @@ limitations under the License.
@@ -132,7 +132,7 @@ index fc24fb8..e308ebc 100644
.attrs = {
{ NL80211_STA_INFO_INACTIVE_TIME, "inactive_time", DT_U32, 0, NULL },
{ NL80211_STA_INFO_RX_BYTES, "rx_bytes", DT_U32, 0, NULL },
@@ -724,15 +783,16 @@ static const uc_nl_nested_spec_t nl80211_sta_info_nla = {
@@ -724,21 +783,22 @@ static const uc_nl_nested_spec_t nl80211_sta_info_nla = {
{ NL80211_STA_INFO_NONPEER_PM, "nonpeer_pm", DT_U32, 0, NULL },
{ NL80211_STA_INFO_CHAIN_SIGNAL, "chain_signal", DT_S8, DF_MULTIPLE|DF_AUTOIDX, NULL },
{ NL80211_STA_INFO_CHAIN_SIGNAL_AVG, "chain_signal_avg", DT_S8, DF_MULTIPLE|DF_AUTOIDX, NULL },
@@ -152,7 +152,22 @@ index fc24fb8..e308ebc 100644
}
};
@@ -1044,6 +1104,9 @@ uc_nl_parse_attrs(struct nl_msg *msg, char *base, const uc_nl_attr_spec_t *attrs
static const uc_nl_nested_spec_t nl80211_msg = {
.headsize = 0,
- .nattrs = 124,
+ .nattrs = 125,
.attrs = {
{ NL80211_ATTR_4ADDR, "4addr", DT_U8, 0, NULL },
{ NL80211_ATTR_AIRTIME_WEIGHT, "airtime_weight", DT_U16, 0, NULL },
@@ -864,6 +924,7 @@ static const uc_nl_nested_spec_t nl80211_msg = {
{ NL80211_ATTR_WPA_VERSIONS, "wpa_versions", DT_U32, 0, NULL },
{ NL80211_ATTR_SUPPORTED_IFTYPES, "supported_iftypes", DT_NESTED, 0, &nl80211_ifcomb_limit_types_nla },
{ NL80211_ATTR_SOFTWARE_IFTYPES, "software_iftypes", DT_NESTED, 0, &nl80211_ifcomb_limit_types_nla },
+ { NL80211_ATTR_MAX_AP_ASSOC_STA, "max_ap_assoc", DT_U16, 0, NULL },
}
};
@@ -1044,6 +1105,9 @@ uc_nl_parse_attrs(struct nl_msg *msg, char *base, const uc_nl_attr_spec_t *attrs
bool exists;
for (i = 0; i < nattrs; i++) {

View File

@@ -60,7 +60,7 @@ CONFIG_RSN_PREAUTH=y
CONFIG_EAP=y
# EAP Re-authentication Protocol (ERP) in integrated EAP server
#CONFIG_ERP=y
CONFIG_ERP=y
# EAP-MD5 for the integrated EAP server
CONFIG_EAP_MD5=y

View File

@@ -727,7 +727,7 @@ hostapd_set_bss_options() {
wps_not_configured=1
[ "$macfilter" = radius ] && {
append_radius_server
vlan_possible = 1
vlan_possible=1
}
;;
psk|sae|psk-sae)

View 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) {

View File

@@ -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

View File

@@ -0,0 +1,32 @@
From d8d342c6d0c4076b509faf1ae1a87df24814abe0 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 23 Feb 2022 07:44:56 +0100
Subject: [PATCH] Revert "ipq40xx: ar40xx: reset port status register"
This reverts commit 88151b8303f29f18e8b037076628fd82eda0978a.
This actually causes several boards to have bad eth connectivity
after reboot.
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
index 8b3ae53bd9..9758f013f0 100644
--- a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
+++ b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
@@ -1198,7 +1198,8 @@ ar40xx_init_port(struct ar40xx_priv *priv, int port)
{
u32 t;
- ar40xx_write(priv, AR40XX_REG_PORT_STATUS(port), 0);
+ ar40xx_rmw(priv, AR40XX_REG_PORT_STATUS(port),
+ AR40XX_PORT_AUTO_LINK_EN, 0);
/* CPU port is setting headers to limit output ports */
if (port == 0)
--
2.25.1

View File

@@ -89,7 +89,7 @@ index 209ae3dc46..c8e1eca88b 100644
wps_not_configured=1
+ [ "$macfilter" = radius ] && {
+ append_radius_server
+ vlan_possible = 1
+ vlan_possible=1
+ }
;;
psk|sae|psk-sae)