Update QCA Source

This commit is contained in:
VIKINGYFY 2025-05-28 19:33:23 +08:00 committed by VIKING
parent c3968fcdeb
commit c8772bddae
18 changed files with 112 additions and 73 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
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 = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "msi";
+ msi-parent = <&gic_v2m0>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;

View File

@ -15,7 +15,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
--- 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";