Skip to content

Commit

Permalink
Merge branch 'openwrt:main' into qualcommax-ssdk-12.5.r2
Browse files Browse the repository at this point in the history
  • Loading branch information
qosmio authored May 6, 2024
2 parents d94b3af + 064d4a8 commit 25a04d0
Show file tree
Hide file tree
Showing 32 changed files with 646 additions and 376 deletions.
4 changes: 2 additions & 2 deletions include/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .29
LINUX_KERNEL_HASH-6.6.29 = 7f26f74c08082c86b1daf866e4d49c5d8276cc1906a89d0e367e457ec167cbd0
LINUX_VERSION-6.6 = .30
LINUX_KERNEL_HASH-6.6.30 = b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6
3 changes: 3 additions & 0 deletions package/boot/uboot-envtools/files/ipq40xx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ linksys,mr8300)
linksys,whw01)
ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x40000" "0x10000"
;;
linksys,whw03)
ubootenv_add_uci_config "/dev/mmcblk0p11" "0x0" "0x100000"
;;
linksys,whw03v2)
ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x80000" "0x20000"
;;
Expand Down
4 changes: 2 additions & 2 deletions package/libs/libxml2/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=libxml2
PKG_VERSION:=2.12.5
PKG_VERSION:=2.12.6
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
PKG_HASH:=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
PKG_HASH:=889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb

PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ SVN-Revision: 35130
goto next_ht;
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -259,7 +259,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
@@ -290,7 +290,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
continue;

iph2 = (struct ipv6hdr *)(p->data + off);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation

--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3305,6 +3305,9 @@ static int mv88e6xxx_setup_port(struct m
@@ -3353,6 +3353,9 @@ static int mv88e6xxx_setup_port(struct m
else
reg = 1 << port;

Expand Down
4 changes: 2 additions & 2 deletions target/linux/generic/hack-6.6/901-debloat_sock_diag.patch
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

static void sock_def_write_space_wfree(struct sock *sk);
static void sock_def_write_space(struct sock *sk);
@@ -589,6 +591,21 @@ discard_and_relse:
@@ -590,6 +592,21 @@ discard_and_relse:
}
EXPORT_SYMBOL(__sk_receive_skb);

Expand All @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
u32));
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
@@ -2246,9 +2263,11 @@ static void __sk_free(struct sock *sk)
@@ -2247,9 +2264,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1);

Expand Down
2 changes: 1 addition & 1 deletion target/linux/generic/hack-6.6/902-debloat_proc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <[email protected]>

--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -4144,6 +4144,8 @@ static __net_initdata struct pernet_oper
@@ -4145,6 +4145,8 @@ static __net_initdata struct pernet_oper

static int __init proto_init(void)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From: Felix Fietkau <[email protected]>
Date: Sun, 5 May 2024 20:36:56 +0200
Subject: [PATCH] net: bridge: fix corrupted ethernet header on
multicast-to-unicast

The change from skb_copy to pskb_copy unfortunately changed the data
copying to omit the ethernet header, since it was pulled before reaching
this point. Fix this by calling __skb_push/pull around pskb_copy.

Fixes: 59c878cbcdd8 ("net: bridge: fix multicast-to-unicast with fraglist GSO")
Signed-off-by: Felix Fietkau <[email protected]>
---

--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -253,6 +253,7 @@ static void maybe_deliver_addr(struct ne
{
struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
const unsigned char *src = eth_hdr(skb)->h_source;
+ struct sk_buff *nskb;

if (!should_deliver(p, skb))
return;
@@ -261,12 +262,16 @@ static void maybe_deliver_addr(struct ne
if (skb->dev == p->dev && ether_addr_equal(src, addr))
return;

- skb = pskb_copy(skb, GFP_ATOMIC);
- if (!skb) {
+ __skb_push(skb, ETH_HLEN);
+ nskb = pskb_copy(skb, GFP_ATOMIC);
+ __skb_pull(skb, ETH_HLEN);
+ if (!nskb) {
DEV_STATS_INC(dev, tx_dropped);
return;
}

+ skb = nskb;
+ __skb_pull(skb, ETH_HLEN);
if (!is_broadcast_ether_addr(addr))
memcpy(eth_hdr(skb)->h_dest, addr, ETH_ALEN);

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From: Felix Fietkau <[email protected]>
Date: Sun, 5 May 2024 20:36:56 +0200
Subject: [PATCH] net: bridge: fix corrupted ethernet header on
multicast-to-unicast

The change from skb_copy to pskb_copy unfortunately changed the data
copying to omit the ethernet header, since it was pulled before reaching
this point. Fix this by calling __skb_push/pull around pskb_copy.

Fixes: 59c878cbcdd8 ("net: bridge: fix multicast-to-unicast with fraglist GSO")
Signed-off-by: Felix Fietkau <[email protected]>
---

--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -258,6 +258,7 @@ static void maybe_deliver_addr(struct ne
{
struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
const unsigned char *src = eth_hdr(skb)->h_source;
+ struct sk_buff *nskb;

if (!should_deliver(p, skb))
return;
@@ -266,12 +267,16 @@ static void maybe_deliver_addr(struct ne
if (skb->dev == p->dev && ether_addr_equal(src, addr))
return;

- skb = pskb_copy(skb, GFP_ATOMIC);
- if (!skb) {
+ __skb_push(skb, ETH_HLEN);
+ nskb = pskb_copy(skb, GFP_ATOMIC);
+ __skb_pull(skb, ETH_HLEN);
+ if (!nskb) {
DEV_STATS_INC(dev, tx_dropped);
return;
}

+ skb = nskb;
+ __skb_pull(skb, ETH_HLEN);
if (!is_broadcast_ether_addr(addr))
memcpy(eth_hdr(skb)->h_dest, addr, ETH_ALEN);

Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ Signed-off-by: Felix Fietkau <[email protected]>
static int min_rcvbuf = SOCK_MIN_RCVBUF;
static int max_skb_frags = MAX_SKB_FRAGS;
+static int backlog_threaded;
static int min_mem_pcpu_rsv = SK_MEMORY_PCPU_RESERVE;

static int net_msg_warn; /* Unused, but still a sysctl */

@@ -188,6 +189,23 @@ static int rps_sock_flow_sysctl(struct c
@@ -189,6 +190,23 @@ static int rps_sock_flow_sysctl(struct c
}
#endif /* CONFIG_RPS */

Expand All @@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
#ifdef CONFIG_NET_FLOW_LIMIT
static DEFINE_MUTEX(flow_limit_update_mutex);

@@ -532,6 +550,15 @@ static struct ctl_table net_core_table[]
@@ -541,6 +559,15 @@ static struct ctl_table net_core_table[]
.proc_handler = rps_sock_flow_sysctl
},
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <[email protected]>

--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -6887,6 +6887,7 @@ static int mv88e6xxx_register_switch(str
@@ -6935,6 +6935,7 @@ static int mv88e6xxx_register_switch(str
ds->ops = &mv88e6xxx_switch_ops;
ds->ageing_time_min = chip->info->age_time_coeff;
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
Expand Down
5 changes: 5 additions & 0 deletions target/linux/ipq40xx/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ipq40xx_setup_interfaces()
glinet,gl-ap1300|\
glinet,gl-b2200|\
google,wifi|\
linksys,whw03|\
linksys,whw03v2|\
luma,wrtq-329acn|\
mikrotik,cap-ac|\
Expand Down Expand Up @@ -215,6 +216,10 @@ ipq40xx_setup_macs()
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
linksys,whw03)
wan_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
lan_mac="$wan_mac"
;;
mikrotik,cap-ac |\
mikrotik,hap-ac2|\
mikrotik,hap-ac3|\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ case "$FIRMWARE" in
# OEM assigns 4 sequential MACs
ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
;;
linksys,whw03)
caldata_extract_mmc "0:ART" 0x9000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
;;
netgear,rbr40|\
netgear,rbs40|\
netgear,rbr50|\
Expand Down Expand Up @@ -104,6 +108,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
;;
linksys,whw03)
caldata_extract_mmc "0:ART" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
;;
meraki,mr33 |\
meraki,mr74)
caldata_extract_ubi "ART" 0x1000 0x2f20
Expand Down Expand Up @@ -200,6 +208,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
;;
linksys,whw03)
caldata_extract_mmc "0:ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
;;
meraki,mr33 |\
meraki,mr74)
caldata_extract_ubi "ART" 0x5000 0x2f20
Expand Down
32 changes: 32 additions & 0 deletions target/linux/ipq40xx/base-files/etc/init.d/bootcount
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

START=99

mmc_resetbc() {
local part_label="$1"

. /lib/functions.sh

local part_device="$(find_mmc_part "$part_label")"
if [ "$part_device" = "" ]; then
>&2 echo "mmc_resetbc: Unknown partition label: $part_label"
return 1
fi

local magic_number="$(hexdump -e '"0x%02x\n"' -n 4 "$part_device")"
if [ "$magic_number" != "0x20110811" ]; then
>&2 echo "mmc_resetbc: Unexpected partition magic: $magic_number"
return 1
fi

local last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
if [ "$last_count" != "0x00" ]; then
printf "\x00" | dd of="$part_device" bs=4 seek=1 count=1 conv=notrunc 2>/dev/null

last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
if [ "$last_count" != "0x00" ]; then
>&2 echo "mmc_resetbc: Unable to reset boot counter"
return 1
fi
fi
}

boot() {
case $(board_name) in
alfa-network,ap120c-ac)
Expand All @@ -15,6 +44,9 @@ boot() {
linksys,whw03v2)
mtd resetbc s_env || true
;;
linksys,whw03)
mmc_resetbc s_env || true
;;
netgear,wac510)
fw_setenv boot_cnt=0
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ preinit_set_mac_address() {
ip link set dev lan1 address $(macaddr_add "$base_mac" 1)
ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7)
;;
linksys,whw03)
base_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
ip link set dev eth0 address "$base_mac"
ip link set dev lan address "$base_mac"
ip link set dev wan address "$base_mac"
;;
mikrotik,wap-ac|\
mikrotik,wap-ac-lte|\
mikrotik,wap-r-ac)
Expand Down
68 changes: 68 additions & 0 deletions target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,71 @@ platform_do_upgrade_linksys() {
get_image "$1" | mtd -e "$part_label" write - "$part_label"
}
}

linksys_get_cmdline_rootfs_device() {
if read cmdline < /proc/cmdline; then
case "$cmdline" in
*root=*)
local str="${cmdline##*root=}"
echo "${str%% *}"
return
;;
esac
fi
return 1
}

linksys_get_current_boot_part_emmc() {
local boot_part="$(fw_printenv -n boot_part)"
if [ "$boot_part" = 1 ] || [ "$boot_part" = 2 ]; then
v "Current boot_part=$boot_part selected from bootloader environment"
else
local rootfs_device="$(linksys_get_cmdline_rootfs_device)"
if [ "$rootfs_device" = "$(find_mmc_part "rootfs")" ]; then
boot_part=1
elif [ "$rootfs_device" = "$(find_mmc_part "alt_rootfs")" ]; then
boot_part=2
else
v "Could not determine current boot_part"
return 1
fi
v "Current boot_part=$boot_part selected from cmdline rootfs=$rootfs_device"
fi
echo $boot_part
}

linksys_set_target_partitions_emmc() {
local current_boot_part="$1"

if [ "$current_boot_part" = 1 ]; then
CI_KERNPART="alt_kernel"
CI_ROOTPART="alt_rootfs"
fw_setenv -s - <<-EOF
boot_part 2
auto_recovery yes
EOF
elif [ "$current_boot_part" = 2 ]; then
CI_KERNPART="kernel"
CI_ROOTPART="rootfs"
fw_setenv -s - <<-EOF
boot_part 1
auto_recovery yes
EOF
else
v "Could not set target eMMC partitions"
return 1
fi

v "Target eMMC partitions: $CI_KERNPART, $CI_ROOTPART"
}

platform_do_upgrade_linksys_emmc() {
local file="$1"

mkdir -p /var/lock
local current_boot_part="$(linksys_get_current_boot_part_emmc)"
linksys_set_target_partitions_emmc "$current_boot_part" || exit 1
touch /var/lock/fw_printenv.lock

emmc_do_upgrade "$file"
}
6 changes: 5 additions & 1 deletion target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ platform_do_upgrade() {
linksys,whw03v2)
platform_do_upgrade_linksys "$1"
;;
linksys,whw03)
platform_do_upgrade_linksys_emmc "$1"
;;
meraki,mr33 |\
meraki,mr74)
CI_KERNPART="part.safe"
Expand Down Expand Up @@ -236,7 +239,8 @@ platform_do_upgrade() {
platform_copy_config() {
case "$(board_name)" in
glinet,gl-b2200 |\
google,wifi)
google,wifi |\
linksys,whw03)
emmc_copy_config
;;
esac
Expand Down
Loading

0 comments on commit 25a04d0

Please sign in to comment.