From c8772bddae9bb2f30d91a64ca799734bd1402755 Mon Sep 17 00:00:00 2001 From: VIKINGYFY Date: Wed, 28 May 2025 19:33:23 +0800 Subject: [PATCH] Update QCA Source --- config/Config-kernel.in | 1 + feeds.conf.default | 2 +- package/kernel/qca-nss-dp/Makefile | 5 +++ .../usr/share/schema/wireless.wifi-iface.json | 7 ++++ .../wifi-scripts/files/lib/netifd/hostapd.sh | 10 +++--- target/linux/qualcommax/Makefile | 11 +++++- target/linux/qualcommax/config-6.12 | 7 ++-- .../files/net/core/skbuff_recycle.c | 2 +- target/linux/qualcommax/image/ipq60xx.mk | 28 +++++++-------- .../ipq60xx/base-files/etc/board.d/02_network | 0 .../etc/hotplug.d/firmware/11-ath11k-caldata | 8 +---- .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 9 +++-- .../ipq60xx/base-files/lib/upgrade/alfa.sh | 34 ------------------- .../base-files/lib/upgrade/platform.sh | 30 ++++++++++++++++ .../ipq807x/base-files/etc/board.d/02_network | 4 +-- .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 4 +-- ...qcom-ipq6018-use-msi-parent-for-PCIe.patch | 21 ++++++++++++ ...07-soc-qcom-fix-smp2p-ack-on-ipq6018.patch | 2 +- 18 files changed, 112 insertions(+), 73 deletions(-) mode change 100644 => 100755 target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network delete mode 100644 target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/alfa.sh create mode 100644 target/linux/qualcommax/patches-6.12/0110-arm64-dts-qcom-ipq6018-use-msi-parent-for-PCIe.patch diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 39681be95d..6e67b93bc7 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -522,6 +522,7 @@ config KERNEL_DEBUG_VIRTUAL config KERNEL_DYNAMIC_DEBUG bool "Compile the kernel with dynamic printk" + default y if TARGET_qualcommax select KERNEL_DEBUG_FS help Compiles debug level messages into the kernel, which would not diff --git a/feeds.conf.default b/feeds.conf.default index 6a9d9d4a86..ea42a5da8e 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,4 @@ -src-git nss_packages https://github.com/LiBwrt/nss-packages.git +src-git nss_packages https://github.com/qosmio/nss-packages.git src-git sqm_scripts_nss https://github.com/qosmio/sqm-scripts-nss.git src-git packages https://github.com/immortalwrt/packages.git src-git luci https://github.com/immortalwrt/luci.git diff --git a/package/kernel/qca-nss-dp/Makefile b/package/kernel/qca-nss-dp/Makefile index eee9c767ce..df70f2cd0a 100644 --- a/package/kernel/qca-nss-dp/Makefile +++ b/package/kernel/qca-nss-dp/Makefile @@ -12,6 +12,11 @@ PKG_MIRROR_HASH:=795ffccf1f4d61b6a5e0a6964ce21efa7b7b3c73b31b93140c56af7d970293b PKG_BUILD_PARALLEL:=1 PKG_FLAGS:=nonshared +PKG_CONFIG_DEPENDS:= \ + CONFIG_TARGET_qualcommax_ipq807x \ + CONFIG_TARGET_qualcommax_ipq60xx \ + CONFIG_TARGET_qualcommax_ipq50xx + include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json index 3964098b57..58b665fc74 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json @@ -724,6 +724,13 @@ "type": "alias", "default": "nas_identifier" }, + "network": { + "description": "Specifies one or multiple logical network interfaces declared in the network configuration, each one should be a L3 bridge to be able to attach this L2 wireless interface.", + "type": "array", + "items": { + "type": "string" + } + }, "network_auth_type": { "description": "Network Authentication Type", "type": "string" diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh index 39186365bd..0caa4f5a1d 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh @@ -767,13 +767,13 @@ hostapd_set_bss_options() { [ "$fils" -gt 0 ] && { set_default erp_domain "$mobility_domain" - set_default erp_domain "$(echo "$ssid" | md5sum | head -c 8)" + set_default erp_domain "$(echo -n "$ssid" | md5sum | head -c 8)" set_default fils_realm "$erp_domain" append bss_conf "erp_send_reauth_start=1" "$N" append bss_conf "erp_domain=$erp_domain" "$N" append bss_conf "fils_realm=$fils_realm" "$N" - append bss_conf "fils_cache_id=$(echo "$fils_realm" | md5sum | head -c 4)" "$N" + append bss_conf "fils_cache_id=$(echo -n "$fils_realm" | md5sum | head -c 4)" "$N" [ "$fils_dhcp" = "*" ] && { json_get_values network network @@ -950,7 +950,7 @@ hostapd_set_bss_options() { if [ "$wpa" -ge "1" ]; then if [ "$fils" -gt 0 ]; then json_get_vars fils_realm - set_default fils_realm "$(echo "$ssid" | md5sum | head -c 8)" + set_default fils_realm "$(echo -n "$ssid" | md5sum | head -c 8)" fi append bss_conf "wpa_disable_eapol_key_retries=$wpa_disable_eapol_key_retries" "$N" @@ -963,7 +963,7 @@ hostapd_set_bss_options() { if [ "$ieee80211r" -gt "0" ]; then json_get_vars mobility_domain ft_psk_generate_local ft_over_ds reassociation_deadline - set_default mobility_domain "$(echo "$ssid" | md5sum | head -c 4)" + set_default mobility_domain "$(echo -n "$ssid" | md5sum | head -c 4)" set_default ft_over_ds 0 set_default reassociation_deadline 1000 @@ -995,7 +995,7 @@ hostapd_set_bss_options() { wireless_setup_vif_failed FT_KEY_CANT_BE_DERIVED return 1 fi - ft_key=`echo -n "$mobility_domain/${auth_secret:-${key}}" | md5sum | awk '{print $1}'` + ft_key="$(echo -n "$mobility_domain/${auth_secret:-${key}}" | md5sum | awk '{print $1}')" set_default r0kh "ff:ff:ff:ff:ff:ff,*,$ft_key" set_default r1kh "00:00:00:00:00:00,00:00:00:00:00:00,$ft_key" diff --git a/target/linux/qualcommax/Makefile b/target/linux/qualcommax/Makefile index 6b933dcd1c..74386d9962 100644 --- a/target/linux/qualcommax/Makefile +++ b/target/linux/qualcommax/Makefile @@ -16,14 +16,23 @@ DEFAULT_PACKAGES += \ kmod-dsa kmod-dsa-qca8k kmod-fs-ext4 kmod-fs-f2fs kmod-gpio-button-hotplug kmod-leds-gpio \ kmod-ath11k kmod-ath11k-ahb kmod-ath11k-pci kmod-phy-aquantia kmod-phy-marvell kmod-phy-qca83xx \ kmod-usb3 kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-qca-nss-dp \ - kmod-qca-nss-ecm kmod-qca-nss-drv \ + kmod-qca-nss-drv kmod-qca-nss-ecm kmod-qca-nss-crypto \ kmod-qca-nss-drv-bridge-mgr \ + kmod-qca-nss-drv-eogremgr \ + kmod-qca-nss-drv-gre \ kmod-qca-nss-drv-igs \ kmod-qca-nss-drv-l2tpv2 \ kmod-qca-nss-drv-lag-mgr \ + kmod-qca-nss-drv-map-t \ + kmod-qca-nss-drv-match \ + kmod-qca-nss-drv-mirror \ kmod-qca-nss-drv-pppoe \ kmod-qca-nss-drv-pptp \ kmod-qca-nss-drv-qdisc \ + kmod-qca-nss-drv-tun6rd \ + kmod-qca-nss-drv-tunipip6 \ kmod-qca-nss-drv-vlan-mgr \ + kmod-qca-nss-drv-vxlanmgr \ + kmod-qca-nss-drv-wifi-meshmgr \ $(eval $(call BuildTarget)) diff --git a/target/linux/qualcommax/config-6.12 b/target/linux/qualcommax/config-6.12 index 899544d8d7..63017cb0e5 100644 --- a/target/linux/qualcommax/config-6.12 +++ b/target/linux/qualcommax/config-6.12 @@ -534,10 +534,11 @@ CONFIG_SERIAL_MSM=y CONFIG_SERIAL_MSM_CONSOLE=y CONFIG_SGL_ALLOC=y CONFIG_SG_POOL=y +# CONFIG_ALLOC_SKB_PAGE_FRAG_DISABLE is not set +# CONFIG_DEBUG_OBJECTS_SKBUFF is not set CONFIG_SKB_RECYCLER=y -# CONFIG_SKB_RECYCLER_MULTI_CPU is not set -# CONFIG_SKB_RECYCLER_PREALLOC is not set -CONFIG_SKB_RECYCLE_SIZE=2304 +CONFIG_SKB_RECYCLER_MULTI_CPU=y +# CONFIG_SKB_FAST_RECYCLABLE_DEBUG_ENABLE is not set CONFIG_SMP=y # CONFIG_SM_CAMCC_4450 is not set # CONFIG_SM_CAMCC_6350 is not set diff --git a/target/linux/qualcommax/files/net/core/skbuff_recycle.c b/target/linux/qualcommax/files/net/core/skbuff_recycle.c index d250567097..a7583da978 100644 --- a/target/linux/qualcommax/files/net/core/skbuff_recycle.c +++ b/target/linux/qualcommax/files/net/core/skbuff_recycle.c @@ -397,7 +397,7 @@ static void skb_recycler_free_skb(struct sk_buff_head *list) skbuff_debugobj_activate(skb); next = skb->next; __skb_unlink(skb, list); - skb_release_data(skb, SKB_CONSUMED); + skb_release_data(skb, SKB_CONSUMED, false); kfree_skbmem(skb); /* * Update the skb->sum for next due to skb_link operation diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index a9c7b88c43..31d0422fe5 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -31,6 +31,7 @@ define Device/alfa-network_ap120c-ax BLOCKSIZE := 128k PAGESIZE := 2048 SOC := ipq6000 + DEVICE_DTS_CONFIG := config@cp03-c1 DEVICE_PACKAGES := ipq-wifi-alfa-network_ap120c-ax endef TARGET_DEVICES += alfa-network_ap120c-ax @@ -42,8 +43,8 @@ define Device/cambiumnetworks_xe3-4 DEVICE_MODEL := XE3-4 BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_DTS_CONFIG := config@cp01-c3-xv3-4 SOC := ipq6010 + DEVICE_DTS_CONFIG := config@cp01-c3-xv3-4 DEVICE_PACKAGES := ipq-wifi-cambiumnetworks_xe34 ath11k-firmware-qcn9074 kmod-ath11k-pci endef TARGET_DEVICES += cambiumnetworks_xe3-4 @@ -54,8 +55,8 @@ define Device/glinet_gl-common DEVICE_VENDOR := GL.iNet BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_DTS_CONFIG := config@cp03-c1 SOC := ipq6000 + DEVICE_DTS_CONFIG := config@cp03-c1 IMAGES += factory.bin IMAGE/factory.bin := append-ubi | append-gl-metadata endef @@ -90,9 +91,9 @@ endef define Device/linksys_mr7350 $(call Device/linksys_mr) DEVICE_MODEL := MR7350 + SOC := ipq6000 NAND_SIZE := 256m IMAGE_SIZE := 75776k - SOC := ipq6000 DEVICE_PACKAGES += ipq-wifi-linksys_mr7350 kmod-leds-pca963x endef TARGET_DEVICES += linksys_mr7350 @@ -103,9 +104,7 @@ define Device/linksys_mr7500 SOC := ipq6010 NAND_SIZE := 512m IMAGE_SIZE := 147456k - DEVICE_PACKAGES += ipq-wifi-linksys_mr7500 \ - ath11k-firmware-qcn9074 kmod-ath11k-pci \ - kmod-leds-pwm kmod-phy-aquantia + DEVICE_PACKAGES += ipq-wifi-linksys_mr7500 ath11k-firmware-qcn9074 kmod-ath11k-pci kmod-leds-pwm kmod-phy-aquantia endef TARGET_DEVICES += linksys_mr7500 @@ -116,8 +115,8 @@ define Device/netgear_wax214 DEVICE_MODEL := WAX214 BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_DTS_CONFIG := config@cp03-c1 SOC := ipq6010 + DEVICE_DTS_CONFIG := config@cp03-c1 DEVICE_PACKAGES := ipq-wifi-netgear_wax214 endef TARGET_DEVICES += netgear_wax214 @@ -127,8 +126,8 @@ define Device/netgear_wax610-common DEVICE_VENDOR := Netgear BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_DTS_CONFIG := config@cp03-c1 SOC := ipq6010 + DEVICE_DTS_CONFIG := config@cp03-c1 KERNEL_IN_UBI := 1 IMAGES += ui-factory.tar IMAGE/ui-factory.tar := append-ubi | qsdk-ipq-factory-nand | pad-to 4096 | wax610-netgear-tar @@ -168,6 +167,7 @@ define Device/tplink_eap6xx-common BLOCKSIZE := 128k PAGESIZE := 2048 SOC := ipq6010 + DEVICE_DTS_CONFIG := config@cp03-c1 DEVICE_PACKAGES := kmod-phy-realtek IMAGES += web-ui-factory.bin IMAGE/web-ui-factory.bin := append-ubi | tplink-image-2022 @@ -214,8 +214,8 @@ define Device/yuncore_fap650 DEVICE_MODEL := FAP650 BLOCKSIZE := 128k PAGESIZE := 2048 - DEVICE_DTS_CONFIG := config@cp03-c1 SOC := ipq6000 + DEVICE_DTS_CONFIG := config@cp03-c1 DEVICE_PACKAGES := ipq-wifi-yuncore_fap650 IMAGES := factory.ubi factory.ubin sysupgrade.bin IMAGE/factory.ubin := append-ubi | qsdk-ipq-factory-nand @@ -279,8 +279,8 @@ define Device/redmi_ax5-jdcloud $(call Device/EmmcImage) DEVICE_VENDOR := Redmi DEVICE_MODEL := AX5 JDCloud - BLOCKSIZE := 128k KERNEL_SIZE := 6144k + BLOCKSIZE := 128k SOC := ipq6000 DEVICE_DTS_CONFIG := config@cp03-c1 DEVICE_PACKAGES := ipq-wifi-redmi_ax5-jdcloud @@ -293,8 +293,8 @@ define Device/link_nn6000-v1 $(call Device/EmmcImage) DEVICE_VENDOR := Link DEVICE_MODEL := NN6000 v1 - BLOCKSIZE := 128k KERNEL_SIZE := 6144k + BLOCKSIZE := 128k SOC := ipq6000 DEVICE_DTS_CONFIG := config@cp03-c2 DEVICE_PACKAGES := ipq-wifi-link_nn6000 @@ -313,8 +313,8 @@ define Device/jdcloud_re-ss-01 $(call Device/EmmcImage) DEVICE_VENDOR := JDCloud DEVICE_MODEL := RE-SS-01 - BLOCKSIZE := 128k KERNEL_SIZE := 6144k + BLOCKSIZE := 128k SOC := ipq6000 DEVICE_DTS_CONFIG := config@cp03-c2 DEVICE_PACKAGES := ipq-wifi-jdcloud_re-ss-01 @@ -327,8 +327,8 @@ define Device/jdcloud_re-cs-02 $(call Device/EmmcImage) DEVICE_VENDOR := JDCloud DEVICE_MODEL := RE-CS-02 - BLOCKSIZE := 128k KERNEL_SIZE := 6144k + BLOCKSIZE := 128k SOC := ipq6010 DEVICE_DTS_CONFIG := config@cp03-c3 DEVICE_PACKAGES := ipq-wifi-jdcloud_re-cs-02 ath11k-firmware-qcn9074 kmod-ath11k-pci luci-app-athena-led luci-i18n-athena-led-zh-cn @@ -341,8 +341,8 @@ define Device/jdcloud_re-cs-07 $(call Device/EmmcImage) DEVICE_VENDOR := JDCloud DEVICE_MODEL := RE-CS-07 - BLOCKSIZE := 128k KERNEL_SIZE := 6144k + BLOCKSIZE := 128k SOC := ipq6010 DEVICE_DTS_CONFIG := config@cp03-c4 DEVICE_PACKAGES := -ath11k-firmware-ipq6018 -ath11k-firmware-qcn9074 -kmod-ath11k -kmod-ath11k-ahb -kmod-ath11k-pci -hostapd-common -wpad-openssl diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network old mode 100644 new mode 100755 diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index bc9b0085ac..d2b7a1621d 100755 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -9,15 +9,9 @@ board=$(board_name) case "$FIRMWARE" in "ath11k/IPQ6018/hw1.0/cal-ahb-c000000.wifi.bin") case "$board" in - 8devices,mango-dvk) - caldata_extract "0:ART" 0x1000 0x20000 - ;; + 8devices,mango-dvk|\ alfa-network,ap120c-ax) caldata_extract "0:ART" 0x1000 0x20000 - label_mac=$(mtd_get_mac_binary 0:ART 12) - ath11k_patch_mac $label_mac 1 - ath11k_patch_mac $(macaddr_add $label_mac 1) 0 - ath11k_set_macflag ;; cambiumnetworks,xe3-4) caldata_extract "0:ART" 0x1000 0x10000 diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 01a7d6e165..3a6ad702f7 100755 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -10,9 +10,14 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in + alfa-network,ap120c-ax) + label_mac=$(mtd_get_mac_binary 0:ART 12) + [ "$PHYNBR" = "0" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress + ;; cmiot,ax18|\ zn,m2) - label_mac=$(mtd_get_mac_binary "0:art" 0x6) + label_mac=$(mtd_get_mac_binary 0:art 0x6) [ "$PHYNBR" = "0" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress ;; @@ -24,7 +29,7 @@ case "$board" in ;; link,nn6000-v1|\ link,nn6000-v2) - label_mac=$(mmc_get_mac_binary "0:ART" 0x18) + label_mac=$(mmc_get_mac_binary 0:ART 0x18) [ "$PHYNBR" = "0" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress ;; diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/alfa.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/alfa.sh deleted file mode 100644 index 5d30af827e..0000000000 --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/alfa.sh +++ /dev/null @@ -1,34 +0,0 @@ -. /lib/functions.sh - -# Flip active 'rootfs' partition in selected 'bootconfig' mtd partition -# $1 target 'bootconfig' mtd partition name -# $2 'offset' of the active rootfs flag byte -alfa_bootconfig_rootfs_rotate() { - local part="$1" - local offs="$2" - - local mtdnum=$(find_mtd_index "$part") - [ -c "/dev/mtd${mtdnum}" ] || return 1 - - dd if=/dev/mtd${mtdnum} of=/tmp/mtd${mtdnum} bs=1k > /dev/null 2>&1 - - local active="$(dd if=/tmp/mtd${mtdnum} bs=1 skip=${offs} count=1 2>/dev/null)" - active=$(printf "%d\n" "\"$active") - - if [ "$active" = "1" ]; then - printf '\x00' | dd of=/tmp/mtd${mtdnum} \ - conv=notrunc bs=1 seek=${offs} > /dev/null 2>&1 - else - printf '\x01' | dd of=/tmp/mtd${mtdnum} \ - conv=notrunc bs=1 seek=${offs} > /dev/null 2>&1 - fi - - mtd -qq write /tmp/mtd${mtdnum} /dev/mtd${mtdnum} 2>/dev/null - - local mtdnum_sec=$(find_mtd_index "${part}1") - [ -c "/dev/mtd${mtdnum_sec}" ] && \ - mtd -qq write \ - /tmp/mtd${mtdnum} /dev/mtd${mtdnum_sec} 2>/dev/null - - return 0 -} diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh index 5c73980ce6..aaea427f9b 100755 --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh @@ -104,6 +104,36 @@ EOF fw_setenv --script /tmp/env_tmp } +alfa_bootconfig_rootfs_rotate() { + local part="$1" + local offs="$2" + + local mtdnum=$(find_mtd_index "$part") + [ -c "/dev/mtd${mtdnum}" ] || return 1 + + dd if=/dev/mtd${mtdnum} of=/tmp/mtd${mtdnum} bs=1k > /dev/null 2>&1 + + local active="$(dd if=/tmp/mtd${mtdnum} bs=1 skip=${offs} count=1 2>/dev/null)" + active=$(printf "%d\n" "\"$active") + + if [ "$active" = "1" ]; then + printf '\x00' | dd of=/tmp/mtd${mtdnum} \ + conv=notrunc bs=1 seek=${offs} > /dev/null 2>&1 + else + printf '\x01' | dd of=/tmp/mtd${mtdnum} \ + conv=notrunc bs=1 seek=${offs} > /dev/null 2>&1 + fi + + mtd -qq write /tmp/mtd${mtdnum} /dev/mtd${mtdnum} 2>/dev/null + + local mtdnum_sec=$(find_mtd_index "${part}1") + [ -c "/dev/mtd${mtdnum_sec}" ] && \ + mtd -qq write \ + /tmp/mtd${mtdnum} /dev/mtd${mtdnum_sec} 2>/dev/null + + return 0 +} + platform_do_upgrade() { case "$(board_name)" in alfa-network,ap120c-ax) diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network index dd96ec8673..2e6382c62f 100755 --- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network +++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network @@ -84,7 +84,7 @@ ipq807x_setup_macs() case "$board" in aliyun,ap8220) - wan_mac=$(cat /dev/mtd12 | awk -F '\t' '/product.mac/{print $2}') + wan_mac=$(cat $(find_mtd_part product_info) | awk -F '\t' '/product.mac/{print $2}') lan_mac=$(macaddr_add $wan_mac 1) label_mac=$wan_mac ;; @@ -113,7 +113,7 @@ ipq807x_setup_macs() label_mac=$wan_mac ;; verizon,cr1000a) - wan_mac=$(mmc_get_mac_ascii "0:APPSBLENV" baseMAC) + wan_mac=$(mmc_get_mac_ascii 0:APPSBLENV baseMAC) lan_mac=$(macaddr_add "$wan_mac" 1) label_mac=$wan_mac ;; diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index cb7cdb7b4d..a62d25582a 100755 --- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -11,7 +11,7 @@ board=$(board_name) case "$board" in aliyun,ap8220) - label_mac=$(cat /dev/mtd12 | awk -F '\t' '/product.mac/{print $2}') + label_mac=$(cat $(find_mtd_part product_info) | awk -F '\t' '/product.mac/{print $2}') [ "$PHYNBR" = "0" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $label_mac 3 > /sys${DEVPATH}/macaddress ;; @@ -60,7 +60,7 @@ case "$board" in [ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress ;; verizon,cr1000a) - label_mac=$(mmc_get_mac_ascii "0:APPSBLENV" baseMAC) + label_mac=$(mmc_get_mac_ascii 0:APPSBLENV baseMAC) [ "$PHYNBR" = "0" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $label_mac 3 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "2" ] && macaddr_add $label_mac 4 > /sys${DEVPATH}/macaddress diff --git a/target/linux/qualcommax/patches-6.12/0110-arm64-dts-qcom-ipq6018-use-msi-parent-for-PCIe.patch b/target/linux/qualcommax/patches-6.12/0110-arm64-dts-qcom-ipq6018-use-msi-parent-for-PCIe.patch new file mode 100644 index 0000000000..960f1293df --- /dev/null +++ b/target/linux/qualcommax/patches-6.12/0110-arm64-dts-qcom-ipq6018-use-msi-parent-for-PCIe.patch @@ -0,0 +1,21 @@ +--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi ++++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi +@@ -749,7 +749,7 @@ + interrupts = ; + ranges = <0 0 0 0xb00a000 0 0xffd>; + +- v2m@0 { ++ gic_v2m0: v2m@0 { + compatible = "arm,gic-v2m-frame"; + msi-controller; + reg = <0x0 0x0 0x0 0xffd>; +@@ -911,8 +911,7 @@ + ranges = <0x81000000 0x0 0x00000000 0x0 0x20200000 0x0 0x10000>, + <0x82000000 0x0 0x20220000 0x0 0x20220000 0x0 0xfde0000>; + +- interrupts = ; +- interrupt-names = "msi"; ++ msi-parent = <&gic_v2m0>; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0x7>; diff --git a/target/linux/qualcommax/patches-6.12/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch b/target/linux/qualcommax/patches-6.12/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch index e4f1809924..3ad1d87b14 100644 --- a/target/linux/qualcommax/patches-6.12/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch +++ b/target/linux/qualcommax/patches-6.12/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch @@ -15,7 +15,7 @@ Signed-off-by: Mantas Pucka --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -1204,6 +1204,7 @@ +@@ -1203,6 +1203,7 @@ wcss_smp2p_out: master-kernel { qcom,entry-name = "master-kernel";