From b42a41acbe51dcd7376e9cc56503b1f6032fa307 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 21 Aug 2022 18:52:52 +0200 Subject: [PATCH 1/7] ipq806x: add missing scaling_available_frequencies for dedicated cpufreq Add missing scaling_available_frequencies sysfs entry for dedicated cpufreq driver. This sysfs entry is not standard and each cpufreq driver needs to provide it and declare it in the cpufreq driver struct attr. Fixes: 5dbbefcbccc0 ("ipq806x: introduce dedicated krait cpufreq") Signed-off-by: Christian Marangi --- ...098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/patches-5.4/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch b/target/linux/ipq806x/patches-5.4/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch index d6711105da6d3..597598e8a91a8 100644 --- a/target/linux/ipq806x/patches-5.4/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch +++ b/target/linux/ipq806x/patches-5.4/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch @@ -75,7 +75,7 @@ Signed-off-by: Ansuel Smith ################################################################################## --- /dev/null +++ b/drivers/cpufreq/qcom-cpufreq-krait.c -@@ -0,0 +1,603 @@ +@@ -0,0 +1,609 @@ +// SPDX-License-Identifier: GPL-2.0 + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -435,6 +435,11 @@ Signed-off-by: Ansuel Smith + return 0; +} + ++static struct freq_attr *krait_cpufreq_attr[] = { ++ &cpufreq_freq_attr_scaling_available_freqs, ++ NULL, ++}; ++ +static struct cpufreq_driver krait_cpufreq_driver = { + .flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK | + CPUFREQ_IS_COOLING_DEV, @@ -446,6 +451,7 @@ Signed-off-by: Ansuel Smith + .online = cpufreq_online, + .offline = cpufreq_offline, + .name = "krait-cpufreq", ++ .attr = krait_cpufreq_attr, + .suspend = cpufreq_generic_suspend, +}; + From eb7c6f49eb7ea01cb7eaefd9a299daaef9141959 Mon Sep 17 00:00:00 2001 From: NueXini <34617094+NueXini@users.noreply.github.com> Date: Tue, 23 Aug 2022 14:42:49 +0800 Subject: [PATCH 2/7] r8101: fix PKG_SOURCE_URL (#9986) --- package/lean/r8101/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/r8101/Makefile b/package/lean/r8101/Makefile index 484aa30361dd6..3de7907a8b77b 100644 --- a/package/lean/r8101/Makefile +++ b/package/lean/r8101/Makefile @@ -11,7 +11,7 @@ PKG_VERSION:=1.037.01 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://github.com/umarizulkifli/r8101/blob/main/r8101-1.037.01.tar.bz2 +PKG_SOURCE_URL:=https://github.com/umarizulkifli/r8101/blob/main PKG_HASH:=45b3ae6af31054879b06c13ce4f0fb14 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) From 2c2ebde06cfddc27f2646ce663a37095d30238be Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Tue, 23 Aug 2022 19:55:09 +0800 Subject: [PATCH 3/7] r8101: fixes download link/hash (#9988) --- package/lean/r8101/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/r8101/Makefile b/package/lean/r8101/Makefile index 3de7907a8b77b..bae42105d9f29 100644 --- a/package/lean/r8101/Makefile +++ b/package/lean/r8101/Makefile @@ -11,8 +11,8 @@ PKG_VERSION:=1.037.01 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://github.com/umarizulkifli/r8101/blob/main -PKG_HASH:=45b3ae6af31054879b06c13ce4f0fb14 +PKG_SOURCE_URL:=https://github.com/umarizulkifli/r8101/raw/main/ +PKG_HASH:=62bb19848a87d2fe4de3fa9332225dcb5381f06cb93ec8931ea3fd894d492aea PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=umarizulkifli From 8b7bdd4f517c05d51af3c1c95768a700ba6a91b5 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Thu, 18 Aug 2022 23:21:29 +0800 Subject: [PATCH 4/7] vsftpd-alt: fix compilation with glibc Fixes: #9987 --- package/lean/vsftpd-alt/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/lean/vsftpd-alt/Makefile b/package/lean/vsftpd-alt/Makefile index dd3a356d4c6d3..db88e30c5f501 100644 --- a/package/lean/vsftpd-alt/Makefile +++ b/package/lean/vsftpd-alt/Makefile @@ -48,6 +48,8 @@ endef ifneq ($(CONFIG_USE_MUSL),) NLSSTRING:=-lcrypt +else ifneq ($(CONFIG_USE_GLIBC),) + NLSSTRING:=-lcrypt else NLSSTRING:=-lcrypt -lnsl endif From 4449335e913b1408612a280eb286129fde10f1c4 Mon Sep 17 00:00:00 2001 From: Joerg Werner Date: Sun, 26 Jun 2022 17:18:39 +0200 Subject: [PATCH 5/7] hostapd: fix WPA3 enterprise keys and ciphers WPA3 enterprise requires group_mgmt_cipher=BIP-GMAC-256 and if 802.11r is active also wpa_key_mgmt FT-EAP-SHA384. This commit also requires corresponding changes in netifd. Signed-off-by: Joerg Werner --- package/network/services/hostapd/files/hostapd.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index df2587aa6cb2a..e861323e45345 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -48,12 +48,15 @@ hostapd_append_wpa_key_mgmt() { ;; eap192) append wpa_key_mgmt "WPA-EAP-SUITE-B-192" - [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP" + [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP-SHA384" ;; eap-eap192) append wpa_key_mgmt "WPA-EAP-SUITE-B-192" append wpa_key_mgmt "WPA-EAP" - [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP" + [ "${ieee80211r:-0}" -gt 0 ] && { + append wpa_key_mgmt "FT-EAP-SHA384" + append wpa_key_mgmt "FT-EAP" + } [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-EAP-SHA256" ;; sae) @@ -934,7 +937,11 @@ hostapd_set_bss_options() { json_get_vars ieee80211w_mgmt_cipher ieee80211w_max_timeout ieee80211w_retry_timeout append bss_conf "ieee80211w=$ieee80211w" "$N" [ "$ieee80211w" -gt "0" ] && { - append bss_conf "group_mgmt_cipher=${ieee80211w_mgmt_cipher:-AES-128-CMAC}" "$N" + if [ "$auth_type" = "eap192" ]; then + append bss_conf "group_mgmt_cipher=BIP-GMAC-256" "$N" + else + append bss_conf "group_mgmt_cipher=${ieee80211w_mgmt_cipher:-AES-128-CMAC}" "$N" + fi [ -n "$ieee80211w_max_timeout" ] && \ append bss_conf "assoc_sa_query_max_timeout=$ieee80211w_max_timeout" "$N" [ -n "$ieee80211w_retry_timeout" ] && \ From 944cb3db09e7f155745b18341e3daaf6a379a8b1 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Thu, 21 Jul 2022 23:36:31 -0700 Subject: [PATCH 6/7] mac80211: parse the correct set of HE capabilities for AP mode It is common for 802.11ax NICs to support more than just AP mode, which results in there being a distinct set of HE capabilities for each mode. As (bad) luck would have it, iw prints out info for each HE mode in sequential order according to `enum nl80211_iftype`, and AP mode isn't always first. As a result, the wrong set of HE capabilities can be parsed if an AP NIC supports station (managed) mode or any other mode preceding AP mode, since only the first set of HE capabilities printed by iw is parsed from awk's output. This has a noticeable impact on beamforming for example, since managed mode usually doesn't have beamformer capabilities enabled, while AP mode does. Hostapd won't be set up with the configs to enable beamformer capabilities in this scenario, causing hostapd to disable beamforming to HE stations even when it's supported by the AP. Always parse the correct set of HE capabilities for AP mode to fix this. This is achieved by trimming all of iw's output prior to the AP mode capabilities, which ensures that the first set of HE capabilities are always for AP mode. Signed-off-by: Sultan Alsawaf --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index d35b4e3b58814..7dae1af713438 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -420,9 +420,9 @@ mac80211_hostapd_setup_base() { he_spr_non_srg_obss_pd_max_offset:1 \ he_bss_color - he_phy_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1) + he_phy_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1) he_phy_cap=${he_phy_cap:2} - he_mac_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1) + he_mac_cap=$(iw phy "$phy" info | sed -n '/HE Iftypes: AP/,$p' | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1) he_mac_cap=${he_mac_cap:2} append base_cfg "ieee80211ax=1" "$N" From 547bdeb71e9056d75987f300b145e723a7daf7ae Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 12 Aug 2022 22:16:00 +0200 Subject: [PATCH 7/7] arm-trusted-firmware-mediatek: skip bad blocks on SPI-NAND (SNFI) Add patch to skip bad blocks when reading from SPI-NAND. This is needed in case erase block(s) early in the flash inside the FIP area are bad and hence need to be skipped in order to be able to boot on such damaged chips. Signed-off-by: Daniel Golle --- ...t7622-bl2_boot_snand-skip-bad-blocks.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch diff --git a/package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch b/package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch new file mode 100644 index 0000000000000..31384d010ecba --- /dev/null +++ b/package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch @@ -0,0 +1,40 @@ +--- a/plat/mediatek/mt7622/bl2_boot_snand.c ++++ b/plat/mediatek/mt7622/bl2_boot_snand.c +@@ -21,6 +21,10 @@ + #define FIP_BASE 0x80000 + #define FIP_SIZE 0x200000 + ++#ifndef NMBM ++#define SNAND_MAX_BAD_BLOCK 3 ++#endif ++ + struct snfi_gpio_mux_info { + const uint32_t *pins; + uint32_t count; +@@ -45,12 +49,26 @@ static size_t snand_read_range(int lba, + size_t sizeremain = size, chunksize; + uint64_t off = lba * cinfo.pagesize; + uint8_t *ptr = (uint8_t *)buf; ++ struct mtk_snand_chip_info info; ++ unsigned int bad_blocks = 0; + int ret = 0; + + if (!snf) + return 0; + ++ ret = mtk_snand_get_chip_info(snf, &info); ++ if (ret) ++ return 0; ++ + while (sizeremain) { ++ while (mtk_snand_block_isbad(snf, off)) { ++ if (bad_blocks > SNAND_MAX_BAD_BLOCK) ++ return size - sizeremain; ++ ++ off += info.blocksize; ++ ++bad_blocks; ++ } ++ + chunksize = cinfo.pagesize; + if (chunksize > sizeremain) + chunksize = sizeremain;