From 9c2c6d19f35708bb97462bb8902c54d2ec23001d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 11 Aug 2023 07:10:17 +0200 Subject: [PATCH 01/13] hostapd: add missing #ifdef for non-802.11ax builds Signed-off-by: Felix Fietkau --- package/network/services/hostapd/src/src/ap/ucode.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index a41eee3fe5..fe99c3f667 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -332,16 +332,21 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs) conf->channel = intval; if ((intval = ucv_int64_get(ucv_object_get(info, "sec_channel", NULL))) && !errno) conf->secondary_channel = intval; +#ifdef CONFIG_IEEE80211AC if ((intval = ucv_int64_get(ucv_object_get(info, "center_seg0_idx", NULL))) && !errno) { conf->vht_oper_centr_freq_seg0_idx = intval; +#ifdef CONFIG_IEEE80211AX conf->he_oper_centr_freq_seg0_idx = intval; +#endif #ifdef CONFIG_IEEE80211BE conf->eht_oper_centr_freq_seg0_idx = intval; #endif } if ((intval = ucv_int64_get(ucv_object_get(info, "center_seg1_idx", NULL))) && !errno) { conf->vht_oper_centr_freq_seg1_idx = intval; +#ifdef CONFIG_IEEE80211AX conf->he_oper_centr_freq_seg1_idx = intval; +#endif #ifdef CONFIG_IEEE80211BE conf->eht_oper_centr_freq_seg1_idx = intval; #endif @@ -349,11 +354,14 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs) intval = ucv_int64_get(ucv_object_get(info, "oper_chwidth", NULL)); if (!errno) { conf->vht_oper_chwidth = intval; +#ifdef CONFIG_IEEE80211AX conf->he_oper_chwidth = intval; +#endif #ifdef CONFIG_IEEE80211BE conf->eht_oper_chwidth = intval; #endif } +#endif out: if (conf->channel) From d773fe5411cd4fdd8e107cfe338ed731001a1ade Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 10 Aug 2023 18:03:43 +0200 Subject: [PATCH 02/13] mbedtls: Update to version 2.28.4 This only fixes minor problems. Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.4 Signed-off-by: Hauke Mehrtens --- package/libs/mbedtls/Makefile | 4 ++-- .../mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index a6a7ac39e9..4c3cb965c5 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.28.3 +PKG_VERSION:=2.28.4 PKG_RELEASE:=1 PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=bdf7c5bbdc338da3edad89b2885d4f8668f9a6fffeba6ec17a60333e36dade6f +PKG_HASH:=578c4dcd15bbff3f5cd56aa07cd4f850fc733634e3d5947be4f7157d5bfd81ac PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=gpl-2.0.txt diff --git a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch index c9802eac19..02632cdb4b 100644 --- a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch +++ b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch @@ -33,7 +33,7 @@ Signed-off-by: Glenn Strauss #include #else #include -@@ -2995,6 +2999,61 @@ find_parent: +@@ -3001,6 +3005,61 @@ find_parent: } } @@ -95,7 +95,7 @@ Signed-off-by: Glenn Strauss /* * Check for CN match */ -@@ -3015,24 +3074,51 @@ static int x509_crt_check_cn(const mbedt +@@ -3021,24 +3080,51 @@ static int x509_crt_check_cn(const mbedt return -1; } @@ -158,7 +158,7 @@ Signed-off-by: Glenn Strauss } /* -@@ -3043,31 +3129,23 @@ static void x509_crt_verify_name(const m +@@ -3049,31 +3135,23 @@ static void x509_crt_verify_name(const m uint32_t *flags) { const mbedtls_x509_name *name; From bfbb5ccf7a55ed2cc574405f7f83da5e48811401 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 10 Aug 2023 17:50:38 +0200 Subject: [PATCH 03/13] linux-firmware: update to 20230804 7be2766 (tag: 20230804) Merge branch 'rb3-update' of https://github.com/lumag/linux-firmware 66c1db8 Merge https://github.com/pkshih/linux-firmware 5046942 Mellanox: Add new mlxsw_spectrum firmware xx.2012.1012 5c7b67f linux-firmware: Add URL for latest FW binaries for NXP BT chipsets 29f185d rtw89: 8851b: update firmware to v0.29.41.1 742bf57 qcom: sdm845: add RB3 sensors DSP firmware 253cc17 amdgpu: Update DMCUB for DCN314 & Yellow Carp 07f05b0 Merge branch 'dmc-adlp_2.20-mtl_2.13' of git://anongit.freedesktop.org/drm/drm-firmware 5a251ed Merge branch 'for-upstream' of https://github.com/CirrusLogic/linux-firmware 6c8ce49 ice: add LAG-supporting DDP package fd6e13c i915: Update MTL DMC to v2.13 41e615c i915: Update ADLP DMC to v2.20 c8424cf cirrus: Add CS35L41 firmware for Dell Oasis Models b6ea35f copy-firmware: Fix linking directories when using compression 0a51959 copy-firmware: Fix test: unexpected operator b602d43 qcom: sc8280xp: LENOVO: remove directory sym link e0bad5e qcom: sc8280xp: LENOVO: Remove execute bits 59fbffa amdgpu: update VCN 4.0.0 firmware 22fb12f amdgpu: add initial SMU 13.0.10 firmware b3f512f amdgpu: add initial SDMA 6.0.3 firmware b1a7d76 amdgpu: add initial PSP 13.0.10 firmware d6d655a amdgpu: add initial GC 11.0.3 firmware c782458 Merge branch 'v2.0.21961' of https://github.com/yunfei-mtk/linux_fw_10bit ca9086f Merge branch 'dg2_mtl_guc_70.8' of git://anongit.freedesktop.org/drm/drm-firmware 0bc3126 linux-firmware: Update AMD fam17h cpu microcode b250b32 linux-firmware: Update AMD cpu microcode 9dfcace amdgpu: update green sardine VCN firmware b519832 amdgpu: update renoir VCN firmware 5f569aa amdgpu: update raven VCN firmware 868bb36 amdgpu: update raven2 VCN firmware 6fa9a17 amdgpu: update Picasso VCN firmware cd52460 amdgpu: update DMCUB to v0.0.175.0 for various AMDGPU ASICs 4ef7581 Updated NXP SR150 UWB firmware 2514504 Merge branch 'for-upstream' of https://github.com/CirrusLogic/linux-firmware 45f5ebf wfx: update to firmware 3.16.1 f41d890 mediatek: Update mt8195 SCP firmware to support 10bit mode 6f3a37f i915: update DG2 GuC to v70.8.0 0ee23bd i915: update to GuC 70.8.0 and HuC 8.5.1 for MTL 1a76e8b cirrus: Add CS35L41 firmware for ASUS ROG 2023 Models d3f6606 Partially revert "amdgpu: DMCUB updates for DCN 3.1.4 and 3.1.5" 8917650 linux-firmware: update firmware for mediatek bluetooth chip (MT7922) 7d9af09 linux-firmware: update firmware for MT7922 WiFi device 0bab5df Merge tag 'iwlwifi-fw-2023-06-29' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware 3ec3817 linux-firmware: Update firmware file for Intel Bluetooth AX203 7db3ef9 linux-firmware: Update firmware file for Intel Bluetooth AX203 5684048 linux-firmware: Update firmware file for Intel Bluetooth AX211 3f7a24e linux-firmware: Update firmware file for Intel Bluetooth AX211 eb2c745 linux-firmware: Update firmware file for Intel Bluetooth AX210 4a3ff0a linux-firmware: Update firmware file for Intel Bluetooth AX200 1d1bad4 linux-firmware: Update firmware file for Intel Bluetooth AX201 db39dff Fix qcom ASoC tglp WHENCE entry a687f89 Merge branch 'sc8280xp-audio-fw' of git://git.kernel.org/pub/scm/linux/kernel/git/srini/linux-firmware 9e0343c check_whence: Check link targets are valid b255f5b iwlwifi: add new FWs from core80-39 release fa5d30b iwlwifi: update cc/Qu/QuZ firmwares for core80-39 release f9a35b3 qcom: Add Audio firmware for SC8280XP X13s Signed-off-by: Hauke Mehrtens --- package/firmware/linux-firmware/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 680f8fb104..ef6cd075de 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware -PKG_VERSION:=20230625 +PKG_VERSION:=20230804 PKG_RELEASE:=1 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=87597111c0d4b71b31e53cb85a92c386921b84c825a402db8c82e0e86015500d +PKG_HASH:=88d46c543847ee3b03404d4941d91c92974690ee1f6fdcbee9cef3e5f97db688 PKG_MAINTAINER:=Felix Fietkau From ced285487144e1138e3d2b986b3e070a9b4fd412 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 11 Aug 2023 11:38:29 +0200 Subject: [PATCH 04/13] firmware: intel-microcode: update to 20230808 Debian changelog: intel-microcode (3.20230808.1) unstable; urgency=high * New upstream microcode datafile 20230808 (closes: #1043305) Mitigations for "Downfall" INTEL-SA-00828 (CVE-2022-40982), INTEL-SA-00836 (CVE-2023-23908) and INTEL-SA-00837 (CVE-2022-41804) * Updated microcodes: sig 0x00050653, pf_mask 0x97, 2023-03-23, rev 0x1000181, size 36864 sig 0x00050654, pf_mask 0xb7, 2023-03-06, rev 0x2007006, size 44032 sig 0x00050656, pf_mask 0xbf, 2023-03-17, rev 0x4003604, size 38912 sig 0x00050657, pf_mask 0xbf, 2023-03-17, rev 0x5003604, size 38912 sig 0x0005065b, pf_mask 0xbf, 2023-03-21, rev 0x7002703, size 30720 sig 0x000606a6, pf_mask 0x87, 2023-03-30, rev 0xd0003a5, size 297984 sig 0x000706e5, pf_mask 0x80, 2023-02-26, rev 0x00bc, size 113664 sig 0x000806c1, pf_mask 0x80, 2023-02-27, rev 0x00ac, size 111616 sig 0x000806c2, pf_mask 0xc2, 2023-02-27, rev 0x002c, size 98304 sig 0x000806d1, pf_mask 0xc2, 2023-02-27, rev 0x0046, size 103424 sig 0x000806e9, pf_mask 0xc0, 2023-02-22, rev 0x00f4, size 106496 sig 0x000806e9, pf_mask 0x10, 2023-02-23, rev 0x00f4, size 105472 sig 0x000806ea, pf_mask 0xc0, 2023-02-23, rev 0x00f4, size 105472 sig 0x000806eb, pf_mask 0xd0, 2023-02-23, rev 0x00f4, size 106496 sig 0x000806ec, pf_mask 0x94, 2023-02-26, rev 0x00f8, size 106496 sig 0x000806f8, pf_mask 0x87, 2023-05-09, rev 0x2b0004b1, size 572416 sig 0x000806f7, pf_mask 0x87, 2023-05-09, rev 0x2b0004b1 sig 0x000806f6, pf_mask 0x87, 2023-05-09, rev 0x2b0004b1 sig 0x000806f5, pf_mask 0x87, 2023-05-09, rev 0x2b0004b1 sig 0x000806f4, pf_mask 0x87, 2023-05-09, rev 0x2b0004b1 sig 0x000806f8, pf_mask 0x10, 2023-05-15, rev 0x2c000271, size 605184 sig 0x000806f6, pf_mask 0x10, 2023-05-15, rev 0x2c000271 sig 0x000806f5, pf_mask 0x10, 2023-05-15, rev 0x2c000271 sig 0x000806f4, pf_mask 0x10, 2023-05-15, rev 0x2c000271 sig 0x00090672, pf_mask 0x07, 2023-04-18, rev 0x002e, size 220160 sig 0x00090675, pf_mask 0x07, 2023-04-18, rev 0x002e sig 0x000b06f2, pf_mask 0x07, 2023-04-18, rev 0x002e sig 0x000b06f5, pf_mask 0x07, 2023-04-18, rev 0x002e sig 0x000906a3, pf_mask 0x80, 2023-04-18, rev 0x042c, size 219136 sig 0x000906a4, pf_mask 0x80, 2023-04-18, rev 0x042c sig 0x000906e9, pf_mask 0x2a, 2023-02-23, rev 0x00f4, size 108544 sig 0x000906ea, pf_mask 0x22, 2023-02-23, rev 0x00f4, size 104448 sig 0x000906eb, pf_mask 0x02, 2023-02-23, rev 0x00f4, size 106496 sig 0x000906ec, pf_mask 0x22, 2023-02-23, rev 0x00f4, size 105472 sig 0x000906ed, pf_mask 0x22, 2023-02-27, rev 0x00fa, size 106496 sig 0x000a0652, pf_mask 0x20, 2023-02-23, rev 0x00f8, size 97280 sig 0x000a0653, pf_mask 0x22, 2023-02-23, rev 0x00f8, size 97280 sig 0x000a0655, pf_mask 0x22, 2023-02-23, rev 0x00f8, size 97280 sig 0x000a0660, pf_mask 0x80, 2023-02-23, rev 0x00f8, size 97280 sig 0x000a0661, pf_mask 0x80, 2023-02-23, rev 0x00f8, size 96256 sig 0x000a0671, pf_mask 0x02, 2023-02-26, rev 0x0059, size 104448 sig 0x000b0671, pf_mask 0x32, 2023-06-06, rev 0x0119, size 210944 sig 0x000b06a2, pf_mask 0xe0, 2023-06-06, rev 0x4119, size 216064 sig 0x000b06a3, pf_mask 0xe0, 2023-06-06, rev 0x4119 sig 0x000b06e0, pf_mask 0x11, 2023-04-12, rev 0x0011, size 136192 * source: update symlinks to reflect id of the latest release, 20230808 intel-microcode (3.20230512.1) unstable; urgency=medium Signed-off-by: Hauke Mehrtens --- package/firmware/intel-microcode/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 4c234ddc84..5102bf81ea 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=intel-microcode -PKG_VERSION:=20230512 +PKG_VERSION:=20230808 PKG_RELEASE:=1 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/non-free-firmware/i/intel-microcode/ -PKG_HASH:=e6717a42d7b6e92280565fbb180cd0d11bc5d14874ef06ff1bed2b7a11d17c67 +PKG_HASH:=29e77c275b3f60a691832c0844f70effbd94a4594d04af21e0c2e6e0c1ac1894 PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1 PKG_BUILD_DEPENDS:=iucode-tool/host From c5988f4c01ff2e74a9588507b621d0ea5986cabe Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 11 Aug 2023 15:41:45 +0200 Subject: [PATCH 05/13] hostapd: fix center frequency calculation for channel 149 and above Signed-off-by: Felix Fietkau --- package/network/services/hostapd/src/src/utils/ucode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/src/src/utils/ucode.c b/package/network/services/hostapd/src/src/utils/ucode.c index dba261e41a..b9e7d871c7 100644 --- a/package/network/services/hostapd/src/src/utils/ucode.c +++ b/package/network/services/hostapd/src/src/utils/ucode.c @@ -119,7 +119,12 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs) if (!sec_channel) return ret; - center_ofs = freq_val >= 5900 ? 0 : 3; + if (freq_val >= 5900) + center_ofs = 0; + else if (freq_val >= 5745) + center_ofs = 20; + else + center_ofs = 35; tmp_channel = channel - center_ofs; tmp_channel &= ~((8 << width) - 1); center_idx = tmp_channel + center_ofs + (4 << width) - 1; From dc122f4d9e44adfd73c27111b00210ad2c0c3555 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Sun, 17 Jan 2021 23:26:33 +0100 Subject: [PATCH 06/13] sunxi: add modules for AC100 MFD and RTC The X-Powers AC100 is a multi-function IC used to provide RTC and audio codec via RSB (reduced serial bus, an Allwinner- speciality). On some boards using the A80/A83T SoCs, aside from the RTC functionality, the RTC is used as a clocksource for the Ampak WiFi/BT modules. Add modules for the core MFD support and the RTC. Signed-off-by: Zoltan HERPAI --- target/linux/sunxi/modules.mk | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk index 8bbafe98a7..28ed86ba4c 100644 --- a/target/linux/sunxi/modules.mk +++ b/target/linux/sunxi/modules.mk @@ -2,6 +2,40 @@ # # Copyright (C) 2013-2016 OpenWrt.org +define KernelPackage/mfd-ac100 + SUBMENU:=$(OTHER_MENU) + TITLE:=X-Powers AC100 MFD support + DEPENDS:=@TARGET_sunxi + KCONFIG:= \ + CONFIG_MFD_AC100 + FILES:=$(LINUX_DIR)/drivers/mfd/ac100.ko + AUTOLOAD:=$(call AutoLoad,50,ac100) +endef + +define KernelPackage/mfd-ac100/description + Support for the X-Powers AC100 RTC/audio chip +endef + +$(eval $(call KernelPackage,mfd-ac100)) + +define KernelPackage/rtc-ac100 + SUBMENU:=$(OTHER_MENU) + TITLE:=X-Powers AC100 RTC support + DEPENDS:=@TARGET_sunxi +kmod-mfd-ac100 + $(call AddDepends/rtc) + KCONFIG:= \ + CONFIG_RTC_DRV_AC100 \ + CONFIG_RTC_CLASS=y + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ac100.ko + AUTOLOAD:=$(call AutoLoad,50,rtc-ac100) +endef + +define KernelPackage/rtc-ac100/description + Support for the X-Powers AC100 RTC +endef + +$(eval $(call KernelPackage,rtc-ac100)) + define KernelPackage/rtc-sunxi SUBMENU:=$(OTHER_MENU) TITLE:=Sunxi SoC built-in RTC support From 80edfaf675364835e6d2e17d97ebec6afc6b2103 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Thu, 5 Mar 2020 21:54:53 +0100 Subject: [PATCH 07/13] sunxi: add support for Banana Pi M3 CPU Allwinner A83t Octa-core Cortex A7 @ 1.2GHz Memory 2Gb DDR3 Storage SDcard, SATA (via USB), 8GB eMMC Network 10/100/1000M ethernet, Ampak AP6212 wifi + BT USB 2x USB 2.0 Flashing instructions: Standard sunxi SD card installation procedure - copy image to SD card, insert into SD card slot on the device and boot. Signed-off-by: Zoltan HERPAI --- package/boot/uboot-sunxi/Makefile | 7 +++++++ target/linux/sunxi/image/cortexa7.mk | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index cb0c93281d..7cadf6ff32 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -294,6 +294,12 @@ define U-Boot/bananapi_m2_plus_h3 BUILD_DEVICES:=sinovoip_bananapi-m2-plus endef +define U-Boot/Sinovoip_BPI_M3 + BUILD_SUBTARGET:=cortexa7 + NAME:=Bananapi M3 + BUILD_DEVICES:=sinovoip_bananapi-m3 +endef + define U-Boot/sopine_baseboard BUILD_SUBTARGET:=cortexa53 NAME:=Sopine Baseboard @@ -378,6 +384,7 @@ UBOOT_TARGETS := \ orangepi_pc2 \ pangolin \ pine64_plus \ + Sinovoip_BPI_M3 \ sopine_baseboard \ orangepi_zero_plus \ libretech_all_h3_cc_h5 diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk index 5b9f27cef8..2858fc0f61 100644 --- a/target/linux/sunxi/image/cortexa7.mk +++ b/target/linux/sunxi/image/cortexa7.mk @@ -176,6 +176,15 @@ define Device/sinovoip_bananapi-m2-plus endef TARGET_DEVICES += sinovoip_bananapi-m2-plus +define Device/sinovoip_bananapi-m3 + DEVICE_VENDOR := Sinovoip + DEVICE_MODEL := Banana Pi M3 + DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-leds-gpio kmod-rtc-ac100 \ + kmod-brcmfmac cypress-firmware-43430-sdio wpad-basic-mbedtls + SOC := sun8i-a83t +endef +TARGET_DEVICES += sinovoip_bananapi-m3 + define Device/xunlong_orangepi-one DEVICE_VENDOR := Xunlong DEVICE_MODEL := Orange Pi One From c1600df91f459c116e37454d5e983571cb166081 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 11 Aug 2023 15:45:14 +0200 Subject: [PATCH 08/13] hostapd: shut down client mode on the same phy while restarting AP An active client mode interface could prevent the AP from claiming its channel and mess up the bringup sequence order Signed-off-by: Felix Fietkau --- .../network/services/hostapd/files/hostapd.uc | 8 +++--- .../services/hostapd/files/wpa_supplicant.uc | 27 ++++++++++++++++++- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index 9bb8f8d29d..401f7c9266 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -66,10 +66,12 @@ function iface_restart(phy, config, old_config) if (err) hostapd.printf(`Failed to create ${bss.ifname} on phy ${phy}: ${err}`); let config_inline = iface_gen_config(phy, config); - if (hostapd.add_iface(`bss_config=${bss.ifname}:${config_inline}`) < 0) { + + let ubus = hostapd.data.ubus; + ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: true }); + if (hostapd.add_iface(`bss_config=${bss.ifname}:${config_inline}`) < 0) hostapd.printf(`hostapd.add_iface failed for phy ${phy} ifname=${bss.ifname}`); - return; - } + ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: false }); } function array_to_obj(arr, key, start) diff --git a/package/network/services/hostapd/files/wpa_supplicant.uc b/package/network/services/hostapd/files/wpa_supplicant.uc index 412f87b4b1..6308fd54e2 100644 --- a/package/network/services/hostapd/files/wpa_supplicant.uc +++ b/package/network/services/hostapd/files/wpa_supplicant.uc @@ -11,6 +11,9 @@ function iface_stop(iface) { let ifname = iface.config.iface; + if (!iface.running) + return; + delete wpas.data.iface_phy[ifname]; wpas.remove_iface(ifname); wdev_remove(ifname); @@ -40,7 +43,7 @@ function iface_cb(new_if, old_if) return; } - if (old_if && old_if.running) + if (old_if) iface_stop(old_if); } @@ -76,6 +79,28 @@ function start_pending(phy_name) } let main_obj = { + phy_set_state: { + args: { + phy: "", + stop: true, + }, + call: function(req) { + if (!req.args.phy || req.args.stop == null) + return libubus.STATUS_INVALID_ARGUMENT; + + let phy = wpas.data.config[req.args.phy]; + if (!phy) + return libubus.STATUS_NOT_FOUND; + + if (req.args.stop) { + for (let ifname in phy.data) + iface_stop(phy.data[ifname]); + } else { + start_pending(req.args.phy); + } + return 0; + } + }, config_set: { args: { phy: "", From f1c4751ba62ba561fef5d64010ac9cc7c0b86afb Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 11 Aug 2023 23:08:56 +0200 Subject: [PATCH 09/13] hostapd: restart wifi when the bssid of the first interface changes Full restart is necessary, since the bss wdev is not re-created Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd.uc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index 401f7c9266..070d70a964 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -136,6 +136,9 @@ function iface_reload_config(phy, config, old_config) if (phy_is_fullmac(phy)) return false; + if (config.bss[0].bssid != old_config.bss[0].bssid) + return false; + hostapd.printf(`Reload config for bss '${config.bss[0].ifname}' on phy '${phy}'`); if (iface.bss[0].set_config(config_inline, 0) < 0) { hostapd.printf(`Failed to set config`); @@ -269,6 +272,9 @@ function iface_load_config(filename) if (!val[0]) continue; + if (val[0] == "bssid") + bss.bssid = val[1]; + if (val[0] == "bss") { bss = config_add_bss(config, val[1]); continue; From a0a5b976746b6bbe94c664ac17efc95ce944f8d1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 12 Aug 2023 00:36:13 +0200 Subject: [PATCH 10/13] hostapd: do not store data in object prototype It cannot be properly cloned, since it is attached to the resource type. Use a separate registry for data. Fixes object confusion issues Signed-off-by: Felix Fietkau --- .../network/services/hostapd/files/hostapd.uc | 14 ++++++---- .../services/hostapd/files/wpa_supplicant.uc | 22 ++++++++------- .../services/hostapd/src/src/ap/ucode.c | 28 +++++++++---------- .../services/hostapd/src/src/utils/ucode.c | 21 ++------------ .../services/hostapd/src/src/utils/ucode.h | 2 +- .../hostapd/src/wpa_supplicant/ucode.c | 10 ++++--- 6 files changed, 44 insertions(+), 53 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index 070d70a964..f9f0c31bab 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -125,13 +125,18 @@ function iface_reload_config(phy, config, old_config) if (config.bss[0].ifname != old_config.bss[0].ifname) return false; - let iface = hostapd.interfaces[config.bss[0].ifname]; + let iface_name = config.bss[0].ifname; + let iface = hostapd.interfaces[iface_name]; if (!iface) return false; + let first_bss = hostapd.bss[iface_name]; + if (!first_bss) + return false; + let config_inline = iface_gen_config(phy, config); - bss_reload_psk(iface.bss[0], config.bss[0], old_config.bss[0]); + bss_reload_psk(first_bss, config.bss[0], old_config.bss[0]); if (!is_equal(config.bss[0], old_config.bss[0])) { if (phy_is_fullmac(phy)) return false; @@ -140,18 +145,17 @@ function iface_reload_config(phy, config, old_config) return false; hostapd.printf(`Reload config for bss '${config.bss[0].ifname}' on phy '${phy}'`); - if (iface.bss[0].set_config(config_inline, 0) < 0) { + if (first_bss.set_config(config_inline, 0) < 0) { hostapd.printf(`Failed to set config`); return false; } } - let bss_list = array_to_obj(iface.bss, "name", 1); let new_cfg = array_to_obj(config.bss, "ifname", 1); let old_cfg = array_to_obj(old_config.bss, "ifname", 1); for (let name in old_cfg) { - let bss = bss_list[name]; + let bss = hostapd.bss[name]; if (!bss) { hostapd.printf(`bss '${name}' not found`); return false; diff --git a/package/network/services/hostapd/files/wpa_supplicant.uc b/package/network/services/hostapd/files/wpa_supplicant.uc index 6308fd54e2..e3a3afcff2 100644 --- a/package/network/services/hostapd/files/wpa_supplicant.uc +++ b/package/network/services/hostapd/files/wpa_supplicant.uc @@ -92,11 +92,16 @@ let main_obj = { if (!phy) return libubus.STATUS_NOT_FOUND; - if (req.args.stop) { - for (let ifname in phy.data) - iface_stop(phy.data[ifname]); - } else { - start_pending(req.args.phy); + try { + if (req.args.stop) { + for (let ifname in phy.data) + iface_stop(phy.data[ifname]); + } else { + start_pending(req.args.phy); + } + } catch (e) { + wpas.printf(`Error chaging state: ${e}\n${e.stacktrace[0].context}`); + return libubus.STATUS_INVALID_ARGUMENT; } return 0; } @@ -221,14 +226,12 @@ return { wpas.ubus.disconnect(); }, iface_add: function(name, obj) { - obj.data.name = name; iface_event("add", name); }, iface_remove: function(name, obj) { iface_event("remove", name); }, - state: function(iface, state) { - let ifname = iface.data.name; + state: function(ifname, iface, state) { let phy = wpas.data.iface_phy[ifname]; if (!phy) { wpas.printf(`no PHY for ifname ${ifname}`); @@ -237,8 +240,7 @@ return { iface_hostapd_notify(phy, ifname, iface, state); }, - event: function(iface, ev, info) { - let ifname = iface.data.name; + event: function(ifname, iface, ev, info) { let phy = wpas.data.iface_phy[ifname]; if (!phy) { wpas.printf(`no PHY for ifname ${ifname}`); diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c index fe99c3f667..053171b142 100644 --- a/package/network/services/hostapd/src/src/ap/ucode.c +++ b/package/network/services/hostapd/src/src/ap/ucode.c @@ -23,7 +23,7 @@ hostapd_ucode_bss_get_uval(struct hostapd_data *hapd) return wpa_ucode_registry_get(bss_registry, hapd->ucode.idx); val = uc_resource_new(bss_type, hapd); - wpa_ucode_registry_add(bss_registry, val, &hapd->ucode.idx); + hapd->ucode.idx = wpa_ucode_registry_add(bss_registry, val); return val; } @@ -37,46 +37,46 @@ hostapd_ucode_iface_get_uval(struct hostapd_iface *hapd) return wpa_ucode_registry_get(iface_registry, hapd->ucode.idx); val = uc_resource_new(iface_type, hapd); - wpa_ucode_registry_add(iface_registry, val, &hapd->ucode.idx); + hapd->ucode.idx = wpa_ucode_registry_add(iface_registry, val); return val; } static void -hostapd_ucode_update_bss_list(struct hostapd_iface *iface) +hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, uc_value_t *bss) { - uc_value_t *ifval, *list; + uc_value_t *list; int i; list = ucv_array_new(vm); for (i = 0; i < iface->num_bss; i++) { struct hostapd_data *hapd = iface->bss[i]; uc_value_t *val = hostapd_ucode_bss_get_uval(hapd); - uc_value_t *proto = ucv_prototype_get(val); - ucv_object_add(proto, "name", ucv_get(ucv_string_new(hapd->conf->iface))); - ucv_object_add(proto, "index", ucv_int64_new(i)); - ucv_array_set(list, i, ucv_get(val)); + ucv_array_set(list, i, ucv_get(ucv_string_new(hapd->conf->iface))); + ucv_object_add(bss, hapd->conf->iface, ucv_get(val)); } - - ifval = hostapd_ucode_iface_get_uval(iface); - ucv_object_add(ucv_prototype_get(ifval), "bss", ucv_get(list)); + ucv_object_add(if_bss, iface->phy, ucv_get(list)); } static void hostapd_ucode_update_interfaces(void) { uc_value_t *ifs = ucv_object_new(vm); + uc_value_t *if_bss = ucv_array_new(vm); + uc_value_t *bss = ucv_object_new(vm); int i; for (i = 0; i < interfaces->count; i++) { struct hostapd_iface *iface = interfaces->iface[i]; ucv_object_add(ifs, iface->phy, ucv_get(hostapd_ucode_iface_get_uval(iface))); - hostapd_ucode_update_bss_list(iface); + hostapd_ucode_update_bss_list(iface, if_bss, bss); } ucv_object_add(ucv_prototype_get(global), "interfaces", ucv_get(ifs)); + ucv_object_add(ucv_prototype_get(global), "interface_bss", ucv_get(if_bss)); + ucv_object_add(ucv_prototype_get(global), "bss", ucv_get(bss)); ucv_gc(vm); } @@ -199,7 +199,7 @@ uc_hostapd_bss_delete(uc_vm_t *vm, size_t nargs) hostapd_config_free_bss(hapd->conf); os_free(hapd); - hostapd_ucode_update_bss_list(iface); + hostapd_ucode_update_interfaces(); ucv_gc(vm); return NULL; @@ -252,7 +252,7 @@ uc_hostapd_iface_add_bss(uc_vm_t *vm, size_t nargs) iface->conf->bss[iface->conf->num_bss] = bss; conf->bss[idx] = NULL; ret = hostapd_ucode_bss_get_uval(hapd); - hostapd_ucode_update_bss_list(iface); + hostapd_ucode_update_interfaces(); goto out; deinit_ctrl: diff --git a/package/network/services/hostapd/src/src/utils/ucode.c b/package/network/services/hostapd/src/src/utils/ucode.c index b9e7d871c7..44169f0bf0 100644 --- a/package/network/services/hostapd/src/src/utils/ucode.c +++ b/package/network/services/hostapd/src/src/utils/ucode.c @@ -271,21 +271,7 @@ uc_value_t *wpa_ucode_global_init(const char *name, uc_resource_type_t *global_t return global; } -static uc_value_t *wpa_ucode_prototype_clone(uc_value_t *uval) -{ - uc_value_t *proto, *proto_new; - - proto = ucv_prototype_get(uval); - proto_new = ucv_object_new(&vm); - - ucv_object_foreach(proto, key, val) - ucv_object_add(proto_new, key, ucv_get(val)); - ucv_prototype_set(uval, ucv_get(proto)); - - return proto; -} - -void wpa_ucode_registry_add(uc_value_t *reg, uc_value_t *val, int *idx) +int wpa_ucode_registry_add(uc_value_t *reg, uc_value_t *val) { uc_value_t *data; int i = 0; @@ -295,10 +281,7 @@ void wpa_ucode_registry_add(uc_value_t *reg, uc_value_t *val, int *idx) ucv_array_set(reg, i, ucv_get(val)); - data = ucv_object_new(&vm); - ucv_object_add(wpa_ucode_prototype_clone(val), "data", ucv_get(data)); - - *idx = i + 1; + return i + 1; } uc_value_t *wpa_ucode_registry_get(uc_value_t *reg, int idx) diff --git a/package/network/services/hostapd/src/src/utils/ucode.h b/package/network/services/hostapd/src/src/utils/ucode.h index 6f0dd4408e..2c1886976e 100644 --- a/package/network/services/hostapd/src/src/utils/ucode.h +++ b/package/network/services/hostapd/src/src/utils/ucode.h @@ -17,7 +17,7 @@ void wpa_ucode_free_vm(void); uc_value_t *wpa_ucode_global_init(const char *name, uc_resource_type_t *global_type); -void wpa_ucode_registry_add(uc_value_t *reg, uc_value_t *val, int *idx); +int wpa_ucode_registry_add(uc_value_t *reg, uc_value_t *val); uc_value_t *wpa_ucode_registry_get(uc_value_t *reg, int idx); uc_value_t *wpa_ucode_registry_remove(uc_value_t *reg, int idx); diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c index 96e1057913..d0a78d1625 100644 --- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c +++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c @@ -21,7 +21,7 @@ wpas_ucode_iface_get_uval(struct wpa_supplicant *wpa_s) return wpa_ucode_registry_get(iface_registry, wpa_s->ucode.idx); val = uc_resource_new(iface_type, wpa_s); - wpa_ucode_registry_add(iface_registry, val, &wpa_s->ucode.idx); + wpa_s->ucode.idx = wpa_ucode_registry_add(iface_registry, val); return val; } @@ -84,9 +84,10 @@ void wpas_ucode_update_state(struct wpa_supplicant *wpa_s) return; state = wpa_supplicant_state_txt(wpa_s->wpa_state); + uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname))); uc_value_push(ucv_get(val)); uc_value_push(ucv_get(ucv_string_new(state))); - ucv_put(wpa_ucode_call(2)); + ucv_put(wpa_ucode_call(3)); ucv_gc(vm); } @@ -105,6 +106,7 @@ void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_d if (wpa_ucode_call_prepare("event")) return; + uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname))); uc_value_push(ucv_get(val)); uc_value_push(ucv_get(ucv_string_new(event_to_string(event)))); val = ucv_object_new(vm); @@ -118,7 +120,7 @@ void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_d ucv_object_add(val, "center_freq2", ucv_int64_new(data->ch_switch.cf2)); } - ucv_put(wpa_ucode_call(3)); + ucv_put(wpa_ucode_call(4)); ucv_gc(vm); } @@ -245,7 +247,7 @@ int wpas_ucode_init(struct wpa_global *gl) iface_type = uc_type_declare(vm, "wpas.iface", iface_fns, NULL); iface_registry = ucv_array_new(vm); - uc_vm_registry_set(vm, "hostap.iface_registry", iface_registry); + uc_vm_registry_set(vm, "wpas.iface_registry", iface_registry); global = wpa_ucode_global_init("wpas", global_type); From 093d317d20bbaa553598dbabf2b04d331131f6d1 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 11 Aug 2023 12:39:29 -0400 Subject: [PATCH 11/13] kernel: bump 6.1 to 6.1.45 Changelog: https://lore.kernel.org/stable/2023081123-ion-ferment-1ce5@gregkh/ All patches automatically rebased. Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Tested-by: Stefan Lippers-Hollmann #x86_64 (j1900) Signed-off-by: John Audia --- include/kernel-6.1 | 4 ++-- ...ers-remove-legacy_cursor_update-hacks.patch | 2 +- ...cm_sf2-enable-GPHY-for-switch-probing.patch | 2 +- ..._sf2-keep-GPHY-enabled-on-the-BCM4908.patch | 2 +- ...ti-gen-LRU-per-node-lru_gen_folio-lis.patch | 8 ++++---- .../hack-6.1/901-debloat_sock_diag.patch | 2 +- .../generic/hack-6.1/902-debloat_proc.patch | 2 +- .../530-jffs2_make_lzma_available.patch | 4 ++-- ...ing-with-source-address-failed-policy.patch | 18 +++++++++--------- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 95d4bb1927..8b6629001c 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .44 -LINUX_KERNEL_HASH-6.1.44 = 2e51d41fe11d082ae167cee05772bb07ca7f19448d2b46772d8ca2db7673a1a5 +LINUX_VERSION-6.1 = .45 +LINUX_KERNEL_HASH-6.1.45 = bd2343396e7ddad8974f3689a5a067ec931f4ade793e72b1070a85cd19f1f192 diff --git a/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch b/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch index 8bcbb0db27..9d4b5571e2 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0045-drm-atomic-helpers-remove-legacy_cursor_update-hacks.patch @@ -88,7 +88,7 @@ Signed-off-by: Maxime Ripard commit->event = kzalloc(sizeof(*commit->event), --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c -@@ -7765,6 +7765,19 @@ static int intel_atomic_commit(struct dr +@@ -7743,6 +7743,19 @@ static int intel_atomic_commit(struct dr state->base.legacy_cursor_update = false; } diff --git a/target/linux/bcm4908/patches-6.1/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch b/target/linux/bcm4908/patches-6.1/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch index 26c2f10942..954b28b63b 100644 --- a/target/linux/bcm4908/patches-6.1/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch +++ b/target/linux/bcm4908/patches-6.1/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch @@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1512,10 +1512,14 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1516,10 +1516,14 @@ static int bcm_sf2_sw_probe(struct platf rev = reg_readl(priv, REG_PHY_REVISION); priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK; diff --git a/target/linux/bcm4908/patches-6.1/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch b/target/linux/bcm4908/patches-6.1/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch index 302c933742..24e6234600 100644 --- a/target/linux/bcm4908/patches-6.1/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch +++ b/target/linux/bcm4908/patches-6.1/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch @@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1526,6 +1526,12 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1530,6 +1530,12 @@ static int bcm_sf2_sw_probe(struct platf priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff, priv->irq0, priv->irq1); diff --git a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch index 7a4d175128..87e7c49a76 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch @@ -325,7 +325,7 @@ Signed-off-by: T.J. Mercier mctz = soft_limit_tree.rb_tree_per_node[nid]; if (!mctz) return; -@@ -3522,6 +3532,9 @@ unsigned long mem_cgroup_soft_limit_recl +@@ -3523,6 +3533,9 @@ unsigned long mem_cgroup_soft_limit_recl struct mem_cgroup_tree_per_node *mctz; unsigned long excess; @@ -335,7 +335,7 @@ Signed-off-by: T.J. Mercier if (order > 0) return 0; -@@ -5382,6 +5395,7 @@ static int mem_cgroup_css_online(struct +@@ -5383,6 +5396,7 @@ static int mem_cgroup_css_online(struct if (unlikely(mem_cgroup_is_root(memcg))) queue_delayed_work(system_unbound_wq, &stats_flush_dwork, 2UL*HZ); @@ -343,7 +343,7 @@ Signed-off-by: T.J. Mercier return 0; offline_kmem: memcg_offline_kmem(memcg); -@@ -5413,6 +5427,7 @@ static void mem_cgroup_css_offline(struc +@@ -5414,6 +5428,7 @@ static void mem_cgroup_css_offline(struc memcg_offline_kmem(memcg); reparent_shrinker_deferred(memcg); wb_memcg_offline(memcg); @@ -351,7 +351,7 @@ Signed-off-by: T.J. Mercier drain_all_stock(memcg); -@@ -5424,6 +5439,7 @@ static void mem_cgroup_css_released(stru +@@ -5425,6 +5440,7 @@ static void mem_cgroup_css_released(stru struct mem_cgroup *memcg = mem_cgroup_from_css(css); invalidate_reclaim_iterators(memcg); diff --git a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch index b93fe2b725..6cd30813a5 100644 --- a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch @@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *, u32)); INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *, -@@ -2168,9 +2182,11 @@ static void __sk_free(struct sock *sk) +@@ -2175,9 +2189,11 @@ static void __sk_free(struct sock *sk) if (likely(sk->sk_net_refcnt)) sock_inuse_add(sock_net(sk), -1); diff --git a/target/linux/generic/hack-6.1/902-debloat_proc.patch b/target/linux/generic/hack-6.1/902-debloat_proc.patch index b035f04ba2..1b7b72f44d 100644 --- a/target/linux/generic/hack-6.1/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.1/902-debloat_proc.patch @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -4093,6 +4093,8 @@ static __net_initdata struct pernet_oper +@@ -4100,6 +4100,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch index b6b75d4ac5..f17216c52b 100644 --- a/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch +++ b/target/linux/generic/pending-6.1/530-jffs2_make_lzma_available.patch @@ -1102,7 +1102,7 @@ Signed-off-by: Alexandros C. Couloumbis # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.) --- a/lib/Makefile +++ b/lib/Makefile -@@ -134,6 +134,16 @@ CFLAGS_kobject.o += -DDEBUG +@@ -140,6 +140,16 @@ CFLAGS_kobject.o += -DDEBUG CFLAGS_kobject_uevent.o += -DDEBUG endif @@ -1119,7 +1119,7 @@ Signed-off-by: Alexandros C. Couloumbis obj-$(CONFIG_DEBUG_INFO_REDUCED) += debug_info.o CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any) -@@ -194,6 +204,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/ +@@ -200,6 +210,8 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd/ obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd/ obj-$(CONFIG_XZ_DEC) += xz/ obj-$(CONFIG_RAID6_PQ) += raid6/ diff --git a/target/linux/generic/pending-6.1/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-6.1/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index e5103570f1..a3cfad2206 100644 --- a/target/linux/generic/pending-6.1/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-6.1/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -4539,6 +4558,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -4540,6 +4559,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -5032,7 +5062,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -5033,7 +5063,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -6286,6 +6317,8 @@ static int ip6_route_dev_notify(struct n +@@ -6287,6 +6318,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -6297,6 +6330,7 @@ static int ip6_route_dev_notify(struct n +@@ -6298,6 +6331,7 @@ static int ip6_route_dev_notify(struct n in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); #ifdef CONFIG_IPV6_MULTIPLE_TABLES in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); #endif } -@@ -6488,6 +6522,8 @@ static int __net_init ip6_route_net_init +@@ -6489,6 +6523,8 @@ static int __net_init ip6_route_net_init #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.fib6_has_custom_rules = false; @@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, sizeof(*net->ipv6.ip6_prohibit_entry), GFP_KERNEL); -@@ -6498,11 +6534,21 @@ static int __net_init ip6_route_net_init +@@ -6499,11 +6535,21 @@ static int __net_init ip6_route_net_init ip6_template_metrics, true); INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); @@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); -@@ -6529,6 +6575,8 @@ out: +@@ -6530,6 +6576,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -6548,6 +6596,7 @@ static void __net_exit ip6_route_net_exi +@@ -6549,6 +6597,7 @@ static void __net_exit ip6_route_net_exi kfree(net->ipv6.ip6_null_entry); #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); @@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski kfree(net->ipv6.ip6_blk_hole_entry); #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); -@@ -6631,6 +6680,9 @@ void __init ip6_route_init_special_entri +@@ -6632,6 +6681,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); From 22d7ac4b804fcc87813a6575b3ca323c32ef2365 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Sat, 12 Aug 2023 13:51:38 +0200 Subject: [PATCH 12/13] sunxi: bananapro: add firmware files for Ampak 6181 The Bananapro board has an Ampak 6181 onboard (BCM43362/1), enable the firmware files in the device profile, and add wpad-basic-mbedtls. Signed-off-by: Zoltan HERPAI --- target/linux/sunxi/image/cortexa7.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk index 2858fc0f61..e14db24eb2 100644 --- a/target/linux/sunxi/image/cortexa7.mk +++ b/target/linux/sunxi/image/cortexa7.mk @@ -104,7 +104,8 @@ TARGET_DEVICES += sinovoip_bananapi-m2-ultra define Device/lemaker_bananapro DEVICE_VENDOR := LeMaker DEVICE_MODEL := Banana Pro - DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi kmod-brcmfmac + DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi kmod-brcmfmac \ + cypress-firmware-43362-sdio wpad-basic-mbedtls SOC := sun7i-a20 endef TARGET_DEVICES += lemaker_bananapro From 16c37ba9136ff431c7e3c97cc27e4ea166b8020a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 31 Jul 2023 12:41:13 +0200 Subject: [PATCH 13/13] arm-trusted-firmware-tools: fix build on macOS/Darwin Resolve conflicts with the uuid type from darwin system headers Signed-off-by: Felix Fietkau --- .../patches/002-darwin_compile.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch diff --git a/package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch b/package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch new file mode 100644 index 0000000000..6bc8192f44 --- /dev/null +++ b/package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch @@ -0,0 +1,21 @@ +--- a/tools/fiptool/fiptool.c ++++ b/tools/fiptool/fiptool.c +@@ -3,7 +3,7 @@ + * + * SPDX-License-Identifier: BSD-3-Clause + */ +- ++#define _DARWIN_C_SOURCE + #ifndef _MSC_VER + #include + #endif +@@ -18,6 +18,9 @@ + #include + #include + #include ++#include ++ ++#define uuid_t fiptool_uuid_t + + #include "fiptool.h" + #include "tbbr_config.h"