From 257a356b20cd6d030da86461605fb61bfb9fc846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hler?= Date: Sat, 1 Jun 2024 19:14:39 +0200 Subject: [PATCH 01/15] realtek: add full SFP support to D-Link DGS-1210-28 series MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DGS-1210-28 series was lacking full SFP support due to missing GPIOs. Fortunately, the existing GPIO definitions of DGS-1210-52 match, this adds the required i2c-gpio nodes to the DTS and allows hotplug SFP support. Signed-off-by: Andreas Böhler Link: https://github.com/openwrt/openwrt/pull/15616 Signed-off-by: Sander Vanheule --- target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28.dts | 1 + .../realtek/dts/rtl8382_d-link_dgs-1210-28_common.dtsi | 9 +++++---- .../linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts | 1 + target/linux/realtek/dts/rtl8393_d-link_dgs-1210-52.dts | 2 +- ...0_gpio.dtsi => rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi} | 0 5 files changed, 8 insertions(+), 5 deletions(-) rename target/linux/realtek/dts/{rtl839x_d-link_dgs-1210_gpio.dtsi => rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi} (100%) diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28.dts index 0bcb196b7c9732..29ff8153fbf7bf 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28.dts +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28.dts @@ -3,6 +3,7 @@ #include "rtl838x.dtsi" #include "rtl83xx_d-link_dgs-1210_common.dtsi" #include "rtl83xx_d-link_dgs-1210_gpio.dtsi" +#include "rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi" #include "rtl8382_d-link_dgs-1210-28_common.dtsi" / { diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28_common.dtsi b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28_common.dtsi index 17866d5f038f3c..d5b984b0a6f1e9 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28_common.dtsi +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28_common.dtsi @@ -34,10 +34,11 @@ EXTERNAL_PHY(22) EXTERNAL_PHY(23) - EXTERNAL_SFP_PHY(24) - EXTERNAL_SFP_PHY(25) - EXTERNAL_SFP_PHY(26) - EXTERNAL_SFP_PHY(27) + /* External phy RTL8214FC */ + EXTERNAL_SFP_PHY_FULL(24, 0) + EXTERNAL_SFP_PHY_FULL(25, 1) + EXTERNAL_SFP_PHY_FULL(26, 2) + EXTERNAL_SFP_PHY_FULL(27, 3) }; }; diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts index ce008229b3334f..d1419cf7ed19d5 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts @@ -3,6 +3,7 @@ #include "rtl838x.dtsi" #include "rtl83xx_d-link_dgs-1210_common.dtsi" #include "rtl83xx_d-link_dgs-1210_gpio.dtsi" +#include "rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi" #include "rtl8382_d-link_dgs-1210-28_common.dtsi" / { diff --git a/target/linux/realtek/dts/rtl8393_d-link_dgs-1210-52.dts b/target/linux/realtek/dts/rtl8393_d-link_dgs-1210-52.dts index 5b876e7c431dae..3ddf56f4f5ca5a 100644 --- a/target/linux/realtek/dts/rtl8393_d-link_dgs-1210-52.dts +++ b/target/linux/realtek/dts/rtl8393_d-link_dgs-1210-52.dts @@ -3,7 +3,7 @@ #include "rtl839x.dtsi" #include "rtl83xx_d-link_dgs-1210_common.dtsi" #include "rtl83xx_d-link_dgs-1210_gpio.dtsi" -#include "rtl839x_d-link_dgs-1210_gpio.dtsi" +#include "rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi" / { compatible = "d-link,dgs-1210-52", "realtek,rtl8393-soc"; diff --git a/target/linux/realtek/dts/rtl839x_d-link_dgs-1210_gpio.dtsi b/target/linux/realtek/dts/rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi similarity index 100% rename from target/linux/realtek/dts/rtl839x_d-link_dgs-1210_gpio.dtsi rename to target/linux/realtek/dts/rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi From 3c152904c22fb6754820e36a0b7bd20b90b64dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hler?= Date: Sat, 1 Jun 2024 19:28:22 +0200 Subject: [PATCH 02/15] realtek: add fan controller support to D-Link DGS-1210-28MP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DGS-1210-28MP has a LM63 fan controller connected via i2c of the RTL8231. The clock line is always low if the property i2c-gpio,scl-open-drain is not set; with this property, the GPIO pin is force-drive and the clock works as expected. The LM63 is not configured by U-Boot, thus only manual fan control is possible by settings pwm1_enable to "1" and writing the desired values to pwm1. The OEM firmware drives the fan from user mode and sets it up like this: // PWM LUT/value r/w, PWM Clock = 1.4kHz 0x4a 0x28 // Tachometer spinup disabled, spin-up cycles bypassed 0x4b 0x00 // PWM Frequency = default 0x4d 0x17 // PWM Value (28) 0x4c 0x1c // If > 0 C, use 0x50 0x00 // PWM = 28 0x51 0x1c // If > 51 C, use 0x52 0x33 // PWM = 44 0x53 0x2e // Set hysteresis to 100 = default 0x4f 0x03 // Turn on automatic mode and w/p the LUT values 0x4a 0x08 A thread in the OEM firmware polls the ALERT status register for fan failures. Unfortunately, the lm63 kernel driver does not perform any initialization of the chip and it does not support changing some config registers (like PWM frequency or LUT). Hence, we are stuck with the defaults and need to do fan control in software. Signed-off-by: Andreas Böhler Link: https://github.com/openwrt/openwrt/pull/15616 Signed-off-by: Sander Vanheule --- .../base-files/etc/uci-defaults/04_dlinkfan | 26 +++++++++++++++++++ .../linux/realtek/base-files/sbin/fan_ctrl.sh | 13 ++++++++++ .../dts/rtl8382_d-link_dgs-1210-28mp-f.dts | 16 ++++++++++++ target/linux/realtek/image/rtl838x.mk | 2 +- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan create mode 100755 target/linux/realtek/base-files/sbin/fan_ctrl.sh diff --git a/target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan b/target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan new file mode 100644 index 00000000000000..1a5fd3606f24c8 --- /dev/null +++ b/target/linux/realtek/base-files/etc/uci-defaults/04_dlinkfan @@ -0,0 +1,26 @@ +# +# Copyright (C) 2024 openwrt.org +# + +. /lib/functions.sh + +board=$(board_name) + +case "$board" in +d-link,dgs-1210-28mp-f) + # Enable fan control + FAN_CTRL='/sys/class/hwmon/hwmon0' + echo 1 > "$FAN_PATH/pwm1_enable" + + # Set fan script execution in crontab + grep -s -q fan_ctrl.sh /etc/crontabs/root && exit 0 + + echo "# dlink fan script runs every 5 minutes" >> /etc/crontabs/root + echo "*/5 * * * * /sbin/fan_ctrl.sh" >> /etc/crontabs/root + + # Execute one time after initial flash (instead of waiting 5 min for cron) + /sbin/fan_ctrl.sh + ;; +esac + +exit 0 diff --git a/target/linux/realtek/base-files/sbin/fan_ctrl.sh b/target/linux/realtek/base-files/sbin/fan_ctrl.sh new file mode 100755 index 00000000000000..e7b661d7bb6685 --- /dev/null +++ b/target/linux/realtek/base-files/sbin/fan_ctrl.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +PSU_TEMP=$(cut -c1-2 /sys/class/hwmon/hwmon0/temp1_input) + +FAN_CTRL='/sys/class/hwmon/hwmon0/pwm1' + +PSU_THRESH=51000 + +if [ "$PSU_TEMP" -ge "$PSU_THRESH" ];then + echo "250" > $FAN_CTRL +else + echo "156" > $FAN_CTRL +fi diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts index d1419cf7ed19d5..4c20a4ae6e2aa6 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28mp-f.dts @@ -9,6 +9,22 @@ / { compatible = "d-link,dgs-1210-28mp-f", "realtek,rtl8382-soc", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-28MP F"; + + /* LM63 */ + i2c-gpio-4 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; + i2c-gpio,delay-us = <2>; + i2c-gpio,scl-open-drain; /* should be replaced by i2c-gpio,scl-has-no-pullup in kernel 6.6 */ + #address-cells = <1>; + #size-cells = <0>; + + lm63@4c { + compatible = "national,lm63"; + reg = <0x4c>; + }; + }; }; &leds { diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index 05574e5375d68f..c44e3a74f7ecca 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -71,7 +71,7 @@ define Device/d-link_dgs-1210-28mp-f SOC := rtl8382 DEVICE_MODEL := DGS-1210-28MP DEVICE_VARIANT := F - DEVICE_PACKAGES += realtek-poe + DEVICE_PACKAGES += realtek-poe kmod-hwmon-lm63 endef TARGET_DEVICES += d-link_dgs-1210-28mp-f From f4d3bd90c21155dcd2dcdd53b4ea6b4b210cbb53 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 9 Aug 2024 08:31:39 +0200 Subject: [PATCH 03/15] omap: rename kernel patches directory to include the version Bring it in line with all the other targets. Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/pull/16099 Signed-off-by: Hauke Mehrtens --- .../{patches => patches-6.1}/900-use-cpsw-ethernet-driver.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename target/linux/omap/{patches => patches-6.1}/900-use-cpsw-ethernet-driver.patch (100%) diff --git a/target/linux/omap/patches/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch similarity index 100% rename from target/linux/omap/patches/900-use-cpsw-ethernet-driver.patch rename to target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch From 51bc04bbd6bbc76a156fc676c0ff604050077573 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 9 Aug 2024 08:34:29 +0200 Subject: [PATCH 04/15] kernel/omap: Create kernel files for v6.6 (from v6.1) This is an automatically generated commit. When doing `git bisect`, consider `git bisect --skip`. Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/pull/16099 Signed-off-by: Hauke Mehrtens --- target/linux/omap/{config-6.1 => config-6.6} | 0 .../900-use-cpsw-ethernet-driver.patch | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename target/linux/omap/{config-6.1 => config-6.6} (100%) rename target/linux/omap/{patches-6.1 => patches-6.6}/900-use-cpsw-ethernet-driver.patch (100%) diff --git a/target/linux/omap/config-6.1 b/target/linux/omap/config-6.6 similarity index 100% rename from target/linux/omap/config-6.1 rename to target/linux/omap/config-6.6 diff --git a/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch similarity index 100% rename from target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch rename to target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch From 401de908745c09b42b103914365ae84dbe0328f9 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 9 Aug 2024 08:34:29 +0200 Subject: [PATCH 05/15] kernel/omap: Restore kernel files for v6.1 This is an automatically generated commit which aids following Kernel patch history, as git will see the move and copy as a rename thus defeating the purpose. For the original discussion see: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/pull/16099 Signed-off-by: Hauke Mehrtens --- target/linux/omap/config-6.1 | 711 ++++++++++++++++++ .../900-use-cpsw-ethernet-driver.patch | 93 +++ 2 files changed, 804 insertions(+) create mode 100644 target/linux/omap/config-6.1 create mode 100644 target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch diff --git a/target/linux/omap/config-6.1 b/target/linux/omap/config-6.1 new file mode 100644 index 00000000000000..d5ed19afe15af2 --- /dev/null +++ b/target/linux/omap/config-6.1 @@ -0,0 +1,711 @@ +# CONFIG_AHCI_DM816 is not set +CONFIG_ALIGNMENT_TRAP=y +CONFIG_AM335X_CONTROL_USB=y +CONFIG_AM335X_PHY_USB=y +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_V6_V7=y +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_OMAP=y +CONFIG_ARCH_OMAP2PLUS=y +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +CONFIG_ARCH_OMAP3=y +CONFIG_ARCH_OMAP4=y +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM=y +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_ARM_ERRATA_430973=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_GIC=y +CONFIG_ARM_HAS_GROUP_RELOCS=y +CONFIG_ARM_HEAVY_MB=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_OMAP2PLUS_CPUFREQ=y +CONFIG_ARM_PATCH_IDIV=y +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +CONFIG_ARM_TI_CPUFREQ=y +CONFIG_ARM_UNWIND=y +CONFIG_ARM_VIRT_EXT=y +CONFIG_ASSOCIATIVE_ARRAY=y +CONFIG_AT803X_PHY=y +CONFIG_ATA=y +CONFIG_AUDIT=y +CONFIG_AUDITSYSCALL=y +CONFIG_AUDIT_GENERIC=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_TPS65217 is not set +CONFIG_BCH=y +CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_PM=y +CONFIG_BOUNCE=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_CACHE_L2X0=y +CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y +CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" +CONFIG_CC_NO_ARRAY_BOUNDS=y +CONFIG_CEC_CORE=y +# CONFIG_CHARGER_TPS65217 is not set +CONFIG_CLKSRC_MMIO=y +CONFIG_CLKSRC_TI_32K=y +CONFIG_CLK_TWL6040=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMA=y +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=7 +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_SIZE_MBYTES=16 +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SYSFS is not set +CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +CONFIG_COMMON_CLK=y +# CONFIG_COMMON_CLK_PALMAS is not set +# CONFIG_COMMON_CLK_TI_ADPLL is not set +CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CONFIGFS_FS=y +CONFIG_CONNECTOR=y +CONFIG_CONTEXT_TRACKING=y +CONFIG_CONTEXT_TRACKING_IDLE=y +CONFIG_CONTIG_ALLOC=y +CONFIG_CPUFREQ_DT=y +CONFIG_CPUFREQ_DT_PLATDEV=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_PM=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SPECTRE=y +CONFIG_CPU_THERMAL=y +CONFIG_CPU_THUMB_CAPABLE=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_V7=y +CONFIG_CRAMFS=y +CONFIG_CRC16=y +CONFIG_CRC7=y +CONFIG_CRC_CCITT=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC_T10DIF=y +CONFIG_CRYPTO_AES_ARM=y +CONFIG_CRYPTO_AES_ARM_BS=y +CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CHACHA20_NEON=y +CONFIG_CRYPTO_CRC32=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CRCT10DIF=y +CONFIG_CRYPTO_CRYPTD=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_OMAP=y +CONFIG_CRYPTO_DEV_OMAP_AES=y +CONFIG_CRYPTO_DEV_OMAP_DES=y +CONFIG_CRYPTO_DEV_OMAP_SHAM=y +CONFIG_CRYPTO_DRBG=y +CONFIG_CRYPTO_DRBG_HMAC=y +CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_ENGINE=y +CONFIG_CRYPTO_GHASH_ARM_CE=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_JITTERENTROPY=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LIB_SHA1=y +CONFIG_CRYPTO_LIB_SHA256=y +CONFIG_CRYPTO_LIB_UTILS=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_SEQIV=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA1_ARM=y +CONFIG_CRYPTO_SHA1_ARM_NEON=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA256_ARM=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_SHA512_ARM=y +CONFIG_CRYPTO_SIMD=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_CURRENT_POINTER_IN_TPIDRURO=y +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_DDR=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +CONFIG_DMADEVICES=y +CONFIG_DMA_CMA=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y +CONFIG_DMA_OMAP=y +CONFIG_DMA_OPS=y +CONFIG_DMA_SHARED_BUFFER=y +CONFIG_DMA_VIRTUAL_CHANNELS=y +CONFIG_DNS_RESOLVER=y +CONFIG_DRM=y +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_DISPLAY_CONNECTOR=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_MIPI_DSI=y +CONFIG_DRM_NOMODESET=y +CONFIG_DRM_OMAP=y +CONFIG_DRM_PANEL=y +CONFIG_DRM_PANEL_BRIDGE=y +CONFIG_DRM_PANEL_LG_LB035Q02=y +CONFIG_DRM_PANEL_NEC_NL8048HL11=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_DRM_PANEL_SHARP_LS037V7DW01=y +CONFIG_DRM_PANEL_SONY_ACX565AKM=y +CONFIG_DRM_PANEL_TPO_TD028TTEC1=y +CONFIG_DRM_PANEL_TPO_TD043MTEA1=y +CONFIG_DRM_SIMPLE_BRIDGE=y +CONFIG_DRM_TI_TFP410=y +CONFIG_DRM_TI_TPD12S015=y +CONFIG_DTC=y +CONFIG_DT_IDLE_STATES=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EEPROM_93CX6=y +CONFIG_EXCLUSIVE_SYSTEM_RAM=y +CONFIG_EXT4_FS=y +CONFIG_EXTCON=y +CONFIG_EXTCON_PALMAS=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_F2FS_FS=y +CONFIG_FANOTIFY=y +CONFIG_FAT_FS=y +CONFIG_FB_CMDLINE=y +CONFIG_FHANDLE=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FS_POSIX_ACL=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_FW_LOADER_SYSFS=y +CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ARCH_TOPOLOGY=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_PINCTRL_GROUPS=y +CONFIG_GENERIC_PINMUX_FUNCTIONS=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GENERIC_VDSO_32=y +CONFIG_GLOB=y +CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_OMAP=y +CONFIG_GPIO_PALMAS=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=y +# CONFIG_GPIO_TPS65218 is not set +CONFIG_GPIO_TPS65910=y +CONFIG_GPIO_TWL4030=y +CONFIG_GPIO_TWL6040=y +CONFIG_GRACE_PERIOD=y +CONFIG_GRO_CELLS=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HAVE_SMP=y +CONFIG_HDMI=y +CONFIG_HIGHMEM=y +CONFIG_HIGHPTE=y +CONFIG_HSI=y +CONFIG_HSI_BOARDINFO=y +# CONFIG_HSI_CHAR is not set +CONFIG_HWMON=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_OMAP=y +CONFIG_HZ_FIXED=0 +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_OMAP=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IRQCHIP=y +CONFIG_IRQSTACKS=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_JBD2=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RUBIN=y +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KCMP=y +CONFIG_KEYS=y +CONFIG_KMAP_LOCAL=y +CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y +CONFIG_KPROBES=y +CONFIG_KRETPROBES=y +CONFIG_KS8851=y +CONFIG_KS8851_MLL=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_PLATFORM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LIBCRC32C=y +CONFIG_LIBFDT=y +CONFIG_LOCKD=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MACH_OMAP_GENERIC=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MDIO_BITBANG=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +# CONFIG_MDIO_GPIO is not set +CONFIG_MEMFD_CREATE=y +CONFIG_MEMORY=y +CONFIG_MEMORY_ISOLATION=y +CONFIG_MFD_CORE=y +CONFIG_MFD_PALMAS=y +CONFIG_MFD_SYSCON=y +CONFIG_MFD_TI_AM335X_TSCADC=y +CONFIG_MFD_TPS65217=y +CONFIG_MFD_TPS65218=y +CONFIG_MFD_TPS65910=y +CONFIG_MFD_TWL4030_AUDIO=y +CONFIG_MICREL_PHY=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_EXTERNAL_DMA=y +CONFIG_MMC_SDHCI_OMAP=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MSDOS_FS=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_OMAP_BCH=y +CONFIG_MTD_NAND_OMAP_BCH_BUILD=y +CONFIG_MTD_ONENAND=y +# CONFIG_MTD_ONENAND_2X_PROGRAM is not set +# CONFIG_MTD_ONENAND_GENERIC is not set +CONFIG_MTD_ONENAND_OMAP2=y +# CONFIG_MTD_ONENAND_OTP is not set +CONFIG_MTD_ONENAND_VERIFY_WRITE=y +CONFIG_MTD_OOPS=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_BLOCK is not set +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +# CONFIG_MUSB_PIO_ONLY is not set +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEON=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_KEY=y +CONFIG_NET_KEY_MIGRATE=y +CONFIG_NET_PTP_CLASSIFY=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NFS_ACL_SUPPORT=y +CONFIG_NFS_FS=y +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_NO_HZ=y +CONFIG_NO_HZ_COMMON=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NR_CPUS=4 +CONFIG_NVMEM=y +CONFIG_NVMEM_LAYOUTS=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OID_REGISTRY=y +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_OMAP2_DSS_DPI=y +CONFIG_OMAP2_DSS_DSI=y +CONFIG_OMAP2_DSS_HDMI_COMMON=y +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 +CONFIG_OMAP2_DSS_SDI=y +CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y +CONFIG_OMAP2_DSS_VENC=y +# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set +# CONFIG_OMAP3_SDRC_AC_TIMING is not set +CONFIG_OMAP3_THERMAL=y +CONFIG_OMAP4_DSS_HDMI=y +CONFIG_OMAP4_DSS_HDMI_CEC=y +CONFIG_OMAP4_THERMAL=y +CONFIG_OMAP5_DSS_HDMI=y +CONFIG_OMAP_CONTROL_PHY=y +CONFIG_OMAP_DM_SYSTIMER=y +CONFIG_OMAP_DM_TIMER=y +CONFIG_OMAP_GPMC=y +# CONFIG_OMAP_GPMC_DEBUG is not set +CONFIG_OMAP_HWMOD=y +CONFIG_OMAP_INTERCONNECT=y +CONFIG_OMAP_INTERCONNECT_BARRIER=y +CONFIG_OMAP_IRQCHIP=y +CONFIG_OMAP_OCP2SCP=y +# CONFIG_OMAP_SSI is not set +CONFIG_OMAP_USB2=y +CONFIG_OMAP_WATCHDOG=y +CONFIG_OPTPROBES=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_PADATA=y +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PAGE_POOL=y +CONFIG_PAGE_SIZE_LESS_THAN_256KB=y +CONFIG_PAGE_SIZE_LESS_THAN_64KB=y +CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y +# CONFIG_PHY_DM816X_USB is not set +CONFIG_PHY_TI_GMII_SEL=y +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_PALMAS is not set +CONFIG_PL310_ERRATA_588369=y +CONFIG_PL310_ERRATA_727915=y +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_OF=y +CONFIG_PM_OPP=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_AVS_OMAP=y +CONFIG_POWER_AVS_OMAP_CLASS3=y +CONFIG_POWER_SUPPLY=y +CONFIG_PPS=y +CONFIG_PREEMPT_NONE_BUILD=y +CONFIG_PRINTK_TIME=y +CONFIG_PRINT_QUOTA_WARNING=y +CONFIG_PROC_EVENTS=y +CONFIG_PROFILING=y +CONFIG_PTP_1588_CLOCK=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_PWM=y +# CONFIG_PWM_OMAP_DMTIMER is not set +CONFIG_PWM_SYSFS=y +CONFIG_PWM_TIECAP=y +CONFIG_PWM_TIEHRPWM=y +# CONFIG_PWM_TWL is not set +# CONFIG_PWM_TWL_LED is not set +CONFIG_QCOM_NET_PHYLIB=y +CONFIG_QFMT_V2=y +CONFIG_QUOTA=y +CONFIG_QUOTACTL=y +CONFIG_QUOTA_TREE=y +CONFIG_RANDSTRUCT_NONE=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_IRQ=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGMAP_SPI=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PALMAS=y +CONFIG_REGULATOR_PBIAS=y +CONFIG_REGULATOR_TI_ABB=y +CONFIG_REGULATOR_TPS62360=y +CONFIG_REGULATOR_TPS65023=y +CONFIG_REGULATOR_TPS6507X=y +CONFIG_REGULATOR_TPS65217=y +CONFIG_REGULATOR_TPS65218=y +CONFIG_REGULATOR_TPS65910=y +CONFIG_REGULATOR_TWL4030=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_ROOT_NFS=y +CONFIG_RPS=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_OMAP=y +CONFIG_RTC_DRV_PALMAS=y +# CONFIG_RTC_DRV_TPS65910 is not set +CONFIG_RTC_DRV_TWL4030=y +CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RTC_MC146818_LIB=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_SATA_HOST=y +CONFIG_SCHEDSTATS=y +CONFIG_SCHED_INFO=y +CONFIG_SCHED_MC=y +CONFIG_SCSI=y +CONFIG_SCSI_COMMON=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_SDIO_UART=y +CONFIG_SECCOMP=y +CONFIG_SECCOMP_FILTER=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_TMP102=y +CONFIG_SENSORS_TSL2550=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_NR_UARTS=32 +# CONFIG_SERIAL_8250_OMAP is not set +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +CONFIG_SERIO=y +CONFIG_SGL_ALLOC=y +CONFIG_SG_POOL=y +CONFIG_SG_SPLIT=y +CONFIG_SKB_EXTENSIONS=y +CONFIG_SMC91X=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_SMSC911X=y +CONFIG_SMSC_PHY=y +CONFIG_SND=y +# CONFIG_SND_COMPRESS_OFFLOAD is not set +CONFIG_SND_DMAENGINE_PCM=y +CONFIG_SND_JACK=y +CONFIG_SND_PCM=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SIMPLE_CARD_UTILS=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_DAVINCI_MCASP=y +CONFIG_SND_SOC_DMIC=y +CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_NOKIA_RX51 is not set +# CONFIG_SND_SOC_OMAP3_PANDORA is not set +CONFIG_SND_SOC_OMAP3_TWL4030=y +CONFIG_SND_SOC_OMAP_ABE_TWL6040=y +CONFIG_SND_SOC_OMAP_DMIC=y +CONFIG_SND_SOC_OMAP_HDMI=y +CONFIG_SND_SOC_OMAP_MCBSP=y +CONFIG_SND_SOC_OMAP_MCPDM=y +CONFIG_SND_SOC_TI_EDMA_PCM=y +CONFIG_SND_SOC_TI_SDMA_PCM=y +CONFIG_SND_SOC_TI_UDMA_PCM=y +CONFIG_SND_SOC_TWL4030=y +CONFIG_SND_SOC_TWL6040=y +CONFIG_SND_VERBOSE_PRINTK=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y +CONFIG_SOC_AM33XX=y +CONFIG_SOC_AM43XX=y +CONFIG_SOC_BUS=y +CONFIG_SOC_HAS_OMAP2_SDRC=y +CONFIG_SOC_OMAP3430=y +# CONFIG_SOC_TI81XX is not set +CONFIG_SOFTIRQ_ON_OWN_STACK=y +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y +CONFIG_SPI_OMAP24XX=y +CONFIG_SPI_TI_QSPI=y +CONFIG_SRAM=y +CONFIG_SRAM_EXEC=y +CONFIG_SRCU=y +CONFIG_STACKTRACE=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_SWPHY=y +CONFIG_SWP_EMULATE=y +CONFIG_SYNC_FILE=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 +CONFIG_THERMAL_GOV_FAIR_SHARE=y +CONFIG_THERMAL_GOV_STEP_WISE=y +CONFIG_THERMAL_GOV_USER_SPACE=y +CONFIG_THERMAL_OF=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TI_CPPI41=y +CONFIG_TI_CPSW=y +CONFIG_TI_CPSW_SWITCHDEV=y +CONFIG_TI_CPTS=y +CONFIG_TI_DAVINCI_EMAC=y +CONFIG_TI_DAVINCI_MDIO=y +CONFIG_TI_DMA_CROSSBAR=y +CONFIG_TI_EDMA=y +CONFIG_TI_EMIF=y +# CONFIG_TI_EMIF_SRAM is not set +CONFIG_TI_PIPE3=y +CONFIG_TI_PWMSS=y +CONFIG_TI_SOC_THERMAL=y +CONFIG_TI_SYSC=y +CONFIG_TI_THERMAL=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_POWER=y +CONFIG_TWL4030_USB=y +CONFIG_TWL4030_WATCHDOG=y +# CONFIG_TWL6030_USB is not set +CONFIG_TWL6040_CORE=y +CONFIG_UBIFS_FS=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_DUAL_ROLE=y +# CONFIG_USB_DWC3_GADGET is not set +# CONFIG_USB_DWC3_HOST is not set +CONFIG_USB_DWC3_OMAP=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_OMAP=y +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +CONFIG_USB_GADGET=y +CONFIG_USB_INVENTRA_DMA=y +CONFIG_USB_MUSB_AM35X=y +CONFIG_USB_MUSB_DSPS=y +CONFIG_USB_MUSB_DUAL_ROLE=y +CONFIG_USB_MUSB_HDRC=y +CONFIG_USB_MUSB_OMAP2PLUS=y +CONFIG_USB_MUSB_TUSB6010=y +CONFIG_USB_PHY=y +CONFIG_USB_ROLE_SWITCH=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_TI_CPPI41_DMA=y +CONFIG_USB_TUSB_OMAP_DMA=y +CONFIG_USE_OF=y +CONFIG_VFAT_FS=y +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_VIDEOMODE_HELPERS=y +CONFIG_WATCHDOG_CORE=y +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_MIGRATE=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMMON=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch new file mode 100644 index 00000000000000..17c07fbdfba111 --- /dev/null +++ b/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch @@ -0,0 +1,93 @@ +From: Jan Hoffmann +Date: Sat, 27 Apr 2024 20:41:43 +0200 +Subject: ARM: dts: Use cpsw ethernet driver for some am335x devices + +The new cpsw-switch driver requires a vid for every port which is +reserved for internal usage (defaulting to 1 and 2). As a result, some +network configurations are impossible, such as a bridge with +default_pvid of 1 (even if it is not vlan aware). + +As a simple workaround, the ti,dual-emac-pvid property could be changed +to another value, but that would just shift the problem. Instead, switch +some devices back to the older cpsw ethernet driver. + +(This patch is not suitable for upstreaming, it just makes the affected +devices in OpenWrt usable again with the default network config.) + +Signed-off-by: Jan Hoffmann +--- + +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -353,27 +353,24 @@ + }; + }; + +-&cpsw_port1 { ++&cpsw_emac0 { + phy-handle = <ðphy0>; + phy-mode = "mii"; +- ti,dual-emac-pvid = <1>; + }; + +-&cpsw_port2 { +- status = "disabled"; +-}; +- +-&mac_sw { ++&mac { ++ slaves = <1>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cpsw_default>; + pinctrl-1 = <&cpsw_sleep>; + status = "okay"; + }; + +-&davinci_mdio_sw { ++&davinci_mdio { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&davinci_mdio_default>; + pinctrl-1 = <&davinci_mdio_sleep>; ++ status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; +--- a/arch/arm/boot/dts/am335x-evm.dts ++++ b/arch/arm/boot/dts/am335x-evm.dts +@@ -682,31 +682,28 @@ + }; + }; + +-&mac_sw { ++&mac { ++ slaves = <1>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cpsw_default>; + pinctrl-1 = <&cpsw_sleep>; + status = "okay"; + }; + +-&davinci_mdio_sw { ++&davinci_mdio { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&davinci_mdio_default>; + pinctrl-1 = <&davinci_mdio_sleep>; ++ status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + }; + +-&cpsw_port1 { ++&cpsw_emac0 { + phy-handle = <ðphy0>; + phy-mode = "rgmii-id"; +- ti,dual-emac-pvid = <1>; +-}; +- +-&cpsw_port2 { +- status = "disabled"; + }; + + &tscadc { From 4927d0f2850efb711fd8f0e96f48869d270a6fc5 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 4 Aug 2024 16:10:49 +0200 Subject: [PATCH 06/15] omap: adapt to the new dts directory layout. .dts files were moved to the 'ti/omap' sub-directory. Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/pull/16099 Signed-off-by: Hauke Mehrtens --- target/linux/omap/image/Makefile | 3 +++ .../patches-6.6/900-use-cpsw-ethernet-driver.patch | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile index 507c91b2cc9aa5..3d8c8a2f172357 100644 --- a/target/linux/omap/image/Makefile +++ b/target/linux/omap/image/Makefile @@ -33,6 +33,9 @@ define Device/Default PROFILES := Default KERNEL_NAME := zImage KERNEL := kernel-bin + ifdef CONFIG_LINUX_6_6 + DTS_DIR := $(DTS_DIR)/ti/omap + endif DEVICE_DTS = $(lastword $(subst _, ,$(1))) IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := omap-sdcard | append-metadata | gzip diff --git a/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch index 17c07fbdfba111..31fa0028c6eed0 100644 --- a/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch +++ b/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch @@ -17,9 +17,9 @@ devices in OpenWrt usable again with the default network config.) Signed-off-by: Jan Hoffmann --- ---- a/arch/arm/boot/dts/am335x-bone-common.dtsi -+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi -@@ -353,27 +353,24 @@ +--- a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi +@@ -358,27 +358,24 @@ }; }; @@ -52,8 +52,8 @@ Signed-off-by: Jan Hoffmann ethphy0: ethernet-phy@0 { reg = <0>; ---- a/arch/arm/boot/dts/am335x-evm.dts -+++ b/arch/arm/boot/dts/am335x-evm.dts +--- a/arch/arm/boot/dts/ti/omap/am335x-evm.dts ++++ b/arch/arm/boot/dts/ti/omap/am335x-evm.dts @@ -682,31 +682,28 @@ }; }; From c6dbeffd50f4300ef6e781ae229db6384e8f6f46 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 4 Aug 2024 16:06:56 +0200 Subject: [PATCH 07/15] omap: refresh kernel 6.6 config Unset CONFIG_CRYPTO_MANAGER_DISABLE_TESTS and CONFIG_CRYPTO_MANAGER_EXTRA_TESTS manually to fix these linker errors: crypto/crypto_engine.o: in function `crypto_engine_register_akcipher': undefined reference to `crypto_register_akcipher' crypto/crypto_engine.o: in function `crypto_engine_unregister_akcipher': undefined reference to `crypto_unregister_akcipher' crypto/crypto_engine.o: in function `crypto_engine_register_kpp': undefined reference to `crypto_register_kpp' crypto/crypto_engine.o: in function `crypto_engine_unregister_kpp': undefined reference to `crypto_unregister_kpp' Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/pull/16099 Signed-off-by: Hauke Mehrtens --- target/linux/omap/config-6.6 | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/target/linux/omap/config-6.6 b/target/linux/omap/config-6.6 index 94c6b5922d47dc..f85a68f0aad886 100644 --- a/target/linux/omap/config-6.6 +++ b/target/linux/omap/config-6.6 @@ -10,7 +10,6 @@ CONFIG_ARCH_MULTIPLATFORM=y CONFIG_ARCH_MULTI_V6_V7=y CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y -CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OMAP=y CONFIG_ARCH_OMAP2PLUS=y CONFIG_ARCH_OMAP2PLUS_TYPICAL=y @@ -20,6 +19,7 @@ CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_STACKWALK=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARM=y CONFIG_ARM_APPENDED_DTB=y @@ -63,6 +63,7 @@ CONFIG_BLK_DEV_SD=y CONFIG_BLK_PM=y CONFIG_BOUNCE=y CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BUFFER_HEAD=y CONFIG_CACHE_L2X0=y CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" @@ -123,6 +124,7 @@ CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y @@ -157,6 +159,7 @@ CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_ENGINE=y +CONFIG_CRYPTO_GENIV=y CONFIG_CRYPTO_GHASH_ARM_CE=y CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y @@ -164,10 +167,13 @@ CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LIB_GF128MUL=y CONFIG_CRYPTO_LIB_SHA1=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LIB_UTILS=y CONFIG_CRYPTO_LZO=y +# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set +# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y @@ -178,8 +184,10 @@ CONFIG_CRYPTO_SHA1_ARM=y CONFIG_CRYPTO_SHA1_ARM_NEON=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA256_ARM=y +CONFIG_CRYPTO_SHA3=y CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA512_ARM=y +CONFIG_CRYPTO_SIG2=y CONFIG_CRYPTO_SIMD=y CONFIG_CRYPTO_ZSTD=y CONFIG_CURRENT_POINTER_IN_TPIDRURO=y @@ -201,7 +209,6 @@ CONFIG_DRM_BRIDGE=y CONFIG_DRM_DISPLAY_CONNECTOR=y CONFIG_DRM_KMS_HELPER=y CONFIG_DRM_MIPI_DSI=y -CONFIG_DRM_NOMODESET=y CONFIG_DRM_OMAP=y CONFIG_DRM_PANEL=y CONFIG_DRM_PANEL_BRIDGE=y @@ -228,16 +235,16 @@ CONFIG_EXTCON_USB_GPIO=y CONFIG_F2FS_FS=y CONFIG_FANOTIFY=y CONFIG_FAT_FS=y -CONFIG_FB_CMDLINE=y CONFIG_FHANDLE=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y +CONFIG_FUNCTION_ALIGNMENT=0 CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GCC10_NO_ARRAY_BOUNDS=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y CONFIG_GENERIC_BUG=y @@ -283,6 +290,7 @@ CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAVE_SMP=y CONFIG_HDMI=y @@ -330,8 +338,8 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_PWM=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEGACY_DIRECT_IO=y CONFIG_LIBCRC32C=y CONFIG_LIBFDT=y CONFIG_LOCKD=y @@ -346,7 +354,6 @@ CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y # CONFIG_MDIO_GPIO is not set -CONFIG_MEMFD_CREATE=y CONFIG_MEMORY=y CONFIG_MEMORY_ISOLATION=y CONFIG_MFD_CORE=y @@ -368,6 +375,7 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_EXTERNAL_DMA=y CONFIG_MMC_SDHCI_OMAP=y CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMU_LAZY_TLB_REFCOUNT=y CONFIG_MODULES_USE_ELF_REL=y CONFIG_MSDOS_FS=y CONFIG_MTD_CMDLINE_PARTS=y @@ -394,14 +402,19 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096 # CONFIG_MUSB_PIO_ONLY is not set CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_SRCU_NMI_SAFE=y CONFIG_NEON=y CONFIG_NET_DEVLINK=y +CONFIG_NET_EGRESS=y CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_HANDSHAKE=y +CONFIG_NET_INGRESS=y CONFIG_NET_KEY=y CONFIG_NET_KEY_MIGRATE=y CONFIG_NET_PTP_CLASSIFY=y CONFIG_NET_SELFTESTS=y CONFIG_NET_SWITCHDEV=y +CONFIG_NET_XGRESS=y CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_FS=y CONFIG_NFS_USE_KERNEL_DNS=y @@ -437,7 +450,6 @@ CONFIG_OMAP2_DSS_SDI=y CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y CONFIG_OMAP2_DSS_VENC=y # CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set -# CONFIG_OMAP3_SDRC_AC_TIMING is not set CONFIG_OMAP3_THERMAL=y CONFIG_OMAP4_DSS_HDMI=y CONFIG_OMAP4_DSS_HDMI_CEC=y @@ -488,7 +500,6 @@ CONFIG_POWER_SUPPLY=y CONFIG_PPS=y CONFIG_PREEMPT_NONE_BUILD=y CONFIG_PRINTK_TIME=y -CONFIG_PRINT_QUOTA_WARNING=y CONFIG_PROC_EVENTS=y CONFIG_PROFILING=y CONFIG_PTP_1588_CLOCK=y @@ -618,12 +629,11 @@ CONFIG_SPI_MASTER=y CONFIG_SPI_MEM=y CONFIG_SPI_OMAP24XX=y CONFIG_SPI_TI_QSPI=y +CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y CONFIG_SRAM=y CONFIG_SRAM_EXEC=y -CONFIG_SRCU=y CONFIG_STACKTRACE=y CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y CONFIG_SWPHY=y CONFIG_SWP_EMULATE=y CONFIG_SYNC_FILE=y @@ -677,7 +687,6 @@ CONFIG_USB_EHCI_HCD_OMAP=y # CONFIG_USB_EHCI_HCD_PLATFORM is not set CONFIG_USB_GADGET=y CONFIG_USB_INVENTRA_DMA=y -CONFIG_USB_MUSB_AM35X=y CONFIG_USB_MUSB_DSPS=y CONFIG_USB_MUSB_DUAL_ROLE=y CONFIG_USB_MUSB_HDRC=y @@ -693,6 +702,8 @@ CONFIG_VFAT_FS=y CONFIG_VFP=y CONFIG_VFPv3=y CONFIG_VIDEOMODE_HELPERS=y +CONFIG_VIDEO_CMDLINE=y +CONFIG_VIDEO_NOMODESET=y CONFIG_WATCHDOG_CORE=y CONFIG_XFRM_ALGO=y CONFIG_XFRM_MIGRATE=y From 1822332bc5c94defe8a8c59f221137745ac7a904 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 4 Aug 2024 16:10:49 +0200 Subject: [PATCH 08/15] omap: switch to kernel 6.6 Switch to Linux 6.6. Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/pull/16099 Signed-off-by: Hauke Mehrtens --- target/linux/omap/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile index a3c61efc9ab254..67db2aa07d639e 100644 --- a/target/linux/omap/Makefile +++ b/target/linux/omap/Makefile @@ -12,7 +12,7 @@ CPU_TYPE:=cortex-a8 CPU_SUBTYPE:=vfpv3 SUBTARGETS:=generic -KERNEL_PATCHVER:=6.1 +KERNEL_PATCHVER:=6.6 KERNELNAME:=zImage dtbs From 232cc239b8acbb39d8b8b05f41751177a8fa8e2f Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 4 Aug 2024 16:11:16 +0200 Subject: [PATCH 09/15] omap: remove 6.1 support We switched to 6.6, so lets remove 6.1 support now. Signed-off-by: Andre Heider Link: https://github.com/openwrt/openwrt/pull/16099 Signed-off-by: Hauke Mehrtens --- target/linux/omap/config-6.1 | 711 ------------------ target/linux/omap/image/Makefile | 2 - .../900-use-cpsw-ethernet-driver.patch | 93 --- 3 files changed, 806 deletions(-) delete mode 100644 target/linux/omap/config-6.1 delete mode 100644 target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch diff --git a/target/linux/omap/config-6.1 b/target/linux/omap/config-6.1 deleted file mode 100644 index d5ed19afe15af2..00000000000000 --- a/target/linux/omap/config-6.1 +++ /dev/null @@ -1,711 +0,0 @@ -# CONFIG_AHCI_DM816 is not set -CONFIG_ALIGNMENT_TRAP=y -CONFIG_AM335X_CONTROL_USB=y -CONFIG_AM335X_PHY_USB=y -CONFIG_ARCH_32BIT_OFF_T=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_KEEP_MEMBLOCK=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MULTIPLATFORM=y -CONFIG_ARCH_MULTI_V6_V7=y -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y -CONFIG_ARCH_NR_GPIO=0 -CONFIG_ARCH_OMAP=y -CONFIG_ARCH_OMAP2PLUS=y -CONFIG_ARCH_OMAP2PLUS_TYPICAL=y -CONFIG_ARCH_OMAP3=y -CONFIG_ARCH_OMAP4=y -CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y -CONFIG_ARM_CPUIDLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARM_ERRATA_430973=y -CONFIG_ARM_ERRATA_720789=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_ARM_ERRATA_775420=y -CONFIG_ARM_GIC=y -CONFIG_ARM_HAS_GROUP_RELOCS=y -CONFIG_ARM_HEAVY_MB=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_OMAP2PLUS_CPUFREQ=y -CONFIG_ARM_PATCH_IDIV=y -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_TI_CPUFREQ=y -CONFIG_ARM_UNWIND=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_AT803X_PHY=y -CONFIG_ATA=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_GENERIC=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_TPS65217 is not set -CONFIG_BCH=y -CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_PM=y -CONFIG_BOUNCE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_CACHE_L2X0=y -CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y -CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" -CONFIG_CC_NO_ARRAY_BOUNDS=y -CONFIG_CEC_CORE=y -# CONFIG_CHARGER_TPS65217 is not set -CONFIG_CLKSRC_MMIO=y -CONFIG_CLKSRC_TI_32K=y -CONFIG_CLK_TWL6040=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_CMA=y -CONFIG_CMA_ALIGNMENT=8 -CONFIG_CMA_AREAS=7 -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_SIZE_MBYTES=16 -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -# CONFIG_CMA_SYSFS is not set -CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -CONFIG_COMMON_CLK=y -# CONFIG_COMMON_CLK_PALMAS is not set -# CONFIG_COMMON_CLK_TI_ADPLL is not set -CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 -CONFIG_COMPAT_32BIT_TIME=y -CONFIG_CONFIGFS_FS=y -CONFIG_CONNECTOR=y -CONFIG_CONTEXT_TRACKING=y -CONFIG_CONTEXT_TRACKING_IDLE=y -CONFIG_CONTIG_ALLOC=y -CONFIG_CPUFREQ_DT=y -CONFIG_CPUFREQ_DT_PLATDEV=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_GOV_ATTR_SET=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_GOV_LADDER=y -CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_PM=y -CONFIG_CPU_RMAP=y -CONFIG_CPU_SPECTRE=y -CONFIG_CPU_THERMAL=y -CONFIG_CPU_THUMB_CAPABLE=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_V7=y -CONFIG_CRAMFS=y -CONFIG_CRC16=y -CONFIG_CRC7=y -CONFIG_CRC_CCITT=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC_T10DIF=y -CONFIG_CRYPTO_AES_ARM=y -CONFIG_CRYPTO_AES_ARM_BS=y -CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CHACHA20_NEON=y -CONFIG_CRYPTO_CRC32=y -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRCT10DIF=y -CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_DEV_OMAP=y -CONFIG_CRYPTO_DEV_OMAP_AES=y -CONFIG_CRYPTO_DEV_OMAP_DES=y -CONFIG_CRYPTO_DEV_OMAP_SHAM=y -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_DRBG_HMAC=y -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_ENGINE=y -CONFIG_CRYPTO_GHASH_ARM_CE=y -CONFIG_CRYPTO_HASH_INFO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_JITTERENTROPY=y -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -CONFIG_CRYPTO_LIB_DES=y -CONFIG_CRYPTO_LIB_SHA1=y -CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_LIB_UTILS=y -CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=y -CONFIG_CRYPTO_SEQIV=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA1_ARM=y -CONFIG_CRYPTO_SHA1_ARM_NEON=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA256_ARM=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_SHA512_ARM=y -CONFIG_CRYPTO_SIMD=y -CONFIG_CRYPTO_ZSTD=y -CONFIG_CURRENT_POINTER_IN_TPIDRURO=y -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_DDR=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_DMADEVICES=y -CONFIG_DMA_CMA=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_OF=y -CONFIG_DMA_OMAP=y -CONFIG_DMA_OPS=y -CONFIG_DMA_SHARED_BUFFER=y -CONFIG_DMA_VIRTUAL_CHANNELS=y -CONFIG_DNS_RESOLVER=y -CONFIG_DRM=y -CONFIG_DRM_BRIDGE=y -CONFIG_DRM_DISPLAY_CONNECTOR=y -CONFIG_DRM_KMS_HELPER=y -CONFIG_DRM_MIPI_DSI=y -CONFIG_DRM_NOMODESET=y -CONFIG_DRM_OMAP=y -CONFIG_DRM_PANEL=y -CONFIG_DRM_PANEL_BRIDGE=y -CONFIG_DRM_PANEL_LG_LB035Q02=y -CONFIG_DRM_PANEL_NEC_NL8048HL11=y -CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y -CONFIG_DRM_PANEL_SHARP_LS037V7DW01=y -CONFIG_DRM_PANEL_SONY_ACX565AKM=y -CONFIG_DRM_PANEL_TPO_TD028TTEC1=y -CONFIG_DRM_PANEL_TPO_TD043MTEA1=y -CONFIG_DRM_SIMPLE_BRIDGE=y -CONFIG_DRM_TI_TFP410=y -CONFIG_DRM_TI_TPD12S015=y -CONFIG_DTC=y -CONFIG_DT_IDLE_STATES=y -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -CONFIG_EEPROM_93CX6=y -CONFIG_EXCLUSIVE_SYSTEM_RAM=y -CONFIG_EXT4_FS=y -CONFIG_EXTCON=y -CONFIG_EXTCON_PALMAS=y -CONFIG_EXTCON_USB_GPIO=y -CONFIG_F2FS_FS=y -CONFIG_FANOTIFY=y -CONFIG_FAT_FS=y -CONFIG_FB_CMDLINE=y -CONFIG_FHANDLE=y -CONFIG_FIXED_PHY=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_FS_IOMAP=y -CONFIG_FS_MBCACHE=y -CONFIG_FS_POSIX_ACL=y -CONFIG_FWNODE_MDIO=y -CONFIG_FW_LOADER_PAGED_BUF=y -CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC11_NO_ARRAY_BOUNDS=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_ARCH_TOPOLOGY=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_VULNERABILITIES=y -CONFIG_GENERIC_EARLY_IOREMAP=y -CONFIG_GENERIC_GETTIMEOFDAY=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_MULTI_HANDLER=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_PHY=y -CONFIG_GENERIC_PINCONF=y -CONFIG_GENERIC_PINCTRL_GROUPS=y -CONFIG_GENERIC_PINMUX_FUNCTIONS=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_VDSO_32=y -CONFIG_GLOB=y -CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_CDEV=y -CONFIG_GPIO_OMAP=y -CONFIG_GPIO_PALMAS=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y -CONFIG_GPIO_PCF857X=y -# CONFIG_GPIO_TPS65218 is not set -CONFIG_GPIO_TPS65910=y -CONFIG_GPIO_TWL4030=y -CONFIG_GPIO_TWL6040=y -CONFIG_GRACE_PERIOD=y -CONFIG_GRO_CELLS=y -CONFIG_HARDEN_BRANCH_PREDICTOR=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAVE_SMP=y -CONFIG_HDMI=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_HSI=y -CONFIG_HSI_BOARDINFO=y -# CONFIG_HSI_CHAR is not set -CONFIG_HWMON=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_OMAP=y -CONFIG_HZ_FIXED=0 -CONFIG_I2C=y -CONFIG_I2C_ALGOBIT=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_OMAP=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_RARP=y -CONFIG_IRQCHIP=y -CONFIG_IRQSTACKS=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_WORK=y -CONFIG_JBD2=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KCMP=y -CONFIG_KEYS=y -CONFIG_KMAP_LOCAL=y -CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y -CONFIG_KPROBES=y -CONFIG_KRETPROBES=y -CONFIG_KS8851=y -CONFIG_KS8851_MLL=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_PLATFORM=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LIBCRC32C=y -CONFIG_LIBFDT=y -CONFIG_LOCKD=y -CONFIG_LOCK_DEBUGGING_SUPPORT=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_MACH_OMAP_GENERIC=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_MDIO_BITBANG=y -CONFIG_MDIO_BUS=y -CONFIG_MDIO_DEVICE=y -CONFIG_MDIO_DEVRES=y -# CONFIG_MDIO_GPIO is not set -CONFIG_MEMFD_CREATE=y -CONFIG_MEMORY=y -CONFIG_MEMORY_ISOLATION=y -CONFIG_MFD_CORE=y -CONFIG_MFD_PALMAS=y -CONFIG_MFD_SYSCON=y -CONFIG_MFD_TI_AM335X_TSCADC=y -CONFIG_MFD_TPS65217=y -CONFIG_MFD_TPS65218=y -CONFIG_MFD_TPS65910=y -CONFIG_MFD_TWL4030_AUDIO=y -CONFIG_MICREL_PHY=y -CONFIG_MIGHT_HAVE_CACHE_L2X0=y -CONFIG_MIGRATION=y -CONFIG_MMC=y -CONFIG_MMC_BLOCK=y -# CONFIG_MMC_OMAP is not set -CONFIG_MMC_OMAP_HS=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_EXTERNAL_DMA=y -CONFIG_MMC_SDHCI_OMAP=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_MSDOS_FS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_NAND_CORE=y -CONFIG_MTD_NAND_ECC=y -CONFIG_MTD_NAND_ECC_SW_HAMMING=y -CONFIG_MTD_NAND_OMAP2=y -CONFIG_MTD_NAND_OMAP_BCH=y -CONFIG_MTD_NAND_OMAP_BCH_BUILD=y -CONFIG_MTD_ONENAND=y -# CONFIG_MTD_ONENAND_2X_PROGRAM is not set -# CONFIG_MTD_ONENAND_GENERIC is not set -CONFIG_MTD_ONENAND_OMAP2=y -# CONFIG_MTD_ONENAND_OTP is not set -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_OOPS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_RAW_NAND=y -CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_BLOCK is not set -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -# CONFIG_MUSB_PIO_ONLY is not set -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEON=y -CONFIG_NET_DEVLINK=y -CONFIG_NET_FLOW_LIMIT=y -CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_NET_PTP_CLASSIFY=y -CONFIG_NET_SELFTESTS=y -CONFIG_NET_SWITCHDEV=y -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_FS=y -CONFIG_NFS_USE_KERNEL_DNS=y -# CONFIG_NFS_USE_LEGACY_DNS is not set -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_NO_HZ=y -CONFIG_NO_HZ_COMMON=y -CONFIG_NO_HZ_IDLE=y -CONFIG_NR_CPUS=4 -CONFIG_NVMEM=y -CONFIG_NVMEM_LAYOUTS=y -CONFIG_OF=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_FLATTREE=y -CONFIG_OF_GPIO=y -CONFIG_OF_IRQ=y -CONFIG_OF_KOBJ=y -CONFIG_OF_MDIO=y -CONFIG_OID_REGISTRY=y -CONFIG_OLD_SIGACTION=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OMAP2_DSS_DPI=y -CONFIG_OMAP2_DSS_DSI=y -CONFIG_OMAP2_DSS_HDMI_COMMON=y -CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 -CONFIG_OMAP2_DSS_SDI=y -CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y -CONFIG_OMAP2_DSS_VENC=y -# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set -# CONFIG_OMAP3_SDRC_AC_TIMING is not set -CONFIG_OMAP3_THERMAL=y -CONFIG_OMAP4_DSS_HDMI=y -CONFIG_OMAP4_DSS_HDMI_CEC=y -CONFIG_OMAP4_THERMAL=y -CONFIG_OMAP5_DSS_HDMI=y -CONFIG_OMAP_CONTROL_PHY=y -CONFIG_OMAP_DM_SYSTIMER=y -CONFIG_OMAP_DM_TIMER=y -CONFIG_OMAP_GPMC=y -# CONFIG_OMAP_GPMC_DEBUG is not set -CONFIG_OMAP_HWMOD=y -CONFIG_OMAP_INTERCONNECT=y -CONFIG_OMAP_INTERCONNECT_BARRIER=y -CONFIG_OMAP_IRQCHIP=y -CONFIG_OMAP_OCP2SCP=y -# CONFIG_OMAP_SSI is not set -CONFIG_OMAP_USB2=y -CONFIG_OMAP_WATCHDOG=y -CONFIG_OPTPROBES=y -CONFIG_OUTER_CACHE=y -CONFIG_OUTER_CACHE_SYNC=y -CONFIG_PADATA=y -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_PAGE_POOL=y -CONFIG_PAGE_SIZE_LESS_THAN_256KB=y -CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_PHYLIB=y -CONFIG_PHYLIB_LEDS=y -# CONFIG_PHY_DM816X_USB is not set -CONFIG_PHY_TI_GMII_SEL=y -CONFIG_PINCTRL=y -# CONFIG_PINCTRL_PALMAS is not set -CONFIG_PL310_ERRATA_588369=y -CONFIG_PL310_ERRATA_727915=y -CONFIG_PM=y -CONFIG_PM_CLK=y -CONFIG_PM_GENERIC_DOMAINS=y -CONFIG_PM_GENERIC_DOMAINS_OF=y -CONFIG_PM_OPP=y -CONFIG_POSIX_MQUEUE=y -CONFIG_POSIX_MQUEUE_SYSCTL=y -CONFIG_POWER_AVS_OMAP=y -CONFIG_POWER_AVS_OMAP_CLASS3=y -CONFIG_POWER_SUPPLY=y -CONFIG_PPS=y -CONFIG_PREEMPT_NONE_BUILD=y -CONFIG_PRINTK_TIME=y -CONFIG_PRINT_QUOTA_WARNING=y -CONFIG_PROC_EVENTS=y -CONFIG_PROFILING=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_PTP_1588_CLOCK_OPTIONAL=y -CONFIG_PWM=y -# CONFIG_PWM_OMAP_DMTIMER is not set -CONFIG_PWM_SYSFS=y -CONFIG_PWM_TIECAP=y -CONFIG_PWM_TIEHRPWM=y -# CONFIG_PWM_TWL is not set -# CONFIG_PWM_TWL_LED is not set -CONFIG_QCOM_NET_PHYLIB=y -CONFIG_QFMT_V2=y -CONFIG_QUOTA=y -CONFIG_QUOTACTL=y -CONFIG_QUOTA_TREE=y -CONFIG_RANDSTRUCT_NONE=y -CONFIG_RATIONAL=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_IRQ=y -CONFIG_REGMAP_MMIO=y -CONFIG_REGMAP_SPI=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_PALMAS=y -CONFIG_REGULATOR_PBIAS=y -CONFIG_REGULATOR_TI_ABB=y -CONFIG_REGULATOR_TPS62360=y -CONFIG_REGULATOR_TPS65023=y -CONFIG_REGULATOR_TPS6507X=y -CONFIG_REGULATOR_TPS65217=y -CONFIG_REGULATOR_TPS65218=y -CONFIG_REGULATOR_TPS65910=y -CONFIG_REGULATOR_TWL4030=y -CONFIG_RESET_CONTROLLER=y -CONFIG_RFS_ACCEL=y -CONFIG_ROOT_NFS=y -CONFIG_RPS=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_OMAP=y -CONFIG_RTC_DRV_PALMAS=y -# CONFIG_RTC_DRV_TPS65910 is not set -CONFIG_RTC_DRV_TWL4030=y -CONFIG_RTC_I2C_AND_SPI=y -CONFIG_RTC_MC146818_LIB=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_SATA_HOST=y -CONFIG_SCHEDSTATS=y -CONFIG_SCHED_INFO=y -CONFIG_SCHED_MC=y -CONFIG_SCSI=y -CONFIG_SCSI_COMMON=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_SDIO_UART=y -CONFIG_SECCOMP=y -CONFIG_SECCOMP_FILTER=y -CONFIG_SENSORS_GPIO_FAN=y -CONFIG_SENSORS_LM75=y -CONFIG_SENSORS_TMP102=y -CONFIG_SENSORS_TSL2550=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_NR_UARTS=32 -# CONFIG_SERIAL_8250_OMAP is not set -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_MCTRL_GPIO=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_OMAP=y -CONFIG_SERIAL_OMAP_CONSOLE=y -CONFIG_SERIO=y -CONFIG_SGL_ALLOC=y -CONFIG_SG_POOL=y -CONFIG_SG_SPLIT=y -CONFIG_SKB_EXTENSIONS=y -CONFIG_SMC91X=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_SMSC911X=y -CONFIG_SMSC_PHY=y -CONFIG_SND=y -# CONFIG_SND_COMPRESS_OFFLOAD is not set -CONFIG_SND_DMAENGINE_PCM=y -CONFIG_SND_JACK=y -CONFIG_SND_PCM=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_SIMPLE_CARD=y -CONFIG_SND_SIMPLE_CARD_UTILS=y -CONFIG_SND_SOC=y -CONFIG_SND_SOC_DAVINCI_MCASP=y -CONFIG_SND_SOC_DMIC=y -CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_NOKIA_RX51 is not set -# CONFIG_SND_SOC_OMAP3_PANDORA is not set -CONFIG_SND_SOC_OMAP3_TWL4030=y -CONFIG_SND_SOC_OMAP_ABE_TWL6040=y -CONFIG_SND_SOC_OMAP_DMIC=y -CONFIG_SND_SOC_OMAP_HDMI=y -CONFIG_SND_SOC_OMAP_MCBSP=y -CONFIG_SND_SOC_OMAP_MCPDM=y -CONFIG_SND_SOC_TI_EDMA_PCM=y -CONFIG_SND_SOC_TI_SDMA_PCM=y -CONFIG_SND_SOC_TI_UDMA_PCM=y -CONFIG_SND_SOC_TWL4030=y -CONFIG_SND_SOC_TWL6040=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SOCK_RX_QUEUE_MAPPING=y -CONFIG_SOC_AM33XX=y -CONFIG_SOC_AM43XX=y -CONFIG_SOC_BUS=y -CONFIG_SOC_HAS_OMAP2_SDRC=y -CONFIG_SOC_OMAP3430=y -# CONFIG_SOC_TI81XX is not set -CONFIG_SOFTIRQ_ON_OWN_STACK=y -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SPARSE_IRQ=y -CONFIG_SPI=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_MEM=y -CONFIG_SPI_OMAP24XX=y -CONFIG_SPI_TI_QSPI=y -CONFIG_SRAM=y -CONFIG_SRAM_EXEC=y -CONFIG_SRCU=y -CONFIG_STACKTRACE=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_SWPHY=y -CONFIG_SWP_EMULATE=y -CONFIG_SYNC_FILE=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y -CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 -CONFIG_THERMAL_GOV_FAIR_SHARE=y -CONFIG_THERMAL_GOV_STEP_WISE=y -CONFIG_THERMAL_GOV_USER_SPACE=y -CONFIG_THERMAL_OF=y -CONFIG_THREAD_INFO_IN_TASK=y -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TIMER_OF=y -CONFIG_TIMER_PROBE=y -CONFIG_TI_CPPI41=y -CONFIG_TI_CPSW=y -CONFIG_TI_CPSW_SWITCHDEV=y -CONFIG_TI_CPTS=y -CONFIG_TI_DAVINCI_EMAC=y -CONFIG_TI_DAVINCI_MDIO=y -CONFIG_TI_DMA_CROSSBAR=y -CONFIG_TI_EDMA=y -CONFIG_TI_EMIF=y -# CONFIG_TI_EMIF_SRAM is not set -CONFIG_TI_PIPE3=y -CONFIG_TI_PWMSS=y -CONFIG_TI_SOC_THERMAL=y -CONFIG_TI_SYSC=y -CONFIG_TI_THERMAL=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TREE_RCU=y -CONFIG_TREE_SRCU=y -CONFIG_TWL4030_CORE=y -CONFIG_TWL4030_POWER=y -CONFIG_TWL4030_USB=y -CONFIG_TWL4030_WATCHDOG=y -# CONFIG_TWL6030_USB is not set -CONFIG_TWL6040_CORE=y -CONFIG_UBIFS_FS=y -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -CONFIG_UNWINDER_ARM=y -CONFIG_USB=y -CONFIG_USB_COMMON=y -CONFIG_USB_DWC3=y -CONFIG_USB_DWC3_DUAL_ROLE=y -# CONFIG_USB_DWC3_GADGET is not set -# CONFIG_USB_DWC3_HOST is not set -CONFIG_USB_DWC3_OMAP=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_HCD_OMAP=y -# CONFIG_USB_EHCI_HCD_PLATFORM is not set -CONFIG_USB_GADGET=y -CONFIG_USB_INVENTRA_DMA=y -CONFIG_USB_MUSB_AM35X=y -CONFIG_USB_MUSB_DSPS=y -CONFIG_USB_MUSB_DUAL_ROLE=y -CONFIG_USB_MUSB_HDRC=y -CONFIG_USB_MUSB_OMAP2PLUS=y -CONFIG_USB_MUSB_TUSB6010=y -CONFIG_USB_PHY=y -CONFIG_USB_ROLE_SWITCH=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_TI_CPPI41_DMA=y -CONFIG_USB_TUSB_OMAP_DMA=y -CONFIG_USE_OF=y -CONFIG_VFAT_FS=y -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_VIDEOMODE_HELPERS=y -CONFIG_WATCHDOG_CORE=y -CONFIG_XFRM_ALGO=y -CONFIG_XFRM_MIGRATE=y -CONFIG_XPS=y -CONFIG_XXHASH=y -CONFIG_XZ_DEC_ARM=y -CONFIG_XZ_DEC_BCJ=y -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZLIB_DEFLATE=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZSTD_COMMON=y -CONFIG_ZSTD_COMPRESS=y -CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile index 3d8c8a2f172357..591628c53f084c 100644 --- a/target/linux/omap/image/Makefile +++ b/target/linux/omap/image/Makefile @@ -33,9 +33,7 @@ define Device/Default PROFILES := Default KERNEL_NAME := zImage KERNEL := kernel-bin - ifdef CONFIG_LINUX_6_6 DTS_DIR := $(DTS_DIR)/ti/omap - endif DEVICE_DTS = $(lastword $(subst _, ,$(1))) IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := omap-sdcard | append-metadata | gzip diff --git a/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch deleted file mode 100644 index 17c07fbdfba111..00000000000000 --- a/target/linux/omap/patches-6.1/900-use-cpsw-ethernet-driver.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Jan Hoffmann -Date: Sat, 27 Apr 2024 20:41:43 +0200 -Subject: ARM: dts: Use cpsw ethernet driver for some am335x devices - -The new cpsw-switch driver requires a vid for every port which is -reserved for internal usage (defaulting to 1 and 2). As a result, some -network configurations are impossible, such as a bridge with -default_pvid of 1 (even if it is not vlan aware). - -As a simple workaround, the ti,dual-emac-pvid property could be changed -to another value, but that would just shift the problem. Instead, switch -some devices back to the older cpsw ethernet driver. - -(This patch is not suitable for upstreaming, it just makes the affected -devices in OpenWrt usable again with the default network config.) - -Signed-off-by: Jan Hoffmann ---- - ---- a/arch/arm/boot/dts/am335x-bone-common.dtsi -+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi -@@ -353,27 +353,24 @@ - }; - }; - --&cpsw_port1 { -+&cpsw_emac0 { - phy-handle = <ðphy0>; - phy-mode = "mii"; -- ti,dual-emac-pvid = <1>; - }; - --&cpsw_port2 { -- status = "disabled"; --}; -- --&mac_sw { -+&mac { -+ slaves = <1>; - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&cpsw_default>; - pinctrl-1 = <&cpsw_sleep>; - status = "okay"; - }; - --&davinci_mdio_sw { -+&davinci_mdio { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&davinci_mdio_default>; - pinctrl-1 = <&davinci_mdio_sleep>; -+ status = "okay"; - - ethphy0: ethernet-phy@0 { - reg = <0>; ---- a/arch/arm/boot/dts/am335x-evm.dts -+++ b/arch/arm/boot/dts/am335x-evm.dts -@@ -682,31 +682,28 @@ - }; - }; - --&mac_sw { -+&mac { -+ slaves = <1>; - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&cpsw_default>; - pinctrl-1 = <&cpsw_sleep>; - status = "okay"; - }; - --&davinci_mdio_sw { -+&davinci_mdio { - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&davinci_mdio_default>; - pinctrl-1 = <&davinci_mdio_sleep>; -+ status = "okay"; - - ethphy0: ethernet-phy@0 { - reg = <0>; - }; - }; - --&cpsw_port1 { -+&cpsw_emac0 { - phy-handle = <ðphy0>; - phy-mode = "rgmii-id"; -- ti,dual-emac-pvid = <1>; --}; -- --&cpsw_port2 { -- status = "disabled"; - }; - - &tscadc { From fea2264d9fddc285f724aad04335462807710d61 Mon Sep 17 00:00:00 2001 From: Mauri Sandberg Date: Mon, 31 Jul 2023 15:35:46 +0300 Subject: [PATCH 10/15] ramips: mt7621: Add DNA Valokuitu Plus EX400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specifications: - Device: DNA Valokuitu Plus EX400 - SoC: MT7621A - Flash: 256MB NAND - RAM: 256MB - Ethernet: Built-in, 2 x 1GbE - Wifi: MT7603 2.4 GHz, MT7615 5 GHz (4x internal antennas) - USB: 1x 3.0 - LED: 1x green/red, 1x green - Buttons: Reset MAC addresses: - LAN: u-boot 'ethaddr' (label) - WAN: label + 1 - 2.4 GHz: label + 6 - 5 GHz: label + 7 Serial: There is a black block connector next to the red ethernet connector. It is accessible also through holes in the casing. Pinout (TTL 3.3V) +---+---+ |Tx |Rx | +---+---+ |Vcc|Gnd| +---+---+ Firmware: The vendor firmware is a fork of OpenWrt (Reboot) with a kernel version 4.4.93. The flash is arranged as below and there is a dual boot mechanism alternating between rootfs_0 and rootfs_1. +-------+------+------+-----------+-----------+ | | env1 | env2 | rootfs_0 | rootfs_1 | | +------+------+-----------+-----------+ | | UBI volumes | +-------+-------------------------------------+ |U-Boot | UBI | +-------+-------------------------------------+ |mtd0 | mtd1 | +-------+-------------------------------------+ | NAND | +---------------------------------------------+ In OpenWrt rootfs_0 will be used as a boot partition that will contain the kernel and the dtb. The squashfs rootfs and overlay are standard OpenWrt behaviour. +-------+------+------+-----------+--------+------------+ | | env1 | env2 | rootfs_0 | rootfs | rootfs_data| | +------+------+-----------+--------+------------+ | | UBI volumes | +-------+-----------------------------------------------+ |U-Boot | UBI | +-------+-----------------------------------------------+ |mtd0 | mtd1 | +-------+-----------------------------------------------+ | NAND | +-------------------------------------------------------+ U-boot: With proper serial access booting can be halted to U-boot by pressing any key. TFTP and flash writes are available, but only the first one has been tested. NOTE: Recovery mode can be accessed by holding down the reset button while powering on the device. The led 'Update' will show a solid green light once ready. A web server will be running at 192.168.1.1:80 and it will allow flashing a firmware package. You can cycle between rootfs_0 and rootfs_1 by pressing the reset button once. Root password: With the vendor web UI create a backup of your settings and download the archive to your computer. Within the archive in the file /etc/shadow replace the password hash for root with that of a password you know. Restore the configuration with the vendor web UI and you will have changed the root password. SSH access: You might need to enable the SSH service for LAN interface as by default it's enabled for WAN only. Installing OpenWrt: With the vendor web UI install the OpenWrt factory image. Alternatively, ssh to the device and use sysupgrade -n from cli. Finalize by installing the OpenWrt sysupgrade image to get a fully functioning system. Reverting to the vendor firmware: Boot with OpenWrt initramfs image - Remove volumes rootfs_0, rootfs and rootfs_data and create vendor volumes. ubirmvol /dev/ubi0 -n 2 ubirmvol /dev/ubi0 -n 3 ubirmvol /dev/ubi0 -n 4 ubimkvol /dev/ubi0 -N rootfs_0 -S 990 ubimkvol /dev/ubi0 -N rootfs_1 -S 990 Power off and enter to the U-boot recovery to install the vendor firmware. Known issues: - MACs for wifi are stored in currently unknown place but it seems to persist over power-off. They might be stored on the chip. Signed-off-by: Mauri Sandberg [rmilecki: try NVMEM for MACs] Signed-off-by: Rafał Miłecki --- package/boot/uboot-envtools/files/ramips | 4 + .../dts/mt7621_dna_valokuitu-plus-ex400.dts | 130 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 87 ++++++++++++ .../mt7621/base-files/etc/board.d/02_network | 1 + .../mt7621/base-files/etc/init.d/bootcount | 4 + .../mt7621/base-files/lib/upgrade/dna.sh | 44 ++++++ .../mt7621/base-files/lib/upgrade/platform.sh | 3 + 7 files changed, 273 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_dna_valokuitu-plus-ex400.dts create mode 100644 target/linux/ramips/mt7621/base-files/lib/upgrade/dna.sh diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index cca394a03b01bd..97e9fc2b1c0f75 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -146,6 +146,10 @@ xiaomi,mi-router-cr6608|\ xiaomi,mi-router-cr6609) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000" ;; +dna,valokuitu-plus-ex400) + ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1" + ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1" + ;; netgear,wax214v2) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000" diff --git a/target/linux/ramips/dts/mt7621_dna_valokuitu-plus-ex400.dts b/target/linux/ramips/dts/mt7621_dna_valokuitu-plus-ex400.dts new file mode 100644 index 00000000000000..98b2bbf7b64dc7 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_dna_valokuitu-plus-ex400.dts @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "dna,valokuitu-plus-ex400", "mediatek,mt7621-soc"; + model = "DNA Valokuitu Plus EX400"; + + aliases { + ethernet0 = &gmac0; + label-mac-device = &gmac0; + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_update_green; + }; + + chosen { + bootargs-override = "console=ttyS0,115200 rootfstype=squashfs,jffs2"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + led_status_red: led-1 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + + led_update_green: led-2 { + color = ; + function = LED_FUNCTION_PROGRAMMING; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x00 0x100000>; + label = "uboot"; + read-only; + }; + + partition@100000 { + reg = <0x100000 0xff00000>; + label = "ubi"; + + volumes { + ubi-volume-env1 { + volname = "env1"; + + nvmem-layout { + compatible = "u-boot,env"; + + ethaddr: ethaddr { + #nvmem-cell-cells = <1>; + }; + }; + }; + }; + }; + }; +}; + +&gmac1 { + label = "wan"; + phy-handle = <ðphy0>; + nvmem-cells = <ðaddr 1>; + nvmem-cell-names = "mac-address"; + status = "okay"; +}; + +&i2c { + status = "okay"; +}; + +ðphy0 { + /delete-property/ interrupts; +}; + +&state_default { + gpio { + groups = "uart2", "uart3"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@1 { + label = "lan"; + nvmem-cells = <ðaddr 0>; + nvmem-cell-names = "mac-address"; + status = "okay"; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 18dbbcadf31d7b..bf700674ef53b0 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -36,6 +36,68 @@ define Build/arcadyan-trx rm $@.hsqs $@.tail endef +define Build/dna-header + BC='$(STAGING_DIR_HOST)/bin/bc' ;\ + ubifsofs="1024" ;\ + ubifs="$$(stat -c%s $@)" ;\ + pkginfoofs="$$(echo $${ubifsofs} + $${ubifs} | $${BC})" ;\ + pkginfo="0" ;\ + scrofs="$$(echo $${pkginfoofs} + $${pkginfo} | $${BC})" ;\ + scr="0" ;\ + sigofs="$$(echo $${scrofs} + $${scr} | $${BC})" ;\ + sig="0" ;\ + md5ofs="$$(echo $${sigofs} + $${sig} | $${BC})" ;\ + md5="32" ;\ + size="$$(echo $${md5ofs} + $${md5} | $${BC})" ;\ + echo "IntenoIopY" > $@.tmp ;\ + echo "version 5" >> $@.tmp ;\ + echo "integrity MD5SUM" >> $@.tmp ;\ + echo "board EX400" >> $@.tmp ;\ + echo "chip 7621" >> $@.tmp ;\ + echo "arch all mipsel_1004kc" >> $@.tmp ;\ + echo "model EX400" >> $@.tmp ;\ + echo "release EX400-X-DNA-4.3.6.100-R-210518_0935" >> $@.tmp ;\ + echo "customer DNA" >> $@.tmp ;\ + echo "ubifsofs $${ubifsofs}" >> $@.tmp ;\ + echo "ubifs $${ubifs}" >> $@.tmp ;\ + echo "pkginfoofs $${pkginfoofs}" >> $@.tmp ;\ + echo "pkginfo $${pkginfo}" >> $@.tmp ;\ + echo "scrofs $${scrofs}" >> $@.tmp ;\ + echo "scr $${scr}" >> $@.tmp ;\ + echo "sigofs $${sigofs}" >> $@.tmp ;\ + echo "sig $${sig}" >> $@.tmp ;\ + echo "md5ofs $${md5ofs}" >> $@.tmp ;\ + echo "md5 $${md5}" >> $@.tmp ;\ + echo "size $${size}" >> $@.tmp + + dd if=$@.tmp of=$@.tmp2 bs=1024 count=1 conv=sync + cat $@.tmp2 $@ > $@.tmp + rm $@.tmp2 + mv $@.tmp $@ +endef + +define Build/dna-bootfs + mkdir -p $@.ubifs-dir/boot + + # populate the boot fs with the dtb and with either initramfs kernel or + # the normal kernel + $(CP) $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@.ubifs-dir/boot/dtb + + $(if $(findstring with-initrd,$(word 1,$(1))),\ + ( \ + $(CP) $@ $@.ubifs-dir/boot/uImage \ + ) , \ + ( \ + $(CP) $(IMAGE_KERNEL) $@.ubifs-dir/boot/uImage \ + ) \ + ) + + # create ubifs + $(STAGING_DIR_HOST)/bin/mkfs.ubifs ${MKUBIFS_OPTS} -r $@.ubifs-dir/ -o $@.new + rm -rf $@.ubifs-dir + mv $@.new $@ +endef + define Build/gemtek-trailer printf "%s%08X" ".GEMTEK." "$$(cksum $@ | cut -d ' ' -f1)" >> $@ endef @@ -103,6 +165,10 @@ define Build/iodata-mstc-header2 mv $@.new $@ endef +define Build/kernel-initramfs-bin + $(CP) $(KDIR)/vmlinux-initramfs $@ +endef + define Build/znet-header $(eval version=$(word 1,$(1))) $(eval magic=$(if $(word 2,$(1)),$(word 2,$(1)),ZNET)) @@ -988,6 +1054,27 @@ define Device/d-team_pbr-m1 endef TARGET_DEVICES += d-team_pbr-m1 +define Device/dna_valokuitu-plus-ex400 + $(Device/dsa-migration) + IMAGE_SIZE := 117m + PAGESIZE := 2048 + MKUBIFS_OPTS := --min-io-size=$$(PAGESIZE) --leb-size=124KiB --max-leb-cnt=96 \ + --log-lebs=2 --space-fixup --squash-uids + DEVICE_VENDOR := DNA + DEVICE_MODEL := Valokuitu Plus EX400 + KERNEL := kernel-bin | lzma | uImage lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma + IMAGES := factory.bin sysupgrade.tar + IMAGE/factory.bin := kernel-initramfs-bin | lzma | uImage lzma | \ + dna-bootfs with-initrd | dna-header | \ + append-md5sum-ascii-salted + IMAGE/sysupgrade.tar := dna-bootfs | sysupgrade-tar kernel=$$$$@ | check-size | \ + append-metadata + DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2) + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 +endef +TARGET_DEVICES += dna_valokuitu-plus-ex400 + define Device/edimax_ra21s $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index b7e3a49b43bfa1..f251daddd5efea 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -67,6 +67,7 @@ ramips_setup_interfaces() ucidef_set_interface_lan "lan" ;; asiarf,ap7621-001|\ + dna,valokuitu-plus-ex400|\ humax,e10|\ keenetic,kn-3510|\ openfi,5pro|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount index 06846cd4ca40fc..b83223e7ddd757 100755 --- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount +++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount @@ -32,6 +32,10 @@ boot() { samknows,whitebox-v8) fw_setenv bootcount 0 ;; + dna,valokuitu-plus-ex400) + fw_setenv boot_cnt_primary 0 + fw_setenv boot_cnt_alt 0 + ;; zyxel,lte3301-plus) [ $(printf %d $(fw_printenv -n DebugFlag)) -gt 0 ] || fw_setenv DebugFlag 1 [ $(printf %d $(fw_printenv -n Image1Stable)) -gt 0 ] || fw_setenv Image1Stable 1 diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/dna.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/dna.sh new file mode 100644 index 00000000000000..d699516ff6f2d5 --- /dev/null +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/dna.sh @@ -0,0 +1,44 @@ +# +# Copyright (C) 2023 Mauri Sandberg +# + +# The vendor UBI is split in volumes 0-3. Volumes 0 and 1 contain U-Boot +# environments env1 and env2, respectively. The vendor root file systems +# are in volumes 2 (rootfs_0) and 3 (rootfs_1). Drop the two roots and +# explicitly use rootfs_0 as a boot partition that contains the dtb and the +# OpenWrt kernel. This is because the vendor U-Boot expects to find them there. +# Then continue upgrade with the default method - a SquashFS rootfs will be +# installed and the rest of UBI will be used as an overlay. + +# The 'kernel' inside the sysupgrage.tar is an UBIFS image that contains +# /boot/dtb and /boot/kernel. The 'root' is an OpenWrt SquashFS root + +. /lib/functions.sh +. /lib/upgrade/nand.sh + +dna_do_upgrade () { + tar -xaf $1 + + # get the size of the new bootfs + local _bootfs_size=$(wc -c < ./sysupgrade-dna_valokuitu-plus-ex400/kernel) + [ -n "$_bootfs_size" -a "$_bootfs_size" -gt "0" ] || nand_do_upgrade_failed + + # remove existing rootfses and recreate rootfs_0 + ubirmvol /dev/ubi0 --name=rootfs_0 > /dev/null 2>&1 + ubirmvol /dev/ubi0 --name=rootfs_1 > /dev/null 2>&1 + ubirmvol /dev/ubi0 --name=rootfs > /dev/null 2>&1 + ubirmvol /dev/ubi0 --name=rootfs_data > /dev/null 2>&1 + ubimkvol /dev/ubi0 --type=static --size=${_bootfs_size} --name=rootfs_0 + + # update the rootfs_0 contents + local _kern_ubivol=$( nand_find_volume "ubi0" "rootfs_0" ) + ubiupdatevol /dev/${_kern_ubivol} sysupgrade-dna_valokuitu-plus-ex400/kernel + + fw_setenv root_vol rootfs_0 + fw_setenv boot_cnt_primary 0 + fw_setenv boot_cnt_alt 0 + + # proceed to upgrade the default way + CI_KERNPART=none + nand_do_upgrade "$1" +} diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index bad7e30ca65ebf..f0d41b09140515 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -150,6 +150,9 @@ platform_do_upgrade() { buffalo,wsr-2533dhpls) buffalo_do_upgrade "$1" ;; + dna,valokuitu-plus-ex400) + dna_do_upgrade "$1" + ;; elecom,wrc-x1800gs) [ "$(fw_printenv -n bootmenu_delay)" != "0" ] || \ fw_setenv bootmenu_delay 3 From 395afc4c581ee8c06110774e3b769fbcd2d543d2 Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Thu, 15 Aug 2024 21:47:25 +0300 Subject: [PATCH 11/15] hostapd: update to 2.11 release tag Release 2.11 has been quite a few new features and fixes since the 2.10 release. The following ChangeLog entries highlight some of the main changes: * Wi-Fi Easy Connect - add support for DPP release 3 - allow Configurator parameters to be provided during config exchange * HE/IEEE 802.11ax/Wi-Fi 6 - various fixes * EHT/IEEE 802.11be/Wi-Fi 7 - add preliminary support * SAE: add support for fetching the password from a RADIUS server * support OpenSSL 3.0 API changes * support background radar detection and CAC with some additional drivers * support RADIUS ACL/PSK check during 4-way handshake (wpa_psk_radius=3) * EAP-SIM/AKA: support IMSI privacy * improve 4-way handshake operations - use Secure=1 in message 3 during PTK rekeying ...and many more Remove upstreamed patches: 023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch 030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch 040-mesh-allow-processing-authentication-frames-in-block.patch 181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch 182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch 183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch 210-build-de-duplicate-_DIRS-before-calling-mkdir.patch 253-qos_map_set_without_interworking.patch 751-qos_map_ignore_when_unsupported.patch 800-SAE-Check-for-invalid-Rejected-Groups-element-length.patch 801-SAE-Check-for-invalid-Rejected-Groups-element-length.patch 802-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch Other patches has been updated. Signed-off-by: Ivan Pavlov Link: https://github.com/openwrt/openwrt/pull/16338 Signed-off-by: Robert Marko --- package/network/services/hostapd/Makefile | 8 +- ...hannels-to-be-selected-if-dfs-is-ena.patch | 24 +- ...erministic-channel-on-channel-switch.patch | 8 +- ...ix-sta-add-after-previous-connection.patch | 4 +- ...-dl_list_del-before-freeing-ipv6-add.patch | 19 -- ...ewrite-neigh-code-to-not-depend-on-l.patch | 275 ------------------ ...ssing-authentication-frames-in-block.patch | 34 --- .../patches/050-Fix-OpenWrt-13156.patch | 6 +- ...-extra-ies-only-if-allowed-by-driver.patch | 4 +- ...ull-pointer-check-in-hostapd_free_ha.patch | 2 +- ...crash-when-adding-an-interface-fails.patch | 2 +- ...edtls-TLS-crypto-option-initial-port.patch | 22 +- .../patches/120-mbedtls-fips186_2_prf.patch | 2 +- ...efile-make-run-tests-with-CONFIG_TLS.patch | 22 +- ...tapd-update-cfs0-and-cfs1-for-160MHz.patch | 2 +- ...pdate-drv-ifindex-on-removing-the-fi.patch | 18 -- ...0211_put_freq_params-call-outside-of.patch | 34 --- ...hannel_list_update_timeout-in-hostap.patch | 28 -- .../hostapd/patches/200-multicall.patch | 56 ++-- .../patches/201-lto-jobserver-support.patch | 6 +- ...duplicate-_DIRS-before-calling-mkdir.patch | 23 -- ..._AP-functions-dependant-on-CONFIG_AP.patch | 4 +- .../patches/220-indicate-features.patch | 4 +- .../patches/250-hostapd_cli_ifdef.patch | 4 +- .../patches/252-disable_ctrl_iface_mib.patch | 32 +- ...253-qos_map_set_without_interworking.patch | 103 ------- .../services/hostapd/patches/300-noscan.patch | 6 +- .../hostapd/patches/301-mesh-noscan.patch | 12 +- .../patches/310-rescan_immediately.patch | 2 +- .../patches/330-nl80211_fix_set_freq.patch | 2 +- .../patches/350-nl80211_del_beacon_bss.patch | 26 +- ...dd-new-config-params-to-be-used-with.patch | 4 +- .../patches/463-add-mcast_rate-to-11s.patch | 6 +- .../patches/464-fix-mesh-obss-check.patch | 2 +- ...tapd-config-support-random-BSS-color.patch | 2 +- .../patches/470-survey_data_fallback.patch | 4 +- .../patches/590-rrm-wnm-statistics.patch | 6 +- .../hostapd/patches/600-ubus_support.patch | 83 +++--- .../hostapd/patches/601-ucode_support.patch | 76 ++--- .../patches/701-reload_config_inline.patch | 2 +- .../hostapd/patches/710-vlan_no_bridge.patch | 2 +- .../patches/711-wds_bridge_force.patch | 2 +- .../patches/720-iface_max_num_sta.patch | 8 +- .../hostapd/patches/730-ft_iface.patch | 4 +- .../hostapd/patches/740-snoop_iface.patch | 8 +- .../751-qos_map_ignore_when_unsupported.patch | 19 -- .../hostapd/patches/760-dynamic_own_ip.patch | 6 +- .../hostapd/patches/761-shared_das_port.patch | 28 +- ...probe-requests-with-invalid-DSSS-par.patch | 7 +- .../hostapd/patches/770-radius_server.patch | 8 +- ...ment-APuP-Access-Point-Micro-Peering.patch | 51 +--- ...us-notification-when-a-peer-comes-up.patch | 15 +- ...-ucode-hook-for-when-a-peer-comes-up.patch | 15 +- ...valid-Rejected-Groups-element-length.patch | 43 --- ...valid-Rejected-Groups-element-length.patch | 42 --- ...id-Rejected-Groups-element-in-the-pa.patch | 30 -- 56 files changed, 262 insertions(+), 1005 deletions(-) delete mode 100644 package/network/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch delete mode 100644 package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch delete mode 100644 package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch delete mode 100644 package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch delete mode 100644 package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch delete mode 100644 package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch delete mode 100644 package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch delete mode 100644 package/network/services/hostapd/patches/253-qos_map_set_without_interworking.patch delete mode 100644 package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch delete mode 100644 package/network/services/hostapd/patches/800-SAE-Check-for-invalid-Rejected-Groups-element-length.patch delete mode 100644 package/network/services/hostapd/patches/801-SAE-Check-for-invalid-Rejected-Groups-element-length.patch delete mode 100644 package/network/services/hostapd/patches/802-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 01a17291681cd5..c3667303367ae4 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=4 +PKG_RELEASE:=1 PKG_SOURCE_URL:=https://w1.fi/hostap.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2024-03-09 -PKG_SOURCE_VERSION:=695277a5b3da08b9a8a4e7117b933deb8b4950a7 -PKG_MIRROR_HASH:=57b8e64d24707e37e0df3359cee15dd5184b824b8622568833a5b8a0cae163ae +PKG_SOURCE_DATE:=2024-07-20 +PKG_SOURCE_VERSION:=d945ddd368085f255e68328f2d3b020ceea359af +PKG_MIRROR_HASH:=647508a242f2969d8a815edb69d47b107f10d2415604e44b0451c48875ae46bd PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch index 4291f015180c53..cbb91ddeabfdab 100644 --- a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch +++ b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch @@ -14,7 +14,7 @@ Signed-off-by: Peter Oh --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2698,7 +2698,7 @@ static int drv_supports_vht(struct wpa_s +@@ -2809,7 +2809,7 @@ static int drv_supports_vht(struct wpa_s } @@ -23,7 +23,7 @@ Signed-off-by: Peter Oh { int i; -@@ -2707,7 +2707,10 @@ static bool ibss_mesh_is_80mhz_avail(int +@@ -2818,7 +2818,10 @@ static bool ibss_mesh_is_80mhz_avail(int chan = hw_get_channel_chan(mode, i, NULL); if (!chan || @@ -35,7 +35,7 @@ Signed-off-by: Peter Oh return false; } -@@ -2834,7 +2837,7 @@ static void ibss_mesh_select_40mhz(struc +@@ -2945,7 +2948,7 @@ static void ibss_mesh_select_40mhz(struc const struct wpa_ssid *ssid, struct hostapd_hw_modes *mode, struct hostapd_freq_params *freq, @@ -44,7 +44,7 @@ Signed-off-by: Peter Oh int chan_idx; struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL; int i, res; -@@ -2858,8 +2861,11 @@ static void ibss_mesh_select_40mhz(struc +@@ -2969,8 +2972,11 @@ static void ibss_mesh_select_40mhz(struc return; /* Check primary channel flags */ @@ -57,7 +57,7 @@ Signed-off-by: Peter Oh #ifdef CONFIG_HT_OVERRIDES if (ssid->disable_ht40) -@@ -2885,8 +2891,11 @@ static void ibss_mesh_select_40mhz(struc +@@ -2996,8 +3002,11 @@ static void ibss_mesh_select_40mhz(struc return; /* Check secondary channel flags */ @@ -70,7 +70,7 @@ Signed-off-by: Peter Oh if (ht40 == -1) { if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS)) -@@ -2940,7 +2949,7 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3052,7 +3061,7 @@ static bool ibss_mesh_select_80_160mhz(s const struct wpa_ssid *ssid, struct hostapd_hw_modes *mode, struct hostapd_freq_params *freq, @@ -79,7 +79,7 @@ Signed-off-by: Peter Oh static const int bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5825, 5955, 6035, 6115, 6195, 6275, 6355, 6435, -@@ -2985,7 +2994,7 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3097,7 +3106,7 @@ static bool ibss_mesh_select_80_160mhz(s goto skip_80mhz; /* Use 40 MHz if channel not usable */ @@ -88,7 +88,7 @@ Signed-off-by: Peter Oh goto skip_80mhz; chwidth = CONF_OPER_CHWIDTH_80MHZ; -@@ -2999,7 +3008,7 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3111,7 +3120,7 @@ static bool ibss_mesh_select_80_160mhz(s if ((mode->he_capab[ieee80211_mode].phy_cap[ HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] & HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz && @@ -97,7 +97,7 @@ Signed-off-by: Peter Oh for (j = 0; j < ARRAY_SIZE(bw160); j++) { if (freq->freq == bw160[j]) { chwidth = CONF_OPER_CHWIDTH_160MHZ; -@@ -3027,10 +3036,12 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3139,10 +3148,12 @@ static bool ibss_mesh_select_80_160mhz(s if (!chan) continue; @@ -113,15 +113,15 @@ Signed-off-by: Peter Oh /* Found a suitable second segment for 80+80 */ chwidth = CONF_OPER_CHWIDTH_80P80MHZ; -@@ -3085,6 +3096,7 @@ void ibss_mesh_setup_freq(struct wpa_sup - int i, obss_scan = 1; +@@ -3197,6 +3208,7 @@ void ibss_mesh_setup_freq(struct wpa_sup + int obss_scan = 1; u8 channel; bool is_6ghz, is_24ghz; + bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR); freq->freq = ssid->frequency; -@@ -3133,9 +3145,9 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3239,9 +3251,9 @@ void ibss_mesh_setup_freq(struct wpa_sup freq->channel = channel; /* Setup higher BW only for 5 GHz */ if (mode->mode == HOSTAPD_MODE_IEEE80211A) { diff --git a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch index a53fcc480c6586..f22841c63ba66b 100644 --- a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch +++ b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch @@ -21,7 +21,7 @@ Signed-off-by: Markus Theil --- a/src/ap/dfs.c +++ b/src/ap/dfs.c -@@ -17,6 +17,7 @@ +@@ -18,6 +18,7 @@ #include "ap_drv_ops.h" #include "drivers/driver.h" #include "dfs.h" @@ -29,7 +29,7 @@ Signed-off-by: Markus Theil enum dfs_channel_type { -@@ -526,9 +527,14 @@ dfs_get_valid_channel(struct hostapd_ifa +@@ -527,9 +528,14 @@ dfs_get_valid_channel(struct hostapd_ifa int num_available_chandefs; int chan_idx, chan_idx2; int sec_chan_idx_80p80 = -1; @@ -44,7 +44,7 @@ Signed-off-by: Markus Theil wpa_printf(MSG_DEBUG, "DFS: Selecting random channel"); *secondary_channel = 0; *oper_centr_freq_seg0_idx = 0; -@@ -548,8 +554,20 @@ dfs_get_valid_channel(struct hostapd_ifa +@@ -549,8 +555,20 @@ dfs_get_valid_channel(struct hostapd_ifa if (num_available_chandefs == 0) return NULL; @@ -68,7 +68,7 @@ Signed-off-by: Markus Theil chan_idx, num_available_chandefs); --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -11195,6 +11195,10 @@ static int nl80211_switch_channel(void * +@@ -11306,6 +11306,10 @@ static int nl80211_switch_channel(void * if (ret) goto error; diff --git a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch index a4a90933b17d61..a39f03c0f1e4a7 100644 --- a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch +++ b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch @@ -4,7 +4,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -4659,6 +4659,13 @@ static int add_associated_sta(struct hos +@@ -4756,6 +4756,13 @@ static int add_associated_sta(struct hos * drivers to accept the STA parameter configuration. Since this is * after a new FT-over-DS exchange, a new TK has been derived, so key * reinstallation is not a concern for this case. @@ -18,7 +18,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc */ wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)", -@@ -4672,7 +4679,8 @@ static int add_associated_sta(struct hos +@@ -4769,7 +4776,8 @@ static int add_associated_sta(struct hos (!(sta->flags & WLAN_STA_AUTHORIZED) || (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) || (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) && diff --git a/package/network/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch b/package/network/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch deleted file mode 100644 index 9ff9b2398de79d..00000000000000 --- a/package/network/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Date: Wed, 28 Jul 2021 05:43:29 +0200 -Subject: [PATCH] ndisc_snoop: call dl_list_del before freeing ipv6 addresses - -Fixes a segmentation fault on sta disconnect - -Signed-off-by: Felix Fietkau ---- - ---- a/src/ap/ndisc_snoop.c -+++ b/src/ap/ndisc_snoop.c -@@ -61,6 +61,7 @@ void sta_ip6addr_del(struct hostapd_data - dl_list_for_each_safe(ip6addr, prev, &sta->ip6addr, struct ip6addr, - list) { - hostapd_drv_br_delete_ip_neigh(hapd, 6, (u8 *) &ip6addr->addr); -+ dl_list_del(&ip6addr->list); - os_free(ip6addr); - } - } diff --git a/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch b/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch deleted file mode 100644 index c5cf8b1b7985d4..00000000000000 --- a/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch +++ /dev/null @@ -1,275 +0,0 @@ -From: Felix Fietkau -Date: Wed, 28 Jul 2021 05:49:46 +0200 -Subject: [PATCH] driver_nl80211: rewrite neigh code to not depend on - libnl3-route - -Removes an unnecessary dependency and also makes the code smaller - -Signed-off-by: Felix Fietkau ---- - ---- a/src/drivers/driver_nl80211.c -+++ b/src/drivers/driver_nl80211.c -@@ -18,9 +18,6 @@ - #include - #include - #include --#ifdef CONFIG_LIBNL3_ROUTE --#include --#endif /* CONFIG_LIBNL3_ROUTE */ - #include - #include - #include -@@ -5859,26 +5856,29 @@ fail: - - static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr) - { --#ifdef CONFIG_LIBNL3_ROUTE - struct wpa_driver_nl80211_data *drv = bss->drv; -- struct rtnl_neigh *rn; -- struct nl_addr *nl_addr; -+ struct ndmsg nhdr = { -+ .ndm_state = NUD_PERMANENT, -+ .ndm_ifindex = bss->ifindex, -+ .ndm_family = AF_BRIDGE, -+ }; -+ struct nl_msg *msg; - int err; - -- rn = rtnl_neigh_alloc(); -- if (!rn) -+ msg = nlmsg_alloc_simple(RTM_DELNEIGH, NLM_F_CREATE); -+ if (!msg) - return; - -- rtnl_neigh_set_family(rn, AF_BRIDGE); -- rtnl_neigh_set_ifindex(rn, bss->ifindex); -- nl_addr = nl_addr_build(AF_BRIDGE, (void *) addr, ETH_ALEN); -- if (!nl_addr) { -- rtnl_neigh_put(rn); -- return; -- } -- rtnl_neigh_set_lladdr(rn, nl_addr); -+ if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0) -+ goto errout; -+ -+ if (nla_put(msg, NDA_LLADDR, ETH_ALEN, (void *)addr)) -+ goto errout; -+ -+ if (nl_send_auto_complete(drv->rtnl_sk, msg) < 0) -+ goto errout; - -- err = rtnl_neigh_delete(drv->rtnl_sk, rn, 0); -+ err = nl_wait_for_ack(drv->rtnl_sk); - if (err < 0) { - wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for " - MACSTR " ifindex=%d failed: %s", MAC2STR(addr), -@@ -5888,9 +5888,8 @@ static void rtnl_neigh_delete_fdb_entry( - MACSTR, MAC2STR(addr)); - } - -- nl_addr_put(nl_addr); -- rtnl_neigh_put(rn); --#endif /* CONFIG_LIBNL3_ROUTE */ -+errout: -+ nlmsg_free(msg); - } - - -@@ -8615,7 +8614,6 @@ static void *i802_init(struct hostapd_da - (params->num_bridge == 0 || !params->bridge[0])) - add_ifidx(drv, br_ifindex, drv->ifindex); - --#ifdef CONFIG_LIBNL3_ROUTE - if (bss->added_if_into_bridge || bss->already_in_bridge) { - int err; - -@@ -8632,7 +8630,6 @@ static void *i802_init(struct hostapd_da - goto failed; - } - } --#endif /* CONFIG_LIBNL3_ROUTE */ - - if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) { - wpa_printf(MSG_DEBUG, -@@ -12071,13 +12068,14 @@ static int wpa_driver_br_add_ip_neigh(vo - const u8 *ipaddr, int prefixlen, - const u8 *addr) - { --#ifdef CONFIG_LIBNL3_ROUTE - struct i802_bss *bss = priv; - struct wpa_driver_nl80211_data *drv = bss->drv; -- struct rtnl_neigh *rn; -- struct nl_addr *nl_ipaddr = NULL; -- struct nl_addr *nl_lladdr = NULL; -- int family, addrsize; -+ struct ndmsg nhdr = { -+ .ndm_state = NUD_PERMANENT, -+ .ndm_ifindex = bss->br_ifindex, -+ }; -+ struct nl_msg *msg; -+ int addrsize; - int res; - - if (!ipaddr || prefixlen == 0 || !addr) -@@ -12096,85 +12094,66 @@ static int wpa_driver_br_add_ip_neigh(vo - } - - if (version == 4) { -- family = AF_INET; -+ nhdr.ndm_family = AF_INET; - addrsize = 4; - } else if (version == 6) { -- family = AF_INET6; -+ nhdr.ndm_family = AF_INET6; - addrsize = 16; - } else { - return -EINVAL; - } - -- rn = rtnl_neigh_alloc(); -- if (rn == NULL) -+ msg = nlmsg_alloc_simple(RTM_NEWNEIGH, NLM_F_CREATE); -+ if (!msg) - return -ENOMEM; - -- /* set the destination ip address for neigh */ -- nl_ipaddr = nl_addr_build(family, (void *) ipaddr, addrsize); -- if (nl_ipaddr == NULL) { -- wpa_printf(MSG_DEBUG, "nl80211: nl_ipaddr build failed"); -- res = -ENOMEM; -+ res = -ENOMEM; -+ if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0) - goto errout; -- } -- nl_addr_set_prefixlen(nl_ipaddr, prefixlen); -- res = rtnl_neigh_set_dst(rn, nl_ipaddr); -- if (res) { -- wpa_printf(MSG_DEBUG, -- "nl80211: neigh set destination addr failed"); -+ -+ if (nla_put(msg, NDA_DST, addrsize, (void *)ipaddr)) - goto errout; -- } - -- /* set the corresponding lladdr for neigh */ -- nl_lladdr = nl_addr_build(AF_BRIDGE, (u8 *) addr, ETH_ALEN); -- if (nl_lladdr == NULL) { -- wpa_printf(MSG_DEBUG, "nl80211: neigh set lladdr failed"); -- res = -ENOMEM; -+ if (nla_put(msg, NDA_LLADDR, ETH_ALEN, (void *)addr)) - goto errout; -- } -- rtnl_neigh_set_lladdr(rn, nl_lladdr); - -- rtnl_neigh_set_ifindex(rn, bss->br_ifindex); -- rtnl_neigh_set_state(rn, NUD_PERMANENT); -+ res = nl_send_auto_complete(drv->rtnl_sk, msg); -+ if (res < 0) -+ goto errout; - -- res = rtnl_neigh_add(drv->rtnl_sk, rn, NLM_F_CREATE); -+ res = nl_wait_for_ack(drv->rtnl_sk); - if (res) { - wpa_printf(MSG_DEBUG, - "nl80211: Adding bridge ip neigh failed: %s", - nl_geterror(res)); - } - errout: -- if (nl_lladdr) -- nl_addr_put(nl_lladdr); -- if (nl_ipaddr) -- nl_addr_put(nl_ipaddr); -- if (rn) -- rtnl_neigh_put(rn); -+ nlmsg_free(msg); - return res; --#else /* CONFIG_LIBNL3_ROUTE */ -- return -1; --#endif /* CONFIG_LIBNL3_ROUTE */ - } - - - static int wpa_driver_br_delete_ip_neigh(void *priv, u8 version, - const u8 *ipaddr) - { --#ifdef CONFIG_LIBNL3_ROUTE - struct i802_bss *bss = priv; - struct wpa_driver_nl80211_data *drv = bss->drv; -- struct rtnl_neigh *rn; -- struct nl_addr *nl_ipaddr; -- int family, addrsize; -+ struct ndmsg nhdr = { -+ .ndm_state = NUD_PERMANENT, -+ .ndm_ifindex = bss->br_ifindex, -+ }; -+ struct nl_msg *msg; -+ int addrsize; - int res; - - if (!ipaddr) - return -EINVAL; - - if (version == 4) { -- family = AF_INET; -+ nhdr.ndm_family = AF_INET; - addrsize = 4; - } else if (version == 6) { -- family = AF_INET6; -+ nhdr.ndm_family = AF_INET6; - addrsize = 16; - } else { - return -EINVAL; -@@ -12192,41 +12171,30 @@ static int wpa_driver_br_delete_ip_neigh - return -1; - } - -- rn = rtnl_neigh_alloc(); -- if (rn == NULL) -+ msg = nlmsg_alloc_simple(RTM_DELNEIGH, NLM_F_CREATE); -+ if (!msg) - return -ENOMEM; - -- /* set the destination ip address for neigh */ -- nl_ipaddr = nl_addr_build(family, (void *) ipaddr, addrsize); -- if (nl_ipaddr == NULL) { -- wpa_printf(MSG_DEBUG, "nl80211: nl_ipaddr build failed"); -- res = -ENOMEM; -+ res = -ENOMEM; -+ if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0) - goto errout; -- } -- res = rtnl_neigh_set_dst(rn, nl_ipaddr); -- if (res) { -- wpa_printf(MSG_DEBUG, -- "nl80211: neigh set destination addr failed"); -+ -+ if (nla_put(msg, NDA_DST, addrsize, (void *)ipaddr)) - goto errout; -- } - -- rtnl_neigh_set_ifindex(rn, bss->br_ifindex); -+ res = nl_send_auto_complete(drv->rtnl_sk, msg); -+ if (res < 0) -+ goto errout; - -- res = rtnl_neigh_delete(drv->rtnl_sk, rn, 0); -+ res = nl_wait_for_ack(drv->rtnl_sk); - if (res) { - wpa_printf(MSG_DEBUG, - "nl80211: Deleting bridge ip neigh failed: %s", - nl_geterror(res)); - } - errout: -- if (nl_ipaddr) -- nl_addr_put(nl_ipaddr); -- if (rn) -- rtnl_neigh_put(rn); -+ nlmsg_free(msg); - return res; --#else /* CONFIG_LIBNL3_ROUTE */ -- return -1; --#endif /* CONFIG_LIBNL3_ROUTE */ - } - - diff --git a/package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch b/package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch deleted file mode 100644 index 636ec2d9c8b7c7..00000000000000 --- a/package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Felix Fietkau -Date: Mon, 18 Feb 2019 12:57:11 +0100 -Subject: [PATCH] mesh: allow processing authentication frames in blocked state - -If authentication fails repeatedly e.g. because of a weak signal, the link -can end up in blocked state. If one of the nodes tries to establish a link -again before it is unblocked on the other side, it will block the link to -that other side. The same happens on the other side when it unblocks the -link. In that scenario, the link never recovers on its own. - -To fix this, allow restarting authentication even if the link is in blocked -state, but don't initiate the attempt until the blocked period is over. - -Signed-off-by: Felix Fietkau ---- - ---- a/src/ap/ieee802_11.c -+++ b/src/ap/ieee802_11.c -@@ -3032,15 +3032,6 @@ static void handle_auth(struct hostapd_d - seq_ctrl); - return; - } --#ifdef CONFIG_MESH -- if ((hapd->conf->mesh & MESH_ENABLED) && -- sta->plink_state == PLINK_BLOCKED) { -- wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR -- " is blocked - drop Authentication frame", -- MAC2STR(sa)); -- return; -- } --#endif /* CONFIG_MESH */ - #ifdef CONFIG_PASN - if (auth_alg == WLAN_AUTH_PASN && - (sta->flags & WLAN_STA_ASSOC)) { diff --git a/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch b/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch index a044409d2d813a..0456ef20b1b850 100644 --- a/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch +++ b/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch @@ -20,7 +20,7 @@ Signed-off-by: Stijn Tintel --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -3646,6 +3646,8 @@ int hostapd_remove_iface(struct hapd_int +@@ -3993,6 +3993,8 @@ int hostapd_remove_iface(struct hapd_int void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta, int reassoc) { @@ -29,7 +29,7 @@ Signed-off-by: Stijn Tintel if (hapd->tkip_countermeasures) { hostapd_drv_sta_deauth(hapd, sta->addr, WLAN_REASON_MICHAEL_MIC_FAILURE); -@@ -3653,10 +3655,16 @@ void hostapd_new_assoc_sta(struct hostap +@@ -4000,10 +4002,16 @@ void hostapd_new_assoc_sta(struct hostap } #ifdef CONFIG_IEEE80211BE @@ -51,7 +51,7 @@ Signed-off-by: Stijn Tintel sta->post_csa_sa_query = 0; --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c -@@ -1412,9 +1412,6 @@ bool ap_sta_set_authorized_flag(struct h +@@ -1485,9 +1485,6 @@ bool ap_sta_set_authorized_flag(struct h mld_assoc_link_id = -2; } #endif /* CONFIG_IEEE80211BE */ diff --git a/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch index de4d4ad3c2461c..d3c261d077b3dd 100644 --- a/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch +++ b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch @@ -26,7 +26,7 @@ Signed-off-by: David Bauer --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -2340,6 +2340,9 @@ struct wpa_driver_capa { +@@ -2355,6 +2355,9 @@ struct wpa_driver_capa { /** Maximum number of iterations in a single scan plan */ u32 max_sched_scan_plan_iterations; @@ -38,7 +38,7 @@ Signed-off-by: David Bauer --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c -@@ -972,6 +972,10 @@ static int wiphy_info_handler(struct nl_ +@@ -976,6 +976,10 @@ static int wiphy_info_handler(struct nl_ nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]); } diff --git a/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch index 85d5127f600d2d..01a0fba600ef68 100644 --- a/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch +++ b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -502,7 +502,7 @@ void hostapd_free_hapd_data(struct hosta +@@ -485,7 +485,7 @@ void hostapd_free_hapd_data(struct hosta struct hapd_interfaces *ifaces = hapd->iface->interfaces; size_t i; diff --git a/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch b/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch index 1df2eff3875f92..028d3563c36567 100644 --- a/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch +++ b/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -3071,7 +3071,7 @@ static int wpa_driver_nl80211_del_beacon +@@ -3083,7 +3083,7 @@ static int wpa_driver_nl80211_del_beacon struct wpa_driver_nl80211_data *drv = bss->drv; struct i802_link *link = nl80211_get_link(bss, link_id); diff --git a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch index b55c0b1f8450a8..ca56b38f68693c 100644 --- a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch +++ b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch @@ -273,7 +273,7 @@ Signed-off-by: Glenn Strauss ifdef CONFIG_RADIUS_SERVER CFLAGS += -DRADIUS_SERVER -@@ -1341,7 +1426,9 @@ NOBJS += ../src/utils/trace.o +@@ -1342,7 +1427,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 ifdef CONFIG_INTERNAL_AES HOBJS += ../src/crypto/aes-internal.o HOBJS += ../src/crypto/aes-internal-enc.o -@@ -1364,13 +1451,17 @@ SOBJS += ../src/common/sae.o +@@ -1365,13 +1452,17 @@ SOBJS += ../src/common/sae.o SOBJS += ../src/common/sae_pk.o SOBJS += ../src/common/dragonfly.o SOBJS += $(AESOBJS) @@ -7765,7 +7765,7 @@ Signed-off-by: Glenn Strauss CONFIG_SIM_SIMULATOR=y --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1229,6 +1229,29 @@ endif +@@ -1230,6 +1230,29 @@ endif CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" endif @@ -7795,7 +7795,7 @@ Signed-off-by: Glenn Strauss ifeq ($(CONFIG_TLS), gnutls) ifndef CONFIG_CRYPTO # default to libgcrypt -@@ -1421,9 +1444,11 @@ endif +@@ -1422,9 +1445,11 @@ endif ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), wolfssl) @@ -7807,7 +7807,7 @@ Signed-off-by: Glenn Strauss ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP # Seems to be needed at least with BoringSSL NEED_INTERNAL_AES_WRAP=y -@@ -1437,9 +1462,11 @@ endif +@@ -1438,9 +1463,11 @@ endif ifdef NEED_INTERNAL_AES_WRAP ifneq ($(CONFIG_TLS), linux) @@ -7819,7 +7819,7 @@ Signed-off-by: Glenn Strauss ifdef NEED_AES_EAX AESOBJS += ../src/crypto/aes-eax.o NEED_AES_CTR=y -@@ -1449,35 +1476,45 @@ AESOBJS += ../src/crypto/aes-siv.o +@@ -1450,35 +1477,45 @@ AESOBJS += ../src/crypto/aes-siv.o NEED_AES_CTR=y endif ifdef NEED_AES_CTR @@ -7865,7 +7865,7 @@ Signed-off-by: Glenn Strauss ifdef NEED_AES_ENC ifdef CONFIG_INTERNAL_AES AESOBJS += ../src/crypto/aes-internal-enc.o -@@ -1492,12 +1529,16 @@ ifneq ($(CONFIG_TLS), openssl) +@@ -1493,12 +1530,16 @@ ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) ifneq ($(CONFIG_TLS), gnutls) ifneq ($(CONFIG_TLS), wolfssl) @@ -7882,7 +7882,7 @@ Signed-off-by: Glenn Strauss ifdef CONFIG_INTERNAL_SHA1 SHA1OBJS += ../src/crypto/sha1-internal.o ifdef NEED_FIPS186_2_PRF -@@ -1509,29 +1550,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2 +@@ -1510,29 +1551,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2 else ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), wolfssl) @@ -7920,7 +7920,7 @@ Signed-off-by: Glenn Strauss ifdef NEED_MD5 ifdef CONFIG_INTERNAL_MD5 MD5OBJS += ../src/crypto/md5-internal.o -@@ -1586,12 +1635,17 @@ ifneq ($(CONFIG_TLS), openssl) +@@ -1587,12 +1636,17 @@ ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), linux) ifneq ($(CONFIG_TLS), gnutls) ifneq ($(CONFIG_TLS), wolfssl) @@ -7938,7 +7938,7 @@ Signed-off-by: Glenn Strauss ifdef CONFIG_INTERNAL_SHA256 SHA256OBJS += ../src/crypto/sha256-internal.o endif -@@ -1604,50 +1658,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512 +@@ -1605,50 +1659,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512 SHA256OBJS += ../src/crypto/sha512-internal.o endif ifdef NEED_TLS_PRF_SHA256 @@ -8007,7 +8007,7 @@ Signed-off-by: Glenn Strauss ifdef NEED_ASN1 OBJS += ../src/tls/asn1.o -@@ -1822,10 +1894,12 @@ ifdef CONFIG_FIPS +@@ -1823,10 +1895,12 @@ ifdef CONFIG_FIPS CFLAGS += -DCONFIG_FIPS ifneq ($(CONFIG_TLS), openssl) ifneq ($(CONFIG_TLS), wolfssl) diff --git a/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch b/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch index c101fbf75ff1c8..ebb7b51be6e563 100644 --- a/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch +++ b/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch @@ -101,7 +101,7 @@ Signed-off-by: Glenn Strauss --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1240,10 +1240,6 @@ endif +@@ -1241,10 +1241,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 diff --git a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch index 32e8ec3a89a034..fd6055d2911c88 100644 --- a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch +++ b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch @@ -696,7 +696,7 @@ Signed-off-by: Glenn Strauss + if tls.startswith("mbed TLS"): + raise HwsimSkip("TLS v1.3 not supported") ok = ['run=OpenSSL 1.1.1', 'run=OpenSSL 3.0', 'run=OpenSSL 3.1', - 'run=OpenSSL 3.2', 'wolfSSL'] + 'run=OpenSSL 3.2', 'run=OpenSSL 3.3', 'wolfSSL'] for s in ok: @@ -122,11 +161,15 @@ def check_pkcs12_support(dev): # raise HwsimSkip("PKCS#12 not supported with this TLS library: " + tls) @@ -935,7 +935,7 @@ Signed-off-by: Glenn Strauss --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py -@@ -2486,11 +2486,11 @@ def test_ap_ft_ap_oom5(dev, apdev): +@@ -2494,11 +2494,11 @@ def test_ap_ft_ap_oom5(dev, apdev): # This will fail to roam dev[0].roam(bssid1, check_bssid=False) @@ -1079,7 +1079,7 @@ Signed-off-by: Glenn Strauss dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS", --- a/tests/hwsim/test_fils.py +++ b/tests/hwsim/test_fils.py -@@ -1472,6 +1472,10 @@ def check_ec_group(dev, group): +@@ -1477,6 +1477,10 @@ def check_ec_group(dev, group): tls = dev.request("GET tls_library") if tls.startswith("wolfSSL"): return @@ -1124,7 +1124,7 @@ Signed-off-by: Glenn Strauss heavy_groups = [14, 15, 16] suitable_groups = [15, 16, 17, 18, 19, 20, 21] groups = [str(g) for g in sae_groups] -@@ -2194,6 +2199,8 @@ def run_sae_pwe_group(dev, apdev, group) +@@ -2232,6 +2237,8 @@ def run_sae_pwe_group(dev, apdev, group) logger.info("Add Brainpool EC groups since OpenSSL is new enough") elif tls.startswith("wolfSSL"): logger.info("Make sure Brainpool EC groups were enabled when compiling wolfSSL") @@ -1154,7 +1154,7 @@ Signed-off-by: Glenn Strauss ca_cert="auth_serv/rsa3072-ca.pem", --- a/tests/hwsim/test_wpas_ctrl.py +++ b/tests/hwsim/test_wpas_ctrl.py -@@ -1842,7 +1842,7 @@ def _test_wpas_ctrl_oom(dev): +@@ -1856,7 +1856,7 @@ def _test_wpas_ctrl_oom(dev): tls = dev[0].request("GET tls_library") if not tls.startswith("internal"): tests.append(('NFC_GET_HANDOVER_SEL NDEF P2P-CR-TAG', 'FAIL', @@ -1294,7 +1294,7 @@ Signed-off-by: Glenn Strauss if (need_more_data) { --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1188,6 +1188,7 @@ TLS_FUNCS=y +@@ -1189,6 +1189,7 @@ TLS_FUNCS=y endif ifeq ($(CONFIG_TLS), wolfssl) @@ -1302,7 +1302,7 @@ Signed-off-by: Glenn Strauss ifdef TLS_FUNCS CFLAGS += -DWOLFSSL_DER_LOAD OBJS += ../src/crypto/tls_wolfssl.o -@@ -1203,6 +1204,7 @@ LIBS_p += -lwolfssl -lm +@@ -1204,6 +1205,7 @@ LIBS_p += -lwolfssl -lm endif ifeq ($(CONFIG_TLS), openssl) @@ -1310,7 +1310,7 @@ Signed-off-by: Glenn Strauss CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 ifdef TLS_FUNCS CFLAGS += -DEAP_TLS_OPENSSL -@@ -1230,6 +1232,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF +@@ -1231,6 +1233,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF endif ifeq ($(CONFIG_TLS), mbedtls) @@ -1318,7 +1318,7 @@ Signed-off-by: Glenn Strauss ifndef CONFIG_CRYPTO CONFIG_CRYPTO=mbedtls endif -@@ -1249,6 +1252,7 @@ endif +@@ -1250,6 +1253,7 @@ endif endif ifeq ($(CONFIG_TLS), gnutls) @@ -1326,7 +1326,7 @@ Signed-off-by: Glenn Strauss ifndef CONFIG_CRYPTO # default to libgcrypt CONFIG_CRYPTO=gnutls -@@ -1279,6 +1283,7 @@ endif +@@ -1280,6 +1284,7 @@ endif endif ifeq ($(CONFIG_TLS), internal) @@ -1334,7 +1334,7 @@ Signed-off-by: Glenn Strauss ifndef CONFIG_CRYPTO CONFIG_CRYPTO=internal endif -@@ -1359,6 +1364,7 @@ endif +@@ -1360,6 +1365,7 @@ endif endif ifeq ($(CONFIG_TLS), linux) diff --git a/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch b/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch index 96f674a77d516f..0f7b8ef7f78b96 100644 --- a/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch +++ b/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch @@ -130,7 +130,7 @@ Signed-off-by: P Praneesh #undef VHT_CAP_CHECK_MAX --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h -@@ -1397,6 +1397,8 @@ struct ieee80211_ampe_ie { +@@ -1398,6 +1398,8 @@ struct ieee80211_ampe_ie { #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB ((u32) BIT(26) | BIT(27)) #define VHT_CAP_RX_ANTENNA_PATTERN ((u32) BIT(28)) #define VHT_CAP_TX_ANTENNA_PATTERN ((u32) BIT(29)) diff --git a/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch b/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch deleted file mode 100644 index b54abecc4f7768..00000000000000 --- a/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Felix Fietkau -Date: Thu, 14 Sep 2023 11:28:03 +0200 -Subject: [PATCH] driver_nl80211: update drv->ifindex on removing the first - BSS - -Signed-off-by: Felix Fietkau ---- - ---- a/src/drivers/driver_nl80211.c -+++ b/src/drivers/driver_nl80211.c -@@ -8985,6 +8985,7 @@ static int wpa_driver_nl80211_if_remove( - if (drv->first_bss->next) { - drv->first_bss = drv->first_bss->next; - drv->ctx = drv->first_bss->ctx; -+ drv->ifindex = drv->first_bss->ifindex; - os_free(bss); - } else { - wpa_printf(MSG_DEBUG, "nl80211: No second BSS to reassign context to"); diff --git a/package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch b/package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch deleted file mode 100644 index e875a82aea778d..00000000000000 --- a/package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Felix Fietkau -Date: Mon, 18 Sep 2023 16:47:41 +0200 -Subject: [PATCH] nl80211: move nl80211_put_freq_params call outside of - 802.11ax #ifdef - -The relevance of this call is not specific to 802.11ax, so it should be done -even with CONFIG_IEEE80211AX disabled. - -Fixes: b3921db426ea ("nl80211: Add frequency info in start AP command") -Signed-off-by: Felix Fietkau ---- - ---- a/src/drivers/driver_nl80211.c -+++ b/src/drivers/driver_nl80211.c -@@ -5315,6 +5315,9 @@ static int wpa_driver_nl80211_set_ap(voi - nla_nest_end(msg, ftm); - } - -+ if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0) -+ goto fail; -+ - #ifdef CONFIG_IEEE80211AX - if (params->he_spr_ctrl) { - struct nlattr *spr; -@@ -5349,9 +5352,6 @@ static int wpa_driver_nl80211_set_ap(voi - nla_nest_end(msg, spr); - } - -- if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0) -- goto fail; -- - if (params->freq && params->freq->he_enabled && - nl80211_attr_supported(drv, NL80211_ATTR_HE_BSS_COLOR)) { - struct nlattr *bss_color; diff --git a/package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch b/package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch deleted file mode 100644 index 4d1af1f5c0c6f5..00000000000000 --- a/package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Felix Fietkau -Date: Wed, 20 Sep 2023 13:41:10 +0200 -Subject: [PATCH] hostapd: cancel channel_list_update_timeout in - hostapd_cleanup_iface_partial - -Fixes a crash when disabling an interface during channel list update - -Signed-off-by: Felix Fietkau ---- - ---- a/src/ap/hostapd.c -+++ b/src/ap/hostapd.c -@@ -656,6 +656,7 @@ static void sta_track_deinit(struct host - void hostapd_cleanup_iface_partial(struct hostapd_iface *iface) - { - wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface); -+ eloop_cancel_timeout(channel_list_update_timeout, iface, NULL); - #ifdef NEED_AP_MLME - hostapd_stop_setup_timers(iface); - #endif /* NEED_AP_MLME */ -@@ -685,7 +686,6 @@ void hostapd_cleanup_iface_partial(struc - static void hostapd_cleanup_iface(struct hostapd_iface *iface) - { - wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface); -- eloop_cancel_timeout(channel_list_update_timeout, iface, NULL); - eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface, - NULL); - diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 1a193b51bb1e19..8bb3d8de6cf9b5 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -15,7 +15,7 @@ This allows building both hostapd and wpa_supplicant as a single binary include ../src/build.rules ifdef LIBS -@@ -199,7 +200,8 @@ endif +@@ -200,7 +201,8 @@ endif ifdef CONFIG_NO_VLAN CFLAGS += -DCONFIG_NO_VLAN @@ -25,7 +25,7 @@ This allows building both hostapd and wpa_supplicant as a single binary OBJS += ../src/ap/vlan_init.o OBJS += ../src/ap/vlan_ifconfig.o OBJS += ../src/ap/vlan.o -@@ -358,10 +360,14 @@ CFLAGS += -DCONFIG_MBO +@@ -359,10 +361,14 @@ CFLAGS += -DCONFIG_MBO OBJS += ../src/ap/mbo_ap.o endif @@ -43,7 +43,7 @@ This allows building both hostapd and wpa_supplicant as a single binary LIBS += $(DRV_AP_LIBS) ifdef CONFIG_L2_PACKET -@@ -1392,6 +1398,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR) +@@ -1393,6 +1399,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 " $@ -@@ -1472,6 +1484,12 @@ include ../src/objs.mk +@@ -1473,6 +1485,12 @@ include ../src/objs.mk _OBJS_VAR := SOBJS include ../src/objs.mk @@ -71,7 +71,7 @@ This allows building both hostapd and wpa_supplicant as a single binary @$(E) " LD " $@ --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -705,6 +705,11 @@ fail: +@@ -692,6 +692,11 @@ fail: return -1; } @@ -83,7 +83,7 @@ This allows building both hostapd and wpa_supplicant as a single binary #ifdef CONFIG_WPS static int gen_uuid(const char *txt_addr) -@@ -798,6 +803,8 @@ int main(int argc, char *argv[]) +@@ -808,6 +813,8 @@ int main(int argc, char *argv[]) return -1; #endif /* CONFIG_DPP */ @@ -94,8 +94,8 @@ 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 -@@ -2341,8 +2341,8 @@ err: - #endif /* CONFIG_OWE */ +@@ -2409,8 +2409,8 @@ static void hostapd_event_color_change(s + #endif /* CONFIG_IEEE80211AX */ -void wpa_supplicant_event(void *ctx, enum wpa_event_type event, @@ -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; -@@ -2674,7 +2674,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -2769,7 +2769,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 -@@ -6763,8 +6763,8 @@ union wpa_event_data { +@@ -6847,8 +6847,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 -@@ -6776,7 +6776,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -6860,7 +6860,7 @@ void wpa_supplicant_event(void *ctx, enu * Same as wpa_supplicant_event(), but we search for the interface in * wpa_global. */ @@ -159,7 +159,7 @@ This allows building both hostapd and wpa_supplicant as a single binary include ../src/build.rules ifdef CONFIG_BUILD_PASN_SO -@@ -388,7 +389,9 @@ endif +@@ -389,7 +390,9 @@ endif ifdef CONFIG_IBSS_RSN NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_IBSS_RSN @@ -169,7 +169,7 @@ This allows building both hostapd and wpa_supplicant as a single binary OBJS += ibss_rsn.o endif -@@ -980,6 +983,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS +@@ -981,6 +984,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS LIBS += -ldl -rdynamic endif @@ -180,7 +180,7 @@ This allows building both hostapd and wpa_supplicant as a single binary endif ifdef CONFIG_AP -@@ -987,9 +994,11 @@ NEED_EAP_COMMON=y +@@ -988,9 +995,11 @@ NEED_EAP_COMMON=y NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_AP OBJS += ap.o @@ -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 -@@ -1080,6 +1089,12 @@ endif +@@ -1081,6 +1090,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 -@@ -1089,7 +1104,9 @@ NEED_GAS=y +@@ -1090,7 +1105,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 -@@ -2079,6 +2096,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) +@@ -2080,6 +2097,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 " $@ -@@ -2211,6 +2234,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK) +@@ -2212,6 +2235,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK) $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ @$(E) " sed" $< @@ -256,7 +256,7 @@ This allows building both hostapd and wpa_supplicant as a single binary const struct wpa_driver_ops *const wpa_drivers[] = { NULL }; -@@ -1325,6 +1330,10 @@ static void usage(void) +@@ -1328,6 +1333,10 @@ static void usage(void) "option several times.\n"); } @@ -267,7 +267,7 @@ This allows building both hostapd and wpa_supplicant as a single binary int main(int argc, char *argv[]) { -@@ -1348,6 +1357,8 @@ int main(int argc, char *argv[]) +@@ -1351,6 +1360,8 @@ int main(int argc, char *argv[]) if (os_program_init()) return -1; @@ -278,7 +278,7 @@ This allows building both hostapd and wpa_supplicant as a single binary os_memset(&eapol_test, 0, sizeof(eapol_test)); --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -5919,8 +5919,8 @@ static void wpas_link_reconfig(struct wp +@@ -5979,8 +5979,8 @@ static void wpas_link_reconfig(struct wp } @@ -289,7 +289,7 @@ This allows building both hostapd and wpa_supplicant as a single binary { struct wpa_supplicant *wpa_s = ctx; int resched; -@@ -6872,7 +6872,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -6932,7 +6932,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -300,7 +300,7 @@ This allows building both hostapd and wpa_supplicant as a single binary struct wpa_supplicant *wpa_s; --- a/wpa_supplicant/wpa_priv.c +++ b/wpa_supplicant/wpa_priv.c -@@ -1039,8 +1039,8 @@ static void wpa_priv_send_ft_response(st +@@ -1042,8 +1042,8 @@ static void wpa_priv_send_ft_response(st } @@ -311,7 +311,7 @@ This allows building both hostapd and wpa_supplicant as a single binary { struct wpa_priv_interface *iface = ctx; -@@ -1103,7 +1103,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -1106,7 +1106,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -320,7 +320,7 @@ This allows building both hostapd and wpa_supplicant as a single binary union wpa_event_data *data) { struct wpa_priv_global *global = ctx; -@@ -1217,6 +1217,8 @@ int main(int argc, char *argv[]) +@@ -1220,6 +1220,8 @@ int main(int argc, char *argv[]) if (os_program_init()) return -1; @@ -331,7 +331,7 @@ This allows building both hostapd and wpa_supplicant as a single binary os_memset(&global, 0, sizeof(global)); --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -7583,7 +7583,6 @@ struct wpa_interface * wpa_supplicant_ma +@@ -7714,7 +7714,6 @@ struct wpa_interface * wpa_supplicant_ma return NULL; } @@ -339,7 +339,7 @@ This allows building both hostapd and wpa_supplicant as a single binary /** * wpa_supplicant_match_existing - Match existing interfaces * @global: Pointer to global data from wpa_supplicant_init() -@@ -7618,6 +7617,11 @@ static int wpa_supplicant_match_existing +@@ -7749,6 +7748,11 @@ static int wpa_supplicant_match_existing #endif /* CONFIG_MATCH_IFACE */ @@ -351,7 +351,7 @@ This allows building both hostapd and wpa_supplicant as a single binary /** * wpa_supplicant_add_iface - Add a new network interface -@@ -7874,6 +7878,8 @@ struct wpa_global * wpa_supplicant_init( +@@ -8005,6 +8009,8 @@ struct wpa_global * wpa_supplicant_init( #ifndef CONFIG_NO_WPA_MSG wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ diff --git a/package/network/services/hostapd/patches/201-lto-jobserver-support.patch b/package/network/services/hostapd/patches/201-lto-jobserver-support.patch index ea0dc290813790..7473cbef968893 100644 --- a/package/network/services/hostapd/patches/201-lto-jobserver-support.patch +++ b/package/network/services/hostapd/patches/201-lto-jobserver-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -1405,7 +1405,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS) +@@ -1406,7 +1406,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 -@@ -1416,7 +1416,7 @@ _OBJS_VAR := OBJS_c +@@ -1417,7 +1417,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 -@@ -2103,31 +2103,31 @@ wpa_supplicant_multi.a: .config $(BCHECK +@@ -2104,31 +2104,31 @@ wpa_supplicant_multi.a: .config $(BCHECK @$(AR) cr $@ wpa_supplicant_multi.o $(OBJS) wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) diff --git a/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch b/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch deleted file mode 100644 index 08d4393c906d0e..00000000000000 --- a/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Felix Fietkau -Date: Thu, 4 Apr 2024 12:59:41 +0200 -Subject: [PATCH] build: de-duplicate _DIRS before calling mkdir - -If the build path is long, the contents of the _DIRS variable can be very long, -since it repeats the same directories very often. -In some cases, this has triggered an "Argument list too long" build error. - -Suggested-by: Eneas U de Queiroz -Signed-off-by: Felix Fietkau ---- - ---- a/src/build.rules -+++ b/src/build.rules -@@ -80,7 +80,7 @@ endif - _DIRS := $(BUILDDIR)/$(PROJ) - .PHONY: _make_dirs - _make_dirs: -- @mkdir -p $(_DIRS) -+ @mkdir -p $(sort $(_DIRS)) - - $(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs - $(Q)$(CC) -c -o $@ $(CFLAGS) $< diff --git a/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch index 84fdea8c785231..475a50b87e5420 100644 --- a/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch +++ b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch @@ -13,7 +13,7 @@ Signed-off-by: David Bauer --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c -@@ -13214,7 +13214,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13233,7 +13233,7 @@ char * wpa_supplicant_ctrl_iface_process if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18)) reply_len = -1; #endif /* CONFIG_WNM */ @@ -22,7 +22,7 @@ Signed-off-by: David Bauer } else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) { if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18)) reply_len = -1; -@@ -13224,7 +13224,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13243,7 +13243,7 @@ char * wpa_supplicant_ctrl_iface_process } else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) { if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11)) reply_len = -1; diff --git a/package/network/services/hostapd/patches/220-indicate-features.patch b/package/network/services/hostapd/patches/220-indicate-features.patch index 006a567c338c9d..ab0af9593e3324 100644 --- a/package/network/services/hostapd/patches/220-indicate-features.patch +++ b/package/network/services/hostapd/patches/220-indicate-features.patch @@ -15,7 +15,7 @@ Subject: [PATCH] hostapd: support optional argument for the -v switch of struct hapd_global { void **drv_priv; -@@ -806,7 +806,7 @@ int main(int argc, char *argv[]) +@@ -816,7 +816,7 @@ int main(int argc, char *argv[]) wpa_supplicant_event = hostapd_wpa_event; wpa_supplicant_event_global = hostapd_wpa_event_global; for (;;) { @@ -24,7 +24,7 @@ Subject: [PATCH] hostapd: support optional argument for the -v switch of if (c < 0) break; switch (c) { -@@ -843,6 +843,8 @@ int main(int argc, char *argv[]) +@@ -853,6 +853,8 @@ int main(int argc, char *argv[]) break; #endif /* CONFIG_DEBUG_LINUX_TRACING */ case 'v': diff --git a/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch b/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch index b6421e9d75957e..58143020ce0a17 100644 --- a/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch +++ b/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch @@ -37,7 +37,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc, -@@ -1670,13 +1666,10 @@ static const struct hostapd_cli_cmd host +@@ -1686,13 +1682,10 @@ static const struct hostapd_cli_cmd host { "disassociate", hostapd_cli_cmd_disassociate, hostapd_complete_stations, " = disassociate a station" }, @@ -51,7 +51,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the { "wps_pin", hostapd_cli_cmd_wps_pin, NULL, " [timeout] [addr] = add WPS Enrollee PIN" }, { "wps_check_pin", hostapd_cli_cmd_wps_check_pin, NULL, -@@ -1701,7 +1694,6 @@ static const struct hostapd_cli_cmd host +@@ -1717,7 +1710,6 @@ static const struct hostapd_cli_cmd host " = configure AP" }, { "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL, "= show current WPS status" }, diff --git a/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch index c65b2b181e3461..fd63ff08bee0a4 100644 --- a/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch +++ b/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch @@ -4,7 +4,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -221,6 +221,9 @@ endif +@@ -222,6 +222,9 @@ endif ifdef CONFIG_NO_CTRL_IFACE CFLAGS += -DCONFIG_NO_CTRL_IFACE else @@ -16,7 +16,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality else --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -3897,6 +3897,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -4005,6 +4005,7 @@ static int hostapd_ctrl_iface_receive_pr reply_size); } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) { reply_len = hostapd_drv_status(hapd, reply, reply_size); @@ -24,7 +24,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strcmp(buf, "MIB") == 0) { reply_len = ieee802_11_get_mib(hapd, reply, reply_size); if (reply_len >= 0) { -@@ -3938,6 +3939,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -4046,6 +4047,7 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, reply_size); @@ -88,7 +88,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, struct sta_info *sta, char *buf, size_t buflen) -@@ -539,6 +539,7 @@ int hostapd_ctrl_iface_sta_next(struct h +@@ -562,6 +562,7 @@ int hostapd_ctrl_iface_sta_next(struct h return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen); } @@ -96,7 +96,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality #ifdef CONFIG_P2P_MANAGER static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype, -@@ -951,12 +952,12 @@ int hostapd_ctrl_iface_status(struct hos +@@ -1010,12 +1011,12 @@ int hostapd_ctrl_iface_status(struct hos return len; len += ret; } @@ -113,7 +113,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality if (os_snprintf_error(buflen - len, ret)) --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c -@@ -2837,6 +2837,7 @@ static const char * bool_txt(bool val) +@@ -2848,6 +2848,7 @@ static const char * bool_txt(bool val) return val ? "TRUE" : "FALSE"; } @@ -121,7 +121,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) { -@@ -3023,6 +3024,7 @@ int ieee802_1x_get_mib_sta(struct hostap +@@ -3034,6 +3035,7 @@ int ieee802_1x_get_mib_sta(struct hostap return len; } @@ -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 -@@ -5583,6 +5583,7 @@ static const char * wpa_bool_txt(int val +@@ -5956,6 +5956,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) \ -@@ -5735,7 +5736,7 @@ int wpa_get_mib_sta(struct wpa_state_mac +@@ -6108,7 +6109,7 @@ int wpa_get_mib_sta(struct wpa_state_mac return len; } @@ -150,7 +150,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality { --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -3943,6 +3943,8 @@ static u32 wpa_key_mgmt_suite(struct wpa +@@ -3974,6 +3974,8 @@ static u32 wpa_key_mgmt_suite(struct wpa } @@ -159,7 +159,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff -@@ -4024,6 +4026,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch +@@ -4055,6 +4057,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch return (int) len; } @@ -169,7 +169,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1038,6 +1038,9 @@ ifdef CONFIG_FILS +@@ -1039,6 +1039,9 @@ ifdef CONFIG_FILS OBJS += ../src/ap/fils_hlp.o endif ifdef CONFIG_CTRL_IFACE @@ -201,7 +201,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality if (wpa_s->ap_iface) { pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos, end - pos, -@@ -12542,6 +12542,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -12561,6 +12561,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = -1; } else if (os_strncmp(buf, "NOTE ", 5) == 0) { wpa_printf(MSG_INFO, "NOTE: %s", buf + 5); @@ -209,7 +209,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strcmp(buf, "MIB") == 0) { reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); if (reply_len >= 0) { -@@ -12554,6 +12555,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -12573,6 +12574,7 @@ char * wpa_supplicant_ctrl_iface_process reply_size - reply_len); #endif /* CONFIG_MACSEC */ } @@ -217,7 +217,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strncmp(buf, "STATUS", 6) == 0) { reply_len = wpa_supplicant_ctrl_iface_status( wpa_s, buf + 6, reply, reply_size); -@@ -13042,6 +13044,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13061,6 +13063,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = wpa_supplicant_ctrl_iface_bss( wpa_s, buf + 4, reply, reply_size); #ifdef CONFIG_AP @@ -225,7 +225,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strcmp(buf, "STA-FIRST") == 0) { reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size); } else if (os_strncmp(buf, "STA ", 4) == 0) { -@@ -13050,12 +13053,15 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13069,12 +13072,15 @@ char * wpa_supplicant_ctrl_iface_process } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply, reply_size); diff --git a/package/network/services/hostapd/patches/253-qos_map_set_without_interworking.patch b/package/network/services/hostapd/patches/253-qos_map_set_without_interworking.patch deleted file mode 100644 index 4072ff5664567c..00000000000000 --- a/package/network/services/hostapd/patches/253-qos_map_set_without_interworking.patch +++ /dev/null @@ -1,103 +0,0 @@ -From: Felix Fietkau -Date: Thu, 4 Nov 2021 11:45:18 +0100 -Subject: [PATCH] hostapd: support qos_map_set without CONFIG_INTERWORKING - -This feature is useful on its own even without full interworking support - ---- a/hostapd/config_file.c -+++ b/hostapd/config_file.c -@@ -1680,6 +1680,8 @@ static int parse_anqp_elem(struct hostap - return 0; - } - -+#endif /* CONFIG_INTERWORKING */ -+ - - static int parse_qos_map_set(struct hostapd_bss_config *bss, - char *buf, int line) -@@ -1721,8 +1723,6 @@ static int parse_qos_map_set(struct host - return 0; - } - --#endif /* CONFIG_INTERWORKING */ -- - - #ifdef CONFIG_HS20 - static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf, -@@ -4260,10 +4260,10 @@ static int hostapd_config_fill(struct ho - bss->gas_frag_limit = val; - } else if (os_strcmp(buf, "gas_comeback_delay") == 0) { - bss->gas_comeback_delay = atoi(pos); -+#endif /* CONFIG_INTERWORKING */ - } else if (os_strcmp(buf, "qos_map_set") == 0) { - if (parse_qos_map_set(bss, pos, line) < 0) - return 1; --#endif /* CONFIG_INTERWORKING */ - #ifdef CONFIG_RADIUS_TEST - } else if (os_strcmp(buf, "dump_msk_file") == 0) { - os_free(bss->dump_msk_file); ---- a/src/ap/hostapd.c -+++ b/src/ap/hostapd.c -@@ -1548,6 +1548,7 @@ static int hostapd_setup_bss(struct host - wpa_printf(MSG_ERROR, "GAS server initialization failed"); - return -1; - } -+#endif /* CONFIG_INTERWORKING */ - - if (conf->qos_map_set_len && - hostapd_drv_set_qos_map(hapd, conf->qos_map_set, -@@ -1555,7 +1556,6 @@ static int hostapd_setup_bss(struct host - wpa_printf(MSG_ERROR, "Failed to initialize QoS Map"); - return -1; - } --#endif /* CONFIG_INTERWORKING */ - - if (conf->bss_load_update_period && bss_load_update_init(hapd)) { - wpa_printf(MSG_ERROR, "BSS Load initialization failed"); ---- a/src/ap/ieee802_11_shared.c -+++ b/src/ap/ieee802_11_shared.c -@@ -1138,13 +1138,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_da - u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta, - const u8 *ext_capab_ie, size_t ext_capab_ie_len) - { --#ifdef CONFIG_INTERWORKING - /* check for QoS Map support */ - if (ext_capab_ie_len >= 5) { - if (ext_capab_ie[4] & 0x01) - sta->qos_map_enabled = 1; - } --#endif /* CONFIG_INTERWORKING */ - - if (ext_capab_ie_len > 0) { - sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2)); ---- a/wpa_supplicant/events.c -+++ b/wpa_supplicant/events.c -@@ -2935,8 +2935,6 @@ void wnm_bss_keep_alive_deinit(struct wp - } - - --#ifdef CONFIG_INTERWORKING -- - static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map, - size_t len) - { -@@ -2969,8 +2967,6 @@ static void interworking_process_assoc_r - } - } - --#endif /* CONFIG_INTERWORKING */ -- - - static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s) - { -@@ -3350,10 +3346,8 @@ static int wpa_supplicant_event_associnf - wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies, - data->assoc_info.resp_ies_len); - #endif /* CONFIG_WNM */ --#ifdef CONFIG_INTERWORKING - interworking_process_assoc_resp(wpa_s, data->assoc_info.resp_ies, - data->assoc_info.resp_ies_len); --#endif /* CONFIG_INTERWORKING */ - if (wpa_s->hw_capab == CAPAB_VHT && - get_ie(data->assoc_info.resp_ies, - data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP)) diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch index 9b3f401b035348..35a5abd2b23e1b 100644 --- a/package/network/services/hostapd/patches/300-noscan.patch +++ b/package/network/services/hostapd/patches/300-noscan.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3656,6 +3656,10 @@ static int hostapd_config_fill(struct ho +@@ -3680,6 +3680,10 @@ static int hostapd_config_fill(struct ho if (bss->ocv && !bss->ieee80211w) bss->ieee80211w = 1; #endif /* CONFIG_OCV */ @@ -18,7 +18,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options } else if (os_strcmp(buf, "ht_capab") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -1093,6 +1093,8 @@ struct hostapd_config { +@@ -1108,6 +1108,8 @@ struct hostapd_config { int ht_op_mode_fixed; u16 ht_capab; @@ -29,7 +29,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options int no_pri_sec_switch; --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c -@@ -544,7 +544,8 @@ static int ieee80211n_check_40mhz(struct +@@ -551,7 +551,8 @@ static int ieee80211n_check_40mhz(struct int ret; /* Check that HT40 is used and PRI / SEC switch is allowed */ diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch b/package/network/services/hostapd/patches/301-mesh-noscan.patch index 64a2eed30e522f..1f96a81eb03a0c 100644 --- a/package/network/services/hostapd/patches/301-mesh-noscan.patch +++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch @@ -47,7 +47,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also /* --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2770,7 +2770,7 @@ static bool ibss_mesh_can_use_vht(struct +@@ -2881,7 +2881,7 @@ static bool ibss_mesh_can_use_vht(struct const struct wpa_ssid *ssid, struct hostapd_hw_modes *mode) { @@ -56,7 +56,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also return false; if (!drv_supports_vht(wpa_s, ssid)) -@@ -2843,7 +2843,7 @@ static void ibss_mesh_select_40mhz(struc +@@ -2954,7 +2954,7 @@ static void ibss_mesh_select_40mhz(struc int i, res; unsigned int j; static const int ht40plus[] = { @@ -65,16 +65,16 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also 149, 157, 165, 173, 184, 192 }; int ht40 = -1; -@@ -3093,7 +3093,7 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3205,7 +3205,7 @@ void ibss_mesh_setup_freq(struct wpa_sup int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode); enum hostapd_hw_mode hw_mode; struct hostapd_hw_modes *mode = NULL; -- int i, obss_scan = 1; -+ int i, obss_scan = !(ssid->noscan); +- int obss_scan = 1; ++ int obss_scan = !(ssid->noscan); u8 channel; bool is_6ghz, is_24ghz; bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR); -@@ -3143,6 +3143,8 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3249,6 +3249,8 @@ void ibss_mesh_setup_freq(struct wpa_sup freq->he_enabled = ibss_mesh_can_use_he(wpa_s, ssid, mode, ieee80211_mode); freq->channel = channel; diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch index 57e13dec8bd8c9..637f5c31a8d795 100644 --- a/package/network/services/hostapd/patches/310-rescan_immediately.patch +++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch @@ -5,7 +5,7 @@ Subject: [PATCH] rescan_immediately.patch --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -5870,7 +5870,7 @@ wpa_supplicant_alloc(struct wpa_supplica +@@ -6001,7 +6001,7 @@ wpa_supplicant_alloc(struct wpa_supplica if (wpa_s == NULL) return NULL; wpa_s->scan_req = INITIAL_SCAN_REQ; diff --git a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch index 70ec6dc63b0dd2..e4cc33b5122449 100644 --- a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch +++ b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch @@ -5,7 +5,7 @@ Subject: [PATCH] nl80211_fix_set_freq.patch --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -5483,7 +5483,7 @@ static int nl80211_set_channel(struct i8 +@@ -5494,7 +5494,7 @@ static int nl80211_set_channel(struct i8 freq->he_enabled, freq->eht_enabled, freq->bandwidth, freq->center_freq1, freq->center_freq2); diff --git a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch index 5ad4d6387fb633..e73f817248fbdc 100644 --- a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch +++ b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch @@ -4,22 +4,7 @@ Subject: [PATCH] nl80211_del_beacon_bss.patch --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -3075,12 +3075,12 @@ static int wpa_driver_nl80211_del_beacon - return 0; - - wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)", -- drv->ifindex); -+ bss->ifindex); - link->beacon_set = 0; - link->freq = 0; - - nl80211_put_wiphy_data_ap(bss); -- msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON); -+ msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_BEACON); - if (!msg) - return -ENOBUFS; - -@@ -6176,8 +6176,7 @@ static void nl80211_teardown_ap(struct i +@@ -6183,8 +6183,7 @@ static void nl80211_teardown_ap(struct i nl80211_mgmt_unsubscribe(bss, "AP teardown"); nl80211_put_wiphy_data_ap(bss); @@ -29,12 +14,3 @@ Subject: [PATCH] nl80211_del_beacon_bss.patch } -@@ -8977,8 +8976,6 @@ static int wpa_driver_nl80211_if_remove( - } else { - wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context"); - nl80211_teardown_ap(bss); -- if (!bss->added_if && !drv->first_bss->next) -- wpa_driver_nl80211_del_beacon_all(bss); - nl80211_destroy_bss(bss); - if (!bss->added_if) - i802_set_iface_flags(bss, 0); diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch index ac1c9280b75656..9a2f58d52a047e 100644 --- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -14,7 +14,7 @@ Signed-hostap: Antonio Quartulli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -971,6 +971,9 @@ struct wpa_driver_associate_params { +@@ -979,6 +979,9 @@ struct wpa_driver_associate_params { * responsible for selecting with which BSS to associate. */ const u8 *bssid; @@ -155,7 +155,7 @@ Signed-hostap: Antonio Quartulli * macsec_policy - Determines the policy for MACsec secure session --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -4249,6 +4249,12 @@ static void wpas_start_assoc_cb(struct w +@@ -4370,6 +4370,12 @@ static void wpas_start_assoc_cb(struct w params.beacon_int = ssid->beacon_int; else params.beacon_int = wpa_s->conf->beacon_int; diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch index c24ca46e969faf..54ef753fc40ec3 100644 --- a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch +++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch @@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -1876,6 +1876,7 @@ struct wpa_driver_mesh_join_params { +@@ -1889,6 +1889,7 @@ struct wpa_driver_mesh_join_params { #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008 unsigned int flags; bool handle_dfs; @@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich struct wpa_driver_set_key_params { --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -11850,6 +11850,18 @@ static int nl80211_put_mesh_id(struct nl +@@ -11983,6 +11983,18 @@ static int nl80211_put_mesh_id(struct nl } @@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich static int nl80211_put_mesh_config(struct nl_msg *msg, struct wpa_driver_mesh_bss_params *params) { -@@ -11911,6 +11923,7 @@ static int nl80211_join_mesh(struct i802 +@@ -12044,6 +12056,7 @@ static int nl80211_join_mesh(struct i802 nl80211_put_basic_rates(msg, params->basic_rates) || nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) || nl80211_put_beacon_int(msg, params->beacon_int) || diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch index 664f27bd63ad64..3d995fe3b0394a 100644 --- a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch +++ b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix issues with disabling obss scan when using fixed_freq on --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -3100,6 +3100,10 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3212,6 +3212,10 @@ void ibss_mesh_setup_freq(struct wpa_sup freq->freq = ssid->frequency; diff --git a/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch b/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch index 8da7a2948eaca9..e291615526d3dd 100644 --- a/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch +++ b/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch @@ -13,7 +13,7 @@ Signed-off-by: David Bauer --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3708,6 +3708,8 @@ static int hostapd_config_fill(struct ho +@@ -3734,6 +3734,8 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "he_bss_color") == 0) { conf->he_op.he_bss_color = atoi(pos) & 0x3f; conf->he_op.he_bss_color_disabled = 0; diff --git a/package/network/services/hostapd/patches/470-survey_data_fallback.patch b/package/network/services/hostapd/patches/470-survey_data_fallback.patch index 1ae2c599ebb0a7..43e30b14e9338c 100644 --- a/package/network/services/hostapd/patches/470-survey_data_fallback.patch +++ b/package/network/services/hostapd/patches/470-survey_data_fallback.patch @@ -4,7 +4,7 @@ Subject: [PATCH] hostapd: implement fallback for incomplete survey data --- a/src/ap/acs.c +++ b/src/ap/acs.c -@@ -467,17 +467,17 @@ static int acs_get_bw_center_chan(int fr +@@ -471,17 +471,17 @@ static int acs_get_bw_center_chan(int fr static int acs_survey_is_sufficient(struct freq_survey *survey) { if (!(survey->filled & SURVEY_HAS_NF)) { @@ -24,7 +24,7 @@ Subject: [PATCH] hostapd: implement fallback for incomplete survey data } if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) && -@@ -485,7 +485,6 @@ static int acs_survey_is_sufficient(stru +@@ -489,7 +489,6 @@ static int acs_survey_is_sufficient(stru wpa_printf(MSG_INFO, "ACS: Survey for freq %d is missing RX and busy time (at least one is required)", survey->freq); diff --git a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch index e1bb37ea55f109..999a2a378109da 100644 --- a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch +++ b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch @@ -10,7 +10,7 @@ method. --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h -@@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue { +@@ -168,6 +168,21 @@ struct hostapd_sae_commit_queue { }; /** @@ -32,9 +32,9 @@ method. * struct hostapd_data - hostapd per-BSS data structure */ struct hostapd_data { -@@ -182,6 +197,9 @@ struct hostapd_data { +@@ -181,6 +196,9 @@ struct hostapd_data { - struct hostapd_data *mld_first_bss; + u8 own_addr[ETH_ALEN]; + /* OpenWrt specific statistics */ + struct hostapd_openwrt_stats openwrt_stats; diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index 0457f37f74c982..b4caabd8262025 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -7,7 +7,7 @@ probe/assoc/auth requests via object subscribe. --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -166,6 +166,12 @@ OBJS += ../src/common/hw_features_common +@@ -167,6 +167,12 @@ OBJS += ../src/common/hw_features_common OBJS += ../src/eapol_auth/eapol_auth_sm.o @@ -53,7 +53,7 @@ probe/assoc/auth requests via object subscribe. } --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -1351,6 +1351,12 @@ void handle_probe_req(struct hostapd_dat +@@ -1357,6 +1357,12 @@ void handle_probe_req(struct hostapd_dat int mld_id; u16 links; #endif /* CONFIG_IEEE80211BE */ @@ -66,7 +66,7 @@ probe/assoc/auth requests via object subscribe. if (hapd->iconf->rssi_ignore_probe_request && ssi_signal && ssi_signal < hapd->iconf->rssi_ignore_probe_request) -@@ -1537,6 +1543,12 @@ void handle_probe_req(struct hostapd_dat +@@ -1543,6 +1549,12 @@ void handle_probe_req(struct hostapd_dat } #endif /* CONFIG_P2P */ @@ -81,7 +81,7 @@ probe/assoc/auth requests via object subscribe. --- a/src/ap/dfs.c +++ b/src/ap/dfs.c -@@ -1225,6 +1225,8 @@ int hostapd_dfs_pre_cac_expired(struct h +@@ -1236,6 +1236,8 @@ int hostapd_dfs_pre_cac_expired(struct h "freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d", freq, ht_enabled, chan_offset, chan_width, cf1, cf2); @@ -118,7 +118,7 @@ probe/assoc/auth requests via object subscribe. wpabuf_free(sta->p2p_ie); --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -493,6 +493,7 @@ void hostapd_free_hapd_data(struct hosta +@@ -475,6 +475,7 @@ void hostapd_free_hapd_data(struct hosta hapd->beacon_set_done = 0; wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); @@ -126,7 +126,7 @@ probe/assoc/auth requests via object subscribe. accounting_deinit(hapd); hostapd_deinit_wpa(hapd); vlan_deinit(hapd); -@@ -1274,6 +1275,8 @@ static int hostapd_start_beacon(struct h +@@ -1303,6 +1304,8 @@ static int hostapd_start_beacon(struct h if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -135,7 +135,7 @@ probe/assoc/auth requests via object subscribe. return 0; } -@@ -2367,6 +2370,7 @@ static int hostapd_setup_interface_compl +@@ -2481,6 +2484,7 @@ static int hostapd_setup_interface_compl if (err) goto fail; @@ -143,7 +143,7 @@ probe/assoc/auth requests via object subscribe. wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (iface->freq) { #ifdef NEED_AP_MLME -@@ -2586,6 +2590,7 @@ dfs_offload: +@@ -2700,6 +2704,7 @@ dfs_offload: fail: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -151,7 +151,7 @@ probe/assoc/auth requests via object subscribe. if (iface->is_no_ir) { hostapd_set_state(iface, HAPD_IFACE_NO_IR); -@@ -3076,6 +3081,7 @@ void hostapd_interface_deinit_free(struc +@@ -3416,6 +3421,7 @@ void hostapd_interface_deinit_free(struc (unsigned int) iface->conf->num_bss); driver = iface->bss[0]->driver; drv_priv = iface->bss[0]->drv_priv; @@ -169,7 +169,7 @@ probe/assoc/auth requests via object subscribe. #define OCE_STA_CFON_ENABLED(hapd) \ ((hapd->conf->oce & OCE_STA_CFON) && \ -@@ -184,6 +185,7 @@ struct hostapd_data { +@@ -189,6 +190,7 @@ struct hostapd_data { struct hostapd_iface *iface; struct hostapd_config *iconf; struct hostapd_bss_config *conf; @@ -177,7 +177,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; -@@ -707,6 +709,7 @@ hostapd_alloc_bss_data(struct hostapd_if +@@ -743,6 +745,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); @@ -187,7 +187,7 @@ probe/assoc/auth requests via object subscribe. struct hostapd_iface * hostapd_alloc_iface(void); --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -2798,7 +2798,7 @@ static void handle_auth(struct hostapd_d +@@ -2874,7 +2874,7 @@ static void handle_auth(struct hostapd_d u16 auth_alg, auth_transaction, status_code; u16 resp = WLAN_STATUS_SUCCESS; struct sta_info *sta = NULL; @@ -196,10 +196,10 @@ probe/assoc/auth requests via object subscribe. u16 fc; const u8 *challenge = NULL; u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN]; -@@ -2807,6 +2807,11 @@ static void handle_auth(struct hostapd_d - struct radius_sta rad_info; - const u8 *dst, *sa, *bssid; +@@ -2885,6 +2885,11 @@ static void handle_auth(struct hostapd_d + #ifdef CONFIG_IEEE80211BE bool mld_sta = false; + #endif /* CONFIG_IEEE80211BE */ + struct hostapd_ubus_request req = { + .type = HOSTAPD_UBUS_AUTH_REQ, + .mgmt_frame = mgmt, @@ -208,7 +208,7 @@ probe/assoc/auth requests via object subscribe. if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)", -@@ -2998,6 +3003,13 @@ static void handle_auth(struct hostapd_d +@@ -3078,6 +3083,13 @@ static void handle_auth(struct hostapd_d resp = WLAN_STATUS_UNSPECIFIED_FAILURE; goto fail; } @@ -222,7 +222,7 @@ probe/assoc/auth requests via object subscribe. if (res == HOSTAPD_ACL_PENDING) return; -@@ -5242,7 +5254,7 @@ static void handle_assoc(struct hostapd_ +@@ -5338,7 +5350,7 @@ static void handle_assoc(struct hostapd_ int resp = WLAN_STATUS_SUCCESS; u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE; const u8 *pos; @@ -231,7 +231,7 @@ probe/assoc/auth requests via object subscribe. struct sta_info *sta; u8 *tmp = NULL; #ifdef CONFIG_FILS -@@ -5484,6 +5496,11 @@ static void handle_assoc(struct hostapd_ +@@ -5580,6 +5592,11 @@ static void handle_assoc(struct hostapd_ left = res; } #endif /* CONFIG_FILS */ @@ -243,9 +243,9 @@ probe/assoc/auth requests via object subscribe. /* followed by SSID and Supported rates; and HT capabilities if 802.11n * is used */ -@@ -5586,6 +5603,13 @@ static void handle_assoc(struct hostapd_ +@@ -5682,6 +5699,13 @@ static void handle_assoc(struct hostapd_ if (set_beacon) - ieee802_11_set_beacons(hapd->iface); + ieee802_11_update_beacons(hapd->iface); + ubus_resp = hostapd_ubus_handle_event(hapd, &req); + if (ubus_resp) { @@ -257,7 +257,7 @@ probe/assoc/auth requests via object subscribe. fail: /* -@@ -5836,6 +5860,7 @@ static void handle_disassoc(struct hosta +@@ -5911,6 +5935,7 @@ static void handle_disassoc(struct hosta (unsigned long) len); return; } @@ -265,7 +265,7 @@ probe/assoc/auth requests via object subscribe. sta = ap_get_sta(hapd, mgmt->sa); if (!sta) { -@@ -5867,6 +5892,8 @@ static void handle_deauth(struct hostapd +@@ -5942,6 +5967,8 @@ static void handle_deauth(struct hostapd /* Clear the PTKSA cache entries for PASN */ ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE); @@ -286,19 +286,18 @@ probe/assoc/auth requests via object subscribe. } -@@ -352,6 +355,9 @@ void hostapd_handle_radio_measurement(st - mgmt->u.action.u.rrm.action, MAC2STR(mgmt->sa)); - - switch (mgmt->u.action.u.rrm.action) { -+ case WLAN_RRM_LINK_MEASUREMENT_REPORT: +@@ -406,7 +409,7 @@ void hostapd_handle_radio_measurement(st + hostapd_handle_nei_report_req(hapd, buf, len); + break; + case WLAN_RRM_LINK_MEASUREMENT_REPORT: +- hostapd_handle_link_mesr_report(hapd, buf, len); + hostapd_ubus_handle_link_measurement(hapd, buf, len); -+ break; - case WLAN_RRM_RADIO_MEASUREMENT_REPORT: - hostapd_handle_radio_msmt_report(hapd, buf, len); break; + default: + wpa_printf(MSG_DEBUG, "RRM action %u is not supported", --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c -@@ -476,6 +476,7 @@ void ap_handle_timer(void *eloop_ctx, vo +@@ -542,6 +542,7 @@ void ap_handle_timer(void *eloop_ctx, vo hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_INFO, "deauthenticated due to " "local deauth request"); @@ -306,7 +305,7 @@ probe/assoc/auth requests via object subscribe. ap_free_sta(hapd, sta); return; } -@@ -631,6 +632,7 @@ skip_poll: +@@ -699,6 +700,7 @@ skip_poll: mlme_deauthenticate_indication( hapd, sta, WLAN_REASON_PREV_AUTH_NOT_VALID); @@ -314,7 +313,7 @@ probe/assoc/auth requests via object subscribe. ap_free_sta(hapd, sta); break; } -@@ -1448,15 +1450,28 @@ void ap_sta_set_authorized_event(struct +@@ -1521,15 +1523,28 @@ void ap_sta_set_authorized_event(struct os_snprintf(buf, sizeof(buf), MACSTR, MAC2STR(sta->addr)); if (authorized) { @@ -343,7 +342,7 @@ probe/assoc/auth requests via object subscribe. #ifdef CONFIG_P2P if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) { os_snprintf(ip_addr, sizeof(ip_addr), -@@ -1467,6 +1482,13 @@ void ap_sta_set_authorized_event(struct +@@ -1540,6 +1555,13 @@ void ap_sta_set_authorized_event(struct } #endif /* CONFIG_P2P */ @@ -357,7 +356,7 @@ probe/assoc/auth requests via object subscribe. keyid = ap_sta_wpa_get_keyid(hapd, sta); if (keyid) { os_snprintf(keyid_buf, sizeof(keyid_buf), -@@ -1485,17 +1507,19 @@ void ap_sta_set_authorized_event(struct +@@ -1558,17 +1580,19 @@ void ap_sta_set_authorized_event(struct dpp_pkhash, SHA256_MAC_LEN); } @@ -383,7 +382,7 @@ probe/assoc/auth requests via object subscribe. hapd->msg_ctx_parent != hapd->msg_ctx) --- a/src/ap/sta_info.h +++ b/src/ap/sta_info.h -@@ -319,6 +319,7 @@ struct sta_info { +@@ -317,6 +317,7 @@ struct sta_info { #endif /* CONFIG_TESTING_OPTIONS */ #ifdef CONFIG_AIRTIME_POLICY unsigned int airtime_weight; @@ -471,7 +470,7 @@ probe/assoc/auth requests via object subscribe. } --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c -@@ -275,6 +275,7 @@ static void hostapd_wpa_auth_psk_failure +@@ -279,6 +279,7 @@ static void hostapd_wpa_auth_psk_failure struct hostapd_data *hapd = ctx; wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR, MAC2STR(addr)); @@ -629,7 +628,7 @@ probe/assoc/auth requests via object subscribe. +} --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -189,6 +189,13 @@ ifdef CONFIG_EAPOL_TEST +@@ -191,6 +191,13 @@ ifdef CONFIG_EAPOL_TEST CFLAGS += -Werror -DEAPOL_TEST endif @@ -643,7 +642,7 @@ probe/assoc/auth requests via object subscribe. ifdef CONFIG_CODE_COVERAGE CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE LIBS += -lgcov -@@ -1042,6 +1049,9 @@ ifdef CONFIG_CTRL_IFACE_MIB +@@ -1043,6 +1050,9 @@ ifdef CONFIG_CTRL_IFACE_MIB CFLAGS += -DCONFIG_CTRL_IFACE_MIB endif OBJS += ../src/ap/ctrl_iface_ap.o @@ -676,7 +675,7 @@ probe/assoc/auth requests via object subscribe. break; --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -7716,6 +7716,8 @@ struct wpa_supplicant * wpa_supplicant_a +@@ -7847,6 +7847,8 @@ struct wpa_supplicant * wpa_supplicant_a } #endif /* CONFIG_P2P */ @@ -685,7 +684,7 @@ probe/assoc/auth requests via object subscribe. return wpa_s; } -@@ -7742,6 +7744,8 @@ int wpa_supplicant_remove_iface(struct w +@@ -7873,6 +7875,8 @@ int wpa_supplicant_remove_iface(struct w struct wpa_supplicant *parent = wpa_s->parent; #endif /* CONFIG_MESH */ @@ -694,7 +693,7 @@ probe/assoc/auth requests via object subscribe. /* Remove interface from the global list of interfaces */ prev = global->ifaces; if (prev == wpa_s) { -@@ -8088,8 +8092,12 @@ int wpa_supplicant_run(struct wpa_global +@@ -8219,8 +8223,12 @@ int wpa_supplicant_run(struct wpa_global eloop_register_signal_terminate(wpa_supplicant_terminate, global); eloop_register_signal_reconfig(wpa_supplicant_reconfig, global); diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch index b826363248a640..e242e3ae5034d9 100644 --- a/package/network/services/hostapd/patches/601-ucode_support.patch +++ b/package/network/services/hostapd/patches/601-ucode_support.patch @@ -8,7 +8,7 @@ as adding/removing interfaces. --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -168,9 +168,21 @@ OBJS += ../src/eapol_auth/eapol_auth_sm. +@@ -169,9 +169,21 @@ OBJS += ../src/eapol_auth/eapol_auth_sm. ifdef CONFIG_UBUS CFLAGS += -DUBUS_SUPPORT @@ -34,7 +34,7 @@ as adding/removing interfaces. ifdef CONFIG_CODE_COVERAGE --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -5487,6 +5487,7 @@ try_again: +@@ -5603,6 +5603,7 @@ try_again: return -1; } @@ -42,7 +42,7 @@ as adding/removing interfaces. wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb); return 0; -@@ -5588,6 +5589,7 @@ fail: +@@ -5704,6 +5705,7 @@ fail: os_free(fname); interface->global_ctrl_sock = s; @@ -52,7 +52,7 @@ as adding/removing interfaces. --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -1014,6 +1014,7 @@ int main(int argc, char *argv[]) +@@ -1024,6 +1024,7 @@ int main(int argc, char *argv[]) } hostapd_global_ctrl_iface_init(&interfaces); @@ -60,7 +60,7 @@ as adding/removing interfaces. if (hostapd_global_run(&interfaces, daemonize, pid_file)) { wpa_printf(MSG_ERROR, "Failed to start eloop"); -@@ -1023,6 +1024,7 @@ int main(int argc, char *argv[]) +@@ -1033,6 +1034,7 @@ int main(int argc, char *argv[]) ret = 0; out: @@ -70,7 +70,7 @@ as adding/removing interfaces. for (i = 0; i < interfaces.count; i++) { --- a/src/ap/ap_drv_ops.h +++ b/src/ap/ap_drv_ops.h -@@ -399,6 +399,23 @@ static inline int hostapd_drv_stop_ap(st +@@ -404,6 +404,23 @@ static inline int hostapd_drv_stop_ap(st return hapd->driver->stop_ap(hapd->drv_priv, link_id); } @@ -105,7 +105,7 @@ as adding/removing interfaces. if (iface->config_fname == NULL) { /* Only in-memory config in use - assume it has been updated */ hostapd_clear_old(iface); -@@ -493,6 +495,7 @@ void hostapd_free_hapd_data(struct hosta +@@ -475,6 +477,7 @@ void hostapd_free_hapd_data(struct hosta hapd->beacon_set_done = 0; wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); @@ -113,7 +113,7 @@ as adding/removing interfaces. hostapd_ubus_free_bss(hapd); accounting_deinit(hapd); hostapd_deinit_wpa(hapd); -@@ -687,6 +690,7 @@ void hostapd_cleanup_iface_partial(struc +@@ -716,6 +719,7 @@ void hostapd_cleanup_iface_partial(struc static void hostapd_cleanup_iface(struct hostapd_iface *iface) { wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface); @@ -121,7 +121,7 @@ as adding/removing interfaces. eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface, NULL); -@@ -1276,6 +1280,7 @@ static int hostapd_start_beacon(struct h +@@ -1305,6 +1309,7 @@ static int hostapd_start_beacon(struct h hapd->driver->set_operstate(hapd->drv_priv, 1); hostapd_ubus_add_bss(hapd); @@ -129,7 +129,7 @@ as adding/removing interfaces. return 0; } -@@ -1298,8 +1303,7 @@ static int hostapd_start_beacon(struct h +@@ -1380,8 +1385,7 @@ static int hostapd_bss_radius_init(struc * initialized. Most of the modules that are initialized here will be * deinitialized in hostapd_cleanup(). */ @@ -139,7 +139,7 @@ as adding/removing interfaces. { struct hostapd_bss_config *conf = hapd->conf; u8 ssid[SSID_MAX_LEN + 1]; -@@ -2790,7 +2794,7 @@ hostapd_alloc_bss_data(struct hostapd_if +@@ -2904,7 +2908,7 @@ hostapd_alloc_bss_data(struct hostapd_if } @@ -148,7 +148,7 @@ as adding/removing interfaces. { if (!hapd) return; -@@ -3608,7 +3612,8 @@ int hostapd_remove_iface(struct hapd_int +@@ -3953,7 +3957,8 @@ int hostapd_remove_iface(struct hapd_int hapd_iface = interfaces->iface[i]; if (hapd_iface == NULL) return -1; @@ -168,7 +168,7 @@ as adding/removing interfaces. #define OCE_STA_CFON_ENABLED(hapd) \ ((hapd->conf->oce & OCE_STA_CFON) && \ -@@ -51,6 +52,10 @@ struct hapd_interfaces { +@@ -52,6 +53,10 @@ struct hapd_interfaces { struct hostapd_config * (*config_read_cb)(const char *config_fname); int (*ctrl_iface_init)(struct hostapd_data *hapd); void (*ctrl_iface_deinit)(struct hostapd_data *hapd); @@ -179,7 +179,7 @@ as adding/removing interfaces. int (*for_each_interface)(struct hapd_interfaces *interfaces, int (*cb)(struct hostapd_iface *iface, void *ctx), void *ctx); -@@ -186,6 +191,7 @@ struct hostapd_data { +@@ -191,6 +196,7 @@ struct hostapd_data { struct hostapd_config *iconf; struct hostapd_bss_config *conf; struct hostapd_ubus_bss ubus; @@ -187,7 +187,7 @@ as adding/removing interfaces. int interface_added; /* virtual interface added for this BSS */ unsigned int started:1; unsigned int disabled:1; -@@ -518,6 +524,7 @@ struct hostapd_sta_info { +@@ -548,6 +554,7 @@ struct hostapd_mld { */ struct hostapd_iface { struct hapd_interfaces *interfaces; @@ -195,7 +195,7 @@ as adding/removing interfaces. void *owner; char *config_fname; struct hostapd_config *conf; -@@ -718,6 +725,8 @@ struct hostapd_iface * hostapd_init(stru +@@ -754,6 +761,8 @@ 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); @@ -206,7 +206,7 @@ as adding/removing interfaces. void hostapd_interface_deinit_free(struct hostapd_iface *iface); --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -3856,6 +3856,25 @@ struct wpa_driver_ops { +@@ -3893,6 +3893,25 @@ struct wpa_driver_ops { const char *ifname); /** @@ -232,7 +232,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) -@@ -6510,6 +6529,7 @@ union wpa_event_data { +@@ -6593,6 +6612,7 @@ union wpa_event_data { /** * struct ch_switch @@ -240,7 +240,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 -@@ -6520,6 +6540,7 @@ union wpa_event_data { +@@ -6603,6 +6623,7 @@ union wpa_event_data { * @punct_bitmap: Puncturing bitmap */ struct ch_switch { @@ -338,7 +338,7 @@ as adding/removing interfaces. nl_cb_set(bss->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL); nl_cb_set(bss->nl_cb, NL_CB_VALID, NL_CB_CUSTOM, -@@ -8554,6 +8575,7 @@ static void *i802_init(struct hostapd_da +@@ -8573,6 +8594,7 @@ static void *i802_init(struct hostapd_da char master_ifname[IFNAMSIZ]; int ifindex, br_ifindex = 0; int br_added = 0; @@ -346,7 +346,7 @@ as adding/removing interfaces. bss = wpa_driver_nl80211_drv_init(hapd, params->ifname, params->global_priv, 1, -@@ -8613,21 +8635,17 @@ static void *i802_init(struct hostapd_da +@@ -8632,21 +8654,17 @@ static void *i802_init(struct hostapd_da (params->num_bridge == 0 || !params->bridge[0])) add_ifidx(drv, br_ifindex, drv->ifindex); @@ -378,7 +378,7 @@ as adding/removing interfaces. } if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) { -@@ -8992,6 +9010,50 @@ static int wpa_driver_nl80211_if_remove( +@@ -9015,6 +9033,50 @@ static int wpa_driver_nl80211_if_remove( return 0; } @@ -429,8 +429,8 @@ as adding/removing interfaces. static int cookie_handler(struct nl_msg *msg, void *arg) { -@@ -10688,6 +10750,37 @@ static int driver_nl80211_if_remove(void - } +@@ -10803,6 +10865,37 @@ static bool nl80211_is_drv_shared(void * + #endif /* CONFIG_IEEE80211BE */ +static int driver_nl80211_if_rename(void *priv, enum wpa_driver_if_type type, @@ -467,7 +467,7 @@ as adding/removing interfaces. static int driver_nl80211_send_mlme(void *priv, const u8 *data, size_t data_len, int noack, unsigned int freq, -@@ -13881,6 +13974,8 @@ const struct wpa_driver_ops wpa_driver_n +@@ -14040,6 +14133,8 @@ const struct wpa_driver_ops wpa_driver_n .set_acl = wpa_driver_nl80211_set_acl, .if_add = wpa_driver_nl80211_if_add, .if_remove = driver_nl80211_if_remove, @@ -493,9 +493,9 @@ as adding/removing interfaces. + if (count) + data.ch_switch.count = nla_get_u32(count); - if (finished) - bss->flink->freq = data.ch_switch.freq; -@@ -3961,6 +3964,7 @@ static void do_process_drv_event(struct + if (link) + data.ch_switch.link_id = nla_get_u8(link); +@@ -3999,6 +4002,7 @@ static void do_process_drv_event(struct tb[NL80211_ATTR_CENTER_FREQ1], tb[NL80211_ATTR_CENTER_FREQ2], tb[NL80211_ATTR_PUNCT_BITMAP], @@ -503,7 +503,7 @@ as adding/removing interfaces. 0); break; case NL80211_CMD_CH_SWITCH_NOTIFY: -@@ -3973,6 +3977,7 @@ static void do_process_drv_event(struct +@@ -4011,6 +4015,7 @@ static void do_process_drv_event(struct tb[NL80211_ATTR_CENTER_FREQ1], tb[NL80211_ATTR_CENTER_FREQ2], tb[NL80211_ATTR_PUNCT_BITMAP], @@ -562,7 +562,7 @@ as adding/removing interfaces. extern int wpa_debug_timestamp; --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -192,8 +192,20 @@ endif +@@ -194,8 +194,20 @@ endif ifdef CONFIG_UBUS CFLAGS += -DUBUS_SUPPORT OBJS += ubus.o @@ -584,7 +584,7 @@ as adding/removing interfaces. endif ifdef CONFIG_CODE_COVERAGE -@@ -1052,6 +1064,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o +@@ -1053,6 +1065,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o ifdef CONFIG_UBUS OBJS += ../src/ap/ubus.o endif @@ -596,7 +596,7 @@ as adding/removing interfaces. CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -5949,6 +5949,7 @@ void supplicant_event(void *ctx, enum wp +@@ -6015,6 +6015,7 @@ void supplicant_event(void *ctx, enum wp event_to_string(event), event); #endif /* CONFIG_NO_STDOUT_DEBUG */ @@ -606,7 +606,7 @@ as adding/removing interfaces. #ifdef CONFIG_FST --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -1060,6 +1060,7 @@ void wpa_supplicant_set_state(struct wpa +@@ -1148,6 +1148,7 @@ void wpa_supplicant_set_state(struct wpa sme_sched_obss_scan(wpa_s, 0); } wpa_s->wpa_state = state; @@ -614,7 +614,7 @@ as adding/removing interfaces. #ifdef CONFIG_BGSCAN if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid) -@@ -7717,6 +7718,7 @@ struct wpa_supplicant * wpa_supplicant_a +@@ -7848,6 +7849,7 @@ struct wpa_supplicant * wpa_supplicant_a #endif /* CONFIG_P2P */ wpas_ubus_add_bss(wpa_s); @@ -622,7 +622,7 @@ as adding/removing interfaces. return wpa_s; } -@@ -7744,6 +7746,7 @@ int wpa_supplicant_remove_iface(struct w +@@ -7875,6 +7877,7 @@ int wpa_supplicant_remove_iface(struct w struct wpa_supplicant *parent = wpa_s->parent; #endif /* CONFIG_MESH */ @@ -630,7 +630,7 @@ as adding/removing interfaces. wpas_ubus_free_bss(wpa_s); /* Remove interface from the global list of interfaces */ -@@ -8054,6 +8057,7 @@ struct wpa_global * wpa_supplicant_init( +@@ -8185,6 +8188,7 @@ struct wpa_global * wpa_supplicant_init( eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0, wpas_periodic, global, NULL); @@ -638,7 +638,7 @@ as adding/removing interfaces. return global; } -@@ -8092,12 +8096,8 @@ int wpa_supplicant_run(struct wpa_global +@@ -8223,12 +8227,8 @@ int wpa_supplicant_run(struct wpa_global eloop_register_signal_terminate(wpa_supplicant_terminate, global); eloop_register_signal_reconfig(wpa_supplicant_reconfig, global); @@ -651,7 +651,7 @@ as adding/removing interfaces. return 0; } -@@ -8130,6 +8130,8 @@ void wpa_supplicant_deinit(struct wpa_gl +@@ -8261,6 +8261,8 @@ void wpa_supplicant_deinit(struct wpa_gl wpas_notify_supplicant_deinitialized(global); diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch index 260e832ddba7a3..f9bdfa1e92c56e 100644 --- a/package/network/services/hostapd/patches/701-reload_config_inline.patch +++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch @@ -8,7 +8,7 @@ as adding/removing interfaces. --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -5065,7 +5065,12 @@ struct hostapd_config * hostapd_config_r +@@ -5132,7 +5132,12 @@ struct hostapd_config * hostapd_config_r int errors = 0; size_t i; diff --git a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch index d3f797ed35abf6..2dc5eab65a0740 100644 --- a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch +++ b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch @@ -8,7 +8,7 @@ was provided by the config --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3559,6 +3559,8 @@ static int hostapd_config_fill(struct ho +@@ -3583,6 +3583,8 @@ static int hostapd_config_fill(struct ho #ifndef CONFIG_NO_VLAN } else if (os_strcmp(buf, "dynamic_vlan") == 0) { bss->ssid.dynamic_vlan = atoi(pos); diff --git a/package/network/services/hostapd/patches/711-wds_bridge_force.patch b/package/network/services/hostapd/patches/711-wds_bridge_force.patch index dbd75658ae4a94..441a21e8d8eed4 100644 --- a/package/network/services/hostapd/patches/711-wds_bridge_force.patch +++ b/package/network/services/hostapd/patches/711-wds_bridge_force.patch @@ -22,7 +22,7 @@ instead rely entirely on netifd handling this properly } else if (os_strcmp(buf, "vlan_bridge") == 0) { --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c -@@ -387,8 +387,6 @@ int hostapd_set_wds_sta(struct hostapd_d +@@ -390,8 +390,6 @@ int hostapd_set_wds_sta(struct hostapd_d return -1; if (hapd->conf->wds_bridge[0]) bridge = hapd->conf->wds_bridge; diff --git a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch index fb00313f3d9198..fa59797c2ef797 100644 --- a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch +++ b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch @@ -8,7 +8,7 @@ full device, e.g. in order to deal with hardware/driver limitations --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3041,6 +3041,14 @@ static int hostapd_config_fill(struct ho +@@ -3065,6 +3065,14 @@ static int hostapd_config_fill(struct ho line, bss->max_num_sta, MAX_STA_COUNT); return 1; } @@ -25,7 +25,7 @@ full device, e.g. in order to deal with hardware/driver limitations } else if (os_strcmp(buf, "extended_key_id") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -1057,6 +1057,8 @@ struct hostapd_config { +@@ -1072,6 +1072,8 @@ struct hostapd_config { unsigned int track_sta_max_num; unsigned int track_sta_max_age; @@ -36,7 +36,7 @@ full device, e.g. in order to deal with hardware/driver limitations * ' ' (ascii 32): all environments --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -1567,7 +1567,7 @@ void handle_probe_req(struct hostapd_dat +@@ -1573,7 +1573,7 @@ void handle_probe_req(struct hostapd_dat if (hapd->conf->no_probe_resp_if_max_sta && is_multicast_ether_addr(mgmt->da) && is_multicast_ether_addr(mgmt->bssid) && @@ -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 -@@ -754,6 +754,7 @@ void hostapd_cleanup_cs_params(struct ho +@@ -790,6 +790,7 @@ void hostapd_cleanup_cs_params(struct ho void hostapd_periodic_iface(struct hostapd_iface *iface); int hostapd_owe_trans_get_info(struct hostapd_data *hapd); void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx); diff --git a/package/network/services/hostapd/patches/730-ft_iface.patch b/package/network/services/hostapd/patches/730-ft_iface.patch index 2f47f17d969574..9c17b809d16a05 100644 --- a/package/network/services/hostapd/patches/730-ft_iface.patch +++ b/package/network/services/hostapd/patches/730-ft_iface.patch @@ -8,7 +8,7 @@ a VLAN interface on top of the bridge, instead of using the bridge directly --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3200,6 +3200,8 @@ static int hostapd_config_fill(struct ho +@@ -3224,6 +3224,8 @@ static int hostapd_config_fill(struct ho wpa_printf(MSG_INFO, "Line %d: Obsolete peerkey parameter ignored", line); #ifdef CONFIG_IEEE80211R_AP @@ -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 -@@ -1777,8 +1777,12 @@ int hostapd_setup_wpa(struct hostapd_dat +@@ -1763,8 +1763,12 @@ int hostapd_setup_wpa(struct hostapd_dat wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) { const char *ft_iface; diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch index f4b3ac33b10369..c7baeedbfa0759 100644 --- a/package/network/services/hostapd/patches/740-snoop_iface.patch +++ b/package/network/services/hostapd/patches/740-snoop_iface.patch @@ -29,7 +29,7 @@ untagged DHCP packets int bridge_hairpin; /* hairpin_mode on bridge members */ --- a/src/ap/ap_drv_ops.h +++ b/src/ap/ap_drv_ops.h -@@ -366,12 +366,12 @@ static inline int hostapd_drv_br_port_se +@@ -371,12 +371,12 @@ static inline int hostapd_drv_br_port_se static inline int hostapd_drv_br_set_net_param(struct hostapd_data *hapd, enum drv_br_net_param param, @@ -112,7 +112,7 @@ untagged DHCP packets hapd->x_snoop_initialized = false; --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -4278,7 +4278,7 @@ struct wpa_driver_ops { +@@ -4315,7 +4315,7 @@ struct wpa_driver_ops { * Returns: 0 on success, negative (<0) on failure */ int (*br_set_net_param)(void *priv, enum drv_br_net_param param, @@ -123,7 +123,7 @@ untagged DHCP packets * get_wowlan - Get wake-on-wireless status --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -12376,7 +12376,7 @@ static const char * drv_br_net_param_str +@@ -12503,7 +12503,7 @@ static const char * drv_br_net_param_str static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param, @@ -132,7 +132,7 @@ untagged DHCP packets { struct i802_bss *bss = priv; char path[128]; -@@ -12402,8 +12402,11 @@ static int wpa_driver_br_set_net_param(v +@@ -12529,8 +12529,11 @@ static int wpa_driver_br_set_net_param(v return -EINVAL; } diff --git a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch deleted file mode 100644 index 86394d78a4db5d..00000000000000 --- a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Date: Thu, 23 Dec 2021 19:18:33 +0100 -Subject: [PATCH] hostapd: only attempt to set qos map if supported by the - driver - -Fixes issues with brcmfmac - ---- a/src/ap/ap_drv_ops.c -+++ b/src/ap/ap_drv_ops.c -@@ -998,7 +998,8 @@ int hostapd_start_dfs_cac(struct hostapd - int hostapd_drv_set_qos_map(struct hostapd_data *hapd, - const u8 *qos_map_set, u8 qos_map_set_len) - { -- if (!hapd->driver || !hapd->driver->set_qos_map || !hapd->drv_priv) -+ if (!hapd->driver || !hapd->driver->set_qos_map || !hapd->drv_priv || -+ !(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_QOS_MAPPING)) - return 0; - return hapd->driver->set_qos_map(hapd->drv_priv, qos_map_set, - qos_map_set_len); diff --git a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch index c4b14d41b00942..40ea6566abef1c 100644 --- a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch +++ b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch @@ -7,7 +7,7 @@ Some servers use the NAS-IP-Address attribute as a destination address --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2819,6 +2819,8 @@ static int hostapd_config_fill(struct ho +@@ -2840,6 +2840,8 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "iapp_interface") == 0) { wpa_printf(MSG_INFO, "DEPRECATED: iapp_interface not used"); #endif /* CONFIG_IAPP */ @@ -25,10 +25,10 @@ Some servers use the NAS-IP-Address attribute as a destination address + int dynamic_own_ip_addr; char *nas_identifier; struct hostapd_radius_servers *radius; - int acct_interim_interval; + int radius_require_message_authenticator; --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c -@@ -601,6 +601,10 @@ int add_common_radius_attr(struct hostap +@@ -600,6 +600,10 @@ int add_common_radius_attr(struct hostap struct hostapd_radius_attr *attr; int len; diff --git a/package/network/services/hostapd/patches/761-shared_das_port.patch b/package/network/services/hostapd/patches/761-shared_das_port.patch index 5ca10d23bdb664..c200cad3c6d101 100644 --- a/package/network/services/hostapd/patches/761-shared_das_port.patch +++ b/package/network/services/hostapd/patches/761-shared_das_port.patch @@ -7,14 +7,14 @@ Use the NAS identifier to find the right receiver context on incoming messages --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -1510,6 +1510,7 @@ int hostapd_setup_bss(struct hostapd_dat +@@ -1366,6 +1366,7 @@ static int hostapd_bss_radius_init(struc - os_memset(&das_conf, 0, sizeof(das_conf)); - das_conf.port = conf->radius_das_port; -+ das_conf.nas_identifier = conf->nas_identifier; - das_conf.shared_secret = conf->radius_das_shared_secret; - das_conf.shared_secret_len = - conf->radius_das_shared_secret_len; + os_memset(&das_conf, 0, sizeof(das_conf)); + das_conf.port = conf->radius_das_port; ++ das_conf.nas_identifier = conf->nas_identifier; + das_conf.shared_secret = conf->radius_das_shared_secret; + das_conf.shared_secret_len = + conf->radius_das_shared_secret_len; --- a/src/radius/radius_das.c +++ b/src/radius/radius_das.c @@ -12,13 +12,26 @@ @@ -45,7 +45,7 @@ Use the NAS identifier to find the right receiver context on incoming messages size_t shared_secret_len; struct hostapd_ip_addr client_addr; unsigned int time_window; -@@ -378,56 +391,17 @@ fail: +@@ -388,56 +401,17 @@ fail: } @@ -108,7 +108,7 @@ Use the NAS identifier to find the right receiver context on incoming messages if (radius_msg_verify_das_req(msg, das->shared_secret, das->shared_secret_len, -@@ -494,9 +468,8 @@ static void radius_das_receive(int sock, +@@ -504,9 +478,8 @@ static void radius_das_receive(int sock, radius_msg_dump(reply); rbuf = radius_msg_get_buf(reply); @@ -120,7 +120,7 @@ Use the NAS identifier to find the right receiver context on incoming messages if (res < 0) { wpa_printf(MSG_ERROR, "DAS: sendto(to %s:%d): %s", abuf, from_port, strerror(errno)); -@@ -508,6 +481,72 @@ fail: +@@ -518,6 +491,72 @@ fail: radius_msg_free(reply); } @@ -193,7 +193,7 @@ Use the NAS identifier to find the right receiver context on incoming messages static int radius_das_open_socket(int port) { -@@ -533,6 +572,49 @@ static int radius_das_open_socket(int po +@@ -543,6 +582,49 @@ static int radius_das_open_socket(int po } @@ -243,7 +243,7 @@ Use the NAS identifier to find the right receiver context on incoming messages struct radius_das_data * radius_das_init(struct radius_das_conf *conf) { -@@ -553,6 +635,8 @@ radius_das_init(struct radius_das_conf * +@@ -563,6 +645,8 @@ radius_das_init(struct radius_das_conf * das->ctx = conf->ctx; das->disconnect = conf->disconnect; das->coa = conf->coa; @@ -252,7 +252,7 @@ Use the NAS identifier to find the right receiver context on incoming messages os_memcpy(&das->client_addr, conf->client_addr, sizeof(das->client_addr)); -@@ -565,19 +649,15 @@ radius_das_init(struct radius_das_conf * +@@ -575,19 +659,15 @@ radius_das_init(struct radius_das_conf * } das->shared_secret_len = conf->shared_secret_len; @@ -275,7 +275,7 @@ Use the NAS identifier to find the right receiver context on incoming messages return das; } -@@ -588,11 +668,14 @@ void radius_das_deinit(struct radius_das +@@ -598,11 +678,14 @@ void radius_das_deinit(struct radius_das if (das == NULL) return; diff --git a/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch b/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch index 3cb1abeb583f9e..31e0de520b40fb 100644 --- a/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch +++ b/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch @@ -26,11 +26,9 @@ Signed-off-by: David Bauer src/ap/beacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/src/ap/beacon.c b/src/ap/beacon.c -index 8cd1c4170..bb9329085 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -905,7 +905,7 @@ void handle_probe_req(struct hostapd_data *hapd, +@@ -1416,7 +1416,7 @@ void handle_probe_req(struct hostapd_dat * is less likely to see them (Probe Request frame sent on a * neighboring, but partially overlapping, channel). */ @@ -39,6 +37,3 @@ index 8cd1c4170..bb9329085 100644 hapd->iface->current_mode && (hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G || hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211B) && --- -2.43.0 - diff --git a/package/network/services/hostapd/patches/770-radius_server.patch b/package/network/services/hostapd/patches/770-radius_server.patch index 73b2c8643ba2c7..7df497811d6676 100644 --- a/package/network/services/hostapd/patches/770-radius_server.patch +++ b/package/network/services/hostapd/patches/770-radius_server.patch @@ -29,7 +29,7 @@ handle reload. #ifndef CONFIG_NO_HOSTAPD_LOGGER static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module, -@@ -778,6 +779,11 @@ int main(int argc, char *argv[]) +@@ -788,6 +789,11 @@ int main(int argc, char *argv[]) if (os_program_init()) return -1; @@ -119,7 +119,7 @@ handle reload. sess->macacl = tmp->macacl; eap_user_free(tmp); -@@ -1118,11 +1155,10 @@ radius_server_encapsulate_eap(struct rad +@@ -1123,11 +1160,10 @@ radius_server_encapsulate_eap(struct rad } if (code == RADIUS_CODE_ACCESS_ACCEPT) { @@ -135,7 +135,7 @@ handle reload. wpa_printf(MSG_ERROR, "Could not add RADIUS attribute"); radius_msg_free(msg); return NULL; -@@ -1211,11 +1247,10 @@ radius_server_macacl(struct radius_serve +@@ -1221,11 +1257,10 @@ radius_server_macacl(struct radius_serve } if (code == RADIUS_CODE_ACCESS_ACCEPT) { @@ -151,7 +151,7 @@ handle reload. wpa_printf(MSG_ERROR, "Could not add RADIUS attribute"); radius_msg_free(msg); return NULL; -@@ -2512,7 +2547,7 @@ static int radius_server_get_eap_user(vo +@@ -2527,7 +2562,7 @@ static int radius_server_get_eap_user(vo ret = data->get_eap_user(data->conf_ctx, identity, identity_len, phase2, user); if (ret == 0 && user) { diff --git a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch index b154a0d3cd630a..9ecb9060d5ee79 100644 --- a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch +++ b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch @@ -37,11 +37,9 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 create mode 100644 src/ap/apup.c create mode 100644 src/ap/apup.h -diff --git a/hostapd/Makefile b/hostapd/Makefile -index 73048c1297..c890a7f29c 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -1415,6 +1415,11 @@ ifdef CONFIG_NO_TKIP +@@ -1416,6 +1416,11 @@ ifdef CONFIG_NO_TKIP CFLAGS += -DCONFIG_NO_TKIP endif @@ -53,11 +51,9 @@ index 73048c1297..c890a7f29c 100644 $(DESTDIR)$(BINDIR)/%: % install -D $(<) $(@) -diff --git a/hostapd/config_file.c b/hostapd/config_file.c -index bba5b19164..ef906199ec 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -5058,6 +5058,15 @@ static int hostapd_config_fill(struct hostapd_config *conf, +@@ -5125,6 +5125,15 @@ static int hostapd_config_fill(struct ho bss->mld_indicate_disabled = atoi(pos); #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_IEEE80211BE */ @@ -73,11 +69,9 @@ index bba5b19164..ef906199ec 100644 } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", -diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h -index 0e52a9990d..9102db5ed0 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -970,6 +970,35 @@ struct hostapd_bss_config { +@@ -985,6 +985,35 @@ struct hostapd_bss_config { bool mld_indicate_disabled; #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_IEEE80211BE */ @@ -113,11 +107,9 @@ index 0e52a9990d..9102db5ed0 100644 }; /** -diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c -index e7396d9aea..0a49ae515e 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c -@@ -382,13 +382,39 @@ int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, +@@ -385,13 +385,39 @@ int hostapd_set_wds_sta(struct hostapd_d const u8 *addr, int aid, int val) { const char *bridge = NULL; @@ -158,11 +150,9 @@ index e7396d9aea..0a49ae515e 100644 } -diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h -index fa89d2398e..ab4dc8eb16 100644 --- a/src/ap/ap_drv_ops.h +++ b/src/ap/ap_drv_ops.h -@@ -33,6 +33,9 @@ int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname, +@@ -35,6 +35,9 @@ int hostapd_set_drv_ieee8021x(struct hos int enabled); int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname); int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname); @@ -171,10 +161,7 @@ index fa89d2398e..ab4dc8eb16 100644 + */ int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, const u8 *addr, int aid, int val); - -diff --git a/src/ap/apup.c b/src/ap/apup.c -new file mode 100644 -index 0000000000..3575f1b6c6 + int hostapd_sta_add(struct hostapd_data *hapd, --- /dev/null +++ b/src/ap/apup.c @@ -0,0 +1,152 @@ @@ -330,9 +317,6 @@ index 0000000000..3575f1b6c6 + " capabilities %d", + mIfname, sta_ret->flags, sta_ret->capability); +} -diff --git a/src/ap/apup.h b/src/ap/apup.h -new file mode 100644 -index 0000000000..a14a283bb4 --- /dev/null +++ b/src/ap/apup.h @@ -0,0 +1,24 @@ @@ -360,8 +344,6 @@ index 0000000000..a14a283bb4 +void apup_process_beacon(struct hostapd_data *hapd, + const struct ieee80211_mgmt *mgmt, size_t len, + const struct ieee802_11_elems *elems ); -diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c -index 1c4dd22da1..09254f18f2 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -59,6 +59,9 @@ @@ -374,7 +356,7 @@ index 1c4dd22da1..09254f18f2 100644 #ifdef CONFIG_FILS static struct wpabuf * -@@ -3469,8 +3472,8 @@ static u16 check_multi_ap(struct hostapd_data *hapd, struct sta_info *sta, +@@ -3562,8 +3565,8 @@ static u16 check_multi_ap(struct hostapd } @@ -385,7 +367,7 @@ index 1c4dd22da1..09254f18f2 100644 { /* Supported rates not used in IEEE 802.11ad/DMG */ if (hapd->iface->current_mode && -@@ -3855,7 +3858,7 @@ static int __check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, +@@ -3950,7 +3953,7 @@ static int __check_assoc_ies(struct host elems->ext_capab_len); if (resp != WLAN_STATUS_SUCCESS) return resp; @@ -394,7 +376,7 @@ index 1c4dd22da1..09254f18f2 100644 if (resp != WLAN_STATUS_SUCCESS) return resp; -@@ -5927,6 +5930,11 @@ static void handle_beacon(struct hostapd_data *hapd, +@@ -6002,6 +6005,11 @@ static void handle_beacon(struct hostapd 0); ap_list_process_beacon(hapd->iface, mgmt, &elems, fi); @@ -406,11 +388,9 @@ index 1c4dd22da1..09254f18f2 100644 } -diff --git a/src/ap/ieee802_11.h b/src/ap/ieee802_11.h -index a35486d464..0861bef82e 100644 --- a/src/ap/ieee802_11.h +++ b/src/ap/ieee802_11.h -@@ -108,6 +108,8 @@ int hostapd_process_ml_assoc_req_addr(struct hostapd_data *hapd, +@@ -108,6 +108,8 @@ int hostapd_process_ml_assoc_req_addr(st const u8 *basic_mle, size_t basic_mle_len, u8 *mld_addr); int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta); @@ -419,11 +399,9 @@ index a35486d464..0861bef82e 100644 u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta, const u8 *ht_capab); u16 copy_sta_vendor_vht(struct hostapd_data *hapd, struct sta_info *sta, -diff --git a/src/drivers/driver.h b/src/drivers/driver.h -index 1bbb9672cd..8d26561e97 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -3976,7 +3976,7 @@ struct wpa_driver_ops { +@@ -4013,7 +4013,7 @@ struct wpa_driver_ops { * Returns: 0 on success, -1 on failure */ int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val, @@ -432,11 +410,9 @@ index 1bbb9672cd..8d26561e97 100644 /** * send_action - Transmit an Action frame -diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c -index aeb1e6beef..b6e4ddd86d 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -8415,24 +8415,14 @@ static int have_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx, +@@ -8434,24 +8434,14 @@ static int have_ifidx(struct wpa_driver_ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val, @@ -463,6 +439,3 @@ index aeb1e6beef..b6e4ddd86d 100644 wpa_printf(MSG_DEBUG, "nl80211: Set WDS STA addr=" MACSTR " aid=%d val=%d name=%s", MAC2STR(addr), aid, val, name); if (val) { --- -2.44.2 - diff --git a/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch b/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch index 6a84aefdc41abd..389b5abbdc27c5 100644 --- a/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch +++ b/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch @@ -13,8 +13,6 @@ Signed-off-by: Gioacchino Mazzurco src/ap/ubus.h | 5 +++++ 3 files changed, 28 insertions(+) -diff --git a/src/ap/apup.c b/src/ap/apup.c -index 3575f1b6c6..3a3991f4d6 100644 --- a/src/ap/apup.c +++ b/src/ap/apup.c @@ -23,6 +23,10 @@ @@ -28,7 +26,7 @@ index 3575f1b6c6..3a3991f4d6 100644 void apup_process_beacon(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, const struct ieee802_11_elems *elems ) -@@ -149,4 +153,8 @@ void apup_process_beacon(struct hostapd_data *hapd, +@@ -149,4 +153,8 @@ void apup_process_beacon(struct hostapd_ "apup_process_beacon(...) Added APuP peer at %s with flags: %d," " capabilities %d", mIfname, sta_ret->flags, sta_ret->capability); @@ -37,11 +35,9 @@ index 3575f1b6c6..3a3991f4d6 100644 + hostapd_ubus_notify_apup_newpeer(hapd, mgmt->bssid, mIfname); +#endif } -diff --git a/src/ap/ubus.c b/src/ap/ubus.c -index 8689494bcf..f21516fc3c 100644 --- a/src/ap/ubus.c +++ b/src/ap/ubus.c -@@ -2004,3 +2004,18 @@ int hostapd_ubus_notify_bss_transition_query( +@@ -2004,3 +2004,18 @@ int hostapd_ubus_notify_bss_transition_q return ureq.resp; #endif } @@ -60,11 +56,9 @@ index 8689494bcf..f21516fc3c 100644 + ubus_notify(ctx, &hapd->ubus.obj, "apup-newpeer", b.head, -1); +} +#endif // def CONFIG_APUP -diff --git a/src/ap/ubus.h b/src/ap/ubus.h -index 22767d67ee..1c65e4dcb9 100644 --- a/src/ap/ubus.h +++ b/src/ap/ubus.h -@@ -71,6 +71,11 @@ int hostapd_ubus_notify_bss_transition_query( +@@ -71,6 +71,11 @@ int hostapd_ubus_notify_bss_transition_q void hostapd_ubus_notify_authorized(struct hostapd_data *hapd, struct sta_info *sta, const char *auth_alg); @@ -76,6 +70,3 @@ index 22767d67ee..1c65e4dcb9 100644 #else struct hostapd_ubus_bss {}; --- -2.44.2 - diff --git a/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch b/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch index 6abddc707125e2..2f14b21a0cb6be 100644 --- a/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch +++ b/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch @@ -10,8 +10,6 @@ Signed-off-by: Gioacchino Mazzurco src/ap/ucode.h | 4 ++++ 3 files changed, 29 insertions(+) -diff --git a/src/ap/apup.c b/src/ap/apup.c -index 3a3991f4d6..f736ddc8e3 100644 --- a/src/ap/apup.c +++ b/src/ap/apup.c @@ -27,6 +27,10 @@ @@ -25,7 +23,7 @@ index 3a3991f4d6..f736ddc8e3 100644 void apup_process_beacon(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, const struct ieee802_11_elems *elems ) -@@ -157,4 +161,8 @@ void apup_process_beacon(struct hostapd_data *hapd, +@@ -157,4 +161,8 @@ void apup_process_beacon(struct hostapd_ #ifdef UBUS_SUPPORT hostapd_ubus_notify_apup_newpeer(hapd, mgmt->bssid, mIfname); #endif @@ -34,11 +32,9 @@ index 3a3991f4d6..f736ddc8e3 100644 + hostapd_ucode_apup_newpeer(hapd, mIfname); +#endif } -diff --git a/src/ap/ucode.c b/src/ap/ucode.c -index d344190208..391002feae 100644 --- a/src/ap/ucode.c +++ b/src/ap/ucode.c -@@ -811,3 +811,20 @@ void hostapd_ucode_free_bss(struct hostapd_data *hapd) +@@ -815,3 +815,20 @@ void hostapd_ucode_free_bss(struct hosta ucv_put(wpa_ucode_call(2)); ucv_gc(vm); } @@ -59,11 +55,9 @@ index d344190208..391002feae 100644 + ucv_gc(vm); +} +#endif // def CONFIG_APUP -diff --git a/src/ap/ucode.h b/src/ap/ucode.h -index d00b787169..c9bdde6516 100644 --- a/src/ap/ucode.h +++ b/src/ap/ucode.h -@@ -27,6 +27,10 @@ void hostapd_ucode_add_bss(struct hostapd_data *hapd); +@@ -27,6 +27,10 @@ void hostapd_ucode_add_bss(struct hostap void hostapd_ucode_free_bss(struct hostapd_data *hapd); void hostapd_ucode_reload_bss(struct hostapd_data *hapd); @@ -74,6 +68,3 @@ index d00b787169..c9bdde6516 100644 #else static inline int hostapd_ucode_init(struct hapd_interfaces *ifaces) --- -2.44.2 - diff --git a/package/network/services/hostapd/patches/800-SAE-Check-for-invalid-Rejected-Groups-element-length.patch b/package/network/services/hostapd/patches/800-SAE-Check-for-invalid-Rejected-Groups-element-length.patch deleted file mode 100644 index 97402887bfe618..00000000000000 --- a/package/network/services/hostapd/patches/800-SAE-Check-for-invalid-Rejected-Groups-element-length.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 364c2da8741f0979dae497551e70b94c0e6c8636 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sun, 7 Jul 2024 11:46:49 +0300 -Subject: [PATCH] SAE: Check for invalid Rejected Groups element length - explicitly - -Instead of practically ignoring an odd octet at the end of the element, -check for such invalid case explicitly. This is needed to avoid a -potential group downgrade attack. - -Signed-off-by: Jouni Malinen ---- - src/ap/ieee802_11.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - ---- a/src/ap/ieee802_11.c -+++ b/src/ap/ieee802_11.c -@@ -1229,7 +1229,7 @@ static int check_sae_rejected_groups(str - struct sae_data *sae) - { - const struct wpabuf *groups; -- size_t i, count; -+ size_t i, count, len; - const u8 *pos; - - if (!sae->tmp) -@@ -1239,7 +1239,15 @@ static int check_sae_rejected_groups(str - return 0; - - pos = wpabuf_head(groups); -- count = wpabuf_len(groups) / 2; -+ len = wpabuf_len(groups); -+ if (len & 1) { -+ wpa_printf(MSG_DEBUG, -+ "SAE: Invalid length of the Rejected Groups element payload: %zu", -+ len); -+ return 1; -+ } -+ -+ count = len / 2; - for (i = 0; i < count; i++) { - int enabled; - u16 group; diff --git a/package/network/services/hostapd/patches/801-SAE-Check-for-invalid-Rejected-Groups-element-length.patch b/package/network/services/hostapd/patches/801-SAE-Check-for-invalid-Rejected-Groups-element-length.patch deleted file mode 100644 index 8d88a4aa13ac16..00000000000000 --- a/package/network/services/hostapd/patches/801-SAE-Check-for-invalid-Rejected-Groups-element-length.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 593a7c2f8c93edd6b552f2d42e28164464b4e6ff Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Tue, 9 Jul 2024 23:33:38 +0300 -Subject: [PATCH] SAE: Check for invalid Rejected Groups element length - explicitly on STA - -Instead of practically ignoring an odd octet at the end of the element, -check for such invalid case explicitly. This is needed to avoid a -potential group downgrade attack. - -Fixes: 444d76f74f65 ("SAE: Check that peer's rejected groups are not enabled") -Signed-off-by: Jouni Malinen ---- - wpa_supplicant/sme.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - ---- a/wpa_supplicant/sme.c -+++ b/wpa_supplicant/sme.c -@@ -1561,14 +1561,21 @@ static int sme_sae_is_group_enabled(stru - static int sme_check_sae_rejected_groups(struct wpa_supplicant *wpa_s, - const struct wpabuf *groups) - { -- size_t i, count; -+ size_t i, count, len; - const u8 *pos; - - if (!groups) - return 0; - - pos = wpabuf_head(groups); -- count = wpabuf_len(groups) / 2; -+ len = wpabuf_len(groups); -+ if (len & 1) { -+ wpa_printf(MSG_DEBUG, -+ "SAE: Invalid length of the Rejected Groups element payload: %zu", -+ len); -+ return 1; -+ } -+ count = len / 2; - for (i = 0; i < count; i++) { - int enabled; - u16 group; diff --git a/package/network/services/hostapd/patches/802-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch b/package/network/services/hostapd/patches/802-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch deleted file mode 100644 index 572a3f721f3fda..00000000000000 --- a/package/network/services/hostapd/patches/802-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 9716bf1160beb677e965d9e6475d6c9e162e8374 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Tue, 9 Jul 2024 23:34:34 +0300 -Subject: [PATCH] SAE: Reject invalid Rejected Groups element in the parser - -There is no need to depend on all uses (i.e., both hostapd and -wpa_supplicant) to verify that the length of the Rejected Groups field -in the Rejected Groups element is valid (i.e., a multiple of two octets) -since the common parser can reject the message when detecting this. - -Signed-off-by: Jouni Malinen ---- - src/common/sae.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/src/common/sae.c -+++ b/src/common/sae.c -@@ -2120,6 +2120,12 @@ static int sae_parse_rejected_groups(str - return WLAN_STATUS_UNSPECIFIED_FAILURE; - epos++; /* skip ext ID */ - len--; -+ if (len & 1) { -+ wpa_printf(MSG_DEBUG, -+ "SAE: Invalid length of the Rejected Groups element payload: %u", -+ len); -+ return WLAN_STATUS_UNSPECIFIED_FAILURE; -+ } - - wpabuf_free(sae->tmp->peer_rejected_groups); - sae->tmp->peer_rejected_groups = wpabuf_alloc(len); From da11a1e20c34381891322946a3a654d8eb3f279b Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Sat, 7 Sep 2024 20:54:34 +0300 Subject: [PATCH 12/15] hostapd: update to version 2024-09-15 Remove upstreamed from 2.11 release: 060-nl80211-fix-crash-when-adding-an-interface-fails.patch Rebase all other patches Signed-off-by: Ivan Pavlov Link: https://github.com/openwrt/openwrt/pull/16338 Signed-off-by: Robert Marko --- package/network/services/hostapd/Makefile | 6 +- ...hannels-to-be-selected-if-dfs-is-ena.patch | 22 ++--- ...erministic-channel-on-channel-switch.patch | 6 +- ...ix-sta-add-after-previous-connection.patch | 4 +- .../patches/050-Fix-OpenWrt-13156.patch | 4 +- ...-extra-ies-only-if-allowed-by-driver.patch | 4 +- ...crash-when-adding-an-interface-fails.patch | 21 ----- ...efile-make-run-tests-with-CONFIG_TLS.patch | 6 +- ...hecks-encountered-during-tests-hwsim.patch | 2 +- ...tapd-update-cfs0-and-cfs1-for-160MHz.patch | 10 +-- .../hostapd/patches/200-multicall.patch | 26 +++--- ..._AP-functions-dependant-on-CONFIG_AP.patch | 4 +- .../patches/220-indicate-features.patch | 4 +- .../patches/250-hostapd_cli_ifdef.patch | 12 +-- .../patches/252-disable_ctrl_iface_mib.patch | 26 +++--- .../services/hostapd/patches/300-noscan.patch | 10 +-- .../hostapd/patches/301-mesh-noscan.patch | 8 +- .../patches/310-rescan_immediately.patch | 2 +- .../patches/330-nl80211_fix_set_freq.patch | 2 +- .../patches/350-nl80211_del_beacon_bss.patch | 2 +- .../381-hostapd_cli_UNKNOWN-COMMAND.patch | 2 +- ...dd-new-config-params-to-be-used-with.patch | 4 +- .../patches/463-add-mcast_rate-to-11s.patch | 6 +- .../patches/464-fix-mesh-obss-check.patch | 2 +- ...tapd-config-support-random-BSS-color.patch | 2 +- .../patches/590-rrm-wnm-statistics.patch | 4 +- .../hostapd/patches/600-ubus_support.patch | 48 +++++------ .../hostapd/patches/601-ucode_support.patch | 84 +++++++++---------- .../patches/701-reload_config_inline.patch | 2 +- .../hostapd/patches/710-vlan_no_bridge.patch | 2 +- .../patches/711-wds_bridge_force.patch | 2 +- .../patches/720-iface_max_num_sta.patch | 8 +- .../hostapd/patches/730-ft_iface.patch | 4 +- .../hostapd/patches/740-snoop_iface.patch | 10 +-- .../hostapd/patches/760-dynamic_own_ip.patch | 2 +- .../hostapd/patches/761-shared_das_port.patch | 2 +- ...probe-requests-with-invalid-DSSS-par.patch | 2 +- .../hostapd/patches/770-radius_server.patch | 2 +- ...ment-APuP-Access-Point-Micro-Peering.patch | 17 ++-- ...us-notification-when-a-peer-comes-up.patch | 2 +- ...-ucode-hook-for-when-a-peer-comes-up.patch | 2 +- .../services/hostapd/src/src/ap/ubus.h | 2 - .../services/hostapd/src/src/ap/ucode.c | 2 +- 43 files changed, 186 insertions(+), 208 deletions(-) delete mode 100644 package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index c3667303367ae4..1c0b6548662e37 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL:=https://w1.fi/hostap.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2024-07-20 -PKG_SOURCE_VERSION:=d945ddd368085f255e68328f2d3b020ceea359af -PKG_MIRROR_HASH:=647508a242f2969d8a815edb69d47b107f10d2415604e44b0451c48875ae46bd +PKG_SOURCE_DATE:=2024-09-15 +PKG_SOURCE_VERSION:=5ace39b0a4cdbe18ddbc4e18f80ee3876233c20b +PKG_MIRROR_HASH:=43187d1ddd923970ef3821a0fe267880c2483f6f1a5acd0dd2d7906661ab1372 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch index cbb91ddeabfdab..d20a6d76d44cc8 100644 --- a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch +++ b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch @@ -14,7 +14,7 @@ Signed-off-by: Peter Oh --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2809,7 +2809,7 @@ static int drv_supports_vht(struct wpa_s +@@ -2831,7 +2831,7 @@ static int drv_supports_vht(struct wpa_s } @@ -23,7 +23,7 @@ Signed-off-by: Peter Oh { int i; -@@ -2818,7 +2818,10 @@ static bool ibss_mesh_is_80mhz_avail(int +@@ -2840,7 +2840,10 @@ static bool ibss_mesh_is_80mhz_avail(int chan = hw_get_channel_chan(mode, i, NULL); if (!chan || @@ -35,7 +35,7 @@ Signed-off-by: Peter Oh return false; } -@@ -2945,7 +2948,7 @@ static void ibss_mesh_select_40mhz(struc +@@ -2967,7 +2970,7 @@ static void ibss_mesh_select_40mhz(struc const struct wpa_ssid *ssid, struct hostapd_hw_modes *mode, struct hostapd_freq_params *freq, @@ -44,7 +44,7 @@ Signed-off-by: Peter Oh int chan_idx; struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL; int i, res; -@@ -2969,8 +2972,11 @@ static void ibss_mesh_select_40mhz(struc +@@ -2991,8 +2994,11 @@ static void ibss_mesh_select_40mhz(struc return; /* Check primary channel flags */ @@ -57,7 +57,7 @@ Signed-off-by: Peter Oh #ifdef CONFIG_HT_OVERRIDES if (ssid->disable_ht40) -@@ -2996,8 +3002,11 @@ static void ibss_mesh_select_40mhz(struc +@@ -3018,8 +3024,11 @@ static void ibss_mesh_select_40mhz(struc return; /* Check secondary channel flags */ @@ -70,7 +70,7 @@ Signed-off-by: Peter Oh if (ht40 == -1) { if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS)) -@@ -3052,7 +3061,7 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3074,7 +3083,7 @@ static bool ibss_mesh_select_80_160mhz(s const struct wpa_ssid *ssid, struct hostapd_hw_modes *mode, struct hostapd_freq_params *freq, @@ -79,7 +79,7 @@ Signed-off-by: Peter Oh static const int bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5825, 5955, 6035, 6115, 6195, 6275, 6355, 6435, -@@ -3097,7 +3106,7 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3119,7 +3128,7 @@ static bool ibss_mesh_select_80_160mhz(s goto skip_80mhz; /* Use 40 MHz if channel not usable */ @@ -88,7 +88,7 @@ Signed-off-by: Peter Oh goto skip_80mhz; chwidth = CONF_OPER_CHWIDTH_80MHZ; -@@ -3111,7 +3120,7 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3133,7 +3142,7 @@ static bool ibss_mesh_select_80_160mhz(s if ((mode->he_capab[ieee80211_mode].phy_cap[ HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] & HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz && @@ -97,7 +97,7 @@ Signed-off-by: Peter Oh for (j = 0; j < ARRAY_SIZE(bw160); j++) { if (freq->freq == bw160[j]) { chwidth = CONF_OPER_CHWIDTH_160MHZ; -@@ -3139,10 +3148,12 @@ static bool ibss_mesh_select_80_160mhz(s +@@ -3161,10 +3170,12 @@ static bool ibss_mesh_select_80_160mhz(s if (!chan) continue; @@ -113,7 +113,7 @@ Signed-off-by: Peter Oh /* Found a suitable second segment for 80+80 */ chwidth = CONF_OPER_CHWIDTH_80P80MHZ; -@@ -3197,6 +3208,7 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3219,6 +3230,7 @@ void ibss_mesh_setup_freq(struct wpa_sup int obss_scan = 1; u8 channel; bool is_6ghz, is_24ghz; @@ -121,7 +121,7 @@ Signed-off-by: Peter Oh freq->freq = ssid->frequency; -@@ -3239,9 +3251,9 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3261,9 +3273,9 @@ void ibss_mesh_setup_freq(struct wpa_sup freq->channel = channel; /* Setup higher BW only for 5 GHz */ if (mode->mode == HOSTAPD_MODE_IEEE80211A) { diff --git a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch index f22841c63ba66b..bfc30e2842b528 100644 --- a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch +++ b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch @@ -29,7 +29,7 @@ Signed-off-by: Markus Theil enum dfs_channel_type { -@@ -527,9 +528,14 @@ dfs_get_valid_channel(struct hostapd_ifa +@@ -534,9 +535,14 @@ dfs_get_valid_channel(struct hostapd_ifa int num_available_chandefs; int chan_idx, chan_idx2; int sec_chan_idx_80p80 = -1; @@ -44,7 +44,7 @@ Signed-off-by: Markus Theil wpa_printf(MSG_DEBUG, "DFS: Selecting random channel"); *secondary_channel = 0; *oper_centr_freq_seg0_idx = 0; -@@ -549,8 +555,20 @@ dfs_get_valid_channel(struct hostapd_ifa +@@ -556,8 +562,20 @@ dfs_get_valid_channel(struct hostapd_ifa if (num_available_chandefs == 0) return NULL; @@ -68,7 +68,7 @@ Signed-off-by: Markus Theil chan_idx, num_available_chandefs); --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -11306,6 +11306,10 @@ static int nl80211_switch_channel(void * +@@ -11465,6 +11465,10 @@ static int nl80211_switch_channel(void * if (ret) goto error; diff --git a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch index a39f03c0f1e4a7..b5551f50e60db0 100644 --- a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch +++ b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch @@ -4,7 +4,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -4756,6 +4756,13 @@ static int add_associated_sta(struct hos +@@ -4784,6 +4784,13 @@ static int add_associated_sta(struct hos * drivers to accept the STA parameter configuration. Since this is * after a new FT-over-DS exchange, a new TK has been derived, so key * reinstallation is not a concern for this case. @@ -18,7 +18,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc */ wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)", -@@ -4769,7 +4776,8 @@ static int add_associated_sta(struct hos +@@ -4797,7 +4804,8 @@ static int add_associated_sta(struct hos (!(sta->flags & WLAN_STA_AUTHORIZED) || (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) || (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) && diff --git a/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch b/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch index 0456ef20b1b850..2492e480fb5977 100644 --- a/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch +++ b/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch @@ -20,7 +20,7 @@ Signed-off-by: Stijn Tintel --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -3993,6 +3993,8 @@ int hostapd_remove_iface(struct hapd_int +@@ -4055,6 +4055,8 @@ int hostapd_remove_iface(struct hapd_int void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta, int reassoc) { @@ -29,7 +29,7 @@ Signed-off-by: Stijn Tintel if (hapd->tkip_countermeasures) { hostapd_drv_sta_deauth(hapd, sta->addr, WLAN_REASON_MICHAEL_MIC_FAILURE); -@@ -4000,10 +4002,16 @@ void hostapd_new_assoc_sta(struct hostap +@@ -4062,10 +4064,16 @@ void hostapd_new_assoc_sta(struct hostap } #ifdef CONFIG_IEEE80211BE diff --git a/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch index d3c261d077b3dd..46ee6234be6837 100644 --- a/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch +++ b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch @@ -26,7 +26,7 @@ Signed-off-by: David Bauer --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -2355,6 +2355,9 @@ struct wpa_driver_capa { +@@ -2390,6 +2390,9 @@ struct wpa_driver_capa { /** Maximum number of iterations in a single scan plan */ u32 max_sched_scan_plan_iterations; @@ -51,7 +51,7 @@ Signed-off-by: David Bauer nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]); --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c -@@ -221,7 +221,7 @@ nl80211_scan_common(struct i802_bss *bss +@@ -235,7 +235,7 @@ nl80211_scan_common(struct i802_bss *bss wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested"); } diff --git a/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch b/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch deleted file mode 100644 index 028d3563c36567..00000000000000 --- a/package/network/services/hostapd/patches/060-nl80211-fix-crash-when-adding-an-interface-fails.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Felix Fietkau -Date: Fri, 14 Jun 2024 14:41:16 +0200 -Subject: [PATCH] nl80211: fix crash when adding an interface fails - -When adding an interface fails early, the bss link is still NULL. -Avoid crashing on deleting beacons. - -Signed-off-by: Felix Fietkau ---- - ---- a/src/drivers/driver_nl80211.c -+++ b/src/drivers/driver_nl80211.c -@@ -3083,7 +3083,7 @@ static int wpa_driver_nl80211_del_beacon - struct wpa_driver_nl80211_data *drv = bss->drv; - struct i802_link *link = nl80211_get_link(bss, link_id); - -- if (!link->beacon_set) -+ if (!link || !link->beacon_set) - return 0; - - wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)", diff --git a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch index fd6055d2911c88..6bc1b78bdadb82 100644 --- a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch +++ b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch @@ -979,7 +979,7 @@ Signed-off-by: Glenn Strauss raise HwsimSkip("Crypto library does not support Brainpool curves: " + tls) capa = dev.request("GET_CAPABILITY dpp") ver = 1 -@@ -3902,6 +3903,9 @@ def test_dpp_proto_auth_req_no_i_proto_k +@@ -3925,6 +3926,9 @@ def test_dpp_proto_auth_req_no_i_proto_k def test_dpp_proto_auth_req_invalid_i_proto_key(dev, apdev): """DPP protocol testing - invalid I-proto key in Auth Req""" @@ -989,7 +989,7 @@ Signed-off-by: Glenn Strauss run_dpp_proto_auth_req_missing(dev, 66, "Invalid Initiator Protocol Key") def test_dpp_proto_auth_req_no_i_nonce(dev, apdev): -@@ -3997,7 +4001,12 @@ def test_dpp_proto_auth_resp_no_r_proto_ +@@ -4020,7 +4024,12 @@ def test_dpp_proto_auth_resp_no_r_proto_ def test_dpp_proto_auth_resp_invalid_r_proto_key(dev, apdev): """DPP protocol testing - invalid R-Proto Key in Auth Resp""" @@ -1003,7 +1003,7 @@ Signed-off-by: Glenn Strauss def test_dpp_proto_auth_resp_no_r_nonce(dev, apdev): """DPP protocol testing - no R-nonce in Auth Resp""" -@@ -4359,11 +4368,17 @@ def test_dpp_proto_pkex_exchange_resp_in +@@ -4382,11 +4391,17 @@ def test_dpp_proto_pkex_exchange_resp_in def test_dpp_proto_pkex_cr_req_invalid_bootstrap_key(dev, apdev): """DPP protocol testing - invalid Bootstrap Key in PKEX Commit-Reveal Request""" diff --git a/package/network/services/hostapd/patches/150-add-NULL-checks-encountered-during-tests-hwsim.patch b/package/network/services/hostapd/patches/150-add-NULL-checks-encountered-during-tests-hwsim.patch index c8c3ff33f42022..78ed459ee6965e 100644 --- a/package/network/services/hostapd/patches/150-add-NULL-checks-encountered-during-tests-hwsim.patch +++ b/package/network/services/hostapd/patches/150-add-NULL-checks-encountered-during-tests-hwsim.patch @@ -29,7 +29,7 @@ Signed-off-by: Glenn Strauss wpa_printf(MSG_DEBUG, "DPP: Generating a keypair"); --- a/src/common/sae.c +++ b/src/common/sae.c -@@ -1278,6 +1278,13 @@ void sae_deinit_pt(struct sae_pt *pt) +@@ -1279,6 +1279,13 @@ void sae_deinit_pt(struct sae_pt *pt) static int sae_derive_commit_element_ecc(struct sae_data *sae, struct crypto_bignum *mask) { diff --git a/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch b/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch index 0f7b8ef7f78b96..0af7a379bcb222 100644 --- a/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch +++ b/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch @@ -40,7 +40,7 @@ Signed-off-by: P Praneesh #endif /* CONFIG_IEEE80211AC */ --- a/src/ap/ieee802_11_ht.c +++ b/src/ap/ieee802_11_ht.c -@@ -82,7 +82,9 @@ u8 * hostapd_eid_ht_capabilities(struct +@@ -127,7 +127,9 @@ no_update: u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid) { struct ieee80211_ht_operation *oper; @@ -50,9 +50,9 @@ Signed-off-by: P Praneesh if (!hapd->iconf->ieee80211n || hapd->conf->disable_11n || is_6ghz_op_class(hapd->iconf->op_class)) -@@ -103,6 +105,13 @@ u8 * hostapd_eid_ht_operation(struct hos - oper->ht_param |= HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW | - HT_INFO_HT_PARAM_STA_CHNL_WIDTH; +@@ -143,6 +145,13 @@ u8 * hostapd_eid_ht_operation(struct hos + oper->operation_mode = host_to_le16(hapd->iface->ht_op_mode); + set_ht_param(hapd, oper); + vht_capabilities_info = host_to_le32(hapd->iface->current_mode->vht_capab); + chwidth = hostapd_get_oper_chwidth(hapd->iconf); @@ -130,7 +130,7 @@ Signed-off-by: P Praneesh #undef VHT_CAP_CHECK_MAX --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h -@@ -1398,6 +1398,8 @@ struct ieee80211_ampe_ie { +@@ -1401,6 +1401,8 @@ struct ieee80211_ampe_ie { #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB ((u32) BIT(26) | BIT(27)) #define VHT_CAP_RX_ANTENNA_PATTERN ((u32) BIT(28)) #define VHT_CAP_TX_ANTENNA_PATTERN ((u32) BIT(29)) diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 8bb3d8de6cf9b5..80a484e974d25d 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -71,7 +71,7 @@ This allows building both hostapd and wpa_supplicant as a single binary @$(E) " LD " $@ --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -692,6 +692,11 @@ fail: +@@ -696,6 +696,11 @@ fail: return -1; } @@ -83,7 +83,7 @@ This allows building both hostapd and wpa_supplicant as a single binary #ifdef CONFIG_WPS static int gen_uuid(const char *txt_addr) -@@ -808,6 +813,8 @@ int main(int argc, char *argv[]) +@@ -817,6 +822,8 @@ int main(int argc, char *argv[]) return -1; #endif /* CONFIG_DPP */ @@ -94,8 +94,8 @@ 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 -@@ -2409,8 +2409,8 @@ static void hostapd_event_color_change(s - #endif /* CONFIG_IEEE80211AX */ +@@ -2520,8 +2520,8 @@ static void hostapd_mld_iface_disable(st + #endif /* CONFIG_IEEE80211BE */ -void wpa_supplicant_event(void *ctx, enum wpa_event_type event, @@ -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; -@@ -2769,7 +2769,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -2879,7 +2879,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 -@@ -6847,8 +6847,8 @@ union wpa_event_data { +@@ -6974,8 +6974,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 -@@ -6860,7 +6860,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -6987,7 +6987,7 @@ void wpa_supplicant_event(void *ctx, enu * Same as wpa_supplicant_event(), but we search for the interface in * wpa_global. */ @@ -278,8 +278,8 @@ This allows building both hostapd and wpa_supplicant as a single binary os_memset(&eapol_test, 0, sizeof(eapol_test)); --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -5979,8 +5979,8 @@ static void wpas_link_reconfig(struct wp - } +@@ -6131,8 +6131,8 @@ static int wpas_pasn_auth(struct wpa_sup + #endif /* CONFIG_PASN */ -void wpa_supplicant_event(void *ctx, enum wpa_event_type event, @@ -289,7 +289,7 @@ This allows building both hostapd and wpa_supplicant as a single binary { struct wpa_supplicant *wpa_s = ctx; int resched; -@@ -6932,7 +6932,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -7084,7 +7084,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -331,7 +331,7 @@ This allows building both hostapd and wpa_supplicant as a single binary os_memset(&global, 0, sizeof(global)); --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -7714,7 +7714,6 @@ struct wpa_interface * wpa_supplicant_ma +@@ -7787,7 +7787,6 @@ struct wpa_interface * wpa_supplicant_ma return NULL; } @@ -339,7 +339,7 @@ This allows building both hostapd and wpa_supplicant as a single binary /** * wpa_supplicant_match_existing - Match existing interfaces * @global: Pointer to global data from wpa_supplicant_init() -@@ -7749,6 +7748,11 @@ static int wpa_supplicant_match_existing +@@ -7822,6 +7821,11 @@ static int wpa_supplicant_match_existing #endif /* CONFIG_MATCH_IFACE */ @@ -351,7 +351,7 @@ This allows building both hostapd and wpa_supplicant as a single binary /** * wpa_supplicant_add_iface - Add a new network interface -@@ -8005,6 +8009,8 @@ struct wpa_global * wpa_supplicant_init( +@@ -8078,6 +8082,8 @@ struct wpa_global * wpa_supplicant_init( #ifndef CONFIG_NO_WPA_MSG wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ diff --git a/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch index 475a50b87e5420..38d4d1500a4347 100644 --- a/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch +++ b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch @@ -13,7 +13,7 @@ Signed-off-by: David Bauer --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c -@@ -13233,7 +13233,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13292,7 +13292,7 @@ char * wpa_supplicant_ctrl_iface_process if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18)) reply_len = -1; #endif /* CONFIG_WNM */ @@ -22,7 +22,7 @@ Signed-off-by: David Bauer } else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) { if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18)) reply_len = -1; -@@ -13243,7 +13243,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13302,7 +13302,7 @@ char * wpa_supplicant_ctrl_iface_process } else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) { if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11)) reply_len = -1; diff --git a/package/network/services/hostapd/patches/220-indicate-features.patch b/package/network/services/hostapd/patches/220-indicate-features.patch index ab0af9593e3324..13a5c38631d041 100644 --- a/package/network/services/hostapd/patches/220-indicate-features.patch +++ b/package/network/services/hostapd/patches/220-indicate-features.patch @@ -15,7 +15,7 @@ Subject: [PATCH] hostapd: support optional argument for the -v switch of struct hapd_global { void **drv_priv; -@@ -816,7 +816,7 @@ int main(int argc, char *argv[]) +@@ -825,7 +825,7 @@ int main(int argc, char *argv[]) wpa_supplicant_event = hostapd_wpa_event; wpa_supplicant_event_global = hostapd_wpa_event_global; for (;;) { @@ -24,7 +24,7 @@ Subject: [PATCH] hostapd: support optional argument for the -v switch of if (c < 0) break; switch (c) { -@@ -853,6 +853,8 @@ int main(int argc, char *argv[]) +@@ -862,6 +862,8 @@ int main(int argc, char *argv[]) break; #endif /* CONFIG_DEBUG_LINUX_TRACING */ case 'v': diff --git a/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch b/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch index 58143020ce0a17..90737b2ac0e9b6 100644 --- a/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch +++ b/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch @@ -5,7 +5,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c -@@ -401,7 +401,6 @@ static int hostapd_cli_cmd_disassociate( +@@ -409,7 +409,6 @@ static int hostapd_cli_cmd_disassociate( } @@ -13,7 +13,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the static int hostapd_cli_cmd_signature(struct wpa_ctrl *ctrl, int argc, char *argv[]) { -@@ -414,7 +413,6 @@ static int hostapd_cli_cmd_signature(str +@@ -422,7 +421,6 @@ static int hostapd_cli_cmd_signature(str os_snprintf(buf, sizeof(buf), "SIGNATURE %s", argv[0]); return wpa_ctrl_command(ctrl, buf); } @@ -21,7 +21,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc, -@@ -431,7 +429,6 @@ static int hostapd_cli_cmd_sa_query(stru +@@ -439,7 +437,6 @@ static int hostapd_cli_cmd_sa_query(stru } @@ -29,7 +29,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) { -@@ -657,7 +654,6 @@ static int hostapd_cli_cmd_wps_config(st +@@ -665,7 +662,6 @@ static int hostapd_cli_cmd_wps_config(st ssid_hex, argv[1]); return wpa_ctrl_command(ctrl, buf); } @@ -37,7 +37,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc, -@@ -1686,13 +1682,10 @@ static const struct hostapd_cli_cmd host +@@ -1694,13 +1690,10 @@ static const struct hostapd_cli_cmd host { "disassociate", hostapd_cli_cmd_disassociate, hostapd_complete_stations, " = disassociate a station" }, @@ -51,7 +51,7 @@ Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the { "wps_pin", hostapd_cli_cmd_wps_pin, NULL, " [timeout] [addr] = add WPS Enrollee PIN" }, { "wps_check_pin", hostapd_cli_cmd_wps_check_pin, NULL, -@@ -1717,7 +1710,6 @@ static const struct hostapd_cli_cmd host +@@ -1725,7 +1718,6 @@ static const struct hostapd_cli_cmd host " = configure AP" }, { "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL, "= show current WPS status" }, diff --git a/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch index fd63ff08bee0a4..0801a93bcd6ed7 100644 --- a/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch +++ b/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch @@ -16,7 +16,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality else --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -4005,6 +4005,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -4057,6 +4057,7 @@ static int hostapd_ctrl_iface_receive_pr reply_size); } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) { reply_len = hostapd_drv_status(hapd, reply, reply_size); @@ -24,7 +24,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strcmp(buf, "MIB") == 0) { reply_len = ieee802_11_get_mib(hapd, reply, reply_size); if (reply_len >= 0) { -@@ -4046,6 +4047,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -4098,6 +4099,7 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, reply_size); @@ -96,7 +96,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality #ifdef CONFIG_P2P_MANAGER static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype, -@@ -1010,12 +1011,12 @@ int hostapd_ctrl_iface_status(struct hos +@@ -1016,12 +1017,12 @@ int hostapd_ctrl_iface_status(struct hos return len; len += ret; } @@ -113,7 +113,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality if (os_snprintf_error(buflen - len, ret)) --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c -@@ -2848,6 +2848,7 @@ static const char * bool_txt(bool val) +@@ -2869,6 +2869,7 @@ static const char * bool_txt(bool val) return val ? "TRUE" : "FALSE"; } @@ -121,7 +121,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) { -@@ -3034,6 +3035,7 @@ int ieee802_1x_get_mib_sta(struct hostap +@@ -3055,6 +3056,7 @@ int ieee802_1x_get_mib_sta(struct hostap return len; } @@ -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 -@@ -5956,6 +5956,7 @@ static const char * wpa_bool_txt(int val +@@ -6141,6 +6141,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) \ -@@ -6108,7 +6109,7 @@ int wpa_get_mib_sta(struct wpa_state_mac +@@ -6293,7 +6294,7 @@ int wpa_get_mib_sta(struct wpa_state_mac return len; } @@ -150,7 +150,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality { --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -3974,6 +3974,8 @@ static u32 wpa_key_mgmt_suite(struct wpa +@@ -4155,6 +4155,8 @@ static u32 wpa_key_mgmt_suite(struct wpa } @@ -159,7 +159,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff -@@ -4055,6 +4057,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch +@@ -4236,6 +4238,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch return (int) len; } @@ -201,7 +201,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality if (wpa_s->ap_iface) { pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos, end - pos, -@@ -12561,6 +12561,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -12620,6 +12620,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = -1; } else if (os_strncmp(buf, "NOTE ", 5) == 0) { wpa_printf(MSG_INFO, "NOTE: %s", buf + 5); @@ -209,7 +209,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strcmp(buf, "MIB") == 0) { reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); if (reply_len >= 0) { -@@ -12573,6 +12574,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -12632,6 +12633,7 @@ char * wpa_supplicant_ctrl_iface_process reply_size - reply_len); #endif /* CONFIG_MACSEC */ } @@ -217,7 +217,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strncmp(buf, "STATUS", 6) == 0) { reply_len = wpa_supplicant_ctrl_iface_status( wpa_s, buf + 6, reply, reply_size); -@@ -13061,6 +13063,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13120,6 +13122,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = wpa_supplicant_ctrl_iface_bss( wpa_s, buf + 4, reply, reply_size); #ifdef CONFIG_AP @@ -225,7 +225,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality } else if (os_strcmp(buf, "STA-FIRST") == 0) { reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size); } else if (os_strncmp(buf, "STA ", 4) == 0) { -@@ -13069,12 +13072,15 @@ char * wpa_supplicant_ctrl_iface_process +@@ -13128,12 +13131,15 @@ char * wpa_supplicant_ctrl_iface_process } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply, reply_size); diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch index 35a5abd2b23e1b..6deb2722b37198 100644 --- a/package/network/services/hostapd/patches/300-noscan.patch +++ b/package/network/services/hostapd/patches/300-noscan.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3680,6 +3680,10 @@ static int hostapd_config_fill(struct ho +@@ -3747,6 +3747,10 @@ static int hostapd_config_fill(struct ho if (bss->ocv && !bss->ieee80211w) bss->ieee80211w = 1; #endif /* CONFIG_OCV */ @@ -18,7 +18,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options } else if (os_strcmp(buf, "ht_capab") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -1108,6 +1108,8 @@ struct hostapd_config { +@@ -1122,6 +1122,8 @@ struct hostapd_config { int ht_op_mode_fixed; u16 ht_capab; @@ -29,7 +29,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options int no_pri_sec_switch; --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c -@@ -551,7 +551,8 @@ static int ieee80211n_check_40mhz(struct +@@ -573,7 +573,8 @@ static int ieee80211n_check_40mhz(struct int ret; /* Check that HT40 is used and PRI / SEC switch is allowed */ @@ -41,7 +41,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options hostapd_set_state(iface, HAPD_IFACE_HT_SCAN); --- a/src/ap/ieee802_11_ht.c +++ b/src/ap/ieee802_11_ht.c -@@ -239,6 +239,9 @@ void hostapd_2040_coex_action(struct hos +@@ -279,6 +279,9 @@ void hostapd_2040_coex_action(struct hos return; } @@ -51,7 +51,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) { wpa_printf(MSG_DEBUG, "Ignore too short 20/40 BSS Coexistence Management frame"); -@@ -399,6 +402,9 @@ void ht40_intolerant_add(struct hostapd_ +@@ -439,6 +442,9 @@ void ht40_intolerant_add(struct hostapd_ if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) return; diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch b/package/network/services/hostapd/patches/301-mesh-noscan.patch index 1f96a81eb03a0c..e5fd053232705f 100644 --- a/package/network/services/hostapd/patches/301-mesh-noscan.patch +++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch @@ -47,7 +47,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also /* --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2881,7 +2881,7 @@ static bool ibss_mesh_can_use_vht(struct +@@ -2903,7 +2903,7 @@ static bool ibss_mesh_can_use_vht(struct const struct wpa_ssid *ssid, struct hostapd_hw_modes *mode) { @@ -56,7 +56,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also return false; if (!drv_supports_vht(wpa_s, ssid)) -@@ -2954,7 +2954,7 @@ static void ibss_mesh_select_40mhz(struc +@@ -2976,7 +2976,7 @@ static void ibss_mesh_select_40mhz(struc int i, res; unsigned int j; static const int ht40plus[] = { @@ -65,7 +65,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also 149, 157, 165, 173, 184, 192 }; int ht40 = -1; -@@ -3205,7 +3205,7 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3227,7 +3227,7 @@ void ibss_mesh_setup_freq(struct wpa_sup int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode); enum hostapd_hw_mode hw_mode; struct hostapd_hw_modes *mode = NULL; @@ -74,7 +74,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also u8 channel; bool is_6ghz, is_24ghz; bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR); -@@ -3249,6 +3249,8 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3271,6 +3271,8 @@ void ibss_mesh_setup_freq(struct wpa_sup freq->he_enabled = ibss_mesh_can_use_he(wpa_s, ssid, mode, ieee80211_mode); freq->channel = channel; diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch index 637f5c31a8d795..038bce9e9d3589 100644 --- a/package/network/services/hostapd/patches/310-rescan_immediately.patch +++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch @@ -5,7 +5,7 @@ Subject: [PATCH] rescan_immediately.patch --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -6001,7 +6001,7 @@ wpa_supplicant_alloc(struct wpa_supplica +@@ -6073,7 +6073,7 @@ wpa_supplicant_alloc(struct wpa_supplica if (wpa_s == NULL) return NULL; wpa_s->scan_req = INITIAL_SCAN_REQ; diff --git a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch index e4cc33b5122449..e757a6df00527c 100644 --- a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch +++ b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch @@ -5,7 +5,7 @@ Subject: [PATCH] nl80211_fix_set_freq.patch --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -5494,7 +5494,7 @@ static int nl80211_set_channel(struct i8 +@@ -5512,7 +5512,7 @@ static int nl80211_set_channel(struct i8 freq->he_enabled, freq->eht_enabled, freq->bandwidth, freq->center_freq1, freq->center_freq2); diff --git a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch index e73f817248fbdc..c3b3ded908cc82 100644 --- a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch +++ b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch @@ -4,7 +4,7 @@ Subject: [PATCH] nl80211_del_beacon_bss.patch --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -6183,8 +6183,7 @@ static void nl80211_teardown_ap(struct i +@@ -6253,8 +6253,7 @@ static void nl80211_teardown_ap(struct i nl80211_mgmt_unsubscribe(bss, "AP teardown"); nl80211_put_wiphy_data_ap(bss); diff --git a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch index e68edacb44062c..29026ac9d1c0a9 100644 --- a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch +++ b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch @@ -11,7 +11,7 @@ if CONFIG_CTRL_IFACE_MIB is not defined. --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c -@@ -753,7 +753,7 @@ static int wpa_ctrl_command_sta(struct w +@@ -761,7 +761,7 @@ static int wpa_ctrl_command_sta(struct w } buf[len] = '\0'; diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch index 9a2f58d52a047e..cc7b1317872f41 100644 --- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -14,7 +14,7 @@ Signed-hostap: Antonio Quartulli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -979,6 +979,9 @@ struct wpa_driver_associate_params { +@@ -1004,6 +1004,9 @@ struct wpa_driver_associate_params { * responsible for selecting with which BSS to associate. */ const u8 *bssid; @@ -155,7 +155,7 @@ Signed-hostap: Antonio Quartulli * macsec_policy - Determines the policy for MACsec secure session --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -4370,6 +4370,12 @@ static void wpas_start_assoc_cb(struct w +@@ -4435,6 +4435,12 @@ static void wpas_start_assoc_cb(struct w params.beacon_int = ssid->beacon_int; else params.beacon_int = wpa_s->conf->beacon_int; diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch index 54ef753fc40ec3..80ccb1c2071b46 100644 --- a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch +++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch @@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -1889,6 +1889,7 @@ struct wpa_driver_mesh_join_params { +@@ -1920,6 +1920,7 @@ struct wpa_driver_mesh_join_params { #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008 unsigned int flags; bool handle_dfs; @@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich struct wpa_driver_set_key_params { --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -11983,6 +11983,18 @@ static int nl80211_put_mesh_id(struct nl +@@ -12142,6 +12142,18 @@ static int nl80211_put_mesh_id(struct nl } @@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich static int nl80211_put_mesh_config(struct nl_msg *msg, struct wpa_driver_mesh_bss_params *params) { -@@ -12044,6 +12056,7 @@ static int nl80211_join_mesh(struct i802 +@@ -12203,6 +12215,7 @@ static int nl80211_join_mesh(struct i802 nl80211_put_basic_rates(msg, params->basic_rates) || nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) || nl80211_put_beacon_int(msg, params->beacon_int) || diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch index 3d995fe3b0394a..9d39db5a634eee 100644 --- a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch +++ b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix issues with disabling obss scan when using fixed_freq on --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -3212,6 +3212,10 @@ void ibss_mesh_setup_freq(struct wpa_sup +@@ -3234,6 +3234,10 @@ void ibss_mesh_setup_freq(struct wpa_sup freq->freq = ssid->frequency; diff --git a/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch b/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch index e291615526d3dd..16962024456d49 100644 --- a/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch +++ b/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch @@ -13,7 +13,7 @@ Signed-off-by: David Bauer --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3734,6 +3734,8 @@ static int hostapd_config_fill(struct ho +@@ -3801,6 +3801,8 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "he_bss_color") == 0) { conf->he_op.he_bss_color = atoi(pos) & 0x3f; conf->he_op.he_bss_color_disabled = 0; diff --git a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch index 999a2a378109da..be09ed319c9663 100644 --- a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch +++ b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch @@ -10,7 +10,7 @@ method. --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h -@@ -168,6 +168,21 @@ struct hostapd_sae_commit_queue { +@@ -185,6 +185,21 @@ struct mld_link_info { }; /** @@ -32,7 +32,7 @@ method. * struct hostapd_data - hostapd per-BSS data structure */ struct hostapd_data { -@@ -181,6 +196,9 @@ struct hostapd_data { +@@ -198,6 +213,9 @@ struct hostapd_data { u8 own_addr[ETH_ALEN]; diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index b4caabd8262025..fb3bfb012030bd 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -53,7 +53,7 @@ probe/assoc/auth requests via object subscribe. } --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -1357,6 +1357,12 @@ void handle_probe_req(struct hostapd_dat +@@ -1418,6 +1418,12 @@ void handle_probe_req(struct hostapd_dat int mld_id; u16 links; #endif /* CONFIG_IEEE80211BE */ @@ -66,7 +66,7 @@ probe/assoc/auth requests via object subscribe. if (hapd->iconf->rssi_ignore_probe_request && ssi_signal && ssi_signal < hapd->iconf->rssi_ignore_probe_request) -@@ -1543,6 +1549,12 @@ void handle_probe_req(struct hostapd_dat +@@ -1604,6 +1610,12 @@ void handle_probe_req(struct hostapd_dat } #endif /* CONFIG_P2P */ @@ -81,7 +81,7 @@ probe/assoc/auth requests via object subscribe. --- a/src/ap/dfs.c +++ b/src/ap/dfs.c -@@ -1236,6 +1236,8 @@ int hostapd_dfs_pre_cac_expired(struct h +@@ -1243,6 +1243,8 @@ int hostapd_dfs_pre_cac_expired(struct h "freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d", freq, ht_enabled, chan_offset, chan_width, cf1, cf2); @@ -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 -@@ -268,6 +268,10 @@ int hostapd_notif_assoc(struct hostapd_d +@@ -317,6 +317,10 @@ int hostapd_notif_assoc(struct hostapd_d struct hostapd_iface *iface = hapd->iface; #endif /* CONFIG_OWE */ bool updated = false; @@ -103,7 +103,7 @@ probe/assoc/auth requests via object subscribe. if (addr == NULL) { /* -@@ -412,6 +416,12 @@ int hostapd_notif_assoc(struct hostapd_d +@@ -461,6 +465,12 @@ int hostapd_notif_assoc(struct hostapd_d goto fail; } @@ -126,7 +126,7 @@ probe/assoc/auth requests via object subscribe. accounting_deinit(hapd); hostapd_deinit_wpa(hapd); vlan_deinit(hapd); -@@ -1303,6 +1304,8 @@ static int hostapd_start_beacon(struct h +@@ -1316,6 +1317,8 @@ static int hostapd_start_beacon(struct h if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -135,7 +135,7 @@ probe/assoc/auth requests via object subscribe. return 0; } -@@ -2481,6 +2484,7 @@ static int hostapd_setup_interface_compl +@@ -2525,6 +2528,7 @@ static int hostapd_setup_interface_compl if (err) goto fail; @@ -143,7 +143,7 @@ probe/assoc/auth requests via object subscribe. wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (iface->freq) { #ifdef NEED_AP_MLME -@@ -2700,6 +2704,7 @@ dfs_offload: +@@ -2750,6 +2754,7 @@ dfs_offload: fail: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -151,7 +151,7 @@ probe/assoc/auth requests via object subscribe. if (iface->is_no_ir) { hostapd_set_state(iface, HAPD_IFACE_NO_IR); -@@ -3416,6 +3421,7 @@ void hostapd_interface_deinit_free(struc +@@ -3478,6 +3483,7 @@ void hostapd_interface_deinit_free(struc (unsigned int) iface->conf->num_bss); driver = iface->bss[0]->driver; drv_priv = iface->bss[0]->drv_priv; @@ -169,7 +169,7 @@ probe/assoc/auth requests via object subscribe. #define OCE_STA_CFON_ENABLED(hapd) \ ((hapd->conf->oce & OCE_STA_CFON) && \ -@@ -189,6 +190,7 @@ struct hostapd_data { +@@ -206,6 +207,7 @@ struct hostapd_data { struct hostapd_iface *iface; struct hostapd_config *iconf; struct hostapd_bss_config *conf; @@ -177,7 +177,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; -@@ -743,6 +745,7 @@ hostapd_alloc_bss_data(struct hostapd_if +@@ -776,6 +778,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); @@ -187,7 +187,7 @@ probe/assoc/auth requests via object subscribe. struct hostapd_iface * hostapd_alloc_iface(void); --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -2874,7 +2874,7 @@ static void handle_auth(struct hostapd_d +@@ -2897,7 +2897,7 @@ static void handle_auth(struct hostapd_d u16 auth_alg, auth_transaction, status_code; u16 resp = WLAN_STATUS_SUCCESS; struct sta_info *sta = NULL; @@ -196,7 +196,7 @@ probe/assoc/auth requests via object subscribe. u16 fc; const u8 *challenge = NULL; u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN]; -@@ -2885,6 +2885,11 @@ static void handle_auth(struct hostapd_d +@@ -2908,6 +2908,11 @@ static void handle_auth(struct hostapd_d #ifdef CONFIG_IEEE80211BE bool mld_sta = false; #endif /* CONFIG_IEEE80211BE */ @@ -208,7 +208,7 @@ probe/assoc/auth requests via object subscribe. if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)", -@@ -3078,6 +3083,13 @@ static void handle_auth(struct hostapd_d +@@ -3104,6 +3109,13 @@ static void handle_auth(struct hostapd_d resp = WLAN_STATUS_UNSPECIFIED_FAILURE; goto fail; } @@ -222,7 +222,7 @@ probe/assoc/auth requests via object subscribe. if (res == HOSTAPD_ACL_PENDING) return; -@@ -5338,7 +5350,7 @@ static void handle_assoc(struct hostapd_ +@@ -5367,7 +5379,7 @@ static void handle_assoc(struct hostapd_ int resp = WLAN_STATUS_SUCCESS; u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE; const u8 *pos; @@ -231,7 +231,7 @@ probe/assoc/auth requests via object subscribe. struct sta_info *sta; u8 *tmp = NULL; #ifdef CONFIG_FILS -@@ -5580,6 +5592,11 @@ static void handle_assoc(struct hostapd_ +@@ -5609,6 +5621,11 @@ static void handle_assoc(struct hostapd_ left = res; } #endif /* CONFIG_FILS */ @@ -243,7 +243,7 @@ probe/assoc/auth requests via object subscribe. /* followed by SSID and Supported rates; and HT capabilities if 802.11n * is used */ -@@ -5682,6 +5699,13 @@ static void handle_assoc(struct hostapd_ +@@ -5711,6 +5728,13 @@ static void handle_assoc(struct hostapd_ if (set_beacon) ieee802_11_update_beacons(hapd->iface); @@ -257,7 +257,7 @@ probe/assoc/auth requests via object subscribe. fail: /* -@@ -5911,6 +5935,7 @@ static void handle_disassoc(struct hosta +@@ -5940,6 +5964,7 @@ static void handle_disassoc(struct hosta (unsigned long) len); return; } @@ -265,7 +265,7 @@ probe/assoc/auth requests via object subscribe. sta = ap_get_sta(hapd, mgmt->sa); if (!sta) { -@@ -5942,6 +5967,8 @@ static void handle_deauth(struct hostapd +@@ -5971,6 +5996,8 @@ static void handle_deauth(struct hostapd /* Clear the PTKSA cache entries for PASN */ ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE); @@ -382,7 +382,7 @@ probe/assoc/auth requests via object subscribe. hapd->msg_ctx_parent != hapd->msg_ctx) --- a/src/ap/sta_info.h +++ b/src/ap/sta_info.h -@@ -317,6 +317,7 @@ struct sta_info { +@@ -304,6 +304,7 @@ struct sta_info { #endif /* CONFIG_TESTING_OPTIONS */ #ifdef CONFIG_AIRTIME_POLICY unsigned int airtime_weight; @@ -470,7 +470,7 @@ probe/assoc/auth requests via object subscribe. } --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c -@@ -279,6 +279,7 @@ static void hostapd_wpa_auth_psk_failure +@@ -328,6 +328,7 @@ static void hostapd_wpa_auth_psk_failure struct hostapd_data *hapd = ctx; wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR, MAC2STR(addr)); @@ -675,7 +675,7 @@ probe/assoc/auth requests via object subscribe. break; --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -7847,6 +7847,8 @@ struct wpa_supplicant * wpa_supplicant_a +@@ -7920,6 +7920,8 @@ struct wpa_supplicant * wpa_supplicant_a } #endif /* CONFIG_P2P */ @@ -684,7 +684,7 @@ probe/assoc/auth requests via object subscribe. return wpa_s; } -@@ -7873,6 +7875,8 @@ int wpa_supplicant_remove_iface(struct w +@@ -7946,6 +7948,8 @@ int wpa_supplicant_remove_iface(struct w struct wpa_supplicant *parent = wpa_s->parent; #endif /* CONFIG_MESH */ @@ -693,7 +693,7 @@ probe/assoc/auth requests via object subscribe. /* Remove interface from the global list of interfaces */ prev = global->ifaces; if (prev == wpa_s) { -@@ -8219,8 +8223,12 @@ int wpa_supplicant_run(struct wpa_global +@@ -8292,8 +8296,12 @@ int wpa_supplicant_run(struct wpa_global eloop_register_signal_terminate(wpa_supplicant_terminate, global); eloop_register_signal_reconfig(wpa_supplicant_reconfig, global); diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch index e242e3ae5034d9..737966201491f1 100644 --- a/package/network/services/hostapd/patches/601-ucode_support.patch +++ b/package/network/services/hostapd/patches/601-ucode_support.patch @@ -34,7 +34,7 @@ as adding/removing interfaces. ifdef CONFIG_CODE_COVERAGE --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -5603,6 +5603,7 @@ try_again: +@@ -5998,6 +5998,7 @@ try_again: return -1; } @@ -42,7 +42,7 @@ as adding/removing interfaces. wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb); return 0; -@@ -5704,6 +5705,7 @@ fail: +@@ -6099,6 +6100,7 @@ fail: os_free(fname); interface->global_ctrl_sock = s; @@ -52,7 +52,7 @@ as adding/removing interfaces. --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -1024,6 +1024,7 @@ int main(int argc, char *argv[]) +@@ -1033,6 +1033,7 @@ int main(int argc, char *argv[]) } hostapd_global_ctrl_iface_init(&interfaces); @@ -60,7 +60,7 @@ as adding/removing interfaces. if (hostapd_global_run(&interfaces, daemonize, pid_file)) { wpa_printf(MSG_ERROR, "Failed to start eloop"); -@@ -1033,6 +1034,7 @@ int main(int argc, char *argv[]) +@@ -1042,6 +1043,7 @@ int main(int argc, char *argv[]) ret = 0; out: @@ -70,7 +70,7 @@ as adding/removing interfaces. for (i = 0; i < interfaces.count; i++) { --- a/src/ap/ap_drv_ops.h +++ b/src/ap/ap_drv_ops.h -@@ -404,6 +404,23 @@ static inline int hostapd_drv_stop_ap(st +@@ -409,6 +409,23 @@ static inline int hostapd_drv_stop_ap(st return hapd->driver->stop_ap(hapd->drv_priv, link_id); } @@ -113,7 +113,7 @@ as adding/removing interfaces. hostapd_ubus_free_bss(hapd); accounting_deinit(hapd); hostapd_deinit_wpa(hapd); -@@ -716,6 +719,7 @@ void hostapd_cleanup_iface_partial(struc +@@ -729,6 +732,7 @@ void hostapd_cleanup_iface_partial(struc static void hostapd_cleanup_iface(struct hostapd_iface *iface) { wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface); @@ -121,7 +121,7 @@ as adding/removing interfaces. eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface, NULL); -@@ -1305,6 +1309,7 @@ static int hostapd_start_beacon(struct h +@@ -1318,6 +1322,7 @@ static int hostapd_start_beacon(struct h hapd->driver->set_operstate(hapd->drv_priv, 1); hostapd_ubus_add_bss(hapd); @@ -129,7 +129,7 @@ as adding/removing interfaces. return 0; } -@@ -1380,8 +1385,7 @@ static int hostapd_bss_radius_init(struc +@@ -1393,8 +1398,7 @@ static int hostapd_bss_radius_init(struc * initialized. Most of the modules that are initialized here will be * deinitialized in hostapd_cleanup(). */ @@ -139,7 +139,7 @@ as adding/removing interfaces. { struct hostapd_bss_config *conf = hapd->conf; u8 ssid[SSID_MAX_LEN + 1]; -@@ -2904,7 +2908,7 @@ hostapd_alloc_bss_data(struct hostapd_if +@@ -2954,7 +2958,7 @@ hostapd_alloc_bss_data(struct hostapd_if } @@ -148,7 +148,7 @@ as adding/removing interfaces. { if (!hapd) return; -@@ -3953,7 +3957,8 @@ int hostapd_remove_iface(struct hapd_int +@@ -4015,7 +4019,8 @@ int hostapd_remove_iface(struct hapd_int hapd_iface = interfaces->iface[i]; if (hapd_iface == NULL) return -1; @@ -179,7 +179,7 @@ as adding/removing interfaces. int (*for_each_interface)(struct hapd_interfaces *interfaces, int (*cb)(struct hostapd_iface *iface, void *ctx), void *ctx); -@@ -191,6 +196,7 @@ struct hostapd_data { +@@ -208,6 +213,7 @@ struct hostapd_data { struct hostapd_config *iconf; struct hostapd_bss_config *conf; struct hostapd_ubus_bss ubus; @@ -187,7 +187,7 @@ as adding/removing interfaces. int interface_added; /* virtual interface added for this BSS */ unsigned int started:1; unsigned int disabled:1; -@@ -548,6 +554,7 @@ struct hostapd_mld { +@@ -577,6 +583,7 @@ struct hostapd_mld { */ struct hostapd_iface { struct hapd_interfaces *interfaces; @@ -195,7 +195,7 @@ as adding/removing interfaces. void *owner; char *config_fname; struct hostapd_config *conf; -@@ -754,6 +761,8 @@ struct hostapd_iface * hostapd_init(stru +@@ -787,6 +794,8 @@ 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); @@ -206,7 +206,7 @@ as adding/removing interfaces. void hostapd_interface_deinit_free(struct hostapd_iface *iface); --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -3893,6 +3893,25 @@ struct wpa_driver_ops { +@@ -3928,6 +3928,25 @@ struct wpa_driver_ops { const char *ifname); /** @@ -232,7 +232,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) -@@ -6593,6 +6612,7 @@ union wpa_event_data { +@@ -6720,6 +6739,7 @@ union wpa_event_data { /** * struct ch_switch @@ -240,7 +240,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 -@@ -6603,6 +6623,7 @@ union wpa_event_data { +@@ -6730,6 +6750,7 @@ union wpa_event_data { * @punct_bitmap: Puncturing bitmap */ struct ch_switch { @@ -250,7 +250,7 @@ as adding/removing interfaces. int ch_offset; --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -75,6 +75,16 @@ enum nlmsgerr_attrs { +@@ -77,6 +77,16 @@ enum nlmsgerr_attrs { #endif /* ANDROID */ @@ -267,7 +267,7 @@ as adding/removing interfaces. static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg) { -@@ -429,6 +439,11 @@ static int no_seq_check(struct nl_msg *m +@@ -431,6 +441,11 @@ static int no_seq_check(struct nl_msg *m return NL_OK; } @@ -279,7 +279,7 @@ as adding/removing interfaces. static void nl80211_nlmsg_clear(struct nl_msg *msg) { -@@ -502,6 +517,8 @@ int send_and_recv(struct nl80211_global +@@ -504,6 +519,8 @@ int send_and_recv(struct nl80211_global if (!msg) return -ENOMEM; @@ -288,7 +288,7 @@ as adding/removing interfaces. err.err = -ENOMEM; s_nl_cb = nl_socket_get_cb(nl_handle); -@@ -536,6 +553,7 @@ int send_and_recv(struct nl80211_global +@@ -538,6 +555,7 @@ int send_and_recv(struct nl80211_global err.orig_msg = msg; err.err_info = err_info; @@ -296,7 +296,7 @@ as adding/removing interfaces. nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err); nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err.err); if (ack_handler_custom) { -@@ -939,6 +957,7 @@ nl80211_get_wiphy_data_ap(struct i802_bs +@@ -941,6 +959,7 @@ nl80211_get_wiphy_data_ap(struct i802_bs os_free(w); return NULL; } @@ -304,7 +304,7 @@ as adding/removing interfaces. nl_cb_set(w->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL); nl_cb_set(w->nl_cb, NL_CB_VALID, NL_CB_CUSTOM, -@@ -1353,7 +1372,7 @@ static void wpa_driver_nl80211_event_rtm +@@ -1355,7 +1374,7 @@ static void wpa_driver_nl80211_event_rtm } wpa_printf(MSG_DEBUG, "nl80211: Interface down (%s/%s)", namebuf, ifname); @@ -313,7 +313,7 @@ as adding/removing interfaces. wpa_printf(MSG_DEBUG, "nl80211: Not the main interface (%s) - do not indicate interface down", drv->first_bss->ifname); -@@ -1389,7 +1408,7 @@ static void wpa_driver_nl80211_event_rtm +@@ -1391,7 +1410,7 @@ static void wpa_driver_nl80211_event_rtm } wpa_printf(MSG_DEBUG, "nl80211: Interface up (%s/%s)", namebuf, ifname); @@ -322,7 +322,7 @@ as adding/removing interfaces. wpa_printf(MSG_DEBUG, "nl80211: Not the main interface (%s) - do not indicate interface up", drv->first_bss->ifname); -@@ -2035,6 +2054,7 @@ static int wpa_driver_nl80211_init_nl_gl +@@ -2037,6 +2056,7 @@ static int wpa_driver_nl80211_init_nl_gl genl_family_put(family); nl_cache_free(cache); @@ -330,7 +330,7 @@ as adding/removing interfaces. nl_cb_set(global->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL); nl_cb_set(global->nl_cb, NL_CB_VALID, NL_CB_CUSTOM, -@@ -2205,6 +2225,7 @@ static int nl80211_init_bss(struct i802_ +@@ -2207,6 +2227,7 @@ static int nl80211_init_bss(struct i802_ if (!bss->nl_cb) return -1; @@ -338,7 +338,7 @@ as adding/removing interfaces. nl_cb_set(bss->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL); nl_cb_set(bss->nl_cb, NL_CB_VALID, NL_CB_CUSTOM, -@@ -8573,6 +8594,7 @@ static void *i802_init(struct hostapd_da +@@ -8704,6 +8725,7 @@ static void *i802_init(struct hostapd_da char master_ifname[IFNAMSIZ]; int ifindex, br_ifindex = 0; int br_added = 0; @@ -346,7 +346,7 @@ as adding/removing interfaces. bss = wpa_driver_nl80211_drv_init(hapd, params->ifname, params->global_priv, 1, -@@ -8632,21 +8654,17 @@ static void *i802_init(struct hostapd_da +@@ -8763,21 +8785,17 @@ static void *i802_init(struct hostapd_da (params->num_bridge == 0 || !params->bridge[0])) add_ifidx(drv, br_ifindex, drv->ifindex); @@ -378,7 +378,7 @@ as adding/removing interfaces. } if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) { -@@ -9015,6 +9033,50 @@ static int wpa_driver_nl80211_if_remove( +@@ -9146,6 +9164,50 @@ static int wpa_driver_nl80211_if_remove( return 0; } @@ -429,7 +429,7 @@ as adding/removing interfaces. static int cookie_handler(struct nl_msg *msg, void *arg) { -@@ -10803,6 +10865,37 @@ static bool nl80211_is_drv_shared(void * +@@ -10962,6 +11024,37 @@ static bool nl80211_is_drv_shared(void * #endif /* CONFIG_IEEE80211BE */ @@ -467,7 +467,7 @@ as adding/removing interfaces. static int driver_nl80211_send_mlme(void *priv, const u8 *data, size_t data_len, int noack, unsigned int freq, -@@ -14040,6 +14133,8 @@ const struct wpa_driver_ops wpa_driver_n +@@ -14510,6 +14603,8 @@ const struct wpa_driver_ops wpa_driver_n .set_acl = wpa_driver_nl80211_set_acl, .if_add = wpa_driver_nl80211_if_add, .if_remove = driver_nl80211_if_remove, @@ -478,7 +478,7 @@ as adding/removing interfaces. .sta_add = wpa_driver_nl80211_sta_add, --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c -@@ -1196,6 +1196,7 @@ static void mlme_event_ch_switch(struct +@@ -1197,6 +1197,7 @@ static void mlme_event_ch_switch(struct struct nlattr *bw, struct nlattr *cf1, struct nlattr *cf2, struct nlattr *punct_bitmap, @@ -486,16 +486,16 @@ as adding/removing interfaces. int finished) { struct i802_bss *bss; -@@ -1259,6 +1260,8 @@ static void mlme_event_ch_switch(struct +@@ -1260,6 +1261,8 @@ static void mlme_event_ch_switch(struct data.ch_switch.cf1 = nla_get_u32(cf1); if (cf2) data.ch_switch.cf2 = nla_get_u32(cf2); + if (count) + data.ch_switch.count = nla_get_u32(count); - if (link) + if (link) { data.ch_switch.link_id = nla_get_u8(link); -@@ -3999,6 +4002,7 @@ static void do_process_drv_event(struct +@@ -4054,6 +4057,7 @@ static void do_process_drv_event(struct tb[NL80211_ATTR_CENTER_FREQ1], tb[NL80211_ATTR_CENTER_FREQ2], tb[NL80211_ATTR_PUNCT_BITMAP], @@ -503,7 +503,7 @@ as adding/removing interfaces. 0); break; case NL80211_CMD_CH_SWITCH_NOTIFY: -@@ -4011,6 +4015,7 @@ static void do_process_drv_event(struct +@@ -4066,6 +4070,7 @@ static void do_process_drv_event(struct tb[NL80211_ATTR_CENTER_FREQ1], tb[NL80211_ATTR_CENTER_FREQ2], tb[NL80211_ATTR_PUNCT_BITMAP], @@ -596,7 +596,7 @@ as adding/removing interfaces. CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -6015,6 +6015,7 @@ void supplicant_event(void *ctx, enum wp +@@ -6167,6 +6167,7 @@ void supplicant_event(void *ctx, enum wp event_to_string(event), event); #endif /* CONFIG_NO_STDOUT_DEBUG */ @@ -606,7 +606,7 @@ as adding/removing interfaces. #ifdef CONFIG_FST --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -1148,6 +1148,7 @@ void wpa_supplicant_set_state(struct wpa +@@ -1151,6 +1151,7 @@ void wpa_supplicant_set_state(struct wpa sme_sched_obss_scan(wpa_s, 0); } wpa_s->wpa_state = state; @@ -614,7 +614,7 @@ as adding/removing interfaces. #ifdef CONFIG_BGSCAN if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid) -@@ -7848,6 +7849,7 @@ struct wpa_supplicant * wpa_supplicant_a +@@ -7921,6 +7922,7 @@ struct wpa_supplicant * wpa_supplicant_a #endif /* CONFIG_P2P */ wpas_ubus_add_bss(wpa_s); @@ -622,7 +622,7 @@ as adding/removing interfaces. return wpa_s; } -@@ -7875,6 +7877,7 @@ int wpa_supplicant_remove_iface(struct w +@@ -7948,6 +7950,7 @@ int wpa_supplicant_remove_iface(struct w struct wpa_supplicant *parent = wpa_s->parent; #endif /* CONFIG_MESH */ @@ -630,7 +630,7 @@ as adding/removing interfaces. wpas_ubus_free_bss(wpa_s); /* Remove interface from the global list of interfaces */ -@@ -8185,6 +8188,7 @@ struct wpa_global * wpa_supplicant_init( +@@ -8258,6 +8261,7 @@ struct wpa_global * wpa_supplicant_init( eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0, wpas_periodic, global, NULL); @@ -638,7 +638,7 @@ as adding/removing interfaces. return global; } -@@ -8223,12 +8227,8 @@ int wpa_supplicant_run(struct wpa_global +@@ -8296,12 +8300,8 @@ int wpa_supplicant_run(struct wpa_global eloop_register_signal_terminate(wpa_supplicant_terminate, global); eloop_register_signal_reconfig(wpa_supplicant_reconfig, global); @@ -651,7 +651,7 @@ as adding/removing interfaces. return 0; } -@@ -8261,6 +8261,8 @@ void wpa_supplicant_deinit(struct wpa_gl +@@ -8334,6 +8334,8 @@ void wpa_supplicant_deinit(struct wpa_gl wpas_notify_supplicant_deinitialized(global); diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch index f9bdfa1e92c56e..54045476477fe6 100644 --- a/package/network/services/hostapd/patches/701-reload_config_inline.patch +++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch @@ -8,7 +8,7 @@ as adding/removing interfaces. --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -5132,7 +5132,12 @@ struct hostapd_config * hostapd_config_r +@@ -5207,7 +5207,12 @@ struct hostapd_config * hostapd_config_r int errors = 0; size_t i; diff --git a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch index 2dc5eab65a0740..d4c6b1445647e8 100644 --- a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch +++ b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch @@ -8,7 +8,7 @@ was provided by the config --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3583,6 +3583,8 @@ static int hostapd_config_fill(struct ho +@@ -3646,6 +3646,8 @@ static int hostapd_config_fill(struct ho #ifndef CONFIG_NO_VLAN } else if (os_strcmp(buf, "dynamic_vlan") == 0) { bss->ssid.dynamic_vlan = atoi(pos); diff --git a/package/network/services/hostapd/patches/711-wds_bridge_force.patch b/package/network/services/hostapd/patches/711-wds_bridge_force.patch index 441a21e8d8eed4..56750352f377c0 100644 --- a/package/network/services/hostapd/patches/711-wds_bridge_force.patch +++ b/package/network/services/hostapd/patches/711-wds_bridge_force.patch @@ -11,7 +11,7 @@ instead rely entirely on netifd handling this properly --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2447,6 +2447,8 @@ static int hostapd_config_fill(struct ho +@@ -2472,6 +2472,8 @@ static int hostapd_config_fill(struct ho sizeof(conf->bss[0]->iface)); } else if (os_strcmp(buf, "bridge") == 0) { os_strlcpy(bss->bridge, pos, sizeof(bss->bridge)); diff --git a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch index fa59797c2ef797..f0e838bf2f3acc 100644 --- a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch +++ b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch @@ -8,7 +8,7 @@ full device, e.g. in order to deal with hardware/driver limitations --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3065,6 +3065,14 @@ static int hostapd_config_fill(struct ho +@@ -3090,6 +3090,14 @@ static int hostapd_config_fill(struct ho line, bss->max_num_sta, MAX_STA_COUNT); return 1; } @@ -25,7 +25,7 @@ full device, e.g. in order to deal with hardware/driver limitations } else if (os_strcmp(buf, "extended_key_id") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -1072,6 +1072,8 @@ struct hostapd_config { +@@ -1086,6 +1086,8 @@ struct hostapd_config { unsigned int track_sta_max_num; unsigned int track_sta_max_age; @@ -36,7 +36,7 @@ full device, e.g. in order to deal with hardware/driver limitations * ' ' (ascii 32): all environments --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -1573,7 +1573,7 @@ void handle_probe_req(struct hostapd_dat +@@ -1634,7 +1634,7 @@ void handle_probe_req(struct hostapd_dat if (hapd->conf->no_probe_resp_if_max_sta && is_multicast_ether_addr(mgmt->da) && is_multicast_ether_addr(mgmt->bssid) && @@ -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 -@@ -790,6 +790,7 @@ void hostapd_cleanup_cs_params(struct ho +@@ -825,6 +825,7 @@ void hostapd_cleanup_cs_params(struct ho void hostapd_periodic_iface(struct hostapd_iface *iface); int hostapd_owe_trans_get_info(struct hostapd_data *hapd); void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx); diff --git a/package/network/services/hostapd/patches/730-ft_iface.patch b/package/network/services/hostapd/patches/730-ft_iface.patch index 9c17b809d16a05..648641e43a7639 100644 --- a/package/network/services/hostapd/patches/730-ft_iface.patch +++ b/package/network/services/hostapd/patches/730-ft_iface.patch @@ -8,7 +8,7 @@ a VLAN interface on top of the bridge, instead of using the bridge directly --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3224,6 +3224,8 @@ static int hostapd_config_fill(struct ho +@@ -3287,6 +3287,8 @@ static int hostapd_config_fill(struct ho wpa_printf(MSG_INFO, "Line %d: Obsolete peerkey parameter ignored", line); #ifdef CONFIG_IEEE80211R_AP @@ -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 -@@ -1763,8 +1763,12 @@ int hostapd_setup_wpa(struct hostapd_dat +@@ -1815,8 +1815,12 @@ int hostapd_setup_wpa(struct hostapd_dat wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) { const char *ft_iface; diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch index c7baeedbfa0759..3c59865f8472c7 100644 --- a/package/network/services/hostapd/patches/740-snoop_iface.patch +++ b/package/network/services/hostapd/patches/740-snoop_iface.patch @@ -8,7 +8,7 @@ untagged DHCP packets --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2451,6 +2451,8 @@ static int hostapd_config_fill(struct ho +@@ -2476,6 +2476,8 @@ static int hostapd_config_fill(struct ho os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge)); } else if (os_strcmp(buf, "bridge_hairpin") == 0) { bss->bridge_hairpin = atoi(pos); @@ -29,7 +29,7 @@ untagged DHCP packets int bridge_hairpin; /* hairpin_mode on bridge members */ --- a/src/ap/ap_drv_ops.h +++ b/src/ap/ap_drv_ops.h -@@ -371,12 +371,12 @@ static inline int hostapd_drv_br_port_se +@@ -376,12 +376,12 @@ static inline int hostapd_drv_br_port_se static inline int hostapd_drv_br_set_net_param(struct hostapd_data *hapd, enum drv_br_net_param param, @@ -112,7 +112,7 @@ untagged DHCP packets hapd->x_snoop_initialized = false; --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -4315,7 +4315,7 @@ struct wpa_driver_ops { +@@ -4350,7 +4350,7 @@ struct wpa_driver_ops { * Returns: 0 on success, negative (<0) on failure */ int (*br_set_net_param)(void *priv, enum drv_br_net_param param, @@ -123,7 +123,7 @@ untagged DHCP packets * get_wowlan - Get wake-on-wireless status --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -12503,7 +12503,7 @@ static const char * drv_br_net_param_str +@@ -12662,7 +12662,7 @@ static const char * drv_br_net_param_str static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param, @@ -132,7 +132,7 @@ untagged DHCP packets { struct i802_bss *bss = priv; char path[128]; -@@ -12529,8 +12529,11 @@ static int wpa_driver_br_set_net_param(v +@@ -12688,8 +12688,11 @@ static int wpa_driver_br_set_net_param(v return -EINVAL; } diff --git a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch index 40ea6566abef1c..5f13b861d31914 100644 --- a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch +++ b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch @@ -7,7 +7,7 @@ Some servers use the NAS-IP-Address attribute as a destination address --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2840,6 +2840,8 @@ static int hostapd_config_fill(struct ho +@@ -2865,6 +2865,8 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "iapp_interface") == 0) { wpa_printf(MSG_INFO, "DEPRECATED: iapp_interface not used"); #endif /* CONFIG_IAPP */ diff --git a/package/network/services/hostapd/patches/761-shared_das_port.patch b/package/network/services/hostapd/patches/761-shared_das_port.patch index c200cad3c6d101..26aeacac76abf4 100644 --- a/package/network/services/hostapd/patches/761-shared_das_port.patch +++ b/package/network/services/hostapd/patches/761-shared_das_port.patch @@ -7,7 +7,7 @@ Use the NAS identifier to find the right receiver context on incoming messages --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -1366,6 +1366,7 @@ static int hostapd_bss_radius_init(struc +@@ -1379,6 +1379,7 @@ static int hostapd_bss_radius_init(struc os_memset(&das_conf, 0, sizeof(das_conf)); das_conf.port = conf->radius_das_port; diff --git a/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch b/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch index 31e0de520b40fb..7beb87118f8385 100644 --- a/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch +++ b/package/network/services/hostapd/patches/762-AP-don-t-ignore-probe-requests-with-invalid-DSSS-par.patch @@ -28,7 +28,7 @@ Signed-off-by: David Bauer --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -1416,7 +1416,7 @@ void handle_probe_req(struct hostapd_dat +@@ -1477,7 +1477,7 @@ void handle_probe_req(struct hostapd_dat * is less likely to see them (Probe Request frame sent on a * neighboring, but partially overlapping, channel). */ diff --git a/package/network/services/hostapd/patches/770-radius_server.patch b/package/network/services/hostapd/patches/770-radius_server.patch index 7df497811d6676..c110a85e2e73f1 100644 --- a/package/network/services/hostapd/patches/770-radius_server.patch +++ b/package/network/services/hostapd/patches/770-radius_server.patch @@ -29,7 +29,7 @@ handle reload. #ifndef CONFIG_NO_HOSTAPD_LOGGER static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module, -@@ -788,6 +789,11 @@ int main(int argc, char *argv[]) +@@ -793,6 +794,11 @@ int main(int argc, char *argv[]) if (os_program_init()) return -1; diff --git a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch index 9ecb9060d5ee79..22bd7ad2634888 100644 --- a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch +++ b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch @@ -53,7 +53,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -5125,6 +5125,15 @@ static int hostapd_config_fill(struct ho +@@ -5200,6 +5200,15 @@ static int hostapd_config_fill(struct ho bss->mld_indicate_disabled = atoi(pos); #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_IEEE80211BE */ @@ -71,7 +71,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 "Line %d: unknown configuration item '%s'", --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -985,6 +985,35 @@ struct hostapd_bss_config { +@@ -999,6 +999,35 @@ struct hostapd_bss_config { bool mld_indicate_disabled; #endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_IEEE80211BE */ @@ -346,7 +346,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 + const struct ieee802_11_elems *elems ); --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -59,6 +59,9 @@ +@@ -60,6 +60,9 @@ #include "nan_usd_ap.h" #include "pasn/pasn_common.h" @@ -356,7 +356,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 #ifdef CONFIG_FILS static struct wpabuf * -@@ -3562,8 +3565,8 @@ static u16 check_multi_ap(struct hostapd +@@ -3588,8 +3591,8 @@ static u16 check_multi_ap(struct hostapd } @@ -367,7 +367,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 { /* Supported rates not used in IEEE 802.11ad/DMG */ if (hapd->iface->current_mode && -@@ -3950,7 +3953,7 @@ static int __check_assoc_ies(struct host +@@ -3976,7 +3979,7 @@ static int __check_assoc_ies(struct host elems->ext_capab_len); if (resp != WLAN_STATUS_SUCCESS) return resp; @@ -376,7 +376,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 if (resp != WLAN_STATUS_SUCCESS) return resp; -@@ -6002,6 +6005,11 @@ static void handle_beacon(struct hostapd +@@ -6031,6 +6034,11 @@ static void handle_beacon(struct hostapd 0); ap_list_process_beacon(hapd->iface, mgmt, &elems, fi); @@ -401,7 +401,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 u16 copy_sta_vendor_vht(struct hostapd_data *hapd, struct sta_info *sta, --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -4013,7 +4013,7 @@ struct wpa_driver_ops { +@@ -4048,7 +4048,7 @@ struct wpa_driver_ops { * Returns: 0 on success, -1 on failure */ int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val, @@ -412,7 +412,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 * send_action - Transmit an Action frame --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -8434,24 +8434,14 @@ static int have_ifidx(struct wpa_driver_ +@@ -8559,25 +8559,15 @@ static int have_ifidx(struct wpa_driver_ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val, @@ -424,6 +424,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6 - char name[IFNAMSIZ + 1]; + const char *name = ifname_wds; // Kept to reduce changes to the minimum union wpa_event_data event; + bool add_br = false; int ret; - ret = os_snprintf(name, sizeof(name), "%s.sta%d", bss->ifname, aid); diff --git a/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch b/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch index 389b5abbdc27c5..b0e2c57b1387c3 100644 --- a/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch +++ b/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch @@ -1,4 +1,4 @@ -From 5d139e62c018f2ff1ae8b0fc76cb9c79813c61ce Mon Sep 17 00:00:00 2001 +From 9a265f70b5e4e048c568564aed5f9ac4a4fd76b0 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Tue, 7 May 2024 10:37:54 +0200 Subject: [PATCH 2/3] APuP add ubus notification when a peer comes up diff --git a/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch b/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch index 2f14b21a0cb6be..d5c76994b4f6cc 100644 --- a/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch +++ b/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch @@ -1,4 +1,4 @@ -From 484489e41a1ae4b43d9863d057f8afb29f1c41d5 Mon Sep 17 00:00:00 2001 +From aaeb60b39a72774c651187208ec47efd0daeb75b Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Tue, 7 May 2024 11:54:23 +0200 Subject: [PATCH 3/3] APuP add ucode hook for when a peer comes up diff --git a/package/network/services/hostapd/src/src/ap/ubus.h b/package/network/services/hostapd/src/src/ap/ubus.h index 22767d67ee7564..5b8938cbd32d7d 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.h +++ b/package/network/services/hostapd/src/src/ap/ubus.h @@ -8,8 +8,6 @@ #ifndef __HOSTAPD_UBUS_H #define __HOSTAPD_UBUS_H -#include "sta_info.h" - enum hostapd_ubus_event_type { HOSTAPD_UBUS_PROBE_REQ, HOSTAPD_UBUS_AUTH_REQ, diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index 68fb450884e2f3..c54f071ee0f5ea 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -3,7 +3,7 @@ #include "utils/includes.h" #include "utils/common.h" #include "utils/ucode.h" -#include "hostapd.h" +#include "sta_info.h" #include "beacon.h" #include "hw_features.h" #include "ap_drv_ops.h" From 9272d9919596967b581cab02c2374a74081b2c6e Mon Sep 17 00:00:00 2001 From: Markus Stockhausen Date: Sat, 14 Sep 2024 16:22:40 -0400 Subject: [PATCH 13/15] realtek: 6.6: Support XGMII attached PHYs On the XGS1210-12 the RTL8218D is attached via XGMII. Add this to the supported list in the DSA driver. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/16391 Signed-off-by: Robert Marko --- target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c index 2f9b3ba8c14709..d61122e330d8f2 100644 --- a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/dsa.c @@ -683,6 +683,7 @@ static void rtl83xx_phylink_get_caps(struct dsa_switch *ds, int port, __set_bit(PHY_INTERFACE_MODE_GMII, config->supported_interfaces); __set_bit(PHY_INTERFACE_MODE_QSGMII, config->supported_interfaces); __set_bit(PHY_INTERFACE_MODE_SGMII, config->supported_interfaces); + __set_bit(PHY_INTERFACE_MODE_XGMII, config->supported_interfaces); __set_bit(PHY_INTERFACE_MODE_1000BASEX, config->supported_interfaces); } From 35e13244aab36958831195a1d2e152aa3ad0ab6c Mon Sep 17 00:00:00 2001 From: Markus Stockhausen Date: Sat, 14 Sep 2024 16:26:34 -0400 Subject: [PATCH 14/15] realtek: 5.15: backport VLAN fix With commit a22d359fa56fe0 VLAN handling was fixed for kernel 6.6. This restored network connectivity of the devices. For easy testing backport the fix for 5.15 too. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/16391 Signed-off-by: Robert Marko --- .../files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 71 ++++++++++++------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c index 9eb444515f46b3..ee87de8e0784f6 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c @@ -109,6 +109,20 @@ static enum dsa_tag_protocol rtl83xx_get_tag_protocol(struct dsa_switch *ds, return DSA_TAG_PROTO_TRAILER; } +static void rtl83xx_vlan_set_pvid(struct rtl838x_switch_priv *priv, + int port, int pvid) +{ + /* Set both inner and outer PVID of the port */ + priv->r->vlan_port_pvid_set(port, PBVLAN_TYPE_INNER, pvid); + priv->r->vlan_port_pvid_set(port, PBVLAN_TYPE_OUTER, pvid); + priv->r->vlan_port_pvidmode_set(port, PBVLAN_TYPE_INNER, + PBVLAN_MODE_UNTAG_AND_PRITAG); + priv->r->vlan_port_pvidmode_set(port, PBVLAN_TYPE_OUTER, + PBVLAN_MODE_UNTAG_AND_PRITAG); + + priv->ports[port].pvid = pvid; +} + /* Initialize all VLANS */ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv) { @@ -132,17 +146,22 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv) info.l2_tunnel_list_id = -1; } - /* Initialize all vlans 0-4095 */ - for (int i = 0; i < MAX_VLANS; i ++) + /* Initialize normal VLANs 1-4095 */ + for (int i = 1; i < MAX_VLANS; i ++) priv->r->vlan_set_tagged(i, &info); - /* reset PVIDs; defaults to 1 on reset */ + /* + * Initialize the special VLAN 0 and reset PVIDs. The CPU port PVID + * is applied to packets from the CPU for untagged destinations, + * regardless if the actual ingress VID. Any port with untagged + * egress VLAN(s) must therefore be a member of VLAN 0 to support + * CPU port as ingress when VLAN filtering is enabled. + */ for (int i = 0; i <= priv->cpu_port; i++) { - priv->r->vlan_port_pvid_set(i, PBVLAN_TYPE_INNER, 1); - priv->r->vlan_port_pvid_set(i, PBVLAN_TYPE_OUTER, 1); - priv->r->vlan_port_pvidmode_set(i, PBVLAN_TYPE_INNER, PBVLAN_MODE_UNTAG_AND_PRITAG); - priv->r->vlan_port_pvidmode_set(i, PBVLAN_TYPE_OUTER, PBVLAN_MODE_UNTAG_AND_PRITAG); + rtl83xx_vlan_set_pvid(priv, i, 0); + info.tagged_ports |= BIT_ULL(i); } + priv->r->vlan_set_tagged(0, &info); /* Set forwarding action based on inner VLAN tag */ for (int i = 0; i < priv->cpu_port; i++) @@ -1392,20 +1411,6 @@ static int rtl83xx_vlan_prepare(struct dsa_switch *ds, int port, return 0; } -static void rtl83xx_vlan_set_pvid(struct rtl838x_switch_priv *priv, - int port, int pvid) -{ - /* Set both inner and outer PVID of the port */ - priv->r->vlan_port_pvid_set(port, PBVLAN_TYPE_INNER, pvid); - priv->r->vlan_port_pvid_set(port, PBVLAN_TYPE_OUTER, pvid); - priv->r->vlan_port_pvidmode_set(port, PBVLAN_TYPE_INNER, - PBVLAN_MODE_UNTAG_AND_PRITAG); - priv->r->vlan_port_pvidmode_set(port, PBVLAN_TYPE_OUTER, - PBVLAN_MODE_UNTAG_AND_PRITAG); - - priv->ports[port].pvid = pvid; -} - static int rtl83xx_vlan_add(struct dsa_switch *ds, int port, const struct switchdev_obj_port_vlan *vlan, struct netlink_ext_ack *extack) @@ -1417,7 +1422,8 @@ static int rtl83xx_vlan_add(struct dsa_switch *ds, int port, pr_debug("%s port %d, vid %d, flags %x\n", __func__, port, vlan->vid, vlan->flags); - if(!vlan->vid) return 0; + /* Let no one mess with our special VLAN 0 */ + if (!vlan->vid) return 0; if (vlan->vid > 4095) { dev_err(priv->dev, "VLAN out of range: %d", vlan->vid); @@ -1430,10 +1436,20 @@ static int rtl83xx_vlan_add(struct dsa_switch *ds, int port, mutex_lock(&priv->reg_mutex); - if (vlan->flags & BRIDGE_VLAN_INFO_PVID) - rtl83xx_vlan_set_pvid(priv, port, vlan->vid); - else if (priv->ports[port].pvid == vlan->vid) - rtl83xx_vlan_set_pvid(priv, port, 0); + /* + * Realtek switches copy frames as-is to/from the CPU. For a proper + * VLAN handling the 12 bit RVID field (= VLAN id) for incoming traffic + * and the 1 bit RVID_SEL field (0 = use inner tag, 1 = use outer tag) + * for outgoing traffic of the CPU tag structure need to be handled. As + * of now no such logic is in place. So for the CPU port keep the fixed + * PVID=0 from initial setup in place and ignore all subsequent settings. + */ + if (port != priv->cpu_port) { + if (vlan->flags & BRIDGE_VLAN_INFO_PVID) + rtl83xx_vlan_set_pvid(priv, port, vlan->vid); + else if (priv->ports[port].pvid == vlan->vid) + rtl83xx_vlan_set_pvid(priv, port, 0); + } /* Get port memberships of this vlan */ priv->r->vlan_tables_read(vlan->vid, &info); @@ -1477,6 +1493,9 @@ static int rtl83xx_vlan_del(struct dsa_switch *ds, int port, pr_debug("%s: port %d, vid %d, flags %x\n", __func__, port, vlan->vid, vlan->flags); + /* Let no one mess with our special VLAN 0 */ + if (!vlan->vid) return 0; + if (vlan->vid > 4095) { dev_err(priv->dev, "VLAN out of range: %d", vlan->vid); return -ENOTSUPP; From 93881ec190c2d0f9d974d19c0f328637c0cc170a Mon Sep 17 00:00:00 2001 From: Markus Stockhausen Date: Sat, 14 Sep 2024 16:39:12 -0400 Subject: [PATCH 15/15] realtek: 6.6: MDIO post fixes Merging of the realtek 6.6 series forgot to include some final fixes for the new MDIO driver. What was changed in last second? 1. The MDIO driver used wrong constants to make use of the raw page (for direct register access). Provide a rawpage variable in the bus private structure, populate it during initialization and make use of it at the proper places 2. We always used the variable portaddr for the bus index. Usually our driver uses either addr or port for the same meaning. Remove the duplication and reuse the normal addr variable. 3. Drop functions rtmdio_write_page() and rtmdio_read_page(). These only call the PHY driver read/write page functions. We know that these will only access page 0x1f. As we have only Realtek PHYs and our driver only reacts to this special page, just hardcode it. Benefit is that we can use these functions for PHY detection when read/write page functions are not yet assigned. 4. Add two new helper functions phy_port_read_paged() and phy_port_write_paged(). These allow to access arbitrary ports on the MDIO bus when the packages are not initialized. These will be needed for proper RTL8218B and RTL8214FC detection in forthcoming patches. 5. The port tracking wrongly used index 0 to mark "normal" access. This does not allow to make a "special" access to port 0. Use index -1 to mark "normal" access. Provide the fix for 5.15 and 6.6 to allow for easy version comparison. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/16391 Signed-off-by: Robert Marko --- .../drivers/net/ethernet/rtl838x_eth.c | 239 +++++++++--------- .../drivers/net/ethernet/rtl838x_eth.h | 3 +- .../files-5.15/drivers/net/phy/rtl83xx-phy.c | 2 + .../drivers/net/ethernet/rtl838x_eth.c | 239 +++++++++--------- .../drivers/net/ethernet/rtl838x_eth.h | 3 +- .../files-6.6/drivers/net/phy/rtl83xx-phy.c | 2 + 6 files changed, 258 insertions(+), 230 deletions(-) diff --git a/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c index e6c06c4452221b..7ad9b5f0291d9c 100644 --- a/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c @@ -1622,7 +1622,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, } /* - * On all RealTek switch platforms the hardware periodically reads the link status of all + * On all Realtek switch platforms the hardware periodically reads the link status of all * PHYs. This is to some degree programmable, so that one can tell the hardware to read * specific C22 registers from specific pages, or C45 registers, to determine the current * link speed, duplex, flow-control, ... @@ -1639,7 +1639,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * abstractions. * * Additionally at least the RTL838x and RTL839x devices are known to have a so called - * raw mode. Using the special MAX_PAGE-1 with the MDIO controller found in RealTek + * raw mode. Using the special MAX_PAGE-1 with the MDIO controller found in Realtek * SoCs allows to access the PHY in raw mode, ie. bypassing the cache and paging engine * of the MDIO controller. E.g. for RTL838x this is 0xfff. * @@ -1648,9 +1648,9 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * when they are not attached to an Realtek SoC. The paradigm should be to keep the PHY * implementation bus independent. * - * As if this is not enough the PHYs consist of 8 ports that all can be programmed - * individually. Writing to port 0 can configure the whole why while other operations - * need to be replicated per port. + * As if this is not enough the PHY packages consist of 4 or 8 ports that all can be + * programmed individually. Some registers are only available on port 0 and configure + * the whole package. * * To bring all this together we need a tricky bus design that intercepts select page * calls but lets raw page accesses through. And especially knows how to handle raw @@ -1661,7 +1661,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * the accesses and the state of the bus with the attributes page[], raw[] and portaddr * of the bus_priv structure. The page selection works as follows: * - * phy_write(phydev, RTL821X_PAGE_SELECT, 12) : store internal page 12 in driver + * phy_write(phydev, RTMDIO_PAGE_SELECT, 12) : store internal page 12 in driver * phy_write(phydev, 7, 33) : write page=12, reg=7, val=33 * * or simply @@ -1670,8 +1670,8 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * * The port selection works as follows and must be called under a held mdio bus lock * - * __mdiobus_write(bus, RTL821X_PORT_SELECT, 4) : switch to port paddr - * __phy_write(phydev, RTL821X_PAGE_SELECT, 11) : store internal page 11 in driver + * __mdiobus_write(bus, RTMDIO_PORT_SELECT, 4) : switch to port 4 + * __phy_write(phydev, RTMDIO_PAGE_SELECT, 11) : store internal page 11 in driver * __phy_write(phydev, 8, 19) : write page=11, reg=8, val=19, port=4 * * Any Realtek PHY that will be connected to this bus must simply provide the standard @@ -1689,75 +1689,57 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * return __phy_write(phydev, RTL821X_PAGE_SELECT, page); * } * - * In case there are non Realtek PHYs attached to the logic might need to be + * In case there are non Realtek PHYs attached to the bus the logic might need to be * reimplemented. For now it should be sufficient. */ -#define RTL821X_PAGE_SELECT 0x1f -#define RTL821X_PORT_SELECT 0x2000 -#define RTL838X_PAGE_RAW 0xfff -#define RTL839X_PAGE_RAW 0x1fff -#define RTL930X_PAGE_RAW 0xfff -#define RTL931X_PAGE_RAW 0x1fff -#define RTMDIO_READ 0x0 -#define RTMDIO_WRITE 0x1 +#define RTMDIO_PAGE_SELECT 0x1f +#define RTMDIO_PORT_SELECT 0x2000 +#define RTMDIO_READ 0x1 +#define RTMDIO_WRITE 0x2 +#define RTMDIO_ABS 0x4 +#define RTMDIO_PKG 0x8 /* - * Provide a generic read/write function so we can access multiple ports on a shared PHY - * package of the bus with separate addresses individually. This basically resembles the + * Provide a generic read/write function so we can access arbitrary ports on the bus. + * E.g. other ports of a PHY package on the bus. This basically resembles the kernel * phy_read_paged() and phy_write_paged() functions. To inform the bus that we are - * workin on a not default port (8, 16, 24, ...) we send a RTL821X_PORT_SELECT command - * at the beginning and the end to switch the port handling logic. + * working on a not default port send a RTMDIO_PORT_SELECT command at the beginning + * and the end to switch the port handling logic. */ -static int rtmdio_read_page(struct phy_device *phydev) -{ - if (WARN_ONCE(!phydev->drv->read_page, - "read_page callback not available, PHY driver not loaded?\n")) - return -EOPNOTSUPP; - - return phydev->drv->read_page(phydev); -} - -static int rtmdio_write_page(struct phy_device *phydev, int page) -{ - if (WARN_ONCE(!phydev->drv->write_page, - "write_page callback not available, PHY driver not loaded?\n")) - return -EOPNOTSUPP; - - return phydev->drv->write_page(phydev, page); -} - -static int rtmdio_package_rw(struct phy_device *phydev, int op, int port, - int page, u32 regnum, u16 val) +static int rtmdio_access(struct phy_device *phydev, int op, int port, + int page, u32 regnum, u16 val) { int r, ret = 0, oldpage; - struct phy_package_shared *shared = phydev->shared; - if (!shared) - return -EIO; + if (op & RTMDIO_PKG) { + if (!phydev->shared) + return -EIO; + port = phydev->shared->addr + port; + } /* lock and inform bus about non default addressing */ phy_lock_mdio_bus(phydev); __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, - RTL821X_PORT_SELECT, shared->addr + port); + RTMDIO_PORT_SELECT, port); - oldpage = ret = rtmdio_read_page(phydev); + oldpage = ret = __phy_read(phydev, RTMDIO_PAGE_SELECT); if (oldpage >= 0 && oldpage != page) { - ret = rtmdio_write_page(phydev, page); + ret = __phy_write(phydev, RTMDIO_PAGE_SELECT, page); if (ret < 0) oldpage = ret; } if (oldpage >= 0) { - if (op == RTMDIO_WRITE) + if (op & RTMDIO_WRITE) ret = __phy_write(phydev, regnum, val); else ret = __phy_read(phydev, regnum); } if (oldpage >= 0) { - r = rtmdio_write_page(phydev, oldpage); + r = __phy_write(phydev, RTMDIO_PAGE_SELECT, oldpage); if (ret >= 0 && r < 0) ret = r; } else @@ -1765,7 +1747,7 @@ static int rtmdio_package_rw(struct phy_device *phydev, int op, int port, /* reset bus to default adressing and unlock it */ __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, - RTL821X_PORT_SELECT, 0); + RTMDIO_PORT_SELECT, -1); phy_unlock_mdio_bus(phydev); return ret; @@ -1775,40 +1757,53 @@ static int rtmdio_package_rw(struct phy_device *phydev, int op, int port, * To make use of the shared package functions provide wrappers that align with kernel * naming conventions. The package() functions are useful to change settings on the * package as a whole. The package_port() functions will allow to target the PHYs - * individually. + * of a package individually. The port() only functions allow to access arbitrary ports + * on the bus through a PHY. */ int phy_package_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val) { - return rtmdio_package_rw(phydev, RTMDIO_WRITE, port, page, regnum, val); + return rtmdio_access(phydev, RTMDIO_WRITE | RTMDIO_PKG, port, page, regnum, val); } int phy_package_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val) { - return rtmdio_package_rw(phydev, RTMDIO_WRITE, 0, page, regnum, val); + return rtmdio_access(phydev, RTMDIO_WRITE | RTMDIO_PKG, 0, page, regnum, val); +} + +int phy_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val) +{ + return rtmdio_access(phydev, RTMDIO_WRITE | RTMDIO_ABS, port, page, regnum, val); } int phy_package_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum) { - return rtmdio_package_rw(phydev, RTMDIO_READ, port, page, regnum, 0); + return rtmdio_access(phydev, RTMDIO_READ | RTMDIO_PKG, port, page, regnum, 0); } int phy_package_read_paged(struct phy_device *phydev, int page, u32 regnum) { - return rtmdio_package_rw(phydev, RTMDIO_READ, 0, page, regnum, 0); + return rtmdio_access(phydev, RTMDIO_READ | RTMDIO_PKG, 0, page, regnum, 0); } -/* These are the core functions of our fancy Realtek SoC MDIO bus. */ +int phy_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum) +{ + return rtmdio_access(phydev, RTMDIO_READ | RTMDIO_ABS, port, page, regnum, 0); +} + +/* These are the core functions of our new Realtek SoC MDIO bus. */ static int rtmdio_read_c45(struct mii_bus *bus, int addr, int devnum, int regnum) { int err, val; struct rtl838x_bus_priv *bus_priv = bus->priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - err = (*bus_priv->read_mmd_phy)(portaddr, devnum, regnum, &val); + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + + err = (*bus_priv->read_mmd_phy)(addr, devnum, regnum, &val); pr_debug("rd_MMD(adr=%d, dev=%d, reg=%d) = %d, err = %d\n", - portaddr, devnum, regnum, val, err); + addr, devnum, regnum, val, err); return err ? err : val; } @@ -1817,21 +1812,23 @@ static int rtmdio_83xx_read(struct mii_bus *bus, int addr, int regnum) int err, val; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - if (portaddr >= 24 && portaddr <= 27 && eth_priv->id == 0x8380) - return rtl838x_read_sds_phy(portaddr, regnum); + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; - if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[portaddr]) - return rtl839x_read_sds_phy(portaddr, regnum); + if (addr >= 24 && addr <= 27 && eth_priv->id == 0x8380) + return rtl838x_read_sds_phy(addr, regnum); - if (regnum == RTL821X_PAGE_SELECT && bus_priv->page[portaddr] != RTL838X_PAGE_RAW) - return bus_priv->page[portaddr]; + if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[addr]) + return rtl839x_read_sds_phy(addr, regnum); - bus_priv->raw[portaddr] = (bus_priv->page[portaddr] == RTL838X_PAGE_RAW); - err = (*bus_priv->read_phy)(portaddr, bus_priv->page[portaddr], regnum, &val); + if (regnum == RTMDIO_PAGE_SELECT && bus_priv->page[addr] != bus_priv->rawpage) + return bus_priv->page[addr]; + + bus_priv->raw[addr] = (bus_priv->page[addr] == bus_priv->rawpage); + err = (*bus_priv->read_phy)(addr, bus_priv->page[addr], regnum, &val); pr_debug("rd_PHY(adr=%d, pag=%d, reg=%d) = %d, err = %d\n", - portaddr, bus_priv->page[portaddr], regnum, val, err); + addr, bus_priv->page[addr], regnum, val, err); return err ? err : val; } @@ -1840,24 +1837,26 @@ static int rtmdio_93xx_read(struct mii_bus *bus, int addr, int regnum) int err, val; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - if (regnum == RTL821X_PAGE_SELECT && bus_priv->page[portaddr] != RTL930X_PAGE_RAW) - return bus_priv->page[portaddr]; + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + + if (regnum == RTMDIO_PAGE_SELECT && bus_priv->page[addr] != bus_priv->rawpage) + return bus_priv->page[addr]; - bus_priv->raw[portaddr] = (bus_priv->page[portaddr] == RTL930X_PAGE_RAW); - if (eth_priv->phy_is_internal[portaddr]) { + bus_priv->raw[addr] = (bus_priv->page[addr] == bus_priv->rawpage); + if (eth_priv->phy_is_internal[addr]) { if (eth_priv->family_id == RTL9300_FAMILY_ID) - return rtl930x_read_sds_phy(eth_priv->sds_id[portaddr], - bus_priv->page[portaddr], regnum); + return rtl930x_read_sds_phy(eth_priv->sds_id[addr], + bus_priv->page[addr], regnum); else - return rtl931x_read_sds_phy(eth_priv->sds_id[portaddr], - bus_priv->page[portaddr], regnum); + return rtl931x_read_sds_phy(eth_priv->sds_id[addr], + bus_priv->page[addr], regnum); } - err = (*bus_priv->read_phy)(portaddr, bus_priv->page[portaddr], regnum, &val); + err = (*bus_priv->read_phy)(addr, bus_priv->page[addr], regnum, &val); pr_debug("rd_PHY(adr=%d, pag=%d, reg=%d) = %d, err = %d\n", - portaddr, bus_priv->page[portaddr], regnum, val, err); + addr, bus_priv->page[addr], regnum, val, err); return err ? err : val; } @@ -1865,83 +1864,91 @@ static int rtmdio_write_c45(struct mii_bus *bus, int addr, int devnum, int regnu { int err; struct rtl838x_bus_priv *bus_priv = bus->priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - err = (*bus_priv->write_mmd_phy)(portaddr, devnum, regnum, val); + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + + err = (*bus_priv->write_mmd_phy)(addr, devnum, regnum, val); pr_debug("wr_MMD(adr=%d, dev=%d, reg=%d, val=%d) err = %d\n", - portaddr, devnum, regnum, val, err); + addr, devnum, regnum, val, err); return err; } static int rtmdio_83xx_write(struct mii_bus *bus, int addr, int regnum, u16 val) { + int err, page, offset = 0; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - int err, page = bus_priv->page[portaddr], offset = 0; - if (regnum == RTL821X_PORT_SELECT) { - bus_priv->portaddr = val; + if (regnum == RTMDIO_PORT_SELECT) { + bus_priv->extaddr = (s16)val; return 0; } - if (portaddr >= 24 && portaddr <= 27 && eth_priv->id == 0x8380) { - if (portaddr == 26) + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + page = bus_priv->page[addr]; + + if (addr >= 24 && addr <= 27 && eth_priv->id == 0x8380) { + if (addr == 26) offset = 0x100; sw_w32(val, RTL838X_SDS4_FIB_REG0 + offset + (regnum << 2)); return 0; } - if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[portaddr]) - return rtl839x_write_sds_phy(portaddr, regnum, val); + if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[addr]) + return rtl839x_write_sds_phy(addr, regnum, val); - if (regnum == RTL821X_PAGE_SELECT) - bus_priv->page[portaddr] = val; + if (regnum == RTMDIO_PAGE_SELECT) + bus_priv->page[addr] = val; - if (!bus_priv->raw[portaddr] && (regnum != RTL821X_PAGE_SELECT || page == RTL838X_PAGE_RAW)) { - bus_priv->raw[portaddr] = (page == RTL838X_PAGE_RAW); - err = (*bus_priv->write_phy)(portaddr, page, regnum, val); + if (!bus_priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == bus_priv->rawpage)) { + bus_priv->raw[addr] = (page == bus_priv->rawpage); + err = (*bus_priv->write_phy)(addr, page, regnum, val); pr_debug("wr_PHY(adr=%d, pag=%d, reg=%d, val=%d) err = %d\n", - portaddr, page, regnum, val, err); + addr, page, regnum, val, err); return err; } - bus_priv->raw[portaddr] = false; + bus_priv->raw[addr] = false; return 0; } static int rtmdio_93xx_write(struct mii_bus *bus, int addr, int regnum, u16 val) { + int err, page; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - int err, page = bus_priv->page[portaddr]; - if (regnum == RTL821X_PORT_SELECT) { - bus_priv->portaddr = val; + if (regnum == RTMDIO_PORT_SELECT) { + bus_priv->extaddr = (s16)val; return 0; } - if (regnum == RTL821X_PAGE_SELECT) - bus_priv->page[portaddr] = val; + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + page = bus_priv->page[addr]; + + if (regnum == RTMDIO_PAGE_SELECT) + bus_priv->page[addr] = val; - if (!bus_priv->raw[portaddr] && (regnum != RTL821X_PAGE_SELECT || page == RTL930X_PAGE_RAW)) { - bus_priv->raw[portaddr] = (page == RTL930X_PAGE_RAW); - if (eth_priv->phy_is_internal[portaddr]) { + if (!bus_priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == bus_priv->rawpage)) { + bus_priv->raw[addr] = (page == bus_priv->rawpage); + if (eth_priv->phy_is_internal[addr]) { if (eth_priv->family_id == RTL9300_FAMILY_ID) - return rtl930x_write_sds_phy(eth_priv->sds_id[portaddr], + return rtl930x_write_sds_phy(eth_priv->sds_id[addr], page, regnum, val); else - return rtl931x_write_sds_phy(eth_priv->sds_id[portaddr], + return rtl931x_write_sds_phy(eth_priv->sds_id[addr], page, regnum, val); } - err = (*bus_priv->write_phy)(portaddr, page, regnum, val); + err = (*bus_priv->write_phy)(addr, page, regnum, val); pr_debug("wr_PHY(adr=%d, pag=%d, reg=%d, val=%d) err = %d\n", - portaddr, page, regnum, val, err); + addr, page, regnum, val, err); } - bus_priv->raw[portaddr] = false; + bus_priv->raw[addr] = false; return 0; } @@ -2244,11 +2251,11 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv = priv->mii_bus->priv; bus_priv->eth_priv = priv; - for (i = 0; i < 64; i++) { + for (i=0; i < 64; i++) { bus_priv->page[i] = 0; bus_priv->raw[i] = false; } - bus_priv->portaddr = 0; + bus_priv->extaddr = -1; switch(priv->family_id) { case RTL8380_FAMILY_ID: @@ -2260,6 +2267,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->write_mmd_phy = rtl838x_write_mmd_phy; bus_priv->read_phy = rtl838x_read_phy; bus_priv->write_phy = rtl838x_write_phy; + bus_priv->rawpage = 0xfff; break; case RTL8390_FAMILY_ID: priv->mii_bus->name = "rtl839x-eth-mdio"; @@ -2270,6 +2278,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->write_mmd_phy = rtl839x_write_mmd_phy; bus_priv->read_phy = rtl839x_read_phy; bus_priv->write_phy = rtl839x_write_phy; + bus_priv->rawpage = 0x1fff; break; case RTL9300_FAMILY_ID: priv->mii_bus->name = "rtl930x-eth-mdio"; @@ -2280,6 +2289,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->write_mmd_phy = rtl930x_write_mmd_phy; bus_priv->read_phy = rtl930x_read_phy; bus_priv->write_phy = rtl930x_write_phy; + bus_priv->rawpage = 0xfff; priv->mii_bus->probe_capabilities = MDIOBUS_C22_C45; break; case RTL9310_FAMILY_ID: @@ -2291,6 +2301,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->write_mmd_phy = rtl931x_write_mmd_phy; bus_priv->read_phy = rtl931x_read_phy; bus_priv->write_phy = rtl931x_write_phy; + bus_priv->rawpage = 0x1fff; priv->mii_bus->probe_capabilities = MDIOBUS_C22_C45; break; } diff --git a/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.h index 0f49eae23da1e5..d6d88fc2ed01b8 100644 --- a/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.h +++ b/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.h @@ -410,7 +410,8 @@ struct dsa_tag; struct rtl838x_bus_priv { struct rtl838x_eth_priv *eth_priv; - int portaddr; + int extaddr; + int rawpage; int page[64]; bool raw[64]; int (*read_mmd_phy)(u32 port, u32 addr, u32 reg, u32 *val); diff --git a/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c index 0c8b1dfd4dcd27..df5e2e444067ab 100644 --- a/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c +++ b/target/linux/realtek/files-5.15/drivers/net/phy/rtl83xx-phy.c @@ -22,8 +22,10 @@ extern struct rtl83xx_soc_info soc_info; extern struct mutex smi_lock; extern int phy_package_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val); extern int phy_package_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val); +extern int phy_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val); extern int phy_package_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum); extern int phy_package_read_paged(struct phy_device *phydev, int page, u32 regnum); +extern int phy_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum); #define PHY_PAGE_2 2 #define PHY_PAGE_4 4 diff --git a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c index 4439059345102d..07664f9f382f3a 100644 --- a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c @@ -1629,7 +1629,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, } /* - * On all RealTek switch platforms the hardware periodically reads the link status of all + * On all Realtek switch platforms the hardware periodically reads the link status of all * PHYs. This is to some degree programmable, so that one can tell the hardware to read * specific C22 registers from specific pages, or C45 registers, to determine the current * link speed, duplex, flow-control, ... @@ -1646,7 +1646,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * abstractions. * * Additionally at least the RTL838x and RTL839x devices are known to have a so called - * raw mode. Using the special MAX_PAGE-1 with the MDIO controller found in RealTek + * raw mode. Using the special MAX_PAGE-1 with the MDIO controller found in Realtek * SoCs allows to access the PHY in raw mode, ie. bypassing the cache and paging engine * of the MDIO controller. E.g. for RTL838x this is 0xfff. * @@ -1655,9 +1655,9 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * when they are not attached to an Realtek SoC. The paradigm should be to keep the PHY * implementation bus independent. * - * As if this is not enough the PHYs consist of 8 ports that all can be programmed - * individually. Writing to port 0 can configure the whole why while other operations - * need to be replicated per port. + * As if this is not enough the PHY packages consist of 4 or 8 ports that all can be + * programmed individually. Some registers are only available on port 0 and configure + * the whole package. * * To bring all this together we need a tricky bus design that intercepts select page * calls but lets raw page accesses through. And especially knows how to handle raw @@ -1668,7 +1668,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * the accesses and the state of the bus with the attributes page[], raw[] and portaddr * of the bus_priv structure. The page selection works as follows: * - * phy_write(phydev, RTL821X_PAGE_SELECT, 12) : store internal page 12 in driver + * phy_write(phydev, RTMDIO_PAGE_SELECT, 12) : store internal page 12 in driver * phy_write(phydev, 7, 33) : write page=12, reg=7, val=33 * * or simply @@ -1677,8 +1677,8 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * * The port selection works as follows and must be called under a held mdio bus lock * - * __mdiobus_write(bus, RTL821X_PORT_SELECT, 4) : switch to port paddr - * __phy_write(phydev, RTL821X_PAGE_SELECT, 11) : store internal page 11 in driver + * __mdiobus_write(bus, RTMDIO_PORT_SELECT, 4) : switch to port 4 + * __phy_write(phydev, RTMDIO_PAGE_SELECT, 11) : store internal page 11 in driver * __phy_write(phydev, 8, 19) : write page=11, reg=8, val=19, port=4 * * Any Realtek PHY that will be connected to this bus must simply provide the standard @@ -1696,75 +1696,57 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev, * return __phy_write(phydev, RTL821X_PAGE_SELECT, page); * } * - * In case there are non Realtek PHYs attached to the logic might need to be + * In case there are non Realtek PHYs attached to the bus the logic might need to be * reimplemented. For now it should be sufficient. */ -#define RTL821X_PAGE_SELECT 0x1f -#define RTL821X_PORT_SELECT 0x2000 -#define RTL838X_PAGE_RAW 0xfff -#define RTL839X_PAGE_RAW 0x1fff -#define RTL930X_PAGE_RAW 0xfff -#define RTL931X_PAGE_RAW 0x1fff -#define RTMDIO_READ 0x0 -#define RTMDIO_WRITE 0x1 +#define RTMDIO_PAGE_SELECT 0x1f +#define RTMDIO_PORT_SELECT 0x2000 +#define RTMDIO_READ 0x1 +#define RTMDIO_WRITE 0x2 +#define RTMDIO_ABS 0x4 +#define RTMDIO_PKG 0x8 /* - * Provide a generic read/write function so we can access multiple ports on a shared PHY - * package of the bus with separate addresses individually. This basically resembles the + * Provide a generic read/write function so we can access arbitrary ports on the bus. + * E.g. other ports of a PHY package on the bus. This basically resembles the kernel * phy_read_paged() and phy_write_paged() functions. To inform the bus that we are - * workin on a not default port (8, 16, 24, ...) we send a RTL821X_PORT_SELECT command - * at the beginning and the end to switch the port handling logic. + * working on a not default port send a RTMDIO_PORT_SELECT command at the beginning + * and the end to switch the port handling logic. */ -static int rtmdio_read_page(struct phy_device *phydev) -{ - if (WARN_ONCE(!phydev->drv->read_page, - "read_page callback not available, PHY driver not loaded?\n")) - return -EOPNOTSUPP; - - return phydev->drv->read_page(phydev); -} - -static int rtmdio_write_page(struct phy_device *phydev, int page) -{ - if (WARN_ONCE(!phydev->drv->write_page, - "write_page callback not available, PHY driver not loaded?\n")) - return -EOPNOTSUPP; - - return phydev->drv->write_page(phydev, page); -} - -static int rtmdio_package_rw(struct phy_device *phydev, int op, int port, - int page, u32 regnum, u16 val) +static int rtmdio_access(struct phy_device *phydev, int op, int port, + int page, u32 regnum, u16 val) { int r, ret = 0, oldpage; - struct phy_package_shared *shared = phydev->shared; - if (!shared) - return -EIO; + if (op & RTMDIO_PKG) { + if (!phydev->shared) + return -EIO; + port = phydev->shared->base_addr + port; + } /* lock and inform bus about non default addressing */ phy_lock_mdio_bus(phydev); __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, - RTL821X_PORT_SELECT, shared->base_addr + port); + RTMDIO_PORT_SELECT, port); - oldpage = ret = rtmdio_read_page(phydev); + oldpage = ret = __phy_read(phydev, RTMDIO_PAGE_SELECT); if (oldpage >= 0 && oldpage != page) { - ret = rtmdio_write_page(phydev, page); + ret = __phy_write(phydev, RTMDIO_PAGE_SELECT, page); if (ret < 0) oldpage = ret; } if (oldpage >= 0) { - if (op == RTMDIO_WRITE) + if (op & RTMDIO_WRITE) ret = __phy_write(phydev, regnum, val); else ret = __phy_read(phydev, regnum); } if (oldpage >= 0) { - r = rtmdio_write_page(phydev, oldpage); + r = __phy_write(phydev, RTMDIO_PAGE_SELECT, oldpage); if (ret >= 0 && r < 0) ret = r; } else @@ -1772,7 +1754,7 @@ static int rtmdio_package_rw(struct phy_device *phydev, int op, int port, /* reset bus to default adressing and unlock it */ __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, - RTL821X_PORT_SELECT, 0); + RTMDIO_PORT_SELECT, -1); phy_unlock_mdio_bus(phydev); return ret; @@ -1782,40 +1764,53 @@ static int rtmdio_package_rw(struct phy_device *phydev, int op, int port, * To make use of the shared package functions provide wrappers that align with kernel * naming conventions. The package() functions are useful to change settings on the * package as a whole. The package_port() functions will allow to target the PHYs - * individually. + * of a package individually. The port() only functions allow to access arbitrary ports + * on the bus through a PHY. */ int phy_package_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val) { - return rtmdio_package_rw(phydev, RTMDIO_WRITE, port, page, regnum, val); + return rtmdio_access(phydev, RTMDIO_WRITE | RTMDIO_PKG, port, page, regnum, val); } int phy_package_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val) { - return rtmdio_package_rw(phydev, RTMDIO_WRITE, 0, page, regnum, val); + return rtmdio_access(phydev, RTMDIO_WRITE | RTMDIO_PKG, 0, page, regnum, val); +} + +int phy_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val) +{ + return rtmdio_access(phydev, RTMDIO_WRITE | RTMDIO_ABS, port, page, regnum, val); } int phy_package_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum) { - return rtmdio_package_rw(phydev, RTMDIO_READ, port, page, regnum, 0); + return rtmdio_access(phydev, RTMDIO_READ | RTMDIO_PKG, port, page, regnum, 0); } int phy_package_read_paged(struct phy_device *phydev, int page, u32 regnum) { - return rtmdio_package_rw(phydev, RTMDIO_READ, 0, page, regnum, 0); + return rtmdio_access(phydev, RTMDIO_READ | RTMDIO_PKG, 0, page, regnum, 0); } -/* These are the core functions of our fancy Realtek SoC MDIO bus. */ +int phy_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum) +{ + return rtmdio_access(phydev, RTMDIO_READ | RTMDIO_ABS, port, page, regnum, 0); +} + +/* These are the core functions of our new Realtek SoC MDIO bus. */ static int rtmdio_read_c45(struct mii_bus *bus, int addr, int devnum, int regnum) { int err, val; struct rtl838x_bus_priv *bus_priv = bus->priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - err = (*bus_priv->read_mmd_phy)(portaddr, devnum, regnum, &val); + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + + err = (*bus_priv->read_mmd_phy)(addr, devnum, regnum, &val); pr_debug("rd_MMD(adr=%d, dev=%d, reg=%d) = %d, err = %d\n", - portaddr, devnum, regnum, val, err); + addr, devnum, regnum, val, err); return err ? err : val; } @@ -1824,21 +1819,23 @@ static int rtmdio_83xx_read(struct mii_bus *bus, int addr, int regnum) int err, val; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - if (portaddr >= 24 && portaddr <= 27 && eth_priv->id == 0x8380) - return rtl838x_read_sds_phy(portaddr, regnum); + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; - if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[portaddr]) - return rtl839x_read_sds_phy(portaddr, regnum); + if (addr >= 24 && addr <= 27 && eth_priv->id == 0x8380) + return rtl838x_read_sds_phy(addr, regnum); - if (regnum == RTL821X_PAGE_SELECT && bus_priv->page[portaddr] != RTL838X_PAGE_RAW) - return bus_priv->page[portaddr]; + if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[addr]) + return rtl839x_read_sds_phy(addr, regnum); - bus_priv->raw[portaddr] = (bus_priv->page[portaddr] == RTL838X_PAGE_RAW); - err = (*bus_priv->read_phy)(portaddr, bus_priv->page[portaddr], regnum, &val); + if (regnum == RTMDIO_PAGE_SELECT && bus_priv->page[addr] != bus_priv->rawpage) + return bus_priv->page[addr]; + + bus_priv->raw[addr] = (bus_priv->page[addr] == bus_priv->rawpage); + err = (*bus_priv->read_phy)(addr, bus_priv->page[addr], regnum, &val); pr_debug("rd_PHY(adr=%d, pag=%d, reg=%d) = %d, err = %d\n", - portaddr, bus_priv->page[portaddr], regnum, val, err); + addr, bus_priv->page[addr], regnum, val, err); return err ? err : val; } @@ -1847,24 +1844,26 @@ static int rtmdio_93xx_read(struct mii_bus *bus, int addr, int regnum) int err, val; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - if (regnum == RTL821X_PAGE_SELECT && bus_priv->page[portaddr] != RTL930X_PAGE_RAW) - return bus_priv->page[portaddr]; + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + + if (regnum == RTMDIO_PAGE_SELECT && bus_priv->page[addr] != bus_priv->rawpage) + return bus_priv->page[addr]; - bus_priv->raw[portaddr] = (bus_priv->page[portaddr] == RTL930X_PAGE_RAW); - if (eth_priv->phy_is_internal[portaddr]) { + bus_priv->raw[addr] = (bus_priv->page[addr] == bus_priv->rawpage); + if (eth_priv->phy_is_internal[addr]) { if (eth_priv->family_id == RTL9300_FAMILY_ID) - return rtl930x_read_sds_phy(eth_priv->sds_id[portaddr], - bus_priv->page[portaddr], regnum); + return rtl930x_read_sds_phy(eth_priv->sds_id[addr], + bus_priv->page[addr], regnum); else - return rtl931x_read_sds_phy(eth_priv->sds_id[portaddr], - bus_priv->page[portaddr], regnum); + return rtl931x_read_sds_phy(eth_priv->sds_id[addr], + bus_priv->page[addr], regnum); } - err = (*bus_priv->read_phy)(portaddr, bus_priv->page[portaddr], regnum, &val); + err = (*bus_priv->read_phy)(addr, bus_priv->page[addr], regnum, &val); pr_debug("rd_PHY(adr=%d, pag=%d, reg=%d) = %d, err = %d\n", - portaddr, bus_priv->page[portaddr], regnum, val, err); + addr, bus_priv->page[addr], regnum, val, err); return err ? err : val; } @@ -1872,83 +1871,91 @@ static int rtmdio_write_c45(struct mii_bus *bus, int addr, int devnum, int regnu { int err; struct rtl838x_bus_priv *bus_priv = bus->priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - err = (*bus_priv->write_mmd_phy)(portaddr, devnum, regnum, val); + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + + err = (*bus_priv->write_mmd_phy)(addr, devnum, regnum, val); pr_debug("wr_MMD(adr=%d, dev=%d, reg=%d, val=%d) err = %d\n", - portaddr, devnum, regnum, val, err); + addr, devnum, regnum, val, err); return err; } static int rtmdio_83xx_write(struct mii_bus *bus, int addr, int regnum, u16 val) { + int err, page, offset = 0; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - int err, page = bus_priv->page[portaddr], offset = 0; - if (regnum == RTL821X_PORT_SELECT) { - bus_priv->portaddr = val; + if (regnum == RTMDIO_PORT_SELECT) { + bus_priv->extaddr = (s16)val; return 0; } - if (portaddr >= 24 && portaddr <= 27 && eth_priv->id == 0x8380) { - if (portaddr == 26) + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + page = bus_priv->page[addr]; + + if (addr >= 24 && addr <= 27 && eth_priv->id == 0x8380) { + if (addr == 26) offset = 0x100; sw_w32(val, RTL838X_SDS4_FIB_REG0 + offset + (regnum << 2)); return 0; } - if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[portaddr]) - return rtl839x_write_sds_phy(portaddr, regnum, val); + if (eth_priv->family_id == RTL8390_FAMILY_ID && eth_priv->phy_is_internal[addr]) + return rtl839x_write_sds_phy(addr, regnum, val); - if (regnum == RTL821X_PAGE_SELECT) - bus_priv->page[portaddr] = val; + if (regnum == RTMDIO_PAGE_SELECT) + bus_priv->page[addr] = val; - if (!bus_priv->raw[portaddr] && (regnum != RTL821X_PAGE_SELECT || page == RTL838X_PAGE_RAW)) { - bus_priv->raw[portaddr] = (page == RTL838X_PAGE_RAW); - err = (*bus_priv->write_phy)(portaddr, page, regnum, val); + if (!bus_priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == bus_priv->rawpage)) { + bus_priv->raw[addr] = (page == bus_priv->rawpage); + err = (*bus_priv->write_phy)(addr, page, regnum, val); pr_debug("wr_PHY(adr=%d, pag=%d, reg=%d, val=%d) err = %d\n", - portaddr, page, regnum, val, err); + addr, page, regnum, val, err); return err; } - bus_priv->raw[portaddr] = false; + bus_priv->raw[addr] = false; return 0; } static int rtmdio_93xx_write(struct mii_bus *bus, int addr, int regnum, u16 val) { + int err, page; struct rtl838x_bus_priv *bus_priv = bus->priv; struct rtl838x_eth_priv *eth_priv = bus_priv->eth_priv; - int portaddr = bus_priv->portaddr ? bus_priv->portaddr : addr; - int err, page = bus_priv->page[portaddr]; - if (regnum == RTL821X_PORT_SELECT) { - bus_priv->portaddr = val; + if (regnum == RTMDIO_PORT_SELECT) { + bus_priv->extaddr = (s16)val; return 0; } - if (regnum == RTL821X_PAGE_SELECT) - bus_priv->page[portaddr] = val; + if (bus_priv->extaddr >= 0) + addr = bus_priv->extaddr; + page = bus_priv->page[addr]; + + if (regnum == RTMDIO_PAGE_SELECT) + bus_priv->page[addr] = val; - if (!bus_priv->raw[portaddr] && (regnum != RTL821X_PAGE_SELECT || page == RTL930X_PAGE_RAW)) { - bus_priv->raw[portaddr] = (page == RTL930X_PAGE_RAW); - if (eth_priv->phy_is_internal[portaddr]) { + if (!bus_priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == bus_priv->rawpage)) { + bus_priv->raw[addr] = (page == bus_priv->rawpage); + if (eth_priv->phy_is_internal[addr]) { if (eth_priv->family_id == RTL9300_FAMILY_ID) - return rtl930x_write_sds_phy(eth_priv->sds_id[portaddr], + return rtl930x_write_sds_phy(eth_priv->sds_id[addr], page, regnum, val); else - return rtl931x_write_sds_phy(eth_priv->sds_id[portaddr], + return rtl931x_write_sds_phy(eth_priv->sds_id[addr], page, regnum, val); } - err = (*bus_priv->write_phy)(portaddr, page, regnum, val); + err = (*bus_priv->write_phy)(addr, page, regnum, val); pr_debug("wr_PHY(adr=%d, pag=%d, reg=%d, val=%d) err = %d\n", - portaddr, page, regnum, val, err); + addr, page, regnum, val, err); } - bus_priv->raw[portaddr] = false; + bus_priv->raw[addr] = false; return 0; } @@ -2217,7 +2224,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->page[i] = 0; bus_priv->raw[i] = false; } - bus_priv->portaddr = 0; + bus_priv->extaddr = -1; switch(priv->family_id) { case RTL8380_FAMILY_ID: @@ -2229,6 +2236,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->write_mmd_phy = rtl838x_write_mmd_phy; bus_priv->read_phy = rtl838x_read_phy; bus_priv->write_phy = rtl838x_write_phy; + bus_priv->rawpage = 0xfff; break; case RTL8390_FAMILY_ID: priv->mii_bus->name = "rtl839x-eth-mdio"; @@ -2239,6 +2247,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->write_mmd_phy = rtl839x_write_mmd_phy; bus_priv->read_phy = rtl839x_read_phy; bus_priv->write_phy = rtl839x_write_phy; + bus_priv->rawpage = 0x1fff; break; case RTL9300_FAMILY_ID: priv->mii_bus->name = "rtl930x-eth-mdio"; @@ -2249,16 +2258,18 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv) bus_priv->write_mmd_phy = rtl930x_write_mmd_phy; bus_priv->read_phy = rtl930x_read_phy; bus_priv->write_phy = rtl930x_write_phy; + bus_priv->rawpage = 0xfff; break; case RTL9310_FAMILY_ID: priv->mii_bus->name = "rtl931x-eth-mdio"; priv->mii_bus->read = rtmdio_93xx_read; priv->mii_bus->write = rtmdio_93xx_write; - priv->mii_bus->reset = rtmdio_931x_reset; + priv->mii_bus->reset = rtmdio_931x_reset; bus_priv->read_mmd_phy = rtl931x_read_mmd_phy; bus_priv->write_mmd_phy = rtl931x_write_mmd_phy; bus_priv->read_phy = rtl931x_read_phy; bus_priv->write_phy = rtl931x_write_phy; + bus_priv->rawpage = 0x1fff; break; } priv->mii_bus->read_c45 = rtmdio_read_c45; diff --git a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h index 0f49eae23da1e5..d6d88fc2ed01b8 100644 --- a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h +++ b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h @@ -410,7 +410,8 @@ struct dsa_tag; struct rtl838x_bus_priv { struct rtl838x_eth_priv *eth_priv; - int portaddr; + int extaddr; + int rawpage; int page[64]; bool raw[64]; int (*read_mmd_phy)(u32 port, u32 addr, u32 reg, u32 *val); diff --git a/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c index 0c8b1dfd4dcd27..df5e2e444067ab 100644 --- a/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c +++ b/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c @@ -22,8 +22,10 @@ extern struct rtl83xx_soc_info soc_info; extern struct mutex smi_lock; extern int phy_package_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val); extern int phy_package_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val); +extern int phy_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val); extern int phy_package_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum); extern int phy_package_read_paged(struct phy_device *phydev, int page, u32 regnum); +extern int phy_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum); #define PHY_PAGE_2 2 #define PHY_PAGE_4 4