Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2026-03-31 14:21:12 +08:00
722 changed files with 122337 additions and 2158 deletions
+20
View File
@@ -64,6 +64,26 @@ config KERNEL_RISCV_PMU_SBI
bool
depends on riscv64
config KERNEL_NR_CPUS
int "Maximum number of CPUs (2-512)" if TARGET_x86
range 2 512 if TARGET_x86
default 512 if TARGET_x86_64
default 8 if TARGET_x86
help
Maximum number of CPUs supported by the kernel.
Each CPU allocates approximately 100-200KB of RAM for
per-CPU data structures.
Sample values:
4 - Ultra-low-level desktops e.g. Intel N150
8 - Low-level desktops e.g. Intel N305
16 - Mid-level dekstops e.g. AMD Ryzen 7
32 - High-level desktops e.g. AMD Ryzen 9/Intel Core i9
384 - High-level server e.g. AMD EPYC 9965
Lower values reduce memory usage. Set to match your hardware
for optimal memory efficiency.
config KERNEL_X86_VSYSCALL_EMULATION
bool "Enable vsyscall emulation"
depends on x86_64
+3
View File
@@ -154,6 +154,9 @@ define collect_module_symvers
grep -F $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
[ "$(PKG_BUILD_DIR)" = "$$$$realdir" ] || \
grep -F $$$$realdir $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
[ -s "$(PKG_BUILD_DIR)/Module.symvers.tmp" ] || [ "$(KERNEL_PATCHVER)" = "6.18" ] && \
sed 's/\.o$$$$//' $(PKG_BUILD_DIR)/$$$$subdir/modules.order | \
grep -Ff - $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
done; \
sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \
mkdir -p $(PKG_SYMVERS_DIR); \
@@ -272,6 +272,16 @@ define Trusted-Firmware-A/mt7981-cudy-ddr3
FIP_SIZE:=0x200000
endef
define Trusted-Firmware-A/mt7981-cudy-ddr4
NAME:=Cudy (SPI-NAND via SPIM, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
FIP_OFFSET:=0x3c0000
FIP_SIZE:=0x200000
endef
define Trusted-Firmware-A/mt7986-ram-ddr4
NAME:=MediaTek MT7986 (RAM, DDR4)
BOOT_DEVICE:=ram
@@ -721,6 +731,7 @@ TFA_TARGETS:= \
mt7981-sdmmc-ddr4 \
mt7981-spim-nand-ddr4 \
mt7981-cudy-ddr3 \
mt7981-cudy-ddr4 \
mt7986-ram-ddr3 \
mt7986-emmc-ddr3 \
mt7986-nor-ddr3 \
+52
View File
@@ -373,6 +373,54 @@ define U-Boot/mt7981_cudy_wbr3000uax-v1
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
endef
define U-Boot/mt7981_cudy_wr3000e-v1
NAME:=Cudy WR3000E v1
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cudy_wr3000e-v1-ubootmod
UBOOT_CONFIG:=mt7981_cudy_wr3000e-v1
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=cudy
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
endef
define U-Boot/mt7981_cudy_wr3000s-v1
NAME:=Cudy WR3000S v1
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cudy_wr3000s-v1-ubootmod
UBOOT_CONFIG:=mt7981_cudy_wr3000s-v1
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=cudy
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
endef
define U-Boot/mt7981_cudy_wr3000h-v1
NAME:=Cudy WR3000H v1
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cudy_wr3000h-v1-ubootmod
UBOOT_CONFIG:=mt7981_cudy_wr3000h-v1
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=cudy
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr3
endef
define U-Boot/mt7981_cudy_wr3000p-v1
NAME:=Cudy WR3000P v1
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cudy_wr3000p-v1-ubootmod
UBOOT_CONFIG:=mt7981_cudy_wr3000p-v1
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=cudy
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr4
DEPENDS:=+trusted-firmware-a-mt7981-cudy-ddr4
endef
define U-Boot/mt7981_glinet_gl-mt2500
NAME:=GL.iNet GL-MT2500
BUILD_SUBTARGET:=filogic
@@ -1263,6 +1311,10 @@ UBOOT_TARGETS := \
mt7981_comfast_cf-wr632ax \
mt7981_cudy_tr3000-v1 \
mt7981_cudy_wbr3000uax-v1 \
mt7981_cudy_wr3000e-v1 \
mt7981_cudy_wr3000s-v1 \
mt7981_cudy_wr3000h-v1 \
mt7981_cudy_wr3000p-v1 \
mt7981_gatonetworks_gdsp \
mt7981_glinet_gl-mt2500 \
mt7981_glinet_gl-x3000 \
@@ -0,0 +1,319 @@
--- /dev/null
+++ b/configs/mt7981_cudy_wr3000e-v1_defconfig
@@ -0,0 +1,108 @@
+CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_MEDIATEK=y
+CONFIG_TEXT_BASE=0x41e00000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cudy-wr3000e-v1"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_TARGET_MT7981=y
+CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
+CONFIG_DEBUG_UART_BASE=0x11002000
+CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_BOOTDELAY=30
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_MENU_SHOW=y
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cudy-wr3000e-v1.dtb"
+CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_LOG=y
+# CONFIG_BOARD_INIT is not set
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_SMC=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_OF_EMBED=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_ENV_REDUNDANT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y
+CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="defenvs/cudy_wr3000e-v1_env"
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NETCONSOLE=y
+CONFIG_USE_IPADDR=y
+CONFIG_IPADDR="192.168.1.1"
+CONFIG_USE_SERVERIP=y
+CONFIG_SERVERIP="192.168.1.254"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_PHY_FIXED=y
+CONFIG_MEDIATEK_ETH=y
+CONFIG_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_MT7981=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPIM=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
--- /dev/null
+++ b/arch/arm/dts/mt7981-cudy-wr3000e-v1.dts
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/dts-v1/;
+#include "mt7981.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "Cudy WR3000E v1";
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
+
+ chosen {
+ stdout-path = &uart0;
+ tick-timer = &timer0;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x10000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led_power_white {
+ label = "white:power";
+ gpios = <&pio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wan_white {
+ label = "white:wan";
+ gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&eth {
+ status = "okay";
+ mediatek,gmac-id = <0>;
+ phy-mode = "2500base-x";
+ mediatek,switch = "mt7531";
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ };
+};
+
+&pio {
+ spi_flash_pins: spi0-pins-func-1 {
+ mux {
+ function = "flash";
+ groups = "spi0", "spi0_wp_hold";
+ };
+
+ conf-pu {
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
+ };
+};
+
+&spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_flash_pins>;
+ status = "okay";
+ must_tx;
+ enhance_timing;
+ dma_ext;
+ ipm_design;
+ support_quad;
+ tick_dly = <2>;
+ sample_sel = <0>;
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bl2";
+ reg = <0x0 0x100000>;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x100000 0x80000>;
+ };
+
+ partition@180000 {
+ label = "factory";
+ reg = <0x180000 0x200000>;
+ };
+
+ partition@380000 {
+ label = "bdinfo";
+ reg = <0x380000 0x40000>;
+ };
+
+ partition@3c0000 {
+ label = "fip";
+ reg = <0x3c0000 0x200000>;
+ };
+
+ partition@5c0000 {
+ label = "ubi";
+ reg = <0x5c0000 0x7a40000>;
+ compatible = "linux,ubi";
+ };
+ };
+ };
+};
+
+&uart0 {
+ mediatek,force-highspeed;
+ status = "okay";
+};
+
+&watchdog {
+ status = "disabled";
+};
--- /dev/null
+++ b/defenvs/cudy_wr3000e-v1_env
@@ -0,0 +1,54 @@
+ipaddr=192.168.1.1
+serverip=192.168.1.254
+loadaddr=0x46000000
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
+bootconf=config-1
+bootdelay=0
+bootfile=immortalwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-initramfs-recovery.itb
+bootfile_bl2=immortalwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-preloader.bin
+bootfile_fip=immortalwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-bl31-uboot.fip
+bootfile_upg=immortalwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-squashfs-sysupgrade.itb
+bootled_pwr=white:power
+bootled_rec=white:wan
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
+bootmenu_default=0
+bootmenu_delay=0
+bootmenu_title= ( ( ( OpenWrt ) ) )
+bootmenu_0=Initialize environment.=run _firstboot
+bootmenu_0d=Run default boot command.=run boot_default
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
+bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
+bootmenu_8=Reboot.=reset
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"
@@ -0,0 +1,319 @@
--- /dev/null
+++ b/configs/mt7981_cudy_wr3000h-v1_defconfig
@@ -0,0 +1,108 @@
+CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_MEDIATEK=y
+CONFIG_TEXT_BASE=0x41e00000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cudy-wr3000h-v1"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_TARGET_MT7981=y
+CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
+CONFIG_DEBUG_UART_BASE=0x11002000
+CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_BOOTDELAY=30
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_MENU_SHOW=y
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cudy-wr3000h-v1.dtb"
+CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_LOG=y
+# CONFIG_BOARD_INIT is not set
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_SMC=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_OF_EMBED=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_ENV_REDUNDANT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y
+CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="defenvs/cudy_wr3000h-v1_env"
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NETCONSOLE=y
+CONFIG_USE_IPADDR=y
+CONFIG_IPADDR="192.168.1.1"
+CONFIG_USE_SERVERIP=y
+CONFIG_SERVERIP="192.168.1.254"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_PHY_FIXED=y
+CONFIG_MEDIATEK_ETH=y
+CONFIG_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_MT7981=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPIM=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
--- /dev/null
+++ b/arch/arm/dts/mt7981-cudy-wr3000h-v1.dts
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/dts-v1/;
+#include "mt7981.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "Cudy WR3000H v1";
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
+
+ chosen {
+ stdout-path = &uart0;
+ tick-timer = &timer0;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x10000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led_status_white {
+ label = "white:status";
+ gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wan_white {
+ label = "white:wan";
+ gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&eth {
+ status = "okay";
+ mediatek,gmac-id = <0>;
+ phy-mode = "2500base-x";
+ mediatek,switch = "mt7531";
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ };
+};
+
+&pio {
+ spi_flash_pins: spi0-pins-func-1 {
+ mux {
+ function = "flash";
+ groups = "spi0", "spi0_wp_hold";
+ };
+
+ conf-pu {
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
+ };
+};
+
+&spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_flash_pins>;
+ status = "okay";
+ must_tx;
+ enhance_timing;
+ dma_ext;
+ ipm_design;
+ support_quad;
+ tick_dly = <2>;
+ sample_sel = <0>;
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bl2";
+ reg = <0x0 0x100000>;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x100000 0x80000>;
+ };
+
+ partition@180000 {
+ label = "factory";
+ reg = <0x180000 0x200000>;
+ };
+
+ partition@380000 {
+ label = "bdinfo";
+ reg = <0x380000 0x40000>;
+ };
+
+ partition@3c0000 {
+ label = "fip";
+ reg = <0x3c0000 0x200000>;
+ };
+
+ partition@5c0000 {
+ label = "ubi";
+ reg = <0x5c0000 0x7a40000>;
+ compatible = "linux,ubi";
+ };
+ };
+ };
+};
+
+&uart0 {
+ mediatek,force-highspeed;
+ status = "okay";
+};
+
+&watchdog {
+ status = "disabled";
+};
--- /dev/null
+++ b/defenvs/cudy_wr3000h-v1_env
@@ -0,0 +1,54 @@
+ipaddr=192.168.1.1
+serverip=192.168.1.254
+loadaddr=0x46000000
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
+bootconf=config-1
+bootdelay=0
+bootfile=immortalwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-initramfs-recovery.itb
+bootfile_bl2=immortalwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-preloader.bin
+bootfile_fip=immortalwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-bl31-uboot.fip
+bootfile_upg=immortalwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-squashfs-sysupgrade.itb
+bootled_pwr=white:status
+bootled_rec=white:wan
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
+bootmenu_default=0
+bootmenu_delay=0
+bootmenu_title= ( ( ( OpenWrt ) ) )
+bootmenu_0=Initialize environment.=run _firstboot
+bootmenu_0d=Run default boot command.=run boot_default
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
+bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
+bootmenu_8=Reboot.=reset
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"
@@ -0,0 +1,319 @@
--- /dev/null
+++ b/configs/mt7981_cudy_wr3000p-v1_defconfig
@@ -0,0 +1,108 @@
+CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_MEDIATEK=y
+CONFIG_TEXT_BASE=0x41e00000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cudy-wr3000p-v1"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_TARGET_MT7981=y
+CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
+CONFIG_DEBUG_UART_BASE=0x11002000
+CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_BOOTDELAY=30
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_MENU_SHOW=y
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cudy-wr3000p-v1.dtb"
+CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_LOG=y
+# CONFIG_BOARD_INIT is not set
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_SMC=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_OF_EMBED=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_ENV_REDUNDANT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y
+CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="defenvs/cudy_wr3000p-v1_env"
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NETCONSOLE=y
+CONFIG_USE_IPADDR=y
+CONFIG_IPADDR="192.168.1.1"
+CONFIG_USE_SERVERIP=y
+CONFIG_SERVERIP="192.168.1.254"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_PHY_FIXED=y
+CONFIG_MEDIATEK_ETH=y
+CONFIG_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_MT7981=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPIM=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
--- /dev/null
+++ b/arch/arm/dts/mt7981-cudy-wr3000p-v1.dts
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/dts-v1/;
+#include "mt7981.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "Cudy WR3000P v1";
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
+
+ chosen {
+ stdout-path = &uart0;
+ tick-timer = &timer0;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x20000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led_status_white {
+ label = "white:status";
+ gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wan_white {
+ label = "white:wan";
+ gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&eth {
+ status = "okay";
+ mediatek,gmac-id = <0>;
+ phy-mode = "2500base-x";
+ mediatek,switch = "mt7531";
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ };
+};
+
+&pio {
+ spi_flash_pins: spi0-pins-func-1 {
+ mux {
+ function = "flash";
+ groups = "spi0", "spi0_wp_hold";
+ };
+
+ conf-pu {
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
+ };
+};
+
+&spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_flash_pins>;
+ status = "okay";
+ must_tx;
+ enhance_timing;
+ dma_ext;
+ ipm_design;
+ support_quad;
+ tick_dly = <2>;
+ sample_sel = <0>;
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bl2";
+ reg = <0x0 0x100000>;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x100000 0x80000>;
+ };
+
+ partition@180000 {
+ label = "factory";
+ reg = <0x180000 0x200000>;
+ };
+
+ partition@380000 {
+ label = "bdinfo";
+ reg = <0x380000 0x40000>;
+ };
+
+ partition@3c0000 {
+ label = "fip";
+ reg = <0x3c0000 0x200000>;
+ };
+
+ partition@5c0000 {
+ label = "ubi";
+ reg = <0x5c0000 0x7a40000>;
+ compatible = "linux,ubi";
+ };
+ };
+ };
+};
+
+&uart0 {
+ mediatek,force-highspeed;
+ status = "okay";
+};
+
+&watchdog {
+ status = "disabled";
+};
--- /dev/null
+++ b/defenvs/cudy_wr3000p-v1_env
@@ -0,0 +1,54 @@
+ipaddr=192.168.1.1
+serverip=192.168.1.254
+loadaddr=0x46000000
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
+bootconf=config-1
+bootdelay=0
+bootfile=immortalwrt-mediatek-filogic-cudy_wr3000p-v1-ubootmod-initramfs-recovery.itb
+bootfile_bl2=immortalwrt-mediatek-filogic-cudy_wr3000p-v1-ubootmod-preloader.bin
+bootfile_fip=immortalwrt-mediatek-filogic-cudy_wr3000p-v1-ubootmod-bl31-uboot.fip
+bootfile_upg=immortalwrt-mediatek-filogic-cudy_wr3000p-v1-ubootmod-squashfs-sysupgrade.itb
+bootled_pwr=white:status
+bootled_rec=white:wan
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
+bootmenu_default=0
+bootmenu_delay=0
+bootmenu_title= ( ( ( OpenWrt ) ) )
+bootmenu_0=Initialize environment.=run _firstboot
+bootmenu_0d=Run default boot command.=run boot_default
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
+bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
+bootmenu_8=Reboot.=reset
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"
@@ -0,0 +1,319 @@
--- /dev/null
+++ b/configs/mt7981_cudy_wr3000s-v1_defconfig
@@ -0,0 +1,108 @@
+CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_MEDIATEK=y
+CONFIG_TEXT_BASE=0x41e00000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cudy-wr3000s-v1"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_TARGET_MT7981=y
+CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
+CONFIG_DEBUG_UART_BASE=0x11002000
+CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_BOOTDELAY=30
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_MENU_SHOW=y
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cudy-wr3000s-v1.dtb"
+CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_LOG=y
+# CONFIG_BOARD_INIT is not set
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_SMC=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_OF_EMBED=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_ENV_REDUNDANT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y
+CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="defenvs/cudy_wr3000s-v1_env"
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NETCONSOLE=y
+CONFIG_USE_IPADDR=y
+CONFIG_IPADDR="192.168.1.1"
+CONFIG_USE_SERVERIP=y
+CONFIG_SERVERIP="192.168.1.254"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_PHY_FIXED=y
+CONFIG_MEDIATEK_ETH=y
+CONFIG_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_MT7981=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPIM=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
--- /dev/null
+++ b/arch/arm/dts/mt7981-cudy-wr3000s-v1.dts
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/dts-v1/;
+#include "mt7981.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "Cudy WR3000S v1";
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
+
+ chosen {
+ stdout-path = &uart0;
+ tick-timer = &timer0;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x10000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led_status_white {
+ label = "white:status";
+ gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+ };
+
+ led_wan_white {
+ label = "white:wan";
+ gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&eth {
+ status = "okay";
+ mediatek,gmac-id = <0>;
+ phy-mode = "2500base-x";
+ mediatek,switch = "mt7531";
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ };
+};
+
+&pio {
+ spi_flash_pins: spi0-pins-func-1 {
+ mux {
+ function = "flash";
+ groups = "spi0", "spi0_wp_hold";
+ };
+
+ conf-pu {
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
+ };
+};
+
+&spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_flash_pins>;
+ status = "okay";
+ must_tx;
+ enhance_timing;
+ dma_ext;
+ ipm_design;
+ support_quad;
+ tick_dly = <2>;
+ sample_sel = <0>;
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bl2";
+ reg = <0x0 0x100000>;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x100000 0x80000>;
+ };
+
+ partition@180000 {
+ label = "factory";
+ reg = <0x180000 0x200000>;
+ };
+
+ partition@380000 {
+ label = "bdinfo";
+ reg = <0x380000 0x40000>;
+ };
+
+ partition@3c0000 {
+ label = "fip";
+ reg = <0x3c0000 0x200000>;
+ };
+
+ partition@5c0000 {
+ label = "ubi";
+ reg = <0x5c0000 0x7a40000>;
+ compatible = "linux,ubi";
+ };
+ };
+ };
+};
+
+&uart0 {
+ mediatek,force-highspeed;
+ status = "okay";
+};
+
+&watchdog {
+ status = "disabled";
+};
--- /dev/null
+++ b/defenvs/cudy_wr3000s-v1_env
@@ -0,0 +1,54 @@
+ipaddr=192.168.1.1
+serverip=192.168.1.254
+loadaddr=0x46000000
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
+bootconf=config-1
+bootdelay=0
+bootfile=immortalwrt-mediatek-filogic-cudy_wr3000s-v1-ubootmod-initramfs-recovery.itb
+bootfile_bl2=immortalwrt-mediatek-filogic-cudy_wr3000s-v1-ubootmod-preloader.bin
+bootfile_fip=immortalwrt-mediatek-filogic-cudy_wr3000s-v1-ubootmod-bl31-uboot.fip
+bootfile_upg=immortalwrt-mediatek-filogic-cudy_wr3000s-v1-ubootmod-squashfs-sysupgrade.itb
+bootled_pwr=white:status
+bootled_rec=white:wan
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
+bootmenu_default=0
+bootmenu_delay=0
+bootmenu_title= ( ( ( OpenWrt ) ) )
+bootmenu_0=Initialize environment.=run _firstboot
+bootmenu_0d=Run default boot command.=run boot_default
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
+bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
+bootmenu_8=Reboot.=reset
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"
@@ -30,6 +30,10 @@ cmcc,a10-ubootmod|\
comfast,cf-wr632ax-ubootmod|\
cudy,tr3000-v1-ubootmod|\
cudy,wbr3000uax-v1-ubootmod|\
cudy,wr3000e-v1-ubootmod|\
cudy,wr3000s-v1-ubootmod|\
cudy,wr3000h-v1-ubootmod|\
cudy,wr3000p-v1-ubootmod|\
h3c,magic-nx30-pro|\
imou,hx21|\
jcg,q30-pro|\
@@ -513,10 +513,15 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
GPIOD_IN);
if (IS_ERR(bdata->gpiod)) {
/* or the legacy (button->gpio is good) way? */
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0)
error = devm_gpio_request_one(dev,
button->gpio, GPIOF_IN | (
button->active_low ? GPIOF_ACTIVE_LOW :
0), desc);
#else
error = devm_gpio_request_one(dev,
button->gpio, GPIOF_IN, desc);
#endif
if (error) {
dev_err_probe(dev, error,
"unable to claim gpio %d",
@@ -525,6 +530,10 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
}
bdata->gpiod = gpio_to_desc(button->gpio);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,18,0)
if (button->active_low ^ gpiod_is_active_low(bdata->gpiod))
gpiod_toggle_active_low(bdata->gpiod);
#endif
}
} else {
/* Device-tree */
+1 -1
View File
@@ -380,7 +380,7 @@ $(eval $(call KernelPackage,md-raid10))
define KernelPackage/md-raid456
$(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +kmod-lib-crc32c)
$(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +LINUX_6_12:kmod-lib-crc32c)
TITLE:=RAID Level 456 Driver
KCONFIG:= \
CONFIG_ASYNC_CORE \
+59 -35
View File
@@ -116,7 +116,7 @@ $(eval $(call KernelPackage,crypto-ccm))
define KernelPackage/crypto-chacha20poly1305
TITLE:=ChaCha20-Poly1305 AEAD support, RFC7539 (used by strongSwan IPsec VPN)
DEPENDS:=+kmod-crypto-aead +kmod-crypto-manager
DEPENDS:=+kmod-crypto-aead +kmod-crypto-manager +!LINUX_6_12:kmod-crypto-lib-poly1305
KCONFIG:=CONFIG_CRYPTO_CHACHA20POLY1305
FILES:=$(LINUX_DIR)/crypto/chacha20poly1305.ko
AUTOLOAD:=$(call AutoLoad,09,chacha20poly1305)
@@ -143,8 +143,9 @@ define KernelPackage/crypto-crc32
DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_CRC32
HIDDEN:=1
FILES:=$(LINUX_DIR)/crypto/crc32_generic.ko
AUTOLOAD:=$(call AutoLoad,04,crc32_generic,1)
FILES:=$(LINUX_DIR)/crypto/crc32_generic.ko@lt6.18 \
$(LINUX_DIR)/crypto/crc32-cryptoapi.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,04,LINUX_6_12:crc32_generic !LINUX_6_12:crc32-cryptoapi,1)
$(call AddDepends/crypto)
endef
@@ -155,8 +156,9 @@ define KernelPackage/crypto-crc32c
TITLE:=CRC32c CRC module
DEPENDS:=+kmod-crypto-hash
KCONFIG:=CONFIG_CRYPTO_CRC32C
FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko
AUTOLOAD:=$(call AutoLoad,04,crc32c_generic,1)
FILES:=$(LINUX_DIR)/crypto/crc32c_generic.ko@lt6.18 \
$(LINUX_DIR)/crypto/crc32c-cryptoapi.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,04,LINUX_6_12:crc32c_generic !LINUX_6_12:crc32c-cryptoapi,1)
$(call AddDepends/crypto)
endef
@@ -521,7 +523,7 @@ $(eval $(call KernelPackage,crypto-hw-talitos))
define KernelPackage/crypto-hw-eip93
TITLE:=MTK EIP93 crypto module
DEPENDS:=@TARGET_ramips_mt7621 \
DEPENDS:=@(TARGET_ramips_mt7621||TARGET_airoha) \
+kmod-crypto-authenc \
+kmod-crypto-des \
+kmod-crypto-md5 \
@@ -530,23 +532,28 @@ define KernelPackage/crypto-hw-eip93
KCONFIG:= \
CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_EIP93 \
CONFIG_CRYPTO_DEV_EIP93_AES=y \
CONFIG_CRYPTO_DEV_EIP93_DES=y \
CONFIG_CRYPTO_DEV_EIP93_AEAD=y \
CONFIG_CRYPTO_DEV_EIP93_AES=y@lt6.18 \
CONFIG_CRYPTO_DEV_EIP93_DES=y@lt6.18 \
CONFIG_CRYPTO_DEV_EIP93_AEAD=y@lt6.18 \
CONFIG_CRYPTO_DEV_EIP93_GENERIC_SW_MAX_LEN=256 \
CONFIG_CRYPTO_DEV_EIP93_AES_128_SW_MAX_LEN=512
FILES:=$(LINUX_DIR)/drivers/crypto/mtk-eip93/crypto-hw-eip93.ko
FILES:=$(LINUX_DIR)/drivers/crypto/mtk-eip93/crypto-hw-eip93.ko@lt6.18 \
$(LINUX_DIR)/drivers/crypto/inside-secure/eip93/crypto-hw-eip93.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,09,crypto-hw-eip93)
$(call AddDepends/crypto)
endef
define KernelPackage/crypto-hw-eip93/description
Kernel module to enable EIP-93 Crypto engine as found
in the Mediatek MT7621 SoC.
in Mediatek MT7621 and Airoha SoCs.
It enables DES/3DES/AES ECB/CBC/CTR and
IPSEC offload with authenc(hmac(sha1/sha256), aes/cbc/rfc3686)
endef
define KernelPackage/crypto-hw-eip93/airoha
FILES:=$(LINUX_DIR)/drivers/crypto/inside-secure/eip93/crypto-hw-eip93.ko
endef
$(eval $(call KernelPackage,crypto-hw-eip93))
define KernelPackage/crypto-kpp
@@ -567,6 +574,7 @@ define KernelPackage/crypto-lib-chacha20
$(call AddDepends/crypto)
endef
ifeq ($(KERNEL_PATCHVER),6.12)
ifndef CONFIG_TARGET_uml
define KernelPackage/crypto-lib-chacha20/x86_64
KCONFIG+=CONFIG_CRYPTO_CHACHA20_X86_64
@@ -602,6 +610,7 @@ ifdef KernelPackage/crypto-lib-chacha20/$(ARCH)
KernelPackage/crypto-lib-chacha20/$(CRYPTO_TARGET)=\
$(KernelPackage/crypto-lib-chacha20/$(ARCH))
endif
endif
$(eval $(call KernelPackage,crypto-lib-chacha20))
@@ -623,10 +632,11 @@ define KernelPackage/crypto-lib-curve25519
HIDDEN:=1
FILES:= \
$(LINUX_DIR)/lib/crypto/libcurve25519.ko \
$(LINUX_DIR)/lib/crypto/libcurve25519-generic.ko
$(LINUX_DIR)/lib/crypto/libcurve25519-generic.ko@lt6.18
$(call AddDepends/crypto,+kmod-crypto-kpp)
endef
ifeq ($(KERNEL_PATCHVER),6.12)
ifndef CONFIG_TARGET_uml
define KernelPackage/crypto-lib-curve25519/x86_64
KCONFIG+=CONFIG_CRYPTO_CURVE25519_X86
@@ -648,6 +658,7 @@ ifdef KernelPackage/crypto-lib-curve25519/$(ARCH)
KernelPackage/crypto-lib-curve25519/$(CRYPTO_TARGET)=\
$(KernelPackage/crypto-lib-curve25519/$(ARCH))
endif
endif
$(eval $(call KernelPackage,crypto-lib-curve25519))
@@ -660,6 +671,7 @@ define KernelPackage/crypto-lib-poly1305
$(call AddDepends/crypto,+kmod-crypto-hash)
endef
ifeq ($(KERNEL_PATCHVER),6.12)
ifndef CONFIG_TARGET_uml
define KernelPackage/crypto-lib-poly1305/x86_64
KCONFIG+=CONFIG_CRYPTO_POLY1305_X86_64
@@ -692,6 +704,7 @@ ifdef KernelPackage/crypto-lib-poly1305/$(ARCH)
KernelPackage/crypto-lib-poly1305/$(CRYPTO_TARGET)=\
$(KernelPackage/crypto-lib-poly1305/$(ARCH))
endif
endif
$(eval $(call KernelPackage,crypto-lib-poly1305))
@@ -729,8 +742,9 @@ define KernelPackage/crypto-md5
CONFIG_CRYPTO_MD5 \
CONFIG_CRYPTO_MD5_OCTEON \
CONFIG_CRYPTO_MD5_PPC
FILES:=$(LINUX_DIR)/crypto/md5.ko
AUTOLOAD:=$(call AutoLoad,09,md5)
FILES:=$(LINUX_DIR)/crypto/md5.ko \
$(LINUX_DIR)/lib/crypto/libmd5.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,09,md5 !LINUX_6_12:libmd5)
$(call AddDepends/crypto)
endef
@@ -961,17 +975,19 @@ define KernelPackage/crypto-sha1
DEPENDS:=+kmod-crypto-hash
KCONFIG:= \
CONFIG_CRYPTO_SHA1 \
CONFIG_CRYPTO_SHA1_ARM \
CONFIG_CRYPTO_SHA1_ARM_NEON \
CONFIG_CRYPTO_SHA1_ARM64_CE \
CONFIG_CRYPTO_SHA1_OCTEON \
CONFIG_CRYPTO_SHA1_PPC_SPE \
CONFIG_CRYPTO_SHA1_SSSE3
FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
CONFIG_CRYPTO_SHA1_ARM@lt6.18 \
CONFIG_CRYPTO_SHA1_ARM_NEON@lt6.18 \
CONFIG_CRYPTO_SHA1_ARM64_CE@lt6.18 \
CONFIG_CRYPTO_SHA1_OCTEON@lt6.18 \
CONFIG_CRYPTO_SHA1_PPC_SPE@lt6.18 \
CONFIG_CRYPTO_SHA1_SSSE3@lt6.18
FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko@lt6.18 \
$(LINUX_DIR)/crypto/sha1.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,09,LINUX_6_12:sha1_generic !LINUX_6_12:sha1)
$(call AddDepends/crypto)
endef
ifeq ($(KERNEL_PATCHVER),6.12)
define KernelPackage/crypto-sha1/arm
FILES+=$(LINUX_DIR)/arch/arm/crypto/sha1-arm.ko
AUTOLOAD+=$(call AutoLoad,09,sha1-arm)
@@ -1022,6 +1038,7 @@ ifdef KernelPackage/crypto-sha1/$(ARCH)
KernelPackage/crypto-sha1/$(CRYPTO_TARGET)=\
$(KernelPackage/crypto-sha1/$(ARCH))
endif
endif
$(eval $(call KernelPackage,crypto-sha1))
@@ -1043,18 +1060,20 @@ define KernelPackage/crypto-sha256
DEPENDS:=+kmod-crypto-hash
KCONFIG:= \
CONFIG_CRYPTO_SHA256 \
CONFIG_CRYPTO_SHA256_OCTEON \
CONFIG_CRYPTO_SHA256_PPC_SPE \
CONFIG_CRYPTO_SHA256_ARM64 \
CONFIG_CRYPTO_SHA2_ARM64_CE \
CONFIG_CRYPTO_SHA256_SSSE3
CONFIG_CRYPTO_SHA256_OCTEON@lt6.18 \
CONFIG_CRYPTO_SHA256_PPC_SPE@lt6.18 \
CONFIG_CRYPTO_SHA256_ARM64@lt6.18 \
CONFIG_CRYPTO_SHA2_ARM64_CE@lt6.18 \
CONFIG_CRYPTO_SHA256_SSSE3@lt6.18
FILES:= \
$(LINUX_DIR)/crypto/sha256_generic.ko \
$(LINUX_DIR)/crypto/sha256_generic.ko@lt6.18 \
$(LINUX_DIR)/crypto/sha256.ko@ge6.18 \
$(LINUX_DIR)/lib/crypto/libsha256.ko
AUTOLOAD:=$(call AutoLoad,09,sha256_generic)
AUTOLOAD:=$(call AutoLoad,09,LINUX_6_12:sha256_generic !LINUX_6_12:sha256)
$(call AddDepends/crypto)
endef
ifeq ($(KERNEL_PATCHVER),6.12)
define KernelPackage/crypto-sha256/aarch64
FILES+=$(LINUX_DIR)/arch/arm64/crypto/sha256-arm64.ko
AUTOLOAD+=$(call AutoLoad,09,sha256-arm64)
@@ -1094,6 +1113,7 @@ ifdef KernelPackage/crypto-sha256/$(ARCH)
KernelPackage/crypto-sha256/$(CRYPTO_TARGET)=\
$(KernelPackage/crypto-sha256/$(ARCH))
endif
endif
$(eval $(call KernelPackage,crypto-sha256))
@@ -1103,15 +1123,18 @@ define KernelPackage/crypto-sha512
DEPENDS:=+kmod-crypto-hash
KCONFIG:= \
CONFIG_CRYPTO_SHA512 \
CONFIG_CRYPTO_SHA512_ARM \
CONFIG_CRYPTO_SHA512_ARM64 \
CONFIG_CRYPTO_SHA512_OCTEON \
CONFIG_CRYPTO_SHA512_SSSE3
FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko
AUTOLOAD:=$(call AutoLoad,09,sha512_generic)
CONFIG_CRYPTO_SHA512_ARM@lt6.18 \
CONFIG_CRYPTO_SHA512_ARM64@lt6.18 \
CONFIG_CRYPTO_SHA512_OCTEON@lt6.18 \
CONFIG_CRYPTO_SHA512_SSSE3@lt6.18
FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko@lt6.18 \
$(LINUX_DIR)/crypto/sha512.ko@ge6.18 \
$(LINUX_DIR)/lib/crypto/libsha512.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,09,LINUX_6_12:sha512_generic !LINUX_6_12:sha512)
$(call AddDepends/crypto)
endef
ifeq ($(KERNEL_PATCHVER),6.12)
define KernelPackage/crypto-sha512/arm
FILES+=$(LINUX_DIR)/arch/arm/crypto/sha512-arm.ko
AUTOLOAD+=$(call AutoLoad,09,sha512-arm)
@@ -1145,6 +1168,7 @@ ifdef KernelPackage/crypto-sha512/$(ARCH)
KernelPackage/crypto-sha512/$(CRYPTO_TARGET)=\
$(KernelPackage/crypto-sha512/$(ARCH))
endif
endif
$(eval $(call KernelPackage,crypto-sha512))
+4 -3
View File
@@ -67,7 +67,7 @@ $(eval $(call KernelPackage,fs-autofs4))
define KernelPackage/fs-btrfs
SUBMENU:=$(FS_MENU)
TITLE:=BTRFS filesystem support
DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd +kmod-crypto-blake2b +kmod-crypto-xxhash
DEPENDS:=+LINUX_6_12:kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd +kmod-crypto-blake2b +kmod-crypto-xxhash
KCONFIG:=\
CONFIG_BTRFS_FS \
CONFIG_BTRFS_FS_CHECK_INTEGRITY=n
@@ -107,7 +107,7 @@ define KernelPackage/fs-smbfs-common
KCONFIG:=\
CONFIG_SMBFS
FILES:= \
$(LINUX_DIR)/fs/smb/common/cifs_arc4.ko \
$(LINUX_DIR)/fs/smb/common/cifs_arc4.ko@lt6.18 \
$(LINUX_DIR)/fs/smb/common/cifs_md4.ko
endef
@@ -474,6 +474,7 @@ define KernelPackage/fs-nfs-common
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" \
CONFIG_NFS_V4_1_MIGRATION=n \
CONFIG_NFS_V4_2=y \
CONFIG_NFSD_V4_DELEG_TIMESTAMPS=n@ge6.18 \
CONFIG_NFS_V4_2_READ_PLUS=n
FILES:= \
$(LINUX_DIR)/fs/lockd/lockd.ko \
@@ -665,7 +666,7 @@ define KernelPackage/fs-xfs
SUBMENU:=$(FS_MENU)
TITLE:=XFS filesystem support
KCONFIG:=CONFIG_XFS_FS
DEPENDS:= +kmod-fs-exportfs +kmod-lib-crc32c
DEPENDS:= +kmod-fs-exportfs +LINUX_6_12:kmod-lib-crc32c
FILES:=$(LINUX_DIR)/fs/xfs/xfs.ko
AUTOLOAD:=$(call AutoLoad,30,xfs,1)
endef
+5 -3
View File
@@ -243,7 +243,7 @@ $(eval $(call KernelPackage,iio-dht11))
define KernelPackage/iio-bme680
TITLE:=BME680 gas/humidity/pressure/temperature sensor
DEPENDS:=+kmod-regmap-core
DEPENDS:=+kmod-regmap-core +!LINUX_6_12:kmod-industrialio-triggered-buffer
KCONFIG:=CONFIG_BME680
FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_core.ko
$(call AddDepends/iio)
@@ -504,7 +504,8 @@ $(eval $(call KernelPackage,iio-lsm6dsx))
define KernelPackage/iio-lsm6dsx-i2c
DEPENDS:=+kmod-iio-lsm6dsx +kmod-i2c-core +kmod-regmap-i2c
TITLE:=ST LSM6DSx driver for IMU MEMS sensors (I2C)
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
KCONFIG:=CONFIG_IIO_ST_LSM6DSX \
CONFIG_IIO_ST_LSM6DSX_I2C
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-i2c)
$(call AddDepends/iio)
@@ -520,7 +521,8 @@ $(eval $(call KernelPackage,iio-lsm6dsx-i2c))
define KernelPackage/iio-lsm6dsx-spi
DEPENDS:=+kmod-iio-lsm6dsx +kmod-regmap-spi
TITLE:=ST LSM6DSx driver for IMU MEMS sensors (SPI)
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
KCONFIG:=CONFIG_IIO_ST_LSM6DSX \
CONFIG_IIO_ST_LSM6DSX_SPI
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-spi)
$(call AddDepends/iio)
+11 -6
View File
@@ -11,7 +11,8 @@ define KernelPackage/lib-crc-ccitt
SUBMENU:=$(LIB_MENU)
TITLE:=CRC-CCITT support
KCONFIG:=CONFIG_CRC_CCITT
FILES:=$(LINUX_DIR)/lib/crc-ccitt.ko
FILES:=$(LINUX_DIR)/lib/crc-ccitt.ko@lt6.18 \
$(LINUX_DIR)/lib/crc/crc-ccitt.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,crc-ccitt)
endef
@@ -26,7 +27,8 @@ define KernelPackage/lib-crc-itu-t
SUBMENU:=$(LIB_MENU)
TITLE:=CRC ITU-T V.41 support
KCONFIG:=CONFIG_CRC_ITU_T
FILES:=$(LINUX_DIR)/lib/crc-itu-t.ko
FILES:=$(LINUX_DIR)/lib/crc-itu-t.ko@lt6.18 \
$(LINUX_DIR)/lib/crc/crc-itu-t.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,crc-itu-t)
endef
@@ -41,7 +43,8 @@ define KernelPackage/lib-crc7
SUBMENU:=$(LIB_MENU)
TITLE:=CRC7 support
KCONFIG:=CONFIG_CRC7
FILES:=$(LINUX_DIR)/lib/crc7.ko
FILES:=$(LINUX_DIR)/lib/crc7.ko@lt6.18 \
$(LINUX_DIR)/lib/crc/crc7.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,crc7)
endef
@@ -56,7 +59,8 @@ define KernelPackage/lib-crc8
SUBMENU:=$(LIB_MENU)
TITLE:=CRC8 support
KCONFIG:=CONFIG_CRC8
FILES:=$(LINUX_DIR)/lib/crc8.ko
FILES:=$(LINUX_DIR)/lib/crc8.ko@lt6.18 \
$(LINUX_DIR)/lib/crc/crc8.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,crc8)
endef
@@ -71,7 +75,8 @@ define KernelPackage/lib-crc16
SUBMENU:=$(LIB_MENU)
TITLE:=CRC16 support
KCONFIG:=CONFIG_CRC16
FILES:=$(LINUX_DIR)/lib/crc16.ko
FILES:=$(LINUX_DIR)/lib/crc16.ko@lt6.18 \
$(LINUX_DIR)/lib/crc/crc16.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,20,crc16,1)
endef
@@ -86,7 +91,7 @@ define KernelPackage/lib-crc32c
SUBMENU:=$(LIB_MENU)
TITLE:=CRC32 support
KCONFIG:=CONFIG_LIBCRC32C
DEPENDS:=+kmod-crypto-crc32c
DEPENDS:=@LINUX_6_12 +kmod-crypto-crc32c
FILES:=$(LINUX_DIR)/lib/libcrc32c.ko
AUTOLOAD:=$(call AutoProbe,libcrc32c)
endef
+83 -15
View File
@@ -120,6 +120,38 @@ endef
$(eval $(call KernelPackage,atl1e))
define KernelPackage/libie-adminq
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel Ethernet common library - adminq helpers
DEPENDS:=@!LINUX_6_12 +kmod-libie
KCONFIG:=CONFIG_LIBIE_ADMINQ
HIDDEN:=1
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/libie/libie_adminq.ko
endef
define KernelPackage/libie-adminq/description
Intel Ethernet common library - adminq helpers
endef
$(eval $(call KernelPackage,libie-adminq))
define KernelPackage/libie-fwlog
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel Ethernet library fw log
DEPENDS:=@!LINUX_6_12 +kmod-libie
KCONFIG:=CONFIG_LIBIE_FWLOG
HIDDEN:=1
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/libie/libie_fwlog.ko
endef
define KernelPackage/libie-fwlog/description
Intel Ethernet library FW Log
endef
$(eval $(call KernelPackage,libie-fwlog))
define KernelPackage/libie
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel Ethernet library
@@ -155,9 +187,11 @@ define KernelPackage/libphy
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=PHY library
KCONFIG:=CONFIG_PHYLIB \
CONFIG_PHYLIB_LEDS=y
FILES:=$(LINUX_DIR)/drivers/net/phy/libphy.ko
AUTOLOAD:=$(call AutoLoad,15,libphy,1)
CONFIG_PHYLIB_LEDS=y \
CONFIG_MDIO_BUS
FILES:=$(LINUX_DIR)/drivers/net/phy/libphy.ko \
$(LINUX_DIR)/drivers/net/phy/mdio-bus.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,15,libphy !LINUX_6_12:mdio-bus,1)
endef
define KernelPackage/libphy/description
@@ -202,7 +236,9 @@ define KernelPackage/mdio-devres
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Supports MDIO device registration
DEPENDS:=+kmod-libphy +(TARGET_armsr||TARGET_bcm27xx_bcm2708||TARGET_loongarch64||TARGET_malta||TARGET_tegra):kmod-of-mdio
ifeq ($(KERNEL_PATCHVER),6.12)
KCONFIG:=CONFIG_MDIO_DEVRES
endif
HIDDEN:=1
FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko
AUTOLOAD:=$(call AutoProbe,mdio-devres)
@@ -490,12 +526,27 @@ endef
$(eval $(call KernelPackage,phy-marvell-10g))
define KernelPackage/phy-package
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Generic PHY Framework
DEPENDS:=@!LINUX_6_12 +kmod-libphy
KCONFIG:=CONFIG_PHY_PACKAGE
HIDDEN:=1
FILES:=$(LINUX_DIR)/drivers/net/phy/phy_package.ko
AUTOLOAD:=$(call AutoLoad,15,phy-package,1)
endef
define KernelPackage/phy-package/description
Generic PHY Framework
endef
$(eval $(call KernelPackage,phy-package))
define KernelPackage/phy-micrel
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Micrel PHYs
KCONFIG:=CONFIG_MICREL_PHY
DEPENDS:=+kmod-libphy +kmod-ptp
DEPENDS:=+kmod-libphy +kmod-ptp +!LINUX_6_12:kmod-phy-package
FILES:=$(LINUX_DIR)/drivers/net/phy/micrel.ko
AUTOLOAD:=$(call AutoLoad,18,micrel,1)
endef
@@ -821,10 +872,27 @@ endef
$(eval $(call KernelPackage,dsa-mv88e6xxx))
define KernelPackage/dsa-mxl862xx
SUBMENU:=Network Devices
TITLE:=MaxLinear MXL862 switch support
KCONFIG:= \
CONFIG_NET_DSA_TAG_MXL_862XX \
CONFIG_NET_DSA_TAG_MXL_862XX_8021Q \
CONFIG_NET_DSA_MXL862
DEPENDS:=+kmod-dsa +kmod-lib-crc16 +kmod-phy-maxlinear
FILES:= \
$(LINUX_DIR)/drivers/net/dsa/mxl862xx/mxl862xx_dsa.ko \
$(LINUX_DIR)/net/dsa/tag_mxl862xx.ko \
$(LINUX_DIR)/net/dsa/tag_mxl862xx_8021q.ko
AUTOLOAD:=$(call AutoProbe,mxl862xx_dsa)
endef
$(eval $(call KernelPackage,dsa-mxl862xx))
define KernelPackage/dsa-qca8k
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Qualcomm Atheros QCA8xxx switch family DSA support
DEPENDS:=+kmod-dsa +kmod-regmap-core
DEPENDS:=+kmod-dsa +kmod-regmap-core +!LINUX_6_12:kmod-mdio-devres
KCONFIG:= \
CONFIG_NET_DSA_QCA8K \
CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT=y \
@@ -1419,7 +1487,7 @@ $(eval $(call KernelPackage,igbvf))
define KernelPackage/ixgbe
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +kmod-mdio-devres
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +kmod-mdio-devres +!LINUX_6_12:kmod-libie-fwlog
KCONFIG:=CONFIG_IXGBE \
CONFIG_IXGBE_HWMON=y \
CONFIG_IXGBE_DCA=n \
@@ -1456,7 +1524,7 @@ $(eval $(call KernelPackage,ixgbevf))
define KernelPackage/i40e
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) Ethernet Controller XL710 Family support
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-libie
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-libie +!LINUX_6_12:kmod-libie-adminq
KCONFIG:=CONFIG_I40E \
CONFIG_I40E_DCB=y
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko
@@ -1473,7 +1541,7 @@ $(eval $(call KernelPackage,i40e))
define KernelPackage/ice
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) Ethernet Controller E810 Series support
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-hwmon-core +kmod-libie
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-hwmon-core +kmod-libie +!LINUX_6_12:kmod-libie-adminq +!LINUX_6_12:kmod-libie-fwlog
KCONFIG:=CONFIG_ICE \
CONFIG_ICE_HWMON=y \
CONFIG_ICE_HWTS=y \
@@ -1492,7 +1560,7 @@ $(eval $(call KernelPackage,ice))
define KernelPackage/iavf
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) Ethernet Adaptive Virtual Function support
DEPENDS:=@PCI_SUPPORT +kmod-libie
DEPENDS:=@PCI_SUPPORT +kmod-libie +!LINUX_6_12:kmod-libie-adminq
KCONFIG:= \
CONFIG_I40EVF \
CONFIG_IAVF
@@ -1850,7 +1918,7 @@ $(eval $(call KernelPackage,bnx2))
define KernelPackage/bnx2x
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=QLogic 5771x/578xx 10/20-Gigabit ethernet adapter driver
DEPENDS:=@PCI_SUPPORT +bnx2x-firmware +kmod-lib-crc32c +kmod-mdio +kmod-ptp +kmod-lib-zlib-inflate
DEPENDS:=@PCI_SUPPORT +bnx2x-firmware +LINUX_6_12:kmod-lib-crc32c +kmod-mdio +kmod-ptp +kmod-lib-zlib-inflate
FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
KCONFIG:= \
CONFIG_BNX2X \
@@ -1867,7 +1935,7 @@ $(eval $(call KernelPackage,bnx2x))
define KernelPackage/bnxt-en
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Broadcom NetXtreme-C/E network driver
DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core +kmod-lib-crc32c +kmod-mdio +kmod-ptp
DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core +LINUX_6_12:kmod-lib-crc32c +kmod-mdio +kmod-ptp
FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnxt/bnxt_en.ko
KCONFIG:= \
CONFIG_BNXT \
@@ -2183,7 +2251,7 @@ $(eval $(call KernelPackage,pcs-qcom-ipq9574))
define KernelPackage/pcs-xpcs
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Synopsis DesignWare PCS driver
DEPENDS:=@(TARGET_x86_64||TARGET_armsr) +kmod-phylink +kmod-mdio-devres
DEPENDS:=@(TARGET_armsr||TARGET_loongarch64||TARGET_x86_64) +kmod-phylink +kmod-mdio-devres
KCONFIG:=CONFIG_PCS_XPCS
FILES:=$(LINUX_DIR)/drivers/net/pcs/pcs_xpcs.ko
AUTOLOAD:=$(call AutoLoad,20,pcs_xpcs)
@@ -2245,7 +2313,7 @@ $(eval $(call KernelPackage,hinic))
define KernelPackage/sfc
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Solarflare SFC9000/SFC9100/EF100-family support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-ptp +kmod-hwmon-core
DEPENDS:=@PCI_SUPPORT +kmod-mdio +LINUX_6_12:kmod-lib-crc32c +kmod-ptp +kmod-hwmon-core
KCONFIG:= \
CONFIG_SFC \
CONFIG_SFC_MTD=y \
@@ -2266,7 +2334,7 @@ $(eval $(call KernelPackage,sfc))
define KernelPackage/sfc-falcon
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Solarflare SFC4000 support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-i2c-algo-bit
DEPENDS:=@PCI_SUPPORT +kmod-mdio +LINUX_6_12:kmod-lib-crc32c +kmod-i2c-algo-bit
KCONFIG:= \
CONFIG_SFC_FALCON \
CONFIG_SFC_FALCON_MTD=y
@@ -2284,7 +2352,7 @@ $(eval $(call KernelPackage,sfc-falcon))
define KernelPackage/sfc-siena
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Solarflare SFN5000/6000 'Siena' based card support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core
DEPENDS:=@PCI_SUPPORT +kmod-mdio +LINUX_6_12:kmod-lib-crc32c +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core
KCONFIG:= \
CONFIG_SFC_SIENA \
CONFIG_SFC_SIENA_MTD=y \
+24 -2
View File
@@ -51,10 +51,32 @@ endef
$(eval $(call KernelPackage,nf-conncount))
define KernelPackage/iptables
SUBMENU:=$(NF_MENU)
TITLE:=Iptables legacy
KCONFIG:= \
CONFIG_IP_NF_IPTABLES_LEGACY \
CONFIG_NETFILTER_XTABLES \
CONFIG_NETFILTER_XTABLES_LEGACY=y \
CONFIG_IP6_NF_IPTABLES_LEGACY \
CONFIG_BRIDGE_NF_EBTABLES_LEGACY
HIDDEN:=1
DEPENDS:=@!LINUX_6_12
FILES:= \
$(LINUX_DIR)/net/ipv4/netfilter/ip_tables.ko \
$(LINUX_DIR)/net/netfilter/x_tables.ko
AUTOLOAD:=$(call AutoProbe,$(notdir ip_tables x_tables))
endef
$(eval $(call KernelPackage,iptables))
define KernelPackage/nf-ipt
SUBMENU:=$(NF_MENU)
TITLE:=Iptables core
KCONFIG:=$(KCONFIG_NF_IPT)
DEPENDS:=+!LINUX_6_12:kmod-iptables
FILES:=$(foreach mod,$(NF_IPT-m),$(LINUX_DIR)/net/$(mod).ko)
AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_IPT-m)))
endef
@@ -428,7 +450,7 @@ IPVS_MODULES:= \
define KernelPackage/nf-ipvs
SUBMENU:=Netfilter Extensions
TITLE:=IP Virtual Server modules
DEPENDS:=@IPV6 +kmod-lib-crc32c +kmod-ipt-conntrack +kmod-nf-conntrack
DEPENDS:=@IPV6 +LINUX_6_12:kmod-lib-crc32c +kmod-ipt-conntrack +kmod-nf-conntrack
KCONFIG:= \
CONFIG_IP_VS \
CONFIG_IP_VS_IPV6=y \
@@ -1123,7 +1145,7 @@ $(eval $(call KernelPackage,ipt-rpfilter))
define KernelPackage/nft-core
SUBMENU:=$(NF_MENU)
TITLE:=Netfilter nf_tables support
DEPENDS:=+kmod-nfnetlink +kmod-nf-reject +IPV6:kmod-nf-reject6 +kmod-nf-nat +kmod-nf-log +IPV6:kmod-nf-log6 +kmod-lib-crc32c
DEPENDS:=+kmod-nfnetlink +kmod-nf-reject +IPV6:kmod-nf-reject6 +kmod-nf-nat +kmod-nf-log +IPV6:kmod-nf-log6 +LINUX_6_12:kmod-lib-crc32c
FILES:=$(foreach mod,$(NFT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m)))
KCONFIG:= \
+3 -2
View File
@@ -1016,7 +1016,7 @@ SCHED_FILES_EXTRA = $(foreach mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/
define KernelPackage/sched
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Extra traffic schedulers
DEPENDS:=+kmod-sched-core +kmod-lib-crc32c +kmod-lib-textsearch
DEPENDS:=+kmod-sched-core +LINUX_6_12:kmod-lib-crc32c +kmod-lib-textsearch
KCONFIG:= \
CONFIG_NET_SCH_CODEL \
CONFIG_NET_SCH_GRED \
@@ -1233,10 +1233,11 @@ define KernelPackage/sctp
CONFIG_SCTP_COOKIE_HMAC_MD5=y \
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE=n \
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=n \
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA256=n@ge6.18 \
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
FILES:= $(LINUX_DIR)/net/sctp/sctp.ko
AUTOLOAD:= $(call AutoLoad,32,sctp)
DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac \
DEPENDS:=+LINUX_6_12:kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac \
+kmod-udptunnel4 +kmod-udptunnel6
endef
+3 -2
View File
@@ -166,7 +166,8 @@ define KernelPackage/mlxreg
CONFIG_SENSORS_MLXREG_FAN \
CONFIG_LEDS_MLXREG
FILES:= \
$(LINUX_DIR)/drivers/platform/x86/mlx-platform.ko \
$(LINUX_DIR)/drivers/platform/x86/mlx-platform.ko@lt6.18 \
$(LINUX_DIR)/drivers/platform/mellanox/mlx-platform.ko@ge6.18 \
$(LINUX_DIR)/drivers/platform/mellanox/mlxreg-hotplug.ko \
$(LINUX_DIR)/drivers/platform/mellanox/mlxreg-io.ko \
$(LINUX_DIR)/drivers/hwmon/mlxreg-fan.ko \
@@ -619,7 +620,7 @@ define KernelPackage/serial-8250-exar
KCONFIG:= CONFIG_SERIAL_8250_EXAR
FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/8250_exar.ko
AUTOLOAD:=$(call AutoProbe,8250 8250_base 8250_exar)
DEPENDS:=@PCI_SUPPORT +kmod-serial-8250
DEPENDS:=@PCI_SUPPORT +kmod-serial-8250 +!LINUX_6_12:kmod-eeprom-93cx6
endef
define KernelPackage/serial-8250-exar/description
+1 -1
View File
@@ -138,7 +138,7 @@ define KernelPackage/rtc-pcf8563
SUBMENU:=$(RTC_MENU)
TITLE:=Philips PCF8563/Epson RTC8564 RTC support
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
DEPENDS:=+kmod-i2c-core
DEPENDS:=+kmod-i2c-core +!LINUX_6_12:kmod-regmap-i2c
KCONFIG:=CONFIG_RTC_DRV_PCF8563 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf8563.ko
+79 -23
View File
@@ -363,15 +363,19 @@ define KernelPackage/sound-hda-core
TITLE:=HD Audio Sound Core Support
KCONFIG:= \
CONFIG_SND_HDA_CORE \
CONFIG_SND_HDA \
CONFIG_SND_HDA_HWDEP=y \
CONFIG_SND_HDA_RECONFIG=n \
CONFIG_SND_HDA_INPUT_BEEP=n \
CONFIG_SND_HDA_PATCH_LOADER=n \
CONFIG_SND_HDA_GENERIC
FILES:= \
$(LINUX_DIR)/sound/hda/snd-hda-core.ko \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec.ko \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-generic.ko
$(LINUX_DIR)/sound/hda/snd-hda-core.ko@lt6.18 \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec.ko@lt6.18 \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-generic.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/core/snd-hda-core.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/common/snd-hda-codec.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-generic.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-core snd-hda-codec snd-hda-codec-generic)
$(call AddDepends/sound,+kmod-regmap-core)
endef
@@ -388,7 +392,8 @@ define KernelPackage/snd-hda-scodec-component
KCONFIG:= \
CONFIG_SND_HDA_SCODEC_COMPONENT
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-scodec-component.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-scodec-component.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/side-codecs/snd-hda-scodec-component.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-scodec-component)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -399,10 +404,31 @@ define KernelPackage/sound-hda-codec-realtek
SUBMENU:=$(SOUND_MENU)
TITLE:= HD Audio Realtek Codec
KCONFIG:= \
CONFIG_SND_HDA_CODEC_REALTEK
CONFIG_SND_HDA_CODEC_REALTEK \
CONFIG_SND_HDA_CODEC_ALC260=m \
CONFIG_SND_HDA_CODEC_ALC262=m \
CONFIG_SND_HDA_CODEC_ALC268=m \
CONFIG_SND_HDA_CODEC_ALC269=m \
CONFIG_SND_HDA_CODEC_ALC662=m \
CONFIG_SND_HDA_CODEC_ALC680=m \
CONFIG_SND_HDA_CODEC_ALC861=m \
CONFIG_SND_HDA_CODEC_ALC861VD=m \
CONFIG_SND_HDA_CODEC_ALC880=m \
CONFIG_SND_HDA_CODEC_ALC882=m
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-realtek.ko
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-realtek)
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-realtek.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-realtek-lib.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc260.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc262.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc268.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc269.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc662.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc680.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc861.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc861vd.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc880.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/realtek/snd-hda-codec-alc882.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-realtek LINUX_6_18:snd-hda-codec-realtek-lib LINUX_6_18:snd-hda-codec-alc260 LINUX_6_18:snd-hda-codec-alc262 LINUX_6_18:snd-hda-codec-alc268 LINUX_6_18:snd-hda-codec-alc269 LINUX_6_18:snd-hda-codec-alc662 LINUX_6_18:snd-hda-codec-alc680 LINUX_6_18:snd-hda-codec-alc861 LINUX_6_18:snd-hda-codec-alc861vd LINUX_6_18:snd-hda-codec-alc880 LINUX_6_18:snd-hda-codec-alc882)
$(call AddDepends/sound,kmod-sound-hda-core +kmod-snd-hda-scodec-component)
endef
@@ -418,7 +444,8 @@ define KernelPackage/sound-hda-codec-cmedia
KCONFIG:= \
CONFIG_SND_HDA_CODEC_CMEDIA
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cmedia.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cmedia.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-cmedia.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-cmedia)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -435,7 +462,8 @@ define KernelPackage/sound-hda-codec-analog
KCONFIG:= \
CONFIG_SND_HDA_CODEC_ANALOG
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-analog.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-analog.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-analog.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-analog)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -452,7 +480,8 @@ define KernelPackage/sound-hda-codec-idt
KCONFIG:= \
CONFIG_SND_HDA_CODEC_SIGMATEL
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-idt.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-idt.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-idt.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-idt)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -469,7 +498,8 @@ define KernelPackage/sound-hda-codec-si3054
KCONFIG:= \
CONFIG_SND_HDA_CODEC_SI3054
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-si3054.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-si3054.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-si3054.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-si3054)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -484,10 +514,16 @@ define KernelPackage/sound-hda-codec-cirrus
SUBMENU:=$(SOUND_MENU)
TITLE:=HD Audio Cirrus Logic Codec
KCONFIG:= \
CONFIG_SND_HDA_CODEC_CIRRUS
CONFIG_SND_HDA_CODEC_CIRRUS \
CONFIG_SND_HDA_CODEC_CS420X=m \
CONFIG_SND_HDA_CODEC_CS421X=m \
CONFIG_SND_HDA_CODEC_CS8409=m
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cirrus.ko
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-cirrus)
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cirrus.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/cirrus/snd-hda-codec-cs420x.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/cirrus/snd-hda-codec-cs421x.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/cirrus/snd-hda-codec-cs8409.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-cirrus LINUX_6_18:snd-hda-codec-cs420x LINUX_6_18:snd-hda-codec-cs421x LINUX_6_18:snd-hda-codec-cs8409)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -503,7 +539,8 @@ define KernelPackage/sound-hda-codec-ca0110
KCONFIG:= \
CONFIG_SND_HDA_CODEC_CA0110
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-ca0110.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-ca0110.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-ca0110.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-ca0110)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -521,7 +558,8 @@ define KernelPackage/sound-hda-codec-ca0132
CONFIG_SND_HDA_CODEC_CA0132 \
CONFIG_SND_HDA_CODEC_CA0132_DSP=n
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-ca0132.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-ca0132.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-ca0132.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-ca0132)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -538,7 +576,8 @@ define KernelPackage/sound-hda-codec-conexant
KCONFIG:= \
CONFIG_SND_HDA_CODEC_CONEXANT
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-conexant.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-conexant.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-conexant.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-conexant)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -555,7 +594,8 @@ define KernelPackage/sound-hda-codec-via
KCONFIG:= \
CONFIG_SND_HDA_CODEC_VIA
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-via.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-via.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/snd-hda-codec-via.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-via)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -570,10 +610,24 @@ define KernelPackage/sound-hda-codec-hdmi
SUBMENU:=$(SOUND_MENU)
TITLE:=HD Audio HDMI/DisplayPort Codec
KCONFIG:= \
CONFIG_SND_HDA_CODEC_HDMI
CONFIG_SND_HDA_CODEC_HDMI \
CONFIG_SND_HDA_CODEC_HDMI_GENERIC=m \
CONFIG_SND_HDA_CODEC_HDMI_SIMPLE=m \
CONFIG_SND_HDA_CODEC_HDMI_INTEL=m \
CONFIG_SND_HDA_CODEC_HDMI_ATI=m \
CONFIG_SND_HDA_CODEC_HDMI_NVIDIA=m \
CONFIG_SND_HDA_CODEC_HDMI_NVIDIA_MCP=m \
CONFIG_SND_HDA_CODEC_HDMI_TEGRA=m
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-hdmi.ko
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-hdmi)
$(LINUX_DIR)/sound/pci/hda/snd-hda-codec-hdmi.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/codecs/hdmi/snd-hda-codec-hdmi.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/hdmi/snd-hda-codec-simplehdmi.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/hdmi/snd-hda-codec-intelhdmi.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/hdmi/snd-hda-codec-atihdmi.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/hdmi/snd-hda-codec-nvhdmi.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/hdmi/snd-hda-codec-nvhdmi-mcp.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/codecs/hdmi/snd-hda-codec-tegrahdmi.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-codec-hdmi LINUX_6_18:snd-hda-codec-simplehdmi LINUX_6_18:snd-hda-codec-intelhdmi LINUX_6_18:snd-hda-codec-atihdmi LINUX_6_18:snd-hda-codec-nvhdmi LINUX_6_18:snd-hda-codec-nvhdmi-mcp LINUX_6_18:snd-hda-codec-tegrahdmi)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
@@ -591,8 +645,10 @@ define KernelPackage/sound-hda-intel
CONFIG_SOUND_PCI \
CONFIG_SND_HDA_INTEL
FILES:= \
$(LINUX_DIR)/sound/pci/hda/snd-hda-intel.ko \
$(LINUX_DIR)/sound/hda/snd-intel-dspcfg.ko
$(LINUX_DIR)/sound/pci/hda/snd-hda-intel.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/snd-intel-dspcfg.ko@lt6.18 \
$(LINUX_DIR)/sound/hda/controllers/snd-hda-intel.ko@ge6.18 \
$(LINUX_DIR)/sound/hda/core/snd-intel-dspcfg.ko@ge6.18
AUTOLOAD:=$(call AutoProbe,snd-hda-intel)
$(call AddDepends/sound,kmod-sound-hda-core)
endef
+5 -3
View File
@@ -581,8 +581,10 @@ define KernelPackage/usb-dwc3-qcom
TITLE:=DWC3 Qualcomm USB driver
DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_qualcommax||TARGET_qualcommbe) +kmod-usb-dwc3
KCONFIG:= CONFIG_USB_DWC3_QCOM
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko
AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1)
FILES:= \
$(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko \
$(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom-legacy.ko@ge6.18
AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom !LINUX_6_12:dwc3-qcom-legacy,1)
$(call AddDepends/usb)
endef
@@ -1338,7 +1340,7 @@ $(eval $(call KernelPackage,usb-net-kaweth))
define KernelPackage/usb-net-lan78xx
TITLE:=USB-To-Ethernet Microchip LAN78XX convertors
DEPENDS:=+kmod-fixed-phy +kmod-phy-microchip +PACKAGE_kmod-of-mdio:kmod-of-mdio
DEPENDS:=+kmod-fixed-phy +kmod-phy-microchip +PACKAGE_kmod-of-mdio:kmod-of-mdio +!LINUX_6_12:kmod-phylink +!LINUX_6_12:kmod-net-selftests
KCONFIG:=CONFIG_USB_LAN78XX
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/lan78xx.ko
AUTOLOAD:=$(call AutoProbe,lan78xx)
+39 -4
View File
@@ -299,6 +299,22 @@ endef
$(eval $(call KernelPackage,multimedia-input))
define KernelPackage/cec-core
SUBMENU:=$(VIDEO_MENU)
TITLE:=CEC framework
HIDDEN:=1
KCONFIG:=CONFIG_CEC_CORE
FILES:=$(LINUX_DIR)/drivers/media/cec/core/cec.ko
AUTOLOAD:=$(call AutoProbe,cec)
endef
define KernelPackage/cec-core/description
CEC framework.
endef
$(eval $(call KernelPackage,cec-core))
define KernelPackage/drm
SUBMENU:=$(VIDEO_MENU)
TITLE:=Direct Rendering Manager (DRM) support
@@ -335,10 +351,11 @@ endef
$(eval $(call KernelPackage,drm-buddy))
define KernelPackage/drm-display-helper
SUBMENU:=$(VIDEO_MENU)
TITLE:=DRM helpers for display adapters drivers
DEPENDS:=@DISPLAY_SUPPORT +kmod-drm-kms-helper
DEPENDS:=@DISPLAY_SUPPORT +kmod-drm-kms-helper +LINUX_6_18:kmod-cec-core
HIDDEN:=1
KCONFIG:=CONFIG_DRM_DISPLAY_HELPER
FILES:=$(LINUX_DIR)/drivers/gpu/drm/display/drm_display_helper.ko
@@ -460,7 +477,8 @@ define KernelPackage/drm-ttm-helper
TITLE:=Helpers for ttm-based gem objects
HIDDEN:=1
DEPENDS:=@DISPLAY_SUPPORT +kmod-drm-ttm +kmod-drm-kms-helper
KCONFIG:=CONFIG_DRM_TTM_HELPER
KCONFIG:=CONFIG_DRM_TTM_HELPER \
CONFIG_DRM_DISPLAY_HELPER_CEC=n
FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_ttm_helper.ko
AUTOLOAD:=$(call AutoProbe,drm_ttm_helper)
endef
@@ -525,7 +543,7 @@ define KernelPackage/drm-amdgpu
DEPENDS:=@TARGET_x86||TARGET_loongarch64 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
+kmod-drm-ttm-helper +kmod-drm-kms-helper +kmod-i2c-algo-bit +amdgpu-firmware \
+kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video \
+kmod-drm-exec +kmod-drm-suballoc-helper
+kmod-drm-exec +kmod-drm-suballoc-helper +kmod-drm +kmod-drm-panel-backlight-quirks
KCONFIG:=CONFIG_DRM_AMDGPU \
CONFIG_DRM_AMDGPU_SI=y \
CONFIG_DRM_AMDGPU_CIK=y \
@@ -762,6 +780,23 @@ endef
$(eval $(call KernelPackage,drm-panel-mipi-dbi))
define KernelPackage/drm-panel-backlight-quirks
SUBMENU:=$(VIDEO_MENU)
TITLE:=Panel backlight quirks
HIDDEN:=1
KCONFIG:=CONFIG_DRM_PANEL_BACKLIGHT_QUIRKS
DEPENDS:=+kmod-backlight
FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_panel_backlight_quirks.ko
AUTOLOAD:=$(call AutoProbe,panel-backlight-quirks)
endef
define KernelPackage/drm-panel-backlight-quirks/description
Panel backlight quirks
endef
$(eval $(call KernelPackage,drm-panel-backlight-quirks))
define KernelPackage/drm-panel-simple
SUBMENU:=$(VIDEO_MENU)
TITLE:=Simple (non-eDP) TFT panels
@@ -806,7 +841,7 @@ define KernelPackage/drm-radeon
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-kms-helper \
+kmod-drm-ttm +kmod-drm-ttm-helper +kmod-i2c-algo-bit +radeon-firmware \
+kmod-drm-display-helper +kmod-acpi-video +kmod-drm-suballoc-helper \
+kmod-fb-io-fops
+kmod-fb-io-fops +kmod-drm-exec
KCONFIG:=CONFIG_DRM_RADEON
FILES:=$(LINUX_DIR)/drivers/gpu/drm/radeon/radeon.ko
AUTOLOAD:=$(call AutoProbe,radeon)
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#ifdef CPTCFG_ATH9K_DEBUGFS
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -16,12 +16,122 @@
@@ -16,12 +16,131 @@
#include "ath9k.h"
@@ -85,12 +85,21 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+}
+
+/* gpio_chip handler : set GPIO pin to value */
+#if LINUX_VERSION_IS_LESS(6,16,0)
+static void ath9k_gpio_pin_set(struct gpio_chip *chip, unsigned offset,
+ int value)
+#else
+static int ath9k_gpio_pin_set(struct gpio_chip *chip, unsigned offset,
+ int value)
+#endif
+{
+ struct ath_softc *sc = gpiochip_get_data(chip);
+
+ ath9k_hw_set_gpio(sc->sc_ah, offset, value);
+
+#if LINUX_VERSION_IS_GEQ(6,16,0)
+ return 0;
+#endif
+}
+
+/* register GPIO chip */
@@ -157,7 +166,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void ath_fill_led_pin(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
@@ -80,6 +190,12 @@ static int ath_add_led(struct ath_softc
@@ -80,6 +199,12 @@ static int ath_add_led(struct ath_softc
else
ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
@@ -170,7 +179,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0;
}
@@ -117,6 +233,11 @@ void ath_deinit_leds(struct ath_softc *s
@@ -117,6 +242,11 @@ void ath_deinit_leds(struct ath_softc *s
while (!list_empty(&sc->leds)) {
led = list_first_entry(&sc->leds, struct ath_led, list);
@@ -182,7 +191,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
list_del(&led->list);
ath_led_brightness(&led->cdev, LED_OFF);
led_classdev_unregister(&led->cdev);
@@ -124,6 +245,7 @@ void ath_deinit_leds(struct ath_softc *s
@@ -124,6 +254,7 @@ void ath_deinit_leds(struct ath_softc *s
ath9k_hw_gpio_free(sc->sc_ah, gpio->gpio);
kfree(led);
}
@@ -190,7 +199,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
void ath_init_leds(struct ath_softc *sc)
@@ -136,6 +258,12 @@ void ath_init_leds(struct ath_softc *sc)
@@ -136,6 +267,12 @@ void ath_init_leds(struct ath_softc *sc)
if (AR_SREV_9100(sc->sc_ah))
return;
@@ -1,64 +1,81 @@
--- a/drivers/net/wireless/ath/carl9170/debug.c
+++ b/drivers/net/wireless/ath/carl9170/debug.c
@@ -54,6 +54,7 @@ struct carl9170_debugfs_fops {
@@ -54,6 +54,9 @@ struct carl9170_debugfs_fops {
char *(*read)(struct ar9170 *ar, char *buf, size_t bufsize,
ssize_t *len);
ssize_t (*write)(struct ar9170 *aru, const char *buf, size_t size);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ const struct file_operations fops;
+#endif
enum carl9170_device_state req_dev_state;
};
@@ -61,7 +62,7 @@ struct carl9170_debugfs_fops {
@@ -61,7 +64,11 @@ struct carl9170_debugfs_fops {
static ssize_t carl9170_debugfs_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
- const struct carl9170_debugfs_fops *dfops;
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ struct carl9170_debugfs_fops *dfops;
+#else
const struct carl9170_debugfs_fops *dfops;
+#endif
struct ar9170 *ar;
char *buf = NULL, *res_buf = NULL;
ssize_t ret = 0;
@@ -74,7 +75,8 @@ static ssize_t carl9170_debugfs_read(str
@@ -74,7 +81,12 @@ static ssize_t carl9170_debugfs_read(str
if (!ar)
return -ENODEV;
- dfops = debugfs_get_aux(file);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ dfops = container_of(debugfs_real_fops(file),
+ struct carl9170_debugfs_fops, fops);
+#else
dfops = debugfs_get_aux(file);
+#endif
if (!dfops->read)
return -ENOSYS;
@@ -111,7 +113,7 @@ out_free:
@@ -111,7 +123,11 @@ out_free:
static ssize_t carl9170_debugfs_write(struct file *file,
const char __user *userbuf, size_t count, loff_t *ppos)
{
- const struct carl9170_debugfs_fops *dfops;
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ struct carl9170_debugfs_fops *dfops;
+#else
const struct carl9170_debugfs_fops *dfops;
+#endif
struct ar9170 *ar;
char *buf = NULL;
int err = 0;
@@ -126,7 +128,8 @@ static ssize_t carl9170_debugfs_write(st
@@ -126,7 +142,12 @@ static ssize_t carl9170_debugfs_write(st
if (!ar)
return -ENODEV;
- dfops = debugfs_get_aux(file);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ dfops = container_of(debugfs_real_fops(file),
+ struct carl9170_debugfs_fops, fops);
+#else
dfops = debugfs_get_aux(file);
+#endif
if (!dfops->write)
return -ENOSYS;
@@ -162,11 +165,6 @@ out_free:
@@ -162,11 +183,14 @@ out_free:
return err;
}
-static struct debugfs_short_fops debugfs_fops = {
- .read = carl9170_debugfs_read,
- .write = carl9170_debugfs_write,
-};
-
+#if LINUX_VERSION_IS_GEQ(6,14,0)
static struct debugfs_short_fops debugfs_fops = {
.read = carl9170_debugfs_read,
.write = carl9170_debugfs_write,
};
+#endif
+#if LINUX_VERSION_IS_LESS(6,14,0)
#define __DEBUGFS_DECLARE_FILE(name, _read, _write, _read_bufsize, \
_attr, _dstate) \
static const struct carl9170_debugfs_fops carl_debugfs_##name ##_ops = {\
@@ -175,6 +173,12 @@ static const struct carl9170_debugfs_fop
@@ -175,7 +199,24 @@ static const struct carl9170_debugfs_fop
.write = _write, \
.attr = _attr, \
.req_dev_state = _dstate, \
@@ -69,79 +86,113 @@
+ .owner = THIS_MODULE \
+ }, \
}
+#else
+#define __DEBUGFS_DECLARE_FILE(name, _read, _write, _read_bufsize, \
+ _attr, _dstate) \
+static const struct carl9170_debugfs_fops carl_debugfs_##name ##_ops = {\
+ .read_bufsize = _read_bufsize, \
+ .read = _read, \
+ .write = _write, \
+ .attr = _attr, \
+ .req_dev_state = _dstate, \
+}
+#endif
#define DEBUGFS_DECLARE_FILE(name, _read, _write, _read_bufsize, _attr) \
@@ -812,9 +816,9 @@ void carl9170_debugfs_register(struct ar
__DEBUGFS_DECLARE_FILE(name, _read, _write, _read_bufsize, \
@@ -811,10 +852,17 @@ void carl9170_debugfs_register(struct ar
ar->debug_dir = debugfs_create_dir(KBUILD_MODNAME,
ar->hw->wiphy->debugfsdir);
#define DEBUGFS_ADD(name) \
- debugfs_create_file_aux(#name, carl_debugfs_##name ##_ops.attr, \
- ar->debug_dir, ar, &carl_debugfs_##name ## _ops, \
- &debugfs_fops)
+#if LINUX_VERSION_IS_LESS(6,14,0)
+#define DEBUGFS_ADD(name) \
+ debugfs_create_file(#name, carl_debugfs_##name ##_ops.attr, \
+ ar->debug_dir, ar, \
+ &carl_debugfs_##name ## _ops.fops)
+#else
#define DEBUGFS_ADD(name) \
debugfs_create_file_aux(#name, carl_debugfs_##name ##_ops.attr, \
ar->debug_dir, ar, &carl_debugfs_##name ## _ops, \
&debugfs_fops)
+#endif
DEBUGFS_ADD(usb_tx_anch_urbs);
DEBUGFS_ADD(usb_rx_pool_urbs);
--- a/drivers/net/wireless/broadcom/b43/debugfs.c
+++ b/drivers/net/wireless/broadcom/b43/debugfs.c
@@ -30,6 +30,7 @@ static struct dentry *rootdir;
@@ -30,6 +30,9 @@ static struct dentry *rootdir;
struct b43_debugfs_fops {
ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize);
int (*write)(struct b43_wldev *dev, const char *buf, size_t count);
+#if LINUX_VERSION_IS_GEQ(6,14,0)
+ struct file_operations fops;
+#endif
/* Offset of struct b43_dfs_file in struct b43_dfsentry */
size_t file_struct_offset;
};
@@ -490,7 +491,7 @@ static ssize_t b43_debugfs_read(struct f
@@ -490,7 +493,11 @@ static ssize_t b43_debugfs_read(struct f
size_t count, loff_t *ppos)
{
struct b43_wldev *dev;
- const struct b43_debugfs_fops *dfops;
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ struct b43_debugfs_fops *dfops;
+#else
const struct b43_debugfs_fops *dfops;
+#endif
struct b43_dfs_file *dfile;
ssize_t ret;
char *buf;
@@ -510,7 +511,8 @@ static ssize_t b43_debugfs_read(struct f
@@ -510,7 +517,12 @@ static ssize_t b43_debugfs_read(struct f
goto out_unlock;
}
- dfops = debugfs_get_aux(file);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ dfops = container_of(debugfs_real_fops(file),
+ struct b43_debugfs_fops, fops);
+#else
dfops = debugfs_get_aux(file);
+#endif
if (!dfops->read) {
err = -ENOSYS;
goto out_unlock;
@@ -553,7 +555,7 @@ static ssize_t b43_debugfs_write(struct
@@ -553,7 +565,11 @@ static ssize_t b43_debugfs_write(struct
size_t count, loff_t *ppos)
{
struct b43_wldev *dev;
- const struct b43_debugfs_fops *dfops;
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ struct b43_debugfs_fops *dfops;
+#else
const struct b43_debugfs_fops *dfops;
+#endif
char *buf;
int err = 0;
@@ -571,7 +573,8 @@ static ssize_t b43_debugfs_write(struct
@@ -571,7 +587,12 @@ static ssize_t b43_debugfs_write(struct
goto out_unlock;
}
- dfops = debugfs_get_aux(file);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ dfops = container_of(debugfs_real_fops(file),
+ struct b43_debugfs_fops, fops);
+#else
dfops = debugfs_get_aux(file);
+#endif
if (!dfops->write) {
err = -ENOSYS;
goto out_unlock;
@@ -599,16 +602,16 @@ out_unlock:
@@ -599,19 +620,37 @@ out_unlock:
}
-static struct debugfs_short_fops debugfs_ops = {
- .read = b43_debugfs_read,
- .write = b43_debugfs_write,
- .llseek = generic_file_llseek,
-};
-
+#if LINUX_VERSION_IS_GEQ(6,14,0)
static struct debugfs_short_fops debugfs_ops = {
.read = b43_debugfs_read,
.write = b43_debugfs_write,
.llseek = generic_file_llseek,
};
+#endif
+#if LINUX_VERSION_IS_LESS(6,14,0)
#define B43_DEBUGFS_FOPS(name, _read, _write) \
static struct b43_debugfs_fops fops_##name = { \
.read = _read, \
@@ -155,76 +206,115 @@
.file_struct_offset = offsetof(struct b43_dfsentry, \
file_##name), \
}
@@ -700,9 +703,9 @@ void b43_debugfs_add_device(struct b43_w
+#else
+#define B43_DEBUGFS_FOPS(name, _read, _write) \
+ static struct b43_debugfs_fops fops_##name = { \
+ .read = _read, \
+ .write = _write, \
+ .file_struct_offset = offsetof(struct b43_dfsentry, \
+ file_##name), \
+ }
+#endif
B43_DEBUGFS_FOPS(shm16read, shm16read__read_file, shm16read__write_file);
B43_DEBUGFS_FOPS(shm16write, NULL, shm16write__write_file);
@@ -698,12 +737,21 @@ void b43_debugfs_add_device(struct b43_w
e->shm32read_routing_next = 0xFFFFFFFF; /* invalid routing */
e->shm32read_addr_next = 0xFFFFFFFF; /* invalid address */
+#if LINUX_VERSION_IS_LESS(6,14,0)
+#define ADD_FILE(name, mode) \
+ do { \
+ debugfs_create_file(__stringify(name), \
+ mode, e->subdir, dev, \
+ &fops_##name.fops); \
+ } while (0)
+#else
#define ADD_FILE(name, mode) \
do { \
- debugfs_create_file_aux(__stringify(name), \
+ debugfs_create_file(__stringify(name), \
debugfs_create_file_aux(__stringify(name), \
mode, e->subdir, dev, \
- &fops_##name, &debugfs_ops); \
+ &fops_##name.fops); \
&fops_##name, &debugfs_ops); \
} while (0)
+#endif
ADD_FILE(shm16read, 0600);
--- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c
+++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
@@ -31,6 +31,7 @@ static struct dentry *rootdir;
@@ -31,6 +31,9 @@ static struct dentry *rootdir;
struct b43legacy_debugfs_fops {
ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize);
int (*write)(struct b43legacy_wldev *dev, const char *buf, size_t count);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ struct file_operations fops;
+#endif
/* Offset of struct b43legacy_dfs_file in struct b43legacy_dfsentry */
size_t file_struct_offset;
/* Take wl->irq_lock before calling read/write? */
@@ -187,7 +188,7 @@ static ssize_t b43legacy_debugfs_read(st
@@ -187,7 +190,11 @@ static ssize_t b43legacy_debugfs_read(st
size_t count, loff_t *ppos)
{
struct b43legacy_wldev *dev;
- const struct b43legacy_debugfs_fops *dfops;
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ struct b43legacy_debugfs_fops *dfops;
+#else
const struct b43legacy_debugfs_fops *dfops;
+#endif
struct b43legacy_dfs_file *dfile;
ssize_t ret;
char *buf;
@@ -207,7 +208,8 @@ static ssize_t b43legacy_debugfs_read(st
@@ -207,7 +214,12 @@ static ssize_t b43legacy_debugfs_read(st
goto out_unlock;
}
- dfops = debugfs_get_aux(file);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ dfops = container_of(debugfs_real_fops(file),
+ struct b43legacy_debugfs_fops, fops);
+#else
dfops = debugfs_get_aux(file);
+#endif
if (!dfops->read) {
err = -ENOSYS;
goto out_unlock;
@@ -255,7 +257,7 @@ static ssize_t b43legacy_debugfs_write(s
@@ -255,7 +267,11 @@ static ssize_t b43legacy_debugfs_write(s
size_t count, loff_t *ppos)
{
struct b43legacy_wldev *dev;
- const struct b43legacy_debugfs_fops *dfops;
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ struct b43legacy_debugfs_fops *dfops;
+#else
const struct b43legacy_debugfs_fops *dfops;
+#endif
char *buf;
int err = 0;
@@ -273,7 +275,8 @@ static ssize_t b43legacy_debugfs_write(s
@@ -273,7 +289,12 @@ static ssize_t b43legacy_debugfs_write(s
goto out_unlock;
}
- dfops = debugfs_get_aux(file);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+ dfops = container_of(debugfs_real_fops(file),
+ struct b43legacy_debugfs_fops, fops);
+#else
dfops = debugfs_get_aux(file);
+#endif
if (!dfops->write) {
err = -ENOSYS;
goto out_unlock;
@@ -305,16 +308,17 @@ out_unlock:
@@ -305,20 +326,39 @@ out_unlock:
return err ? err : count;
}
-static struct debugfs_short_fops debugfs_ops = {
- .read = b43legacy_debugfs_read,
- .write = b43legacy_debugfs_write,
- .llseek = generic_file_llseek
-};
+#if LINUX_VERSION_IS_GEQ(6,14,0)
static struct debugfs_short_fops debugfs_ops = {
.read = b43legacy_debugfs_read,
.write = b43legacy_debugfs_write,
.llseek = generic_file_llseek
};
+#endif
+#if LINUX_VERSION_IS_LESS(6,14,0)
#define B43legacy_DEBUGFS_FOPS(name, _read, _write, _take_irqlock) \
static struct b43legacy_debugfs_fops fops_##name = { \
.read = _read, \
@@ -238,15 +328,39 @@
.file_struct_offset = offsetof(struct b43legacy_dfsentry, \
file_##name), \
.take_irqlock = _take_irqlock, \
@@ -382,9 +386,9 @@ void b43legacy_debugfs_add_device(struct
}
+#else
+#define B43legacy_DEBUGFS_FOPS(name, _read, _write, _take_irqlock) \
+ static struct b43legacy_debugfs_fops fops_##name = { \
+ .read = _read, \
+ .write = _write, \
+ .file_struct_offset = offsetof(struct b43legacy_dfsentry, \
+ file_##name), \
+ .take_irqlock = _take_irqlock, \
+ }
+#endif
B43legacy_DEBUGFS_FOPS(tsf, tsf_read_file, tsf_write_file, 1);
B43legacy_DEBUGFS_FOPS(ucode_regs, ucode_regs_read_file, NULL, 1);
@@ -380,12 +420,21 @@ void b43legacy_debugfs_add_device(struct
snprintf(devdir, sizeof(devdir), "%s", wiphy_name(dev->wl->hw->wiphy));
e->subdir = debugfs_create_dir(devdir, rootdir);
+#if LINUX_VERSION_IS_LESS(6,14,0)
+#define ADD_FILE(name, mode) \
+ do { \
+ debugfs_create_file(__stringify(name), mode, \
+ e->subdir, dev, \
+ &fops_##name.fops); \
+ } while (0)
+#else
#define ADD_FILE(name, mode) \
do { \
- debugfs_create_file_aux(__stringify(name), mode, \
+ debugfs_create_file(__stringify(name), mode, \
debugfs_create_file_aux(__stringify(name), mode, \
e->subdir, dev, \
- &fops_##name, &debugfs_ops); \
+ &fops_##name.fops); \
&fops_##name, &debugfs_ops); \
} while (0)
+#endif
ADD_FILE(tsf, 0600);
@@ -0,0 +1,15 @@
--- a/backport-include/linux/net.h
+++ b/backport-include/linux/net.h
@@ -3,12 +3,4 @@
#include_next <linux/net.h>
#include <linux/static_key.h>
-
-#ifndef SOCKWQ_ASYNC_NOSPACE
-#define SOCKWQ_ASYNC_NOSPACE SOCK_ASYNC_NOSPACE
-#endif
-#ifndef SOCKWQ_ASYNC_WAITDATA
-#define SOCKWQ_ASYNC_WAITDATA SOCK_ASYNC_WAITDATA
-#endif
-
#endif /* __BACKPORT_LINUX_NET_H */
@@ -0,0 +1,33 @@
From a95e567eb0e06d460dee234f9c845fbfb215ab11 Mon Sep 17 00:00:00 2001
From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Date: Thu, 29 Jan 2026 16:36:25 +0100
Subject: [PATCH] wifi: mt76: use hrtimer_setup() in mt76x02u beacon init
Replace the two-step hrtimer initialization pattern with a single
consolidated call to hrtimer_setup().
The legacy approach of calling hrtimer_init() followed by manual
assignment to timer.function is deprecated. The new hrtimer_setup()
helper atomically initializes the timer and assigns the callback
function in one operation, eliminating the race-prone intermediate
state where the timer is initialized but lacks a handler.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
---
mt76x02_usb_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mt76x02_usb_core.c b/mt76x02_usb_core.c
index c94c2f661..3a28a8cc1 100644
--- a/mt76x02_usb_core.c
+++ b/mt76x02_usb_core.c
@@ -264,8 +264,8 @@ void mt76x02u_init_beacon_config(struct mt76x02_dev *dev)
};
dev->beacon_ops = &beacon_ops;
- hrtimer_init(&dev->pre_tbtt_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- dev->pre_tbtt_timer.function = mt76x02u_pre_tbtt_interrupt;
+ hrtimer_setup(&dev->pre_tbtt_timer, mt76x02u_pre_tbtt_interrupt, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
INIT_WORK(&dev->pre_tbtt_work, mt76x02u_pre_tbtt_work);
mt76x02_init_beacon_config(dev);
+1 -1
View File
@@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/rtl8812au-ct
SUBMENU:=Wireless Drivers
TITLE:=Driver for Realtek 8812 AU devices comfast 912-ac, etc
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT
DEPENDS:=@!LINUX_6_18 +kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT
FILES:=\
$(PKG_BUILD_DIR)/rtl8812au.ko
AUTOLOAD:=$(call AutoProbe,rtl8812au)
+2 -2
View File
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
PKG_VERSION:=5.8.4
PKG_VERSION:=5.9.0
PKG_REAL_VERSION:=$(PKG_VERSION)-stable
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_REAL_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_REAL_VERSION)
PKG_HASH:=2b702b7a66b0067bfd284408827b1e59288b357b0dd758d0089c062395f2a522
PKG_HASH:=6efc62b86f145a5c52bfd62294ca66c20ce85b54e9033f5d7e0ee73eb30306c1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_REAL_VERSION)
@@ -1,6 +1,6 @@
--- a/wolfssl/wolfcrypt/settings.h
+++ b/wolfssl/wolfcrypt/settings.h
@@ -4048,7 +4048,7 @@ extern void uITRON4_free(void *p) ;
@@ -4122,7 +4122,7 @@ extern void uITRON4_free(void *p) ;
/* warning for not using harden build options (default with ./configure) */
/* do not warn if big integer support is disabled */
@@ -134,6 +134,7 @@ validate_switch_vlan()
service_triggers()
{
procd_add_reload_trigger network wireless
procd_add_reload_data_trigger network-device network-interface bridge-vlan wifi-device wifi-iface
procd_open_validate
validate_atm_bridge_section
@@ -334,6 +334,11 @@
"type": "boolean",
"default": false
},
"he_twt_responder": {
"description": "Whether TWT (HE) responder is enabled.",
"type": "boolean",
"default": true
},
"hostapd_options": {
"type": "array",
"items": {
@@ -1041,7 +1041,11 @@
"uesa": {
"description": "Unauthenticated emergency service accessible",
"type": "boolean",
"default": false
"default": false
},
"uuid": {
"description": "Device UUID used by WPS",
"type": "string"
},
"utf8_ssid": {
"description": "Whether the SSID is to be interpreted using UTF-8 encoding",
@@ -234,7 +234,7 @@ function iface_wps(config) {
append_vars(config, [
'wps_state', 'device_type', 'device_name', 'config_methods', 'wps_independent', 'eap_server',
'ap_pin', 'ap_setup_locked', 'upnp_iface'
'ap_pin', 'ap_setup_locked', 'upnp_iface', 'uuid'
]);
}
}
@@ -426,12 +426,15 @@ function device_htmode_append(config) {
config.he_mu_beamformer = false;
if (!(he_phy_cap[7] & 0x1))
config.he_spr_psr_enabled = false;
if (!(he_mac_cap[0] & 0x1))
if (!(he_mac_cap[0] & 0x4))
config.he_twt_responder = false;
if (!config.he_twt_responder)
config.he_twt_required= false;
append_vars(config, [
'ieee80211ax', 'he_oper_chwidth', 'he_oper_centr_freq_seg0_idx',
'he_su_beamformer', 'he_su_beamformee', 'he_mu_beamformer', 'he_twt_required',
'he_su_beamformer', 'he_su_beamformee', 'he_mu_beamformer',
'he_twt_required', 'he_twt_responder',
'he_default_pe_duration', 'he_rts_threshold', 'he_mu_edca_qos_info_param_count',
'he_mu_edca_qos_info_q_ack', 'he_mu_edca_qos_info_queue_request', 'he_mu_edca_qos_info_txop_request',
'he_mu_edca_ac_be_aifsn', 'he_mu_edca_ac_be_aci', 'he_mu_edca_ac_be_ecwmin',
@@ -338,7 +338,7 @@ hostapd_common_add_bss_config() {
config_add_boolean wps_pushbutton wps_label ext_registrar wps_pbc_in_m1
config_add_int wps_ap_setup_locked wps_independent
config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin
config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin uuid
config_add_string multi_ap_backhaul_ssid multi_ap_backhaul_key
config_add_boolean wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition mbo
@@ -565,7 +565,7 @@ hostapd_set_bss_options() {
wpa_disable_eapol_key_retries tdls_prohibit \
maxassoc max_inactivity disassoc_low_ack isolate auth_cache \
wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 wps_ap_setup_locked \
wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \
wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin uuid \
macfilter ssid utf8_ssid uapsd hidden short_preamble rsn_preauth \
iapp_interface eapol_version dynamic_vlan ieee80211w nasid \
acct_secret acct_port acct_interval \
@@ -856,6 +856,7 @@ hostapd_set_bss_options() {
append bss_conf "config_methods=$config_methods" "$N"
append bss_conf "wps_independent=$wps_independent" "$N"
[ -n "$wps_ap_setup_locked" ] && append bss_conf "ap_setup_locked=$wps_ap_setup_locked" "$N"
[ -n "$uuid" ] && append bss_conf "uuid=$uuid" "$N"
[ "$wps_pbc_in_m1" -gt 0 ] && append bss_conf "pbc_in_m1=$wps_pbc_in_m1" "$N"
[ "$multi_ap" -gt 0 ] && [ -n "$multi_ap_backhaul_ssid" ] && {
append bss_conf "multi_ap_backhaul_ssid=\"$multi_ap_backhaul_ssid\"" "$N"
+3 -3
View File
@@ -9,9 +9,9 @@ PKG_RELEASE:=1
PKG_SOURCE_URL:=https://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2026-03-19
PKG_SOURCE_VERSION:=2a98e6b981fb3f81b3ce3aa5f3941e509f73c454
PKG_MIRROR_HASH:=34487c2c24a93bb7ead4b1f850152bdab475ea897419be18b3dd3df2fdde6a7b
PKG_SOURCE_DATE:=2026-03-23
PKG_SOURCE_VERSION:=3f9b7ae0780973446d3feea27b4caf6dbf43f0c6
PKG_MIRROR_HASH:=5421a6bfe145559d27930010f1aba7781a483898e6de5462024871388f114661
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-3-Clause
@@ -1,33 +0,0 @@
From 3650b847ca9dac1e38c09116321010f33c4dc194 Mon Sep 17 00:00:00 2001
From: Nick Hainke <vincent@systemli.org>
Date: Fri, 20 Mar 2026 11:08:19 +0100
Subject: [PATCH] RSN: Fix pmksa_cache_flush prototype mismatch in
non-IEEE8021X_EAPOL case
Fix compilation error caused by conflicting declarations of
pmksa_cache_flush() when IEEE8021X_EAPOL is not enabled or
CONFIG_NO_WPA is set. The function definition in pmksa_cache.c
was missing the addr parameter present in the header declaration
for this build configuration.
Align the implementation with the header by adding the missing
parameter.
Fixes: e6dbaa673f39 ("SAE: Limit PMKSA flushing on failure to the current BSS")
Signed-off-by: Nick Hainke <vincent@systemli.org>
---
src/rsn_supp/pmksa_cache.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/src/rsn_supp/pmksa_cache.c
+++ b/src/rsn_supp/pmksa_cache.c
@@ -955,7 +955,8 @@ int pmksa_cache_set_current(struct wpa_s
void pmksa_cache_flush(struct rsn_pmksa_cache *pmksa, void *network_ctx,
- const u8 *pmk, size_t pmk_len, bool external_only)
+ const u8 *pmk, size_t pmk_len, bool external_only,
+ const u8 *addr)
{
}
@@ -273,7 +273,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef CONFIG_RADIUS_SERVER
CFLAGS += -DRADIUS_SERVER
@@ -1373,7 +1458,9 @@ NOBJS += ../src/utils/trace.o
@@ -1374,7 +1459,9 @@ NOBJS += ../src/utils/trace.o
endif
HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o
@@ -283,7 +283,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef CONFIG_INTERNAL_AES
HOBJS += ../src/crypto/aes-internal.o
HOBJS += ../src/crypto/aes-internal-enc.o
@@ -1396,18 +1483,24 @@ SOBJS += ../src/common/sae.o
@@ -1397,18 +1484,24 @@ SOBJS += ../src/common/sae.o
SOBJS += ../src/common/sae_pk.o
SOBJS += ../src/common/dragonfly.o
SOBJS += $(AESOBJS)
@@ -7770,7 +7770,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
CONFIG_SIM_SIMULATOR=y
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1265,6 +1265,29 @@ endif
@@ -1266,6 +1266,29 @@ endif
CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
endif
@@ -7800,7 +7800,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifeq ($(CONFIG_TLS), gnutls)
ifndef CONFIG_CRYPTO
# default to libgcrypt
@@ -1457,9 +1480,11 @@ endif
@@ -1458,9 +1481,11 @@ endif
ifneq ($(CONFIG_TLS), openssl)
ifneq ($(CONFIG_TLS), wolfssl)
@@ -7812,7 +7812,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
# Seems to be needed at least with BoringSSL
NEED_INTERNAL_AES_WRAP=y
@@ -1473,9 +1498,11 @@ endif
@@ -1474,9 +1499,11 @@ endif
ifdef NEED_INTERNAL_AES_WRAP
ifneq ($(CONFIG_TLS), linux)
@@ -7824,7 +7824,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef NEED_AES_EAX
AESOBJS += ../src/crypto/aes-eax.o
NEED_AES_CTR=y
@@ -1485,35 +1512,45 @@ AESOBJS += ../src/crypto/aes-siv.o
@@ -1486,35 +1513,45 @@ AESOBJS += ../src/crypto/aes-siv.o
NEED_AES_CTR=y
endif
ifdef NEED_AES_CTR
@@ -7870,7 +7870,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef NEED_AES_ENC
ifdef CONFIG_INTERNAL_AES
AESOBJS += ../src/crypto/aes-internal-enc.o
@@ -1528,12 +1565,16 @@ ifneq ($(CONFIG_TLS), openssl)
@@ -1529,12 +1566,16 @@ ifneq ($(CONFIG_TLS), openssl)
ifneq ($(CONFIG_TLS), linux)
ifneq ($(CONFIG_TLS), gnutls)
ifneq ($(CONFIG_TLS), wolfssl)
@@ -7887,7 +7887,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef CONFIG_INTERNAL_SHA1
SHA1OBJS += ../src/crypto/sha1-internal.o
ifdef NEED_FIPS186_2_PRF
@@ -1545,29 +1586,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2
@@ -1546,29 +1587,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2
else
ifneq ($(CONFIG_TLS), openssl)
ifneq ($(CONFIG_TLS), wolfssl)
@@ -7925,7 +7925,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef NEED_MD5
ifdef CONFIG_INTERNAL_MD5
MD5OBJS += ../src/crypto/md5-internal.o
@@ -1622,12 +1671,17 @@ ifneq ($(CONFIG_TLS), openssl)
@@ -1623,12 +1672,17 @@ ifneq ($(CONFIG_TLS), openssl)
ifneq ($(CONFIG_TLS), linux)
ifneq ($(CONFIG_TLS), gnutls)
ifneq ($(CONFIG_TLS), wolfssl)
@@ -7943,7 +7943,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef CONFIG_INTERNAL_SHA256
SHA256OBJS += ../src/crypto/sha256-internal.o
endif
@@ -1640,50 +1694,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512
@@ -1641,50 +1695,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512
SHA256OBJS += ../src/crypto/sha512-internal.o
endif
ifdef NEED_TLS_PRF_SHA256
@@ -8012,7 +8012,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifdef NEED_ASN1
OBJS += ../src/tls/asn1.o
@@ -1858,10 +1930,12 @@ ifdef CONFIG_FIPS
@@ -1859,10 +1931,12 @@ ifdef CONFIG_FIPS
CFLAGS += -DCONFIG_FIPS
ifneq ($(CONFIG_TLS), openssl)
ifneq ($(CONFIG_TLS), wolfssl)
@@ -101,7 +101,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1276,10 +1276,6 @@ endif
@@ -1277,10 +1277,6 @@ endif
OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
@@ -1289,7 +1289,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
if (need_more_data) {
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1223,6 +1223,7 @@ TLS_FUNCS=y
@@ -1224,6 +1224,7 @@ TLS_FUNCS=y
endif
ifeq ($(CONFIG_TLS), wolfssl)
@@ -1297,7 +1297,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
ifdef TLS_FUNCS
CFLAGS += -DWOLFSSL_DER_LOAD
@@ -1239,6 +1240,7 @@ LIBS_p += -lwolfssl -lm
@@ -1240,6 +1241,7 @@ LIBS_p += -lwolfssl -lm
endif
ifeq ($(CONFIG_TLS), openssl)
@@ -1305,7 +1305,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
ifdef TLS_FUNCS
CFLAGS += -DEAP_TLS_OPENSSL
@@ -1266,6 +1268,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
@@ -1267,6 +1269,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
endif
ifeq ($(CONFIG_TLS), mbedtls)
@@ -1313,7 +1313,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifndef CONFIG_CRYPTO
CONFIG_CRYPTO=mbedtls
endif
@@ -1285,6 +1288,7 @@ endif
@@ -1286,6 +1289,7 @@ endif
endif
ifeq ($(CONFIG_TLS), gnutls)
@@ -1321,7 +1321,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifndef CONFIG_CRYPTO
# default to libgcrypt
CONFIG_CRYPTO=gnutls
@@ -1315,6 +1319,7 @@ endif
@@ -1316,6 +1320,7 @@ endif
endif
ifeq ($(CONFIG_TLS), internal)
@@ -1329,7 +1329,7 @@ Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
ifndef CONFIG_CRYPTO
CONFIG_CRYPTO=internal
endif
@@ -1395,6 +1400,7 @@ endif
@@ -1396,6 +1401,7 @@ endif
endif
ifeq ($(CONFIG_TLS), linux)
@@ -43,7 +43,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
LIBS += $(DRV_AP_LIBS)
ifdef CONFIG_L2_PACKET
@@ -1424,6 +1430,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
@@ -1425,6 +1431,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
_OBJS_VAR := OBJS
include ../src/objs.mk
@@ -56,7 +56,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
hostapd: $(OBJS)
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
@$(E) " LD " $@
@@ -1512,6 +1524,12 @@ include ../src/objs.mk
@@ -1513,6 +1525,12 @@ include ../src/objs.mk
_OBJS_VAR := SOBJS
include ../src/objs.mk
@@ -94,7 +94,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
if (c < 0)
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -2580,8 +2580,8 @@ static void hostapd_mld_iface_disable(st
@@ -2596,8 +2596,8 @@ static void hostapd_mld_iface_disable(st
#endif /* CONFIG_IEEE80211BE */
@@ -105,7 +105,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
{
struct hostapd_data *hapd = ctx;
struct sta_info *sta;
@@ -2943,7 +2943,7 @@ void wpa_supplicant_event(void *ctx, enu
@@ -2967,7 +2967,7 @@ void wpa_supplicant_event(void *ctx, enu
}
@@ -116,7 +116,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
struct hapd_interfaces *interfaces = ctx;
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -7291,8 +7291,8 @@ union wpa_event_data {
@@ -7309,8 +7309,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@@ -127,7 +127,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
/**
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
@@ -7304,7 +7304,7 @@ void wpa_supplicant_event(void *ctx, enu
@@ -7322,7 +7322,7 @@ void wpa_supplicant_event(void *ctx, enu
* Same as wpa_supplicant_event(), but we search for the interface in
* wpa_global.
*/
@@ -192,7 +192,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
OBJS += ../src/ap/hostapd.o
OBJS += ../src/ap/wpa_auth_glue.o
OBJS += ../src/ap/utils.o
@@ -1115,6 +1124,12 @@ endif
@@ -1116,6 +1125,12 @@ endif
ifdef CONFIG_HS20
OBJS += ../src/ap/hs20.o
endif
@@ -205,7 +205,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
endif
ifdef CONFIG_MBO
@@ -1124,7 +1139,9 @@ NEED_GAS=y
@@ -1125,7 +1140,9 @@ NEED_GAS=y
endif
ifdef NEED_RSN_AUTHENTICATOR
@@ -215,7 +215,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
NEED_AES_WRAP=y
OBJS += ../src/ap/wpa_auth.o
OBJS += ../src/ap/wpa_auth_ie.o
@@ -2124,6 +2141,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
@@ -2125,6 +2142,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
_OBJS_VAR := OBJS
include ../src/objs.mk
@@ -228,7 +228,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
@$(E) " LD " $@
@@ -2256,6 +2279,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
@@ -2257,6 +2280,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
@$(E) " sed" $<
@@ -5,7 +5,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1437,7 +1437,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@@ -1438,7 +1438,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@$(AR) cr $@ hostapd_multi.o $(OBJS)
hostapd: $(OBJS)
@@ -14,7 +14,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
@$(E) " LD " $@
ifdef CONFIG_WPA_TRACE
@@ -1448,7 +1448,7 @@ _OBJS_VAR := OBJS_c
@@ -1449,7 +1449,7 @@ _OBJS_VAR := OBJS_c
include ../src/objs.mk
hostapd_cli: $(OBJS_c)
@@ -25,7 +25,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -2148,31 +2148,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@@ -2149,31 +2149,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
@@ -131,7 +131,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -6490,6 +6490,7 @@ static const char * wpa_bool_txt(int val
@@ -6526,6 +6526,7 @@ static const char * wpa_bool_txt(int val
return val ? "TRUE" : "FALSE";
}
@@ -139,7 +139,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
#define RSN_SUITE "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s) \
@@ -6642,7 +6643,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
@@ -6678,7 +6679,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
return len;
}
@@ -181,7 +181,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -1527,7 +1527,7 @@ int wpas_ap_wps_nfc_report_handover(stru
@@ -1535,7 +1535,7 @@ int wpas_ap_wps_nfc_report_handover(stru
#endif /* CONFIG_WPS */
@@ -5,7 +5,7 @@ Subject: [PATCH] wpa_supplicant: fix calling channel switch via wpa_cli on
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -1855,6 +1855,21 @@ int ap_switch_channel(struct wpa_supplic
@@ -1863,6 +1863,21 @@ int ap_switch_channel(struct wpa_supplic
#ifdef CONFIG_CTRL_IFACE
@@ -27,7 +27,7 @@ Subject: [PATCH] wpa_supplicant: fix calling channel switch via wpa_cli on
int ap_ctrl_iface_chanswitch(struct wpa_supplicant *wpa_s, const char *pos)
{
struct csa_settings settings;
@@ -1874,12 +1889,18 @@ int ap_ctrl_iface_chanswitch(struct wpa_
@@ -1882,12 +1897,18 @@ int ap_ctrl_iface_chanswitch(struct wpa_
return -1;
ret = hostapd_parse_csa_settings(iface, pos, &settings);
@@ -92,7 +92,7 @@ probe/assoc/auth requests via object subscribe.
return 0;
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -332,6 +332,10 @@ int hostapd_notif_assoc(struct hostapd_d
@@ -333,6 +333,10 @@ int hostapd_notif_assoc(struct hostapd_d
#endif /* CONFIG_OWE */
bool updated = false;
bool driver_acl;
@@ -103,7 +103,7 @@ probe/assoc/auth requests via object subscribe.
#ifdef CONFIG_P2P
if (hapd->p2p_group && (!hapd->started || hapd->disabled)) {
@@ -527,6 +531,12 @@ int hostapd_notif_assoc(struct hostapd_d
@@ -528,6 +532,12 @@ int hostapd_notif_assoc(struct hostapd_d
}
#endif /* CONFIG_IEEE80211BE */
@@ -116,7 +116,7 @@ probe/assoc/auth requests via object subscribe.
#ifdef CONFIG_P2P
if (elems.p2p) {
wpabuf_free(sta->p2p_ie);
@@ -1424,6 +1434,7 @@ void hostapd_event_ch_switch(struct host
@@ -1425,6 +1435,7 @@ void hostapd_event_ch_switch(struct host
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_CSA_FINISHED
"freq=%d dfs=%d", freq, is_dfs);
@@ -185,7 +185,7 @@ probe/assoc/auth requests via object subscribe.
int interface_added; /* virtual interface added for this BSS */
unsigned int started:1;
unsigned int disabled:1;
@@ -783,6 +785,7 @@ hostapd_alloc_bss_data(struct hostapd_if
@@ -785,6 +787,7 @@ hostapd_alloc_bss_data(struct hostapd_if
struct hostapd_bss_config *bss);
int hostapd_setup_interface(struct hostapd_iface *iface);
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
@@ -407,7 +407,7 @@ as adding/removing interfaces.
int interface_added; /* virtual interface added for this BSS */
unsigned int started:1;
unsigned int disabled:1;
@@ -585,6 +591,7 @@ struct hostapd_mld {
@@ -587,6 +593,7 @@ struct hostapd_mld {
*/
struct hostapd_iface {
struct hapd_interfaces *interfaces;
@@ -415,7 +415,7 @@ as adding/removing interfaces.
void *owner;
char *config_fname;
struct hostapd_config *conf;
@@ -794,11 +801,16 @@ struct hostapd_iface * hostapd_init(stru
@@ -796,11 +803,16 @@ struct hostapd_iface * hostapd_init(stru
struct hostapd_iface *
hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy,
const char *config_fname, int debug);
@@ -432,7 +432,7 @@ as adding/removing interfaces.
int hostapd_enable_iface(struct hostapd_iface *hapd_iface);
int hostapd_reload_iface(struct hostapd_iface *hapd_iface);
int hostapd_reload_bss_only(struct hostapd_data *bss);
@@ -824,6 +836,7 @@ hostapd_switch_channel_fallback(struct h
@@ -826,6 +838,7 @@ hostapd_switch_channel_fallback(struct h
void hostapd_cleanup_cs_params(struct hostapd_data *hapd);
void hostapd_periodic_iface(struct hostapd_iface *iface);
int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
@@ -614,7 +614,7 @@ as adding/removing interfaces.
* set_sta_vlan - Bind a station into a specific interface (AP only)
* @priv: Private driver interface data
* @ifname: Interface (main or virtual BSS or VLAN)
@@ -7017,6 +7036,7 @@ union wpa_event_data {
@@ -7023,6 +7042,7 @@ union wpa_event_data {
/**
* struct ch_switch
@@ -622,7 +622,7 @@ as adding/removing interfaces.
* @freq: Frequency of new channel in MHz
* @ht_enabled: Whether this is an HT channel
* @ch_offset: Secondary channel offset
@@ -7027,6 +7047,7 @@ union wpa_event_data {
@@ -7033,6 +7053,7 @@ union wpa_event_data {
* @punct_bitmap: Puncturing bitmap
*/
struct ch_switch {
@@ -859,7 +859,7 @@ as adding/removing interfaces.
if (link) {
data.ch_switch.link_id = nla_get_u8(link);
@@ -4332,6 +4335,7 @@ static void do_process_drv_event(struct
@@ -4421,6 +4424,7 @@ static void do_process_drv_event(struct
tb[NL80211_ATTR_CENTER_FREQ1],
tb[NL80211_ATTR_CENTER_FREQ2],
tb[NL80211_ATTR_PUNCT_BITMAP],
@@ -867,7 +867,7 @@ as adding/removing interfaces.
0);
break;
case NL80211_CMD_CH_SWITCH_NOTIFY:
@@ -4344,6 +4348,7 @@ static void do_process_drv_event(struct
@@ -4433,6 +4437,7 @@ static void do_process_drv_event(struct
tb[NL80211_ATTR_CENTER_FREQ1],
tb[NL80211_ATTR_CENTER_FREQ2],
tb[NL80211_ATTR_PUNCT_BITMAP],
@@ -79,7 +79,7 @@ full device, e.g. in order to deal with hardware/driver limitations
{
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -838,6 +838,7 @@ void hostapd_periodic_iface(struct hosta
@@ -840,6 +840,7 @@ void hostapd_periodic_iface(struct hosta
int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
void hostapd_owe_update_trans(struct hostapd_iface *iface);;
void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
@@ -29,7 +29,7 @@ a VLAN interface on top of the bridge, instead of using the bridge directly
int bridge_hairpin; /* hairpin_mode on bridge members */
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -1899,8 +1899,12 @@ int hostapd_setup_wpa(struct hostapd_dat
@@ -1925,8 +1925,12 @@ int hostapd_setup_wpa(struct hostapd_dat
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
const char *ft_iface;
@@ -39,7 +39,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1448,6 +1448,11 @@ CFLAGS += -DCONFIG_PROCESS_COORDINATION
@@ -1449,6 +1449,11 @@ CFLAGS += -DCONFIG_PROCESS_COORDINATION
OBJS += ../src/common/proc_coord.o
endif
+3 -1
View File
@@ -335,7 +335,9 @@ _procd_add_reload_data_trigger() {
local name=$(basename ${script:-$initscript})
_procd_open_trigger
_procd_add_data_trigger $1 /etc/init.d/$name reload
for t in "$@"; do
_procd_add_data_trigger "$t" /etc/init.d/$name reload
done
_procd_close_trigger
}
@@ -356,6 +356,7 @@
};
&pcie0 {
airoha,x2-mode;
pinctrl-names = "default";
pinctrl-0 = <&pcie1_rst_pins>;
status = "okay";
@@ -252,6 +252,8 @@
&pcie0 {
status = "okay";
airoha,x2-mode;
pinctrl-names = "default";
pinctrl-0 = <&pcie0_rst_pins>;
pcie@0,0 {
-5
View File
@@ -728,10 +728,7 @@
mediatek,pbus-csr = <&pbus_csr 0x0 0x4>;
airoha,chip-scu = <&chip_scu>;
airoha,np-scu = <&scuclk>;
airoha,x2-mode;
airoha,serdes-lanes-mask = <0x3>;
interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
bus-range = <0x00 0xff>;
@@ -819,8 +816,6 @@
mediatek,pbus-csr = <&pbus_csr 0x10 0x14>;
airoha,chip-scu = <&chip_scu>;
airoha,serdes-lanes-mask = <0x4>;
airoha,np-scu = <&scuclk>;
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
@@ -1,40 +0,0 @@
From 8e38e08f2c560328a873c35aff1a0dbea6a7d084 Mon Sep 17 00:00:00 2001
From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: Tue, 1 Oct 2024 12:10:25 +0200
Subject: [PATCH 2/2] net: airoha: fix PSE memory configuration in
airoha_fe_pse_ports_init()
Align PSE memory configuration to vendor SDK. In particular, increase
initial value of PSE reserved memory in airoha_fe_pse_ports_init()
routine by the value used for the second Packet Processor Engine (PPE2)
and do not overwrite the default value.
Introduced by commit 23020f049327 ("net: airoha: Introduce ethernet support
for EN7581 SoC")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241001-airoha-eth-pse-fix-v2-2-9a56cdffd074@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/mediatek/airoha_eth.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ b/drivers/net/ethernet/mediatek/airoha_eth.c
@@ -1166,11 +1166,13 @@ static void airoha_fe_pse_ports_init(str
[FE_PSE_PORT_GDM4] = 2,
[FE_PSE_PORT_CDM5] = 2,
};
+ u32 all_rsv;
int q;
+ all_rsv = airoha_fe_get_pse_all_rsv(eth);
/* hw misses PPE2 oq rsv */
- airoha_fe_set(eth, REG_FE_PSE_BUF_SET,
- PSE_RSV_PAGES * pse_port_num_queues[FE_PSE_PORT_PPE2]);
+ all_rsv += PSE_RSV_PAGES * pse_port_num_queues[FE_PSE_PORT_PPE2];
+ airoha_fe_set(eth, REG_FE_PSE_BUF_SET, all_rsv);
/* CMD1 */
for (q = 0; q < pse_port_num_queues[FE_PSE_PORT_CDM1]; q++)
@@ -1,52 +0,0 @@
From 1f3e7ff4f296af1f4350f457d5bd82bc825e645a Mon Sep 17 00:00:00 2001
From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: Tue, 1 Oct 2024 12:10:24 +0200
Subject: [PATCH 1/2] net: airoha: read default PSE reserved pages value before
updating
Store the default value for the number of PSE reserved pages in orig_val
at the beginning of airoha_fe_set_pse_oq_rsv routine, before updating it
with airoha_fe_set_pse_queue_rsv_pages().
Introduce airoha_fe_get_pse_all_rsv utility routine.
Introduced by commit 23020f049327 ("net: airoha: Introduce ethernet support
for EN7581 SoC")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241001-airoha-eth-pse-fix-v2-1-9a56cdffd074@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/mediatek/airoha_eth.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ b/drivers/net/ethernet/mediatek/airoha_eth.c
@@ -1116,17 +1116,23 @@ static void airoha_fe_set_pse_queue_rsv_
PSE_CFG_WR_EN_MASK | PSE_CFG_OQRSV_SEL_MASK);
}
+static u32 airoha_fe_get_pse_all_rsv(struct airoha_eth *eth)
+{
+ u32 val = airoha_fe_rr(eth, REG_FE_PSE_BUF_SET);
+
+ return FIELD_GET(PSE_ALLRSV_MASK, val);
+}
+
static int airoha_fe_set_pse_oq_rsv(struct airoha_eth *eth,
u32 port, u32 queue, u32 val)
{
- u32 orig_val, tmp, all_rsv, fq_limit;
+ u32 orig_val = airoha_fe_get_pse_queue_rsv_pages(eth, port, queue);
+ u32 tmp, all_rsv, fq_limit;
airoha_fe_set_pse_queue_rsv_pages(eth, port, queue, val);
/* modify all rsv */
- orig_val = airoha_fe_get_pse_queue_rsv_pages(eth, port, queue);
- tmp = airoha_fe_rr(eth, REG_FE_PSE_BUF_SET);
- all_rsv = FIELD_GET(PSE_ALLRSV_MASK, tmp);
+ all_rsv = airoha_fe_get_pse_all_rsv(eth);
all_rsv += (val - orig_val);
airoha_fe_rmw(eth, REG_FE_PSE_BUF_SET, PSE_ALLRSV_MASK,
FIELD_PREP(PSE_ALLRSV_MASK, all_rsv));
@@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ b/drivers/net/ethernet/mediatek/airoha_eth.c
@@ -1709,9 +1709,11 @@ static int airoha_qdma_tx_napi_poll(stru
@@ -1713,9 +1713,11 @@ static int airoha_qdma_tx_napi_poll(stru
WRITE_ONCE(desc->msg1, 0);
if (skb) {
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (netif_tx_queue_stopped(txq) &&
q->ndesc - q->queued >= q->free_thr)
netif_tx_wake_queue(txq);
@@ -2499,7 +2501,9 @@ static netdev_tx_t airoha_dev_xmit(struc
@@ -2494,7 +2496,9 @@ static netdev_tx_t airoha_dev_xmit(struc
q->queued += i;
skb_tx_timestamp(skb);
@@ -1,92 +0,0 @@
From 3affa310de523d63e52ea8e2efb3c476df29e414 Mon Sep 17 00:00:00 2001
From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: Tue, 29 Oct 2024 13:17:09 +0100
Subject: [PATCH 1/2] net: airoha: Read completion queue data in
airoha_qdma_tx_napi_poll()
In order to avoid any possible race, read completion queue head and
pending entry in airoha_qdma_tx_napi_poll routine instead of doing it in
airoha_irq_handler. Remove unused airoha_tx_irq_queue unused fields.
This is a preliminary patch to add Qdisc offload for airoha_eth driver.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20241029-airoha-en7581-tx-napi-work-v1-1-96ad1686b946@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/mediatek/airoha_eth.c | 31 +++++++++-------------
1 file changed, 13 insertions(+), 18 deletions(-)
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ b/drivers/net/ethernet/mediatek/airoha_eth.c
@@ -752,11 +752,9 @@ struct airoha_tx_irq_queue {
struct airoha_qdma *qdma;
struct napi_struct napi;
- u32 *q;
int size;
- int queued;
- u16 head;
+ u32 *q;
};
struct airoha_hw_stats {
@@ -1655,25 +1653,31 @@ static int airoha_qdma_init_rx(struct ai
static int airoha_qdma_tx_napi_poll(struct napi_struct *napi, int budget)
{
struct airoha_tx_irq_queue *irq_q;
+ int id, done = 0, irq_queued;
struct airoha_qdma *qdma;
struct airoha_eth *eth;
- int id, done = 0;
+ u32 status, head;
irq_q = container_of(napi, struct airoha_tx_irq_queue, napi);
qdma = irq_q->qdma;
id = irq_q - &qdma->q_tx_irq[0];
eth = qdma->eth;
- while (irq_q->queued > 0 && done < budget) {
- u32 qid, last, val = irq_q->q[irq_q->head];
+ status = airoha_qdma_rr(qdma, REG_IRQ_STATUS(id));
+ head = FIELD_GET(IRQ_HEAD_IDX_MASK, status);
+ head = head % irq_q->size;
+ irq_queued = FIELD_GET(IRQ_ENTRY_LEN_MASK, status);
+
+ while (irq_queued > 0 && done < budget) {
+ u32 qid, last, val = irq_q->q[head];
struct airoha_queue *q;
if (val == 0xff)
break;
- irq_q->q[irq_q->head] = 0xff; /* mark as done */
- irq_q->head = (irq_q->head + 1) % irq_q->size;
- irq_q->queued--;
+ irq_q->q[head] = 0xff; /* mark as done */
+ head = (head + 1) % irq_q->size;
+ irq_queued--;
done++;
last = FIELD_GET(IRQ_DESC_IDX_MASK, val);
@@ -2025,20 +2029,11 @@ static irqreturn_t airoha_irq_handler(in
if (intr[0] & INT_TX_MASK) {
for (i = 0; i < ARRAY_SIZE(qdma->q_tx_irq); i++) {
- struct airoha_tx_irq_queue *irq_q = &qdma->q_tx_irq[i];
- u32 status, head;
-
if (!(intr[0] & TX_DONE_INT_MASK(i)))
continue;
airoha_qdma_irq_disable(qdma, QDMA_INT_REG_IDX0,
TX_DONE_INT_MASK(i));
-
- status = airoha_qdma_rr(qdma, REG_IRQ_STATUS(i));
- head = FIELD_GET(IRQ_HEAD_IDX_MASK, status);
- irq_q->head = head % irq_q->size;
- irq_q->queued = FIELD_GET(IRQ_ENTRY_LEN_MASK, status);
-
napi_schedule(&qdma->q_tx_irq[i].napi);
}
}
@@ -101,7 +101,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-obj-$(CONFIG_NET_AIROHA) += airoha_eth.o
--- /dev/null
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -0,0 +1,3358 @@
@@ -0,0 +1,3357 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2024 AIROHA Inc
@@ -3433,7 +3433,6 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+ if (!port)
+ continue;
+
+ airoha_dev_stop(port->dev);
+ unregister_netdev(port->dev);
+ }
+ free_netdev(eth->napi_dev);
@@ -3462,7 +3461,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+MODULE_DESCRIPTION("Ethernet driver for Airoha SoC");
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ /dev/null
@@ -1,3358 +0,0 @@
@@ -1,3357 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright (c) 2024 AIROHA Inc
@@ -6794,7 +6793,6 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
- if (!port)
- continue;
-
- airoha_dev_stop(port->dev);
- unregister_netdev(port->dev);
- }
- free_netdev(eth->napi_dev);
@@ -236,9 +236,9 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}
free_netdev(eth->napi_dev);
platform_set_drvdata(pdev, NULL);
@@ -2414,6 +2526,7 @@ static void airoha_remove(struct platfor
@@ -2413,6 +2525,7 @@ static void airoha_remove(struct platfor
continue;
airoha_dev_stop(port->dev);
unregister_netdev(port->dev);
+ airoha_metadata_dst_free(port);
}
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
default:
return -EOPNOTSUPP;
}
@@ -2504,6 +2561,7 @@ static void airoha_remove(struct platfor
@@ -2503,6 +2560,7 @@ static void airoha_remove(struct platfor
}
free_netdev(eth->napi_dev);
@@ -75,7 +75,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
eth->xsi_rsts);
if (err) {
dev_err(eth->dev, "failed to get bulk xsi reset lines\n");
@@ -3052,8 +3061,23 @@ static void airoha_remove(struct platfor
@@ -3051,8 +3060,23 @@ static void airoha_remove(struct platfor
platform_set_drvdata(pdev, NULL);
}
@@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
fallthrough;
case 2:
if (airoha_ppe_is_enabled(eth, 1)) {
@@ -3073,11 +3078,38 @@ static const char * const en7581_xsi_rst
@@ -3072,11 +3077,38 @@ static const char * const en7581_xsi_rst
"xfp-mac",
};
@@ -88,7 +88,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
msg1 = FIELD_PREP(QDMA_ETH_TXMSG_FPORT_MASK, fport) |
FIELD_PREP(QDMA_ETH_TXMSG_METER_MASK, 0x7f);
@@ -3102,6 +3120,35 @@ static int airoha_en7581_get_src_port_id
@@ -3101,6 +3119,35 @@ static int airoha_en7581_get_src_port_id
return -EINVAL;
}
@@ -124,7 +124,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static const struct airoha_eth_soc_data en7581_soc_data = {
.version = 0x7581,
.xsi_rsts_names = en7581_xsi_rsts_names,
@@ -3112,8 +3159,19 @@ static const struct airoha_eth_soc_data
@@ -3111,8 +3158,19 @@ static const struct airoha_eth_soc_data
},
};
@@ -98,7 +98,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (airoha_ppe_is_enabled(eth, 1)) {
/* For PPE2 always use secondary cpu port. */
fe_cpu_port = FE_PSE_PORT_CDM2;
@@ -3101,14 +3103,14 @@ static const char * const en7581_xsi_rst
@@ -3100,14 +3102,14 @@ static const char * const en7581_xsi_rst
static int airoha_en7581_get_src_port_id(struct airoha_gdm_port *port, int nbq)
{
switch (port->id) {
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* 7581 SoC supports eth and usb serdes on GDM4 port */
if (!nbq)
return HSGMII_LAN_7581_ETH_SRCPORT;
@@ -3132,12 +3134,12 @@ static const char * const an7583_xsi_rst
@@ -3131,12 +3133,12 @@ static const char * const an7583_xsi_rst
static int airoha_an7583_get_src_port_id(struct airoha_gdm_port *port, int nbq)
{
switch (port->id) {
@@ -1,30 +0,0 @@
From d4a533ad249e9fbdc2d0633f2ddd60a5b3a9a4ca Mon Sep 17 00:00:00 2001
From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: Fri, 13 Mar 2026 12:27:00 +0100
Subject: [PATCH] net: airoha: Remove airoha_dev_stop() in airoha_remove()
Do not run airoha_dev_stop routine explicitly in airoha_remove()
since ndo_stop() callback is already executed by unregister_netdev() in
__dev_close_many routine if necessary and, doing so, we will end up causing
an underflow in the qdma users atomic counters. Rely on networking subsystem
to stop the device removing the airoha_eth module.
Fixes: 23020f0493270 ("net: airoha: Introduce ethernet support for EN7581 SoC")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260313-airoha-remove-ndo_stop-remove-net-v2-1-67542c3ceeca@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/airoha/airoha_eth.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -3095,7 +3095,6 @@ static void airoha_remove(struct platfor
if (!port)
continue;
- airoha_dev_stop(port->dev);
unregister_netdev(port->dev);
airoha_metadata_dst_free(port);
}
@@ -122,7 +122,7 @@
};
/* Uart divisor latch read */
@@ -2835,6 +2843,12 @@ serial8250_do_set_termios(struct uart_po
@@ -2841,6 +2849,12 @@ serial8250_do_set_termios(struct uart_po
serial8250_set_divisor(port, baud, quot, frac);
@@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3385,12 +3385,19 @@ static int spi_nor_set_mtd_info(struct s
@@ -3526,12 +3526,19 @@ static int spi_nor_set_mtd_info(struct s
{
struct mtd_info *mtd = &nor->mtd;
struct device *dev = nor->dev;
@@ -259,7 +259,7 @@ SVN-Revision: 35130
#include <linux/uaccess.h>
#include <linux/ipv6.h>
#include <linux/icmpv6.h>
@@ -914,10 +915,10 @@ static void tcp_v6_send_response(const s
@@ -915,10 +916,10 @@ static void tcp_v6_send_response(const s
topt = (__be32 *)(t1 + 1);
if (tsecr) {
@@ -829,7 +829,7 @@ SVN-Revision: 35130
*sum = csum_fold(csum_partial(diff, sizeof(diff),
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -559,7 +559,7 @@ static inline bool is_etherdev_addr(cons
@@ -560,7 +560,7 @@ static inline bool is_etherdev_addr(cons
* @b: Pointer to Ethernet header
*
* Compare two Ethernet headers, returns 0 if equal.
@@ -838,7 +838,7 @@ SVN-Revision: 35130
* aligned OR the platform can handle unaligned access. This is the
* case for all packets coming into netif_receive_skb or similar
* entry points.
@@ -582,11 +582,12 @@ static inline unsigned long compare_ethe
@@ -583,11 +583,12 @@ static inline unsigned long compare_ethe
fold |= *(unsigned long *)(a + 6) ^ *(unsigned long *)(b + 6);
return fold;
#else
+1 -1
View File
@@ -118,6 +118,7 @@ define KernelPackage/drm-vc4
TITLE:=Broadcom VC4 Graphics
DEPENDS:= \
@TARGET_bcm27xx +kmod-drm \
+kmod-cec-core \
+kmod-sound-core \
+kmod-sound-soc-core
KCONFIG:= \
@@ -128,7 +129,6 @@ define KernelPackage/drm-vc4
$(LINUX_DIR)/drivers/gpu/drm/drm_dma_helper.ko \
$(LINUX_DIR)/drivers/gpu/drm/vc4/vc4.ko \
$(LINUX_DIR)/drivers/gpu/drm/drm_kms_helper.ko \
$(LINUX_DIR)/drivers/media/cec/core/cec.ko
AUTOLOAD:=$(call AutoProbe,vc4)
endef
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -304,9 +304,7 @@ int bcmgenet_mii_probe(struct net_device
@@ -301,9 +301,7 @@ int bcmgenet_mii_probe(struct net_device
struct device_node *dn = kdev->of_node;
phy_interface_t phy_iface = priv->phy_interface;
struct phy_device *phydev;
@@ -1259,7 +1259,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
USB_PORT_FEAT_C_OVER_CURRENT);
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -2180,6 +2180,85 @@ free_interfaces:
@@ -2238,6 +2238,85 @@ free_interfaces:
if (cp->string == NULL &&
!(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
cp->string = usb_cache_string(dev, cp->desc.iConfiguration);
@@ -18589,7 +18589,7 @@ Signed-off-by: j-schambacher <joerg@hifiberry.com>
u32 xfer_resolution;
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1437,7 +1437,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
@@ -1436,7 +1436,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
return 0;
for_each_rtd_codec_dais(rtd, i, codec_dai) {
@@ -18626,7 +18626,7 @@ Signed-off-by: j-schambacher <joerg@hifiberry.com>
* For devices with more than one control interface, we assume the
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2395,6 +2395,8 @@ static const struct usb_audio_quirk_flag
@@ -2397,6 +2397,8 @@ static const struct usb_audio_quirk_flag
QUIRK_FLAG_ALIGN_TRANSFER),
DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */
QUIRK_FLAG_ALIGN_TRANSFER),
@@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf;
@@ -3462,8 +3471,14 @@ static int lan78xx_bind(struct lan78xx_n
@@ -3466,8 +3475,14 @@ static int lan78xx_bind(struct lan78xx_n
if (DEFAULT_RX_CSUM_ENABLE)
dev->net->features |= NETIF_F_RXCSUM;
@@ -28,7 +28,7 @@ See: https://github.com/raspberrypi/linux/issues/2447
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf;
@@ -4446,7 +4451,13 @@ static int lan78xx_probe(struct usb_inte
@@ -4452,7 +4457,13 @@ static int lan78xx_probe(struct usb_inte
if (ret < 0)
goto out4;
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2913,6 +2913,11 @@ static int lan78xx_reset(struct lan78xx_
@@ -2917,6 +2917,11 @@ static int lan78xx_reset(struct lan78xx_
int ret;
u32 buf;
u8 sig;
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
if (ret < 0)
@@ -2981,6 +2986,10 @@ static int lan78xx_reset(struct lan78xx_
@@ -2985,6 +2990,10 @@ static int lan78xx_reset(struct lan78xx_
buf |= HW_CFG_CLK125_EN_;
buf |= HW_CFG_REFCLK25_EN_;
@@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
ret = lan78xx_write_reg(dev, HW_CFG, buf);
if (ret < 0)
return ret;
@@ -3083,6 +3092,9 @@ static int lan78xx_reset(struct lan78xx_
@@ -3087,6 +3096,9 @@ static int lan78xx_reset(struct lan78xx_
buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
}
}
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2664,7 +2664,7 @@ static void bcmgenet_init_tx_ring(struct
@@ -2657,7 +2657,7 @@ static void bcmgenet_init_tx_ring(struct
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Disable rate control for now */
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
TDMA_FLOW_PERIOD);
@@ -4139,9 +4139,12 @@ static int bcmgenet_probe(struct platfor
@@ -4132,9 +4132,12 @@ static int bcmgenet_probe(struct platfor
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
/* Set default coalescing parameters */
@@ -20,7 +20,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -310,6 +310,8 @@ int bcmgenet_mii_probe(struct net_device
@@ -307,6 +307,8 @@ int bcmgenet_mii_probe(struct net_device
/* Communicate the integrated PHY revision */
if (priv->internal_phy)
phy_flags = priv->gphy_rev;
@@ -46,7 +46,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
* have been called previously. Use for set_configuration, set_interface,
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1267,6 +1267,21 @@ static void remove_intf_ep_devs(struct u
@@ -1325,6 +1325,21 @@ static void remove_intf_ep_devs(struct u
intf->ep_devs_created = 0;
}
@@ -70,7 +70,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
* @dev: the device whose endpoint is being disabled
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1875,6 +1875,8 @@ extern int usb_clear_halt(struct usb_dev
@@ -1879,6 +1879,8 @@ extern int usb_clear_halt(struct usb_dev
extern int usb_reset_configuration(struct usb_device *dev);
extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate);
extern void usb_reset_endpoint(struct usb_device *dev, unsigned int epaddr);
@@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
@@ -2493,6 +2496,11 @@ static void reset_umac(struct bcmgenet_p
@@ -2486,6 +2489,11 @@ static void reset_umac(struct bcmgenet_p
bcmgenet_rbuf_ctrl_set(priv, 0);
udelay(10);
@@ -32,7 +32,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3907,6 +3907,7 @@ static int spi_set_cs_timing(struct spi_
@@ -3906,6 +3906,7 @@ static int spi_set_cs_timing(struct spi_
*/
int spi_setup(struct spi_device *spi)
{
@@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
unsigned bad_bits, ugly_bits;
int status;
@@ -3933,6 +3934,14 @@ int spi_setup(struct spi_device *spi)
@@ -3932,6 +3933,14 @@ int spi_setup(struct spi_device *spi)
"setup: MOSI configured to idle low and high at the same time.\n");
return -EINVAL;
}
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
@@ -3430,6 +3433,17 @@ static int bcmgenet_open(struct net_devi
@@ -3423,6 +3426,17 @@ static int bcmgenet_open(struct net_devi
bcmgenet_phy_pause_set(dev, priv->rx_pause, priv->tx_pause);
@@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3666,6 +3666,48 @@ static int xhci_align_td(struct xhci_hcd
@@ -3667,6 +3667,48 @@ static int xhci_align_td(struct xhci_hcd
return 1;
}
@@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* This is very similar to what ehci-q.c qtd_fill() does */
int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
struct urb *urb, int slot_id, unsigned int ep_index)
@@ -3820,6 +3862,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
@@ -3821,6 +3863,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
}
check_trb_math(urb, enqd_len);
@@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
start_cycle, start_trb);
return 0;
@@ -3968,6 +4012,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
@@ -3969,6 +4013,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
/* Event on completion */
field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state);
@@ -51,7 +51,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
};
/*****************************************************************************\
@@ -4565,6 +4575,15 @@ int sdhci_setup_host(struct sdhci_host *
@@ -4572,6 +4582,15 @@ int sdhci_setup_host(struct sdhci_host *
!(host->quirks2 & SDHCI_QUIRK2_BROKEN_DDR50))
mmc->caps |= MMC_CAP_UHS_DDR50;
@@ -152,7 +152,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
unsigned int max_tx_length;
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -41,6 +41,9 @@
@@ -42,6 +42,9 @@
#include <linux/inetdevice.h>
#include "macb.h"
@@ -162,7 +162,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* This structure is only used for MACB on SiFive FU540 devices */
struct sifive_fu540_macb_mgmt {
void __iomem *reg;
@@ -334,7 +337,7 @@ static int macb_mdio_wait_for_idle(struc
@@ -335,7 +338,7 @@ static int macb_mdio_wait_for_idle(struc
u32 val;
return readx_poll_timeout(MACB_READ_NSR, bp, val, val & MACB_BIT(IDLE),
@@ -171,7 +171,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
}
static int macb_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
@@ -493,6 +496,19 @@ mdio_pm_exit:
@@ -494,6 +497,19 @@ mdio_pm_exit:
return status;
}
@@ -191,7 +191,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static void macb_init_buffers(struct macb *bp)
{
struct macb_queue *queue;
@@ -974,6 +990,7 @@ static int macb_mii_init(struct macb *bp
@@ -1066,6 +1082,7 @@ static int macb_mii_init(struct macb *bp
bp->mii_bus->write = &macb_mdio_write_c22;
bp->mii_bus->read_c45 = &macb_mdio_read_c45;
bp->mii_bus->write_c45 = &macb_mdio_write_c45;
@@ -199,7 +199,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
bp->pdev->name, bp->pdev->id);
bp->mii_bus->priv = bp;
@@ -1639,6 +1656,11 @@ static int macb_rx(struct macb_queue *qu
@@ -1731,6 +1748,11 @@ static int macb_rx(struct macb_queue *qu
macb_init_rx_ring(queue);
queue_writel(queue, RBQP, queue->rx_ring_dma);
@@ -211,7 +211,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
macb_writel(bp, NCR, ctrl | MACB_BIT(RE));
@@ -1941,8 +1963,9 @@ static irqreturn_t macb_interrupt(int ir
@@ -2033,8 +2055,9 @@ static irqreturn_t macb_interrupt(int ir
queue_writel(queue, ISR, MACB_BIT(TCOMP) |
MACB_BIT(TXUBR));
@@ -222,7 +222,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
wmb(); // ensure softirq can see update
}
@@ -2398,6 +2421,11 @@ static netdev_tx_t macb_start_xmit(struc
@@ -2490,6 +2513,11 @@ static netdev_tx_t macb_start_xmit(struc
skb_tx_timestamp(skb);
spin_lock(&bp->lock);
@@ -234,7 +234,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
spin_unlock(&bp->lock);
@@ -2804,6 +2832,37 @@ static void macb_configure_dma(struct ma
@@ -2901,6 +2929,37 @@ static void macb_configure_dma(struct ma
}
}
@@ -272,7 +272,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static void macb_init_hw(struct macb *bp)
{
u32 config;
@@ -2832,6 +2891,11 @@ static void macb_init_hw(struct macb *bp
@@ -2929,6 +2988,11 @@ static void macb_init_hw(struct macb *bp
if (bp->caps & MACB_CAPS_JUMBO)
bp->rx_frm_len_mask = MACB_RX_JFRMLEN_MASK;
@@ -284,7 +284,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
macb_configure_dma(bp);
/* Enable RX partial store and forward and set watermark */
@@ -3199,6 +3263,52 @@ static void gem_get_ethtool_strings(stru
@@ -3296,6 +3360,52 @@ static void gem_get_ethtool_strings(stru
}
}
@@ -337,7 +337,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static struct net_device_stats *macb_get_stats(struct net_device *dev)
{
struct macb *bp = netdev_priv(dev);
@@ -3783,6 +3893,8 @@ static const struct ethtool_ops macb_eth
@@ -3883,6 +3993,8 @@ static const struct ethtool_ops macb_eth
};
static const struct ethtool_ops gem_ethtool_ops = {
@@ -346,7 +346,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
.get_regs_len = macb_get_regs_len,
.get_regs = macb_get_regs,
.get_wol = macb_get_wol,
@@ -3792,6 +3904,8 @@ static const struct ethtool_ops gem_etht
@@ -3892,6 +4004,8 @@ static const struct ethtool_ops gem_etht
.get_ethtool_stats = gem_get_ethtool_stats,
.get_strings = gem_get_ethtool_strings,
.get_sset_count = gem_get_sset_count,
@@ -355,7 +355,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
.get_link_ksettings = macb_get_link_ksettings,
.set_link_ksettings = macb_set_link_ksettings,
.get_ringparam = macb_get_ringparam,
@@ -5113,6 +5227,11 @@ static int macb_probe(struct platform_de
@@ -5213,6 +5327,11 @@ static int macb_probe(struct platform_de
}
}
}
@@ -367,7 +367,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
spin_lock_init(&bp->lock);
spin_lock_init(&bp->stats_lock);
@@ -5173,6 +5292,21 @@ static int macb_probe(struct platform_de
@@ -5273,6 +5392,21 @@ static int macb_probe(struct platform_de
else
bp->phy_interface = interface;
@@ -389,7 +389,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
/* IP specific init */
err = init(pdev);
if (err)
@@ -5244,6 +5378,19 @@ static void macb_remove(struct platform_
@@ -5344,6 +5478,19 @@ static void macb_remove(struct platform_
}
}
@@ -409,7 +409,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static int __maybe_unused macb_suspend(struct device *dev)
{
struct net_device *netdev = dev_get_drvdata(dev);
@@ -5497,6 +5644,7 @@ static const struct dev_pm_ops macb_pm_o
@@ -5607,6 +5754,7 @@ static const struct dev_pm_ops macb_pm_o
static struct platform_driver macb_driver = {
.probe = macb_probe,
.remove_new = macb_remove,
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/pmdomain/bcm/bcm2835-power.c
+++ b/drivers/pmdomain/bcm/bcm2835-power.c
@@ -79,6 +79,7 @@
@@ -80,6 +80,7 @@
#define PM_IMAGE 0x108
#define PM_GRAFX 0x10c
#define PM_PROC 0x110
@@ -22,7 +22,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#define PM_ENAB BIT(12)
#define PM_ISPRSTN BIT(8)
#define PM_H264RSTN BIT(7)
@@ -381,6 +382,9 @@ static int bcm2835_power_pd_power_on(str
@@ -377,6 +378,9 @@ static int bcm2835_power_pd_power_on(str
return bcm2835_power_power_on(pd, PM_GRAFX);
case BCM2835_POWER_DOMAIN_GRAFX_V3D:
@@ -32,7 +32,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
return bcm2835_asb_power_on(pd, PM_GRAFX,
ASB_V3D_M_CTRL, ASB_V3D_S_CTRL,
PM_V3DRSTN);
@@ -447,6 +451,9 @@ static int bcm2835_power_pd_power_off(st
@@ -443,6 +447,9 @@ static int bcm2835_power_pd_power_off(st
return bcm2835_power_power_off(pd, PM_GRAFX);
case BCM2835_POWER_DOMAIN_GRAFX_V3D:
@@ -42,7 +42,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
return bcm2835_asb_power_off(pd, PM_GRAFX,
ASB_V3D_M_CTRL, ASB_V3D_S_CTRL,
PM_V3DRSTN);
@@ -642,19 +649,21 @@ static int bcm2835_power_probe(struct pl
@@ -638,19 +645,21 @@ static int bcm2835_power_probe(struct pl
power->asb = pm->asb;
power->rpivid_asb = pm->rpivid_asb;
@@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
BUG_ON(data->blksz > host->mmc->max_blk_size);
BUG_ON(data->blocks > 65535);
@@ -4709,11 +4709,16 @@ int sdhci_setup_host(struct sdhci_host *
@@ -4716,11 +4716,16 @@ int sdhci_setup_host(struct sdhci_host *
spin_lock_init(&host->lock);
/*
@@ -43,7 +43,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
retry_disable:
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -643,7 +643,7 @@ void drm_mode_config_validate(struct drm
@@ -646,7 +646,7 @@ void drm_mode_config_validate(struct drm
struct drm_encoder *encoder;
struct drm_crtc *crtc;
struct drm_plane *plane;
@@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -5076,6 +5076,17 @@ static const struct macb_config versal_c
@@ -5176,6 +5176,17 @@ static const struct macb_config versal_c
.usrio = &macb_default_usrio,
};
@@ -33,7 +33,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct of_device_id macb_dt_ids[] = {
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
{ .compatible = "cdns,macb" },
@@ -5096,6 +5107,7 @@ static const struct of_device_id macb_dt
@@ -5196,6 +5207,7 @@ static const struct of_device_id macb_dt
{ .compatible = "microchip,mpfs-macb", .data = &mpfs_config },
{ .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
{ .compatible = "microchip,sama7g5-emac", .data = &sama7g5_emac_config },
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2109,6 +2109,7 @@ static void nvme_free_host_mem(struct nv
@@ -2111,6 +2111,7 @@ static void nvme_free_host_mem(struct nv
dev->nr_host_mem_descs = 0;
}
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
u32 chunk_size)
{
@@ -2177,9 +2178,11 @@ out:
@@ -2179,9 +2180,11 @@ out:
dev->host_mem_descs = NULL;
return -ENOMEM;
}
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
u64 min_chunk = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
u64 hmminds = max_t(u32, dev->ctrl.hmminds * 4096, PAGE_SIZE * 2);
u64 chunk_size;
@@ -2192,6 +2195,7 @@ static int nvme_alloc_host_mem(struct nv
@@ -2194,6 +2197,7 @@ static int nvme_alloc_host_mem(struct nv
nvme_free_host_mem(dev);
}
}
@@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -6932,6 +6932,39 @@ static int __init cgroup_disable(char *s
@@ -6933,6 +6933,39 @@ static int __init cgroup_disable(char *s
}
__setup("cgroup_disable=", cgroup_disable);
@@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1539,10 +1539,14 @@ static int bcm_sf2_sw_probe(struct platf
@@ -1543,10 +1543,14 @@ static int bcm_sf2_sw_probe(struct platf
rev = reg_readl(priv, REG_PHY_REVISION);
priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK;
@@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1553,6 +1553,12 @@ static int bcm_sf2_sw_probe(struct platf
@@ -1557,6 +1557,12 @@ static int bcm_sf2_sw_probe(struct platf
priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
priv->irq0, priv->irq1);
@@ -122,7 +122,7 @@
};
/* Uart divisor latch read */
@@ -2835,6 +2843,12 @@ serial8250_do_set_termios(struct uart_po
@@ -2841,6 +2849,12 @@ serial8250_do_set_termios(struct uart_po
serial8250_set_divisor(port, baud, quot, frac);
@@ -60,7 +60,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
brcmnand_set_ecc_enabled(host, 1);
return ret;
}
@@ -2363,13 +2355,10 @@ static int brcmnand_write_page(struct na
@@ -2361,13 +2353,10 @@ static int brcmnand_write_page(struct na
int oob_required, int page)
{
struct mtd_info *mtd = nand_to_mtd(chip);
@@ -75,7 +75,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
}
static int brcmnand_write_page_raw(struct nand_chip *chip, const uint8_t *buf,
@@ -2381,9 +2370,8 @@ static int brcmnand_write_page_raw(struc
@@ -2379,9 +2368,8 @@ static int brcmnand_write_page_raw(struc
u64 addr = (u64)page << chip->page_shift;
int ret = 0;
@@ -75,7 +75,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
/* EDU info, per-transaction */
const u16 *edu_offsets;
void __iomem *edu_base;
@@ -2478,18 +2509,190 @@ static int brcmnand_op_is_reset(const st
@@ -2476,18 +2507,190 @@ static int brcmnand_op_is_reset(const st
return 0;
}
@@ -268,7 +268,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
if (brcmnand_op_is_status(op)) {
status = op->instrs[1].ctx.data.buf.in;
@@ -2513,11 +2716,7 @@ static int brcmnand_exec_op(struct nand_
@@ -2511,11 +2714,7 @@ static int brcmnand_exec_op(struct nand_
if (op->deassert_wp)
brcmnand_wp(mtd, 0);
@@ -281,7 +281,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
if (op->deassert_wp)
brcmnand_wp(mtd, 1);
@@ -3130,6 +3329,15 @@ int brcmnand_probe(struct platform_devic
@@ -3128,6 +3327,15 @@ int brcmnand_probe(struct platform_devic
if (ret)
goto err;
@@ -27,7 +27,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22541,6 +22541,7 @@ L: netdev@vger.kernel.org
@@ -22542,6 +22542,7 @@ L: netdev@vger.kernel.org
S: Maintained
F: include/net/pkt_cls.h
F: include/net/pkt_sched.h
@@ -431,7 +431,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+ pci_restore_state(pdev);
+ pci_set_power_state(pdev, PCI_D0);
+
+ ret = pcim_enable_device(pdev);
+ ret = pci_enable_device(pdev);
+ if (ret)
+ return ret;
+
@@ -20,7 +20,7 @@ Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -7070,6 +7070,9 @@ static int igc_probe(struct pci_dev *pde
@@ -7074,6 +7074,9 @@ static int igc_probe(struct pci_dev *pde
netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
NETDEV_XDP_ACT_XSK_ZEROCOPY;
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -3387,11 +3387,17 @@ static int of_phy_led(struct phy_device
@@ -3382,11 +3382,17 @@ static int of_phy_led(struct phy_device
if (index > U8_MAX)
return -EINVAL;

Some files were not shown because too many files have changed in this diff Show More