Skip to content

Commit

Permalink
Merge branch 'openwrt:main' into mx4300-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
arix00 authored Oct 17, 2024
2 parents c139607 + caf5caa commit 6f9d4f8
Show file tree
Hide file tree
Showing 69 changed files with 2,271 additions and 280 deletions.
5 changes: 4 additions & 1 deletion include/prereq-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
perl --version | grep "perl.*v5"))

$(eval $(call SetupHostCommand,python,Please install Python >= 3.7, \
python3.12 -V 2>&1 | grep 'Python 3', \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \
Expand All @@ -190,6 +191,7 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.7, \
python3 -V 2>&1 | grep -E 'Python 3\.([7-9]|[0-9][0-9])\.?'))

$(eval $(call SetupHostCommand,python3,Please install Python >= 3.7, \
python3.12 -V 2>&1 | grep 'Python 3', \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \
Expand All @@ -199,7 +201,8 @@ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.7, \

$(eval $(call TestHostCommand,python3-distutils, \
Please install the Python3 distutils module, \
$(STAGING_DIR_HOST)/bin/python3 -c 'from distutils import util'))
printf 'from sys import version_info\nif version_info < (3, 12):\n\tfrom distutils import util' | \
$(STAGING_DIR_HOST)/bin/python3 -))

$(eval $(call TestHostCommand,python3-stdlib, \
Please install the Python3 stdlib module, \
Expand Down
2 changes: 1 addition & 1 deletion package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ endef
define ImageConfigOptions
mkdir -p $(1)/lib/preinit
echo 'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib/preinit/00_preinit.conf
echo 'fs_failsafe_wait_timeout=$(if $(CONFIG_TARGET_PREINIT_TIMEOUT),$(CONFIG_TARGET_PREINIT_TIMEOUT),2)' >>$(1)/lib/preinit/00_preinit.conf
echo 'fs_failsafe_wait_timeout=$(if $(CONFIG_TARGET_PREINIT_TIMEOUT),$(CONFIG_TARGET_PREINIT_TIMEOUT),4)' >>$(1)/lib/preinit/00_preinit.conf
echo 'pi_init_path="$(TARGET_INIT_PATH)"' >>$(1)/lib/preinit/00_preinit.conf
echo 'pi_init_env=$(if $(CONFIG_TARGET_INIT_ENV),$(CONFIG_TARGET_INIT_ENV),"")' >>$(1)/lib/preinit/00_preinit.conf
echo 'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib/preinit/00_preinit.conf
Expand Down
2 changes: 1 addition & 1 deletion package/base-files/image-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ config TARGET_PREINIT_DISABLE_FAILSAFE
config TARGET_PREINIT_TIMEOUT
int
prompt "Failsafe/Debug wait timeout" if PREINITOPT
default 2
default 4
help
How long to wait for failsafe mode to be entered or for
a debug option to be pressed before continuing with a
Expand Down
4 changes: 2 additions & 2 deletions package/boot/uboot-ath79/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_VERSION:=2024.07
PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f
PKG_VERSION:=2024.10
PKG_HASH:=b28daf4ac17e43156363078bf510297584137f6df50fced9b12df34f61a92fb0

UBOOT_USE_INTREE_DTC:=1

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From aab8e6cf7afbbcef60593c6b1795fa5d8e78e597 Mon Sep 17 00:00:00 2001
From: Jonas Jelonek <[email protected]>
Date: Tue, 15 Oct 2024 20:02:25 +0200
Subject: [PATCH] arm: provide noncached_set_region prototype to fix build

Due to the removal of weak functions in 7d6cee2cd0 ("cmd: cache: Remove
weak function"), uboot fails to compile after updating to v2024.10 for
mediatek target in OpenWrt with GCC-14 with error:
cmd/cache.c: In function 'do_dcache':
cmd/cache.c:57:25: error: implicit declaration of function
'noncached_set_region' [-Wimplicit-function-declaration]

Thus, provide a prototype in arm's include/asm/system.h to fix a build
error in cmd/cache.c, since related prototypes are also located there.
Also add an include of asm/system.h in cmd/cache.c have the function
available there.

Signed-off-by: Jonas Jelonek <[email protected]>
---
arch/arm/include/asm/system.h | 1 +
cmd/cache.c | 1 +
2 files changed, 2 insertions(+)

--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -658,6 +658,7 @@ void mmu_set_region_dcache_behaviour(phy
* Return: 0 if OK
*/
int noncached_init(void);
+void noncached_set_region(void);

phys_addr_t noncached_alloc(size_t size, size_t align);
#endif /* CONFIG_SYS_NONCACHED_MEMORY */
--- a/cmd/cache.c
+++ b/cmd/cache.c
@@ -10,6 +10,7 @@
#include <command.h>
#include <cpu_func.h>
#include <linux/compiler.h>
+#include <asm/system.h>

static int parse_argv(const char *);

29 changes: 9 additions & 20 deletions package/firmware/ath11k-firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ath11k-firmware
PKG_SOURCE_DATE:=2024-03-14
PKG_SOURCE_VERSION:=795809c7041582bd51bdfaa1f548b916ae8d4382
PKG_MIRROR_HASH:=d93edc651b641a97ec4f5ed329e15ac110928f863b4afbaae7fcb25953d04544
PKG_RELEASE:=2
PKG_SOURCE_DATE:=2024-10-14
PKG_SOURCE_VERSION:=15f050122da5ef5bef2cc8c7c19dfb7f98060a49
PKG_MIRROR_HASH:=e7a89d1570f32552ade539376181494724b5eafb31d00451ff2dcf5a2922a0cb
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/quic/upstream-wifi-fw.git
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git

PKG_LICENSE_FILES:=LICENSE.qca_firmware

Expand Down Expand Up @@ -51,38 +51,27 @@ define Build/Compile

endef

QCN9074_BOARD_REV:=8e140c65f36137714b6d8934e09dcd73cb05c2f6
QCN9074_BOARD_FILE:=board-2.bin.$(QCN9074_BOARD_REV)

define Download/qcn9074-board
URL:=https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware/-/raw/main/QCN9074/hw1.0/
URL_FILE:=board-2.bin
FILE:=$(QCN9074_BOARD_FILE)
HASH:=dbf0ca14aa1229eccd48f26f1026901b9718b143bd30b51b8ea67c84ba6207f1
endef
$(eval $(call Download,qcn9074-board))

define Package/ath11k-firmware-ipq6018/install
$(INSTALL_DIR) $(1)/lib/firmware/IPQ6018
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/ath11k-firmware/IPQ6018/hw1.0/2.5.0.1/WLAN.HK.2.5.0.1-03982-QCAHKSWPL_SILICONZ-3/* \
$(PKG_BUILD_DIR)/IPQ6018/hw1.0/2.5.0.1/WLAN.HK.2.5.0.1-03982-QCAHKSWPL_SILICONZ-3/* \
$(1)/lib/firmware/IPQ6018/
endef

define Package/ath11k-firmware-ipq8074/install
$(INSTALL_DIR) $(1)/lib/firmware/IPQ8074
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/ath11k-firmware/IPQ8074/hw2.0/2.9.0.1/WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1/* \
$(PKG_BUILD_DIR)/IPQ8074/hw2.0/2.9.0.1/WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1/* \
$(1)/lib/firmware/IPQ8074/
endef

define Package/ath11k-firmware-qcn9074/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/ath11k-firmware/QCN9074/hw1.0/2.9.0.1/WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1/* \
$(PKG_BUILD_DIR)/QCN9074/hw1.0/2.9.0.1/WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1/* \
$(1)/lib/firmware/ath11k/QCN9074/hw1.0/
$(INSTALL_BIN) \
$(DL_DIR)/$(QCN9074_BOARD_FILE) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board-2.bin
$(PKG_BUILD_DIR)/QCN9074/hw1.0/board-2.bin $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board-2.bin
endef

$(eval $(call BuildPackage,ath11k-firmware-ipq6018))
Expand Down
8 changes: 7 additions & 1 deletion package/firmware/linux-firmware/realtek.mk
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ $(eval $(call BuildPackage,rtl8852ae-firmware))
Package/rtl8852be-firmware = $(call Package/firmware-default,RealTek RTL8852BE firmware)
define Package/rtl8852be-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8852b_fw.bin $(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8852b_fw-1.bin $(1)/lib/firmware/rtw89
endef
$(eval $(call BuildPackage,rtl8852be-firmware))
Expand All @@ -191,3 +190,10 @@ define Package/rtl8852ce-firmware/install
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8852c_fw.bin $(1)/lib/firmware/rtw89
endef
$(eval $(call BuildPackage,rtl8852ce-firmware))

Package/rtl8922ae-firmware = $(call Package/firmware-default,RealTek RTL8922AE firmware)
define Package/rtl8922ae-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8922a_fw.bin $(1)/lib/firmware/rtw89
endef
$(eval $(call BuildPackage,rtl8922ae-firmware))
14 changes: 13 additions & 1 deletion package/kernel/mac80211/realtek.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ PKG_DRIVERS += \
rtl8xxxu rtw88 rtw88-pci rtw88-usb rtw88-sdio rtw88-8821c rtw88-8822b rtw88-8822c \
rtw88-8723x rtw88-8723d rtw88-8821ce rtw88-8821cu rtw88-8822be rtw88-8822bu \
rtw88-8822ce rtw88-8822cu rtw88-8723de rtw88-8723ds rtw88-8723du \
rtw89 rtw89-pci rtw89-8851be rtw89-8852ae rtw89-8852b-common rtw89-8852be rtw89-8852ce
rtw89 rtw89-pci rtw89-8851be rtw89-8852ae rtw89-8852b-common \
rtw89-8852be rtw89-8852ce rtw89-8922ae

config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI
config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI
Expand Down Expand Up @@ -56,6 +57,7 @@ config-$(call config_package,rtw89-8852ae) += RTW89_8852A RTW89_8852AE
config-$(call config_package,rtw89-8852b-common) += RTW89_8852B_COMMON
config-$(call config_package,rtw89-8852be) += RTW89_8852B RTW89_8852BE
config-$(call config_package,rtw89-8852ce) += RTW89_8852C RTW89_8852CE
config-$(call config_package,rtw89-8922ae) += RTW89_8922A RTW89_8922AE
config-$(CONFIG_PACKAGE_RTW89_DEBUG) += RTW89_DEBUG
config-$(CONFIG_PACKAGE_RTW89_DEBUGFS) += RTW89_DEBUGFS
config-$(CONFIG_PACKAGE_RTW89_DEBUGMSG) += RTW89_DEBUGMSG
Expand Down Expand Up @@ -480,3 +482,13 @@ define KernelPackage/rtw89-8852ce
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8852ce.ko
AUTOLOAD:=$(call AutoProbe,rtw89_8852ce)
endef

define KernelPackage/rtw89-8922ae
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8922AE support
DEPENDS+= +kmod-rtw89-pci +rtl8922ae-firmware +@DRIVER_11BE_SUPPORT
FILES:= \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8922a.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8922ae.ko
AUTOLOAD:=$(call AutoProbe,rtw89_8922ae)
endef
8 changes: 4 additions & 4 deletions package/system/opkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=opkg
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_FLAGS:=essential

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/opkg-lede.git
PKG_SOURCE_DATE:=2022-02-24
PKG_SOURCE_VERSION:=d038e5b6d155784575f62a66a8bb7e874173e92e
PKG_MIRROR_HASH:=6889f7d322996f9291f42d7d6a5877d256b91d4a01d6015cebaae9227702eb43
PKG_SOURCE_DATE:=2024-10-16
PKG_SOURCE_VERSION:=38eccbb1fd694d4798ac1baf88f9ba83d1eac616
PKG_MIRROR_HASH:=de58ff1c99c14789f9ba8946623c8c1e58d022e7e2a659d6f97c6fde54f2c4f4

PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
Expand Down
2 changes: 1 addition & 1 deletion package/utils/busybox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PKG_FLAGS:=essential

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.busybox.net/downloads \
http://sources.buildroot.net
https://sources.buildroot.net/$(PKG_NAME)
PKG_HASH:=b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314

PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From c283782fc5d60c4d8169137c6f955aa3553d3b3d Mon Sep 17 00:00:00 2001
From: Hui Wang <[email protected]>
Date: Fri, 27 Sep 2024 19:46:10 +0800
Subject: [PATCH] net: phy: realtek: Check the index value in
led_hw_control_get

Just like rtl8211f_led_hw_is_supported() and
rtl8211f_led_hw_control_set(), the rtl8211f_led_hw_control_get() also
needs to check the index value, otherwise the caller is likely to get
an incorrect rules.

Fixes: 17784801d888 ("net: phy: realtek: Add support for PHY LEDs on RTL8211F")
Signed-off-by: Hui Wang <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
---
drivers/net/phy/realtek.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -527,6 +527,9 @@ static int rtl8211f_led_hw_control_get(s
{
int val;

+ if (index >= RTL8211F_LED_COUNT)
+ return -EINVAL;
+
val = phy_read_paged(phydev, 0xd04, RTL8211F_LEDCR);
if (val < 0)
return val;
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From a6ad589c1d118f9d5b1bc4c6888d42919f830340 Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <[email protected]>
Date: Mon, 7 Oct 2024 11:57:41 +0200
Subject: [PATCH] net: phy: realtek: Fix MMD access on RTL8126A-integrated PHY

All MMD reads return 0 for the RTL8126A-integrated PHY. Therefore phylib
assumes it doesn't support EEE, what results in higher power consumption,
and a significantly higher chip temperature in my case.
To fix this split out the PHY driver for the RTL8126A-integrated PHY
and set the read_mmd/write_mmd callbacks to read from vendor-specific
registers.

Fixes: 5befa3728b85 ("net: phy: realtek: add support for RTL8126A-integrated 5Gbps PHY")
Cc: [email protected]
Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
---
drivers/net/phy/realtek.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)

--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -1081,6 +1081,16 @@ static int rtl8221b_vn_cg_c45_match_phy_
return rtlgen_is_c45_match(phydev, RTL_8221B_VN_CG, true);
}

+static int rtl8251b_c22_match_phy_device(struct phy_device *phydev)
+{
+ return rtlgen_is_c45_match(phydev, RTL_8251B, false);
+}
+
+static int rtl8251b_c45_match_phy_device(struct phy_device *phydev)
+{
+ return rtlgen_is_c45_match(phydev, RTL_8251B, true);
+}
+
static int rtlgen_resume(struct phy_device *phydev)
{
int ret = genphy_resume(phydev);
@@ -1418,7 +1428,7 @@ static struct phy_driver realtek_drvs[]
.suspend = genphy_c45_pma_suspend,
.resume = rtlgen_c45_resume,
}, {
- PHY_ID_MATCH_EXACT(0x001cc862),
+ .match_phy_device = rtl8251b_c45_match_phy_device,
.name = "RTL8251B 5Gbps PHY",
.get_features = rtl822x_get_features,
.config_aneg = rtl822x_config_aneg,
@@ -1428,6 +1438,18 @@ static struct phy_driver realtek_drvs[]
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, {
+ .match_phy_device = rtl8251b_c22_match_phy_device,
+ .name = "RTL8126A-internal 5Gbps PHY",
+ .get_features = rtl822x_get_features,
+ .config_aneg = rtl822x_config_aneg,
+ .read_status = rtl822x_read_status,
+ .suspend = genphy_suspend,
+ .resume = rtlgen_resume,
+ .read_page = rtl821x_read_page,
+ .write_page = rtl821x_write_page,
+ .read_mmd = rtl822x_read_mmd,
+ .write_mmd = rtl822x_write_mmd,
+ }, {
PHY_ID_MATCH_EXACT(0x001ccad0),
.name = "RTL8224 2.5Gbps PHY",
.get_features = rtl822x_c45_get_features,
Loading

0 comments on commit 6f9d4f8

Please sign in to comment.