Merge remote-tracking branch 'upstream/master' into owrt
This commit is contained in:
commit
b8959d0f5d
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .84
|
||||
LINUX_KERNEL_HASH-6.6.84 = 7fd20721551a61db347c5ac6ca05818e24058682be4e4389dc51e88d4ac17ba7
|
||||
LINUX_VERSION-6.6 = .85
|
||||
LINUX_KERNEL_HASH-6.6.85 = 5ebaccf4ca3428cd26817bae62171f4efd270eed866a3e3d0a1d9e970b7b7529
|
||||
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_DISTNAME:=u-boot
|
||||
PKG_VERSION:=2025.01
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:= \
|
||||
@ -26,7 +26,6 @@ define Package/dumpimage
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Boot Loaders
|
||||
DEPENDS := +libopenssl
|
||||
TITLE:=dumpimage lists and extracts data from U-Boot images.
|
||||
URL:=http://www.denx.de/wiki/U-Boot
|
||||
endef
|
||||
@ -38,6 +37,18 @@ define Package/dumpimage/description
|
||||
position to outfile.
|
||||
endef
|
||||
|
||||
define Package/fit-check-sign
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Boot Loaders
|
||||
TITLE:=verify uImage.FIT
|
||||
URL:=http://www.denx.de/wiki/U-Boot
|
||||
endef
|
||||
|
||||
define Package/fit-check-sign/description
|
||||
fit_check_sign validates uImage.FIT hashes and signatures
|
||||
endef
|
||||
|
||||
define Package/uboot-envtools
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
@ -62,6 +73,7 @@ define Build/Configure
|
||||
$(call Build/Compile/Default,tools-only_defconfig)
|
||||
$(call Build/Compile/Default,syncconfig)
|
||||
$(SED) 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
|
||||
$(SED) 's/CONFIG_TOOLS_KWBIMAGE=y/# CONFIG_TOOLS_KWBIMAGE is not set/' $(PKG_BUILD_DIR)/.config
|
||||
endef
|
||||
|
||||
MAKE_FLAGS += \
|
||||
@ -75,7 +87,7 @@ define Build/Compile
|
||||
ifneq ($(CONFIG_PACKAGE_uboot-envtools),)
|
||||
$(call Build/Compile/Default,envtools)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_dumpimage),)
|
||||
ifneq ($(CONFIG_PACKAGE_dumpimage)$(CONFIG_PACKAGE_fit-check-sign),)
|
||||
$(call Build/Compile/Default,cross_tools)
|
||||
endif
|
||||
|
||||
@ -86,6 +98,11 @@ define Package/dumpimage/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/dumpimage $(1)/usr/bin
|
||||
endef
|
||||
|
||||
define Package/fit-check-sign/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/fit_check_sign $(1)/usr/bin
|
||||
endef
|
||||
|
||||
define Package/uboot-envtools/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
|
||||
@ -109,4 +126,5 @@ define Package/uboot-envtools/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dumpimage))
|
||||
$(eval $(call BuildPackage,fit-check-sign))
|
||||
$(eval $(call BuildPackage,uboot-envtools))
|
||||
|
@ -1,28 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/package/boot/u-boot-tools/patches/0001-tools-disable-kwbimage.patch
|
||||
@@ -0,0 +1,25 @@
|
||||
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
|
||||
+Date: Tue, 30 Nov 2021 11:29:19 +0100
|
||||
+Subject: [PATCH] tools: disable kwbimage
|
||||
+MIME-Version: 1.0
|
||||
+Content-Type: text/plain; charset=UTF-8
|
||||
+Content-Transfer-Encoding: 8bit
|
||||
+
|
||||
+Without CONFIG_TOOLS_LIBCRYPTO kwbimage doesn't compile because of
|
||||
+multiple "undefined reference"s to SSL functions.
|
||||
+
|
||||
+Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
|
||||
+---
|
||||
+ tools/Makefile | 1 -
|
||||
+ 1 file changed, 1 deletion(-)
|
||||
+
|
||||
+--- a/tools/Makefile
|
||||
++++ b/tools/Makefile
|
||||
+@@ -117,7 +117,6 @@ dumpimage-mkimage-objs := aisimage.o \
|
||||
+ imximage.o \
|
||||
+ imx8image.o \
|
||||
+ imx8mimage.o \
|
||||
+- kwbimage.o \
|
||||
+ lib/md5.o \
|
||||
+ lpc32xximage.o \
|
||||
+ mxsimage.o \
|
@ -0,0 +1,69 @@
|
||||
From patchwork Sat Mar 29 03:12:50 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 2066664
|
||||
Return-Path: <u-boot-bounces@lists.denx.de>
|
||||
X-Original-To: incoming@patchwork.ozlabs.org
|
||||
Delivered-To: patchwork-incoming@legolas.ozlabs.org
|
||||
Date: Sat, 29 Mar 2025 03:12:50 +0000
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
|
||||
Chia-Wei Wang <chiawei_wang@aspeedtech.com>, u-boot@lists.denx.de
|
||||
Cc: Thomas =?iso-8859-1?q?H=FChn?= <thomas.huehn@hs-nordhausen.de>
|
||||
Subject: [PATCH 1/2] image-fit-sig: skip in tools build if key is missing
|
||||
Message-ID:
|
||||
<bf6a90e864b713db41bf788797554649eeaa0732.1743217745.git.daniel@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
X-BeenThere: u-boot@lists.denx.de
|
||||
X-Mailman-Version: 2.1.39
|
||||
Precedence: list
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
|
||||
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
|
||||
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
|
||||
List-Post: <mailto:u-boot@lists.denx.de>
|
||||
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
|
||||
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
|
||||
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
|
||||
Errors-To: u-boot-bounces@lists.denx.de
|
||||
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
|
||||
|
||||
Skip signature verification in case no public key was given in order to
|
||||
allow using fit_check_sign also to validate uImage.FIT images without
|
||||
signatures. Guarded by USE_HOSTCC macro the behavior on target is
|
||||
unchanged.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
boot/image-fit-sig.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/boot/image-fit-sig.c
|
||||
+++ b/boot/image-fit-sig.c
|
||||
@@ -191,6 +191,11 @@ int fit_image_verify_required_sigs(const
|
||||
int noffset;
|
||||
int key_node;
|
||||
|
||||
+#ifdef USE_HOSTCC
|
||||
+ if (!key_blob)
|
||||
+ return 0;
|
||||
+#endif
|
||||
+
|
||||
/* Work out what we need to verify */
|
||||
*no_sigsp = 1;
|
||||
key_node = fdt_subnode_offset(key_blob, 0, FIT_SIG_NODENAME);
|
||||
@@ -477,6 +482,11 @@ static int fit_config_verify_required_ke
|
||||
bool reqd_policy_all = true;
|
||||
const char *reqd_mode;
|
||||
|
||||
+#ifdef USE_HOSTCC
|
||||
+ if (!key_blob)
|
||||
+ return 0;
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* We don't support this since libfdt considers names with the
|
||||
* name root but different @ suffix to be equal
|
@ -0,0 +1,92 @@
|
||||
From patchwork Sat Mar 29 03:13:01 2025
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 2066665
|
||||
Return-Path: <u-boot-bounces@lists.denx.de>
|
||||
X-Original-To: incoming@patchwork.ozlabs.org
|
||||
Delivered-To: patchwork-incoming@legolas.ozlabs.org
|
||||
Date: Sat, 29 Mar 2025 03:13:01 +0000
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
|
||||
Chia-Wei Wang <chiawei_wang@aspeedtech.com>,
|
||||
Daniel Golle <daniel@makrotopia.org>, u-boot@lists.denx.de
|
||||
Cc: Thomas =?iso-8859-1?q?H=FChn?= <thomas.huehn@hs-nordhausen.de>
|
||||
Subject: [PATCH 2/2] tools/fit_check_sign: make key optional
|
||||
Message-ID:
|
||||
<1f0c5a1f7e84f638f921278284ff6245d78e730d.1743217745.git.daniel@makrotopia.org>
|
||||
References:
|
||||
<bf6a90e864b713db41bf788797554649eeaa0732.1743217745.git.daniel@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To:
|
||||
<bf6a90e864b713db41bf788797554649eeaa0732.1743217745.git.daniel@makrotopia.org>
|
||||
X-BeenThere: u-boot@lists.denx.de
|
||||
X-Mailman-Version: 2.1.39
|
||||
Precedence: list
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
|
||||
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
|
||||
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
|
||||
List-Post: <mailto:u-boot@lists.denx.de>
|
||||
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
|
||||
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
|
||||
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
|
||||
Errors-To: u-boot-bounces@lists.denx.de
|
||||
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
|
||||
|
||||
Allow invoking fit_check_sig without the key parameter, allowing to
|
||||
validate only checksums and hashes for unsigned images.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
tools/fit_check_sign.c | 15 ++++++---------
|
||||
1 file changed, 6 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/tools/fit_check_sign.c
|
||||
+++ b/tools/fit_check_sign.c
|
||||
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
|
||||
char *config_name = NULL;
|
||||
char cmdname[256];
|
||||
int ret;
|
||||
- void *key_blob;
|
||||
+ void *key_blob = NULL;
|
||||
int c;
|
||||
|
||||
strncpy(cmdname, *argv, sizeof(cmdname) - 1);
|
||||
@@ -70,18 +70,15 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "%s: Missing fdt file\n", *argv);
|
||||
usage(*argv);
|
||||
}
|
||||
- if (!keyfile) {
|
||||
- fprintf(stderr, "%s: Missing key file\n", *argv);
|
||||
- usage(*argv);
|
||||
- }
|
||||
|
||||
ffd = mmap_fdt(cmdname, fdtfile, 0, &fit_blob, &fsbuf, false, true);
|
||||
if (ffd < 0)
|
||||
return EXIT_FAILURE;
|
||||
- kfd = mmap_fdt(cmdname, keyfile, 0, &key_blob, &ksbuf, false, true);
|
||||
- if (kfd < 0)
|
||||
- return EXIT_FAILURE;
|
||||
-
|
||||
+ if (keyfile) {
|
||||
+ kfd = mmap_fdt(cmdname, keyfile, 0, &key_blob, &ksbuf, false, true);
|
||||
+ if (kfd < 0)
|
||||
+ return EXIT_FAILURE;
|
||||
+ }
|
||||
image_set_host_blob(key_blob);
|
||||
ret = fit_check_sign(fit_blob, key_blob, config_name);
|
||||
if (!ret) {
|
||||
@@ -93,7 +90,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
(void) munmap((void *)fit_blob, fsbuf.st_size);
|
||||
- (void) munmap((void *)key_blob, ksbuf.st_size);
|
||||
+
|
||||
+ if (keyfile)
|
||||
+ (void) munmap((void *)key_blob, ksbuf.st_size);
|
||||
|
||||
close(ffd);
|
||||
close(kfd);
|
@ -0,0 +1,13 @@
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -83,8 +83,8 @@ HOSTCFLAGS_img2srec.o := -pedantic
|
||||
hostprogs-y += mkenvimage
|
||||
mkenvimage-objs := mkenvimage.o os_support.o generated/lib/crc32.o
|
||||
|
||||
-hostprogs-y += dumpimage mkimage
|
||||
-hostprogs-$(CONFIG_TOOLS_LIBCRYPTO) += fit_info fit_check_sign
|
||||
+hostprogs-y += dumpimage mkimage fit_check_sign
|
||||
+hostprogs-$(CONFIG_TOOLS_LIBCRYPTO) += fit_info
|
||||
hostprogs-$(CONFIG_TOOLS_LIBCRYPTO) += fdt_add_pubkey
|
||||
|
||||
ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST)$(CONFIG_FWU_MDATA_GPT_BLK),)
|
@ -593,27 +593,18 @@ endef
|
||||
|
||||
define Package/ath10k-firmware-qca9888-ct/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
|
||||
ln -s \
|
||||
../../cal-pci-0000:01:00.0.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9888) \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
|
||||
endef
|
||||
define Package/ath10k-firmware-qca9888-ct-full-htt/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
|
||||
ln -s \
|
||||
../../cal-pci-0000:01:00.0.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(DL_DIR)/$(call CT_FIRMWARE_FILE_FULL_HTT,QCA9888) \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/ct-firmware-5.bin
|
||||
endef
|
||||
define Package/ath10k-firmware-qca9888-ct-htt/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
|
||||
ln -s \
|
||||
../../cal-pci-0000:01:00.0.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA9888) \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/ct-firmware-5.bin
|
||||
|
@ -1,21 +1,21 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ath10k-ct
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2024-07-30
|
||||
PKG_SOURCE_VERSION:=ac71b14dc93aef0af6f0f24808b0afb673eaa5f5
|
||||
PKG_MIRROR_HASH:=f7774fc7002bbea450f543927acd528fb1bb6742f0e9ef28a402df3796893d93
|
||||
PKG_SOURCE_DATE:=2025-03-14
|
||||
PKG_SOURCE_VERSION:=63f5b605236f2cd2f919539d67236c43fb8f957d
|
||||
PKG_MIRROR_HASH:=d83cb59b947680d40006e0da825735c387c5b1699a7981c2d973ca4d285266f2
|
||||
|
||||
# Build the 6.10 ath10k-ct driver version.
|
||||
# Build the 6.14 ath10k-ct driver version.
|
||||
# Probably this should match as closely as
|
||||
# possible to whatever mac80211 backports version is being used.
|
||||
CT_KVER="-6.10"
|
||||
CT_KVER="-6.14"
|
||||
|
||||
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- a/ath10k-6.10/pci.c
|
||||
+++ b/ath10k-6.10/pci.c
|
||||
--- a/ath10k-6.14/pci.c
|
||||
+++ b/ath10k-6.14/pci.c
|
||||
@@ -3871,7 +3871,7 @@ static int __ath10k_pci_probe(struct pci
|
||||
int (*pci_hard_reset)(struct ath10k *ar);
|
||||
u32 (*targ_cpu_to_ce_addr)(struct ath10k *ar, u32 addr);
|
||||
|
||||
- printk(KERN_INFO "ath10k 6.7 driver, optimized for CT firmware, probing pci device: 0x%x.\n",
|
||||
+ printk(KERN_INFO "ath10k 6.10 driver, optimized for CT firmware, probing pci device: 0x%x.\n",
|
||||
+ printk(KERN_INFO "ath10k 6.14 driver, optimized for CT firmware, probing pci device: 0x%x.\n",
|
||||
pci_dev->device);
|
||||
|
||||
switch (pci_dev->device) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/ath10k-6.10/mac.c
|
||||
+++ b/ath10k-6.10/mac.c
|
||||
@@ -11626,7 +11626,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -11648,7 +11648,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->wiphy->n_cipher_suites = ar->hw_params.n_cipher_suites;
|
||||
|
||||
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
@ -0,0 +1,46 @@
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 28 Mar 2025 19:56:06 +0800
|
||||
Subject: [PATCH] ath10k-ct: make it compatible with the old LTS kernel
|
||||
|
||||
Rollback some APIs to fix compilation errors.
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
ath10k-6.14/ahb.c | 2 +-
|
||||
ath10k-6.14/mac.c | 5 ++---
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/ath10k-6.14/ahb.c
|
||||
+++ b/ath10k-6.14/ahb.c
|
||||
@@ -842,7 +842,7 @@ static struct platform_driver ath10k_ahb
|
||||
.of_match_table = ath10k_ahb_of_match,
|
||||
},
|
||||
.probe = ath10k_ahb_probe,
|
||||
- .remove = ath10k_ahb_remove,
|
||||
+ .remove_new = ath10k_ahb_remove,
|
||||
};
|
||||
|
||||
int ath10k_ahb_init(void)
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -9607,10 +9607,9 @@ exit:
|
||||
|
||||
static void ath10k_sta_rc_update(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
- struct ieee80211_link_sta *link_sta,
|
||||
+ struct ieee80211_sta *sta,
|
||||
u32 changed)
|
||||
{
|
||||
- struct ieee80211_sta *sta = link_sta->sta;
|
||||
struct ath10k *ar = hw->priv;
|
||||
struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
|
||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
||||
@@ -10603,7 +10602,7 @@ static const struct ieee80211_ops ath10k
|
||||
.reconfig_complete = ath10k_reconfig_complete,
|
||||
.get_survey = ath10k_get_survey,
|
||||
.set_bitrate_mask = ath10k_mac_op_set_bitrate_mask,
|
||||
- .link_sta_rc_update = ath10k_sta_rc_update,
|
||||
+ .sta_rc_update = ath10k_sta_rc_update,
|
||||
.offset_tsf = ath10k_offset_tsf,
|
||||
.get_tsf = ath10k_get_tsf,
|
||||
.ampdu_action = ath10k_ampdu_action,
|
@ -0,0 +1,28 @@
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 28 Mar 2025 19:56:06 +0800
|
||||
Subject: [PATCH] Revert "wifi: ath10k: Use iommu_paging_domain_alloc()"
|
||||
|
||||
IPQ4019 wireless can't start after upstream commit d5b7485588df[1].
|
||||
|
||||
[1] https://github.com/torvalds/linux/commit/d5b7485588dffb39c5687e965623124ab7ebcd51
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
ath10k-6.14/snoc.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/ath10k-6.14/snoc.c
|
||||
+++ b/ath10k-6.14/snoc.c
|
||||
@@ -1635,10 +1635,10 @@ static int ath10k_fw_init(struct ath10k
|
||||
|
||||
ar_snoc->fw.dev = &pdev->dev;
|
||||
|
||||
- iommu_dom = iommu_paging_domain_alloc(ar_snoc->fw.dev);
|
||||
- if (IS_ERR(iommu_dom)) {
|
||||
+ iommu_dom = iommu_domain_alloc(&platform_bus_type);
|
||||
+ if (!iommu_dom) {
|
||||
ath10k_err(ar, "failed to allocate iommu domain\n");
|
||||
- ret = PTR_ERR(iommu_dom);
|
||||
+ ret = -ENOMEM;
|
||||
goto err_unregister;
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
--- a/ath10k-6.10/mac.c
|
||||
+++ b/ath10k-6.10/mac.c
|
||||
@@ -1675,7 +1675,7 @@ static void ath10k_recalc_radar_detectio
|
||||
* by indicating that radar was detected.
|
||||
*/
|
||||
ath10k_warn(ar, "failed to start CAC: %d\n", ret);
|
||||
- ieee80211_radar_detected(ar->hw);
|
||||
+ ieee80211_radar_detected(ar->hw, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6238,7 +6238,7 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static void ath10k_stop(struct ieee80211_hw *hw)
|
||||
+static void ath10k_stop(struct ieee80211_hw *hw, bool suspend)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
u32 opt;
|
||||
--- a/ath10k-6.10/debug.c
|
||||
+++ b/ath10k-6.10/debug.c
|
||||
@@ -3319,7 +3319,7 @@ static ssize_t ath10k_write_simulate_rad
|
||||
if (!arvif->is_started)
|
||||
return -EINVAL;
|
||||
|
||||
- ieee80211_radar_detected(ar->hw);
|
||||
+ ieee80211_radar_detected(ar->hw, NULL);
|
||||
|
||||
return count;
|
||||
}
|
||||
--- a/ath10k-6.10/wmi.c
|
||||
+++ b/ath10k-6.10/wmi.c
|
||||
@@ -4402,7 +4402,7 @@ static void ath10k_radar_detected(struct
|
||||
if (ar->dfs_block_radar_events)
|
||||
ath10k_info(ar, "DFS Radar detected, but ignored as requested\n");
|
||||
else
|
||||
- ieee80211_radar_detected(ar->hw);
|
||||
+ ieee80211_radar_detected(ar->hw, NULL);
|
||||
}
|
||||
|
||||
static void ath10k_radar_confirmation_work(struct work_struct *work)
|
@ -39,9 +39,9 @@ that the feature is properly initialized:
|
||||
|
||||
Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
|
||||
|
||||
--- a/ath10k-6.10/core.c
|
||||
+++ b/ath10k-6.10/core.c
|
||||
@@ -2871,14 +2871,14 @@ done:
|
||||
--- a/ath10k-6.14/core.c
|
||||
+++ b/ath10k-6.14/core.c
|
||||
@@ -2888,14 +2888,14 @@ done:
|
||||
static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar)
|
||||
{
|
||||
struct device_node *node;
|
||||
|
@ -1,616 +0,0 @@
|
||||
From 8e1debd82466a3fe711784ab37e6b54e56011267 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
Date: Mon, 13 May 2024 17:22:25 +0300
|
||||
Subject: [PATCH] wifi: ath10k: add LED and GPIO controlling support for
|
||||
various chipsets
|
||||
|
||||
Adds LED and GPIO Control support for 988x, 9887, 9888, 99x0, 9984
|
||||
based chipsets with on chipset connected led's using WMI Firmware API.
|
||||
The LED device will get available named as "ath10k-phyX" at sysfs and
|
||||
can be controlled with various triggers.
|
||||
Adds also debugfs interface for gpio control.
|
||||
|
||||
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
Reviewed-by: Steve deRosier <derosier@cal-sierra.com>
|
||||
[kvalo: major reorg and cleanup]
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
[ansuel: rebase and small cleanup]
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
|
||||
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
||||
Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com
|
||||
---
|
||||
ath10k-6.10/Kconfig | 6 ++
|
||||
ath10k-6.10/Makefile | 1 +
|
||||
ath10k-6.10/core.c | 32 ++++++++
|
||||
ath10k-6.10/core.h | 8 ++
|
||||
ath10k-6.10/hw.h | 1 +
|
||||
ath10k-6.10/leds.c | 90 +++++++++++++++++++++++
|
||||
ath10k-6.10/leds.h | 34 +++++++++
|
||||
ath10k-6.10/mac.c | 1 +
|
||||
ath10k-6.10/wmi-ops.h | 32 ++++++++
|
||||
ath10k-6.10/wmi-tlv.c | 2 +
|
||||
ath10k-6.10/wmi.c | 54 ++++++++++++++
|
||||
ath10k-6.10/wmi.h | 35 +++++++++
|
||||
12 files changed, 296 insertions(+)
|
||||
create mode 100644 ath10k-6.10/leds.c
|
||||
create mode 100644 ath10k-6.10/leds.h
|
||||
|
||||
--- a/ath10k-6.10/Kconfig
|
||||
+++ b/ath10k-6.10/Kconfig
|
||||
@@ -68,6 +68,12 @@ config ATH10K_DEBUGFS
|
||||
|
||||
If unsure, say Y to make it easier to debug problems.
|
||||
|
||||
+config ATH10K_LEDS
|
||||
+ bool
|
||||
+ depends on ATH10K
|
||||
+ depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
|
||||
+ default y
|
||||
+
|
||||
config ATH10K_SPECTRAL
|
||||
bool "Atheros ath10k spectral scan support"
|
||||
depends on ATH10K_DEBUGFS
|
||||
--- a/ath10k-6.10/Makefile
|
||||
+++ b/ath10k-6.10/Makefile
|
||||
@@ -20,6 +20,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
|
||||
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
|
||||
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
|
||||
ath10k_core-$(CONFIG_THERMAL) += thermal.o
|
||||
+ath10k_core-$(CONFIG_ATH10K_LEDS) += leds.o
|
||||
ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
|
||||
ath10k_core-$(CONFIG_PM) += wow.o
|
||||
ath10k_core-$(CONFIG_ATH10K_CE) += ce.o
|
||||
--- a/ath10k-6.10/core.c
|
||||
+++ b/ath10k-6.10/core.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "testmode.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "coredump.h"
|
||||
+#include "leds.h"
|
||||
|
||||
/* Disable ath10k-ct DBGLOG output by default */
|
||||
unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
|
||||
@@ -81,6 +82,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca988x hw2.0",
|
||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
+ .led_pin = 1,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
@@ -121,6 +123,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca988x hw2.0 ubiquiti",
|
||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
+ .led_pin = 0,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
@@ -162,6 +165,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca9887 hw1.0",
|
||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
+ .led_pin = 1,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
@@ -203,6 +207,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca6174 hw3.2 sdio",
|
||||
.patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 19,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -239,6 +244,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca6164 hw2.1",
|
||||
.patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -279,6 +285,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca6174 hw2.1",
|
||||
.patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -319,6 +326,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca6174 hw3.0",
|
||||
.patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -359,6 +367,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca6174 hw3.2",
|
||||
.patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -403,6 +412,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca99x0 hw2.0",
|
||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
+ .led_pin = 17,
|
||||
.otp_exe_param = 0x00000700,
|
||||
.continuous_frag_desc = true,
|
||||
.cck_rate_map_rev2 = true,
|
||||
@@ -449,6 +459,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
+ .led_pin = 17,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
.otp_exe_param = 0x00000700,
|
||||
.continuous_frag_desc = true,
|
||||
@@ -501,6 +512,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca9888 hw2.0",
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
+ .led_pin = 17,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
.otp_exe_param = 0x00000700,
|
||||
.continuous_frag_desc = true,
|
||||
@@ -551,6 +563,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca9377 hw1.0",
|
||||
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -591,6 +604,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca9377 hw1.1",
|
||||
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -633,6 +647,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca9377 hw1.1 sdio",
|
||||
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 19,
|
||||
+ .led_pin = 0,
|
||||
.otp_exe_param = 0,
|
||||
.channel_counters_freq_hz = 88000,
|
||||
.max_probe_resp_desc_thres = 0,
|
||||
@@ -666,6 +681,7 @@ static const struct ath10k_hw_params ath
|
||||
.name = "qca4019 hw1.0",
|
||||
.patch_load_addr = QCA4019_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
+ .led_pin = 0,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
.otp_exe_param = 0x0010000,
|
||||
.continuous_frag_desc = true,
|
||||
@@ -711,6 +727,7 @@ static const struct ath10k_hw_params ath
|
||||
.dev_id = 0,
|
||||
.bus = ATH10K_BUS_SNOC,
|
||||
.name = "wcn3990 hw1.0",
|
||||
+ .led_pin = 0,
|
||||
.continuous_frag_desc = true,
|
||||
.tx_chain_mask = 0x7,
|
||||
.rx_chain_mask = 0x7,
|
||||
@@ -4073,6 +4090,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||
ath10k_wmi_check_apply_board_power_ctl_table(ar);
|
||||
}
|
||||
|
||||
+ status = ath10k_leds_start(ar);
|
||||
+ if (status)
|
||||
+ goto err_hif_stop;
|
||||
+
|
||||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -4334,9 +4355,18 @@ static void ath10k_core_register_work(st
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
+ status = ath10k_leds_register(ar);
|
||||
+ if (status) {
|
||||
+ ath10k_err(ar, "could not register leds: %d\n",
|
||||
+ status);
|
||||
+ goto err_thermal_unregister;
|
||||
+ }
|
||||
+
|
||||
set_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags);
|
||||
return;
|
||||
|
||||
+err_thermal_unregister:
|
||||
+ ath10k_thermal_unregister(ar);
|
||||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -4396,6 +4426,8 @@ void ath10k_core_unregister(struct ath10
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
+ ath10k_leds_unregister(ar);
|
||||
+
|
||||
ath10k_thermal_unregister(ar);
|
||||
/* Stop spectral before unregistering from mac80211 to remove the
|
||||
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
||||
--- a/ath10k-6.10/core.h
|
||||
+++ b/ath10k-6.10/core.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/uuid.h>
|
||||
#include <linux/time.h>
|
||||
+#include <linux/leds.h>
|
||||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -1592,6 +1593,13 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
+ struct gpio_led wifi_led;
|
||||
+ struct led_classdev cdev;
|
||||
+ char label[48];
|
||||
+ u32 gpio_state_pin;
|
||||
+ } leds;
|
||||
+
|
||||
+ struct {
|
||||
/* protected by data_lock */
|
||||
u32 rx_crc_err_drop;
|
||||
u32 fw_crash_counter;
|
||||
--- a/ath10k-6.10/hw.h
|
||||
+++ b/ath10k-6.10/hw.h
|
||||
@@ -516,6 +516,7 @@ struct ath10k_hw_params {
|
||||
const char *name;
|
||||
u32 patch_load_addr;
|
||||
int uart_pin;
|
||||
+ int led_pin;
|
||||
u32 otp_exe_param;
|
||||
|
||||
/* Type of hw cycle counter wraparound logic, for more info
|
||||
--- /dev/null
|
||||
+++ b/ath10k-6.10/leds.c
|
||||
@@ -0,0 +1,90 @@
|
||||
+// SPDX-License-Identifier: ISC
|
||||
+/*
|
||||
+ * Copyright (c) 2005-2011 Atheros Communications Inc.
|
||||
+ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
|
||||
+ * Copyright (c) 2018 Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/leds.h>
|
||||
+
|
||||
+#include "core.h"
|
||||
+#include "wmi.h"
|
||||
+#include "wmi-ops.h"
|
||||
+
|
||||
+#include "leds.h"
|
||||
+
|
||||
+static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev,
|
||||
+ enum led_brightness brightness)
|
||||
+{
|
||||
+ struct ath10k *ar = container_of(led_cdev, struct ath10k,
|
||||
+ leds.cdev);
|
||||
+ struct gpio_led *led = &ar->leds.wifi_led;
|
||||
+
|
||||
+ mutex_lock(&ar->conf_mutex);
|
||||
+
|
||||
+ if (ar->state != ATH10K_STATE_ON)
|
||||
+ goto out;
|
||||
+
|
||||
+ ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low;
|
||||
+ ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin);
|
||||
+
|
||||
+out:
|
||||
+ mutex_unlock(&ar->conf_mutex);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int ath10k_leds_start(struct ath10k *ar)
|
||||
+{
|
||||
+ if (ar->hw_params.led_pin == 0)
|
||||
+ /* leds not supported */
|
||||
+ return 0;
|
||||
+
|
||||
+ /* under some circumstances, the gpio pin gets reconfigured
|
||||
+ * to default state by the firmware, so we need to
|
||||
+ * reconfigure it this behaviour has only ben seen on
|
||||
+ * QCA9984 and QCA99XX devices so far
|
||||
+ */
|
||||
+ ath10k_wmi_gpio_config(ar, ar->hw_params.led_pin, 0,
|
||||
+ WMI_GPIO_PULL_NONE, WMI_GPIO_INTTYPE_DISABLE);
|
||||
+ ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, 1);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int ath10k_leds_register(struct ath10k *ar)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ if (ar->hw_params.led_pin == 0)
|
||||
+ /* leds not supported */
|
||||
+ return 0;
|
||||
+
|
||||
+ snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s",
|
||||
+ wiphy_name(ar->hw->wiphy));
|
||||
+ ar->leds.wifi_led.active_low = 1;
|
||||
+ ar->leds.wifi_led.gpio = ar->hw_params.led_pin;
|
||||
+ ar->leds.wifi_led.name = ar->leds.label;
|
||||
+ ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
|
||||
+
|
||||
+ ar->leds.cdev.name = ar->leds.label;
|
||||
+ ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
|
||||
+ ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger;
|
||||
+
|
||||
+ ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void ath10k_leds_unregister(struct ath10k *ar)
|
||||
+{
|
||||
+ if (ar->hw_params.led_pin == 0)
|
||||
+ /* leds not supported */
|
||||
+ return;
|
||||
+
|
||||
+ led_classdev_unregister(&ar->leds.cdev);
|
||||
+}
|
||||
+
|
||||
--- /dev/null
|
||||
+++ b/ath10k-6.10/leds.h
|
||||
@@ -0,0 +1,34 @@
|
||||
+/* SPDX-License-Identifier: ISC */
|
||||
+/*
|
||||
+ * Copyright (c) 2005-2011 Atheros Communications Inc.
|
||||
+ * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
|
||||
+ * Copyright (c) 2018 Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||
+ * Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LEDS_H_
|
||||
+#define _LEDS_H_
|
||||
+
|
||||
+#include "core.h"
|
||||
+
|
||||
+#ifdef CONFIG_ATH10K_LEDS
|
||||
+void ath10k_leds_unregister(struct ath10k *ar);
|
||||
+int ath10k_leds_start(struct ath10k *ar);
|
||||
+int ath10k_leds_register(struct ath10k *ar);
|
||||
+#else
|
||||
+static inline void ath10k_leds_unregister(struct ath10k *ar)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static inline int ath10k_leds_start(struct ath10k *ar)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline int ath10k_leds_register(struct ath10k *ar)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+#endif /* _LEDS_H_ */
|
||||
--- a/ath10k-6.10/mac.c
|
||||
+++ b/ath10k-6.10/mac.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "wmi-tlv.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "wow.h"
|
||||
+#include "leds.h"
|
||||
|
||||
/*********/
|
||||
/* Rates */
|
||||
--- a/ath10k-6.10/wmi-ops.h
|
||||
+++ b/ath10k-6.10/wmi-ops.h
|
||||
@@ -228,7 +228,10 @@ struct wmi_ops {
|
||||
const struct wmi_bb_timing_cfg_arg *arg);
|
||||
struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar,
|
||||
const struct wmi_per_peer_per_tid_cfg_arg *arg);
|
||||
+ struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num,
|
||||
+ u32 input, u32 pull_type, u32 intr_mode);
|
||||
|
||||
+ struct sk_buff *(*gen_gpio_output)(struct ath10k *ar, u32 gpio_num, u32 set);
|
||||
};
|
||||
|
||||
int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
|
||||
@@ -1147,6 +1150,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
|
||||
return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
|
||||
}
|
||||
|
||||
+static inline int ath10k_wmi_gpio_config(struct ath10k *ar, u32 gpio_num,
|
||||
+ u32 input, u32 pull_type, u32 intr_mode)
|
||||
+{
|
||||
+ struct sk_buff *skb;
|
||||
+
|
||||
+ if (!ar->wmi.ops->gen_gpio_config)
|
||||
+ return -EOPNOTSUPP;
|
||||
+
|
||||
+ skb = ar->wmi.ops->gen_gpio_config(ar, gpio_num, input, pull_type, intr_mode);
|
||||
+ if (IS_ERR(skb))
|
||||
+ return PTR_ERR(skb);
|
||||
+
|
||||
+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_config_cmdid);
|
||||
+}
|
||||
+
|
||||
+static inline int ath10k_wmi_gpio_output(struct ath10k *ar, u32 gpio_num, u32 set)
|
||||
+{
|
||||
+ struct sk_buff *skb;
|
||||
+
|
||||
+ if (!ar->wmi.ops->gen_gpio_config)
|
||||
+ return -EOPNOTSUPP;
|
||||
+
|
||||
+ skb = ar->wmi.ops->gen_gpio_output(ar, gpio_num, set);
|
||||
+ if (IS_ERR(skb))
|
||||
+ return PTR_ERR(skb);
|
||||
+
|
||||
+ return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->gpio_output_cmdid);
|
||||
+}
|
||||
+
|
||||
static inline int
|
||||
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
|
||||
{
|
||||
--- a/ath10k-6.10/wmi-tlv.c
|
||||
+++ b/ath10k-6.10/wmi-tlv.c
|
||||
@@ -4606,6 +4606,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
||||
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
||||
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
|
||||
+ /* .gen_gpio_config not implemented */
|
||||
+ /* .gen_gpio_output not implemented */
|
||||
};
|
||||
|
||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||
--- a/ath10k-6.10/wmi.c
|
||||
+++ b/ath10k-6.10/wmi.c
|
||||
@@ -8467,6 +8467,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||
return skb;
|
||||
}
|
||||
|
||||
+static struct sk_buff *ath10k_wmi_op_gen_gpio_config(struct ath10k *ar,
|
||||
+ u32 gpio_num, u32 input,
|
||||
+ u32 pull_type, u32 intr_mode)
|
||||
+{
|
||||
+ struct wmi_gpio_config_cmd *cmd;
|
||||
+ struct sk_buff *skb;
|
||||
+
|
||||
+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
|
||||
+ if (!skb)
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+
|
||||
+ cmd = (struct wmi_gpio_config_cmd *)skb->data;
|
||||
+ cmd->pull_type = __cpu_to_le32(pull_type);
|
||||
+ cmd->gpio_num = __cpu_to_le32(gpio_num);
|
||||
+ cmd->input = __cpu_to_le32(input);
|
||||
+ cmd->intr_mode = __cpu_to_le32(intr_mode);
|
||||
+
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_config gpio_num 0x%08x input 0x%08x pull_type 0x%08x intr_mode 0x%08x\n",
|
||||
+ gpio_num, input, pull_type, intr_mode);
|
||||
+
|
||||
+ return skb;
|
||||
+}
|
||||
+
|
||||
+static struct sk_buff *ath10k_wmi_op_gen_gpio_output(struct ath10k *ar,
|
||||
+ u32 gpio_num, u32 set)
|
||||
+{
|
||||
+ struct wmi_gpio_output_cmd *cmd;
|
||||
+ struct sk_buff *skb;
|
||||
+
|
||||
+ skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
|
||||
+ if (!skb)
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+
|
||||
+ cmd = (struct wmi_gpio_output_cmd *)skb->data;
|
||||
+ cmd->gpio_num = __cpu_to_le32(gpio_num);
|
||||
+ cmd->set = __cpu_to_le32(set);
|
||||
+
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi gpio_output gpio_num 0x%08x set 0x%08x\n",
|
||||
+ gpio_num, set);
|
||||
+
|
||||
+ return skb;
|
||||
+}
|
||||
+
|
||||
static struct sk_buff *
|
||||
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
||||
enum wmi_sta_ps_mode psmode)
|
||||
@@ -10274,6 +10317,9 @@ static const struct wmi_ops wmi_ops = {
|
||||
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
|
||||
+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
|
||||
+
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -10344,6 +10390,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
|
||||
+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -10423,6 +10471,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||
+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
|
||||
+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
|
||||
/* .gen_pdev_enable_adaptive_cca not implemented */
|
||||
};
|
||||
|
||||
@@ -10494,6 +10544,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
||||
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
||||
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
||||
+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
|
||||
+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
|
||||
/* .gen_bcn_tmpl not implemented */
|
||||
/* .gen_prb_tmpl not implemented */
|
||||
/* .gen_p2p_go_bcn_ie not implemented */
|
||||
@@ -10576,6 +10628,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
||||
+ .gen_gpio_config = ath10k_wmi_op_gen_gpio_config,
|
||||
+ .gen_gpio_output = ath10k_wmi_op_gen_gpio_output,
|
||||
};
|
||||
|
||||
int ath10k_wmi_attach(struct ath10k *ar)
|
||||
--- a/ath10k-6.10/wmi.h
|
||||
+++ b/ath10k-6.10/wmi.h
|
||||
@@ -3137,6 +3137,41 @@ enum wmi_10_4_feature_mask {
|
||||
|
||||
};
|
||||
|
||||
+/* WMI_GPIO_CONFIG_CMDID */
|
||||
+enum {
|
||||
+ WMI_GPIO_PULL_NONE,
|
||||
+ WMI_GPIO_PULL_UP,
|
||||
+ WMI_GPIO_PULL_DOWN,
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
+ WMI_GPIO_INTTYPE_DISABLE,
|
||||
+ WMI_GPIO_INTTYPE_RISING_EDGE,
|
||||
+ WMI_GPIO_INTTYPE_FALLING_EDGE,
|
||||
+ WMI_GPIO_INTTYPE_BOTH_EDGE,
|
||||
+ WMI_GPIO_INTTYPE_LEVEL_LOW,
|
||||
+ WMI_GPIO_INTTYPE_LEVEL_HIGH
|
||||
+};
|
||||
+
|
||||
+/* WMI_GPIO_CONFIG_CMDID */
|
||||
+struct wmi_gpio_config_cmd {
|
||||
+ __le32 gpio_num; /* GPIO number to be setup */
|
||||
+ __le32 input; /* 0 - Output/ 1 - Input */
|
||||
+ __le32 pull_type; /* Pull type defined above */
|
||||
+ __le32 intr_mode; /* Interrupt mode defined above (Input) */
|
||||
+} __packed;
|
||||
+
|
||||
+/* WMI_GPIO_OUTPUT_CMDID */
|
||||
+struct wmi_gpio_output_cmd {
|
||||
+ __le32 gpio_num; /* GPIO number to be setup */
|
||||
+ __le32 set; /* Set the GPIO pin*/
|
||||
+} __packed;
|
||||
+
|
||||
+/* WMI_GPIO_INPUT_EVENTID */
|
||||
+struct wmi_gpio_input_event {
|
||||
+ __le32 gpio_num; /* GPIO number which changed state */
|
||||
+} __packed;
|
||||
+
|
||||
struct wmi_ext_resource_config_10_4_cmd {
|
||||
/* contains enum wmi_host_platform_type */
|
||||
__le32 host_platform_config;
|
@ -9,13 +9,13 @@ traffic.
|
||||
|
||||
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
---
|
||||
ath10k-6.7/core.h | 4 ++++
|
||||
ath10k-6.7/leds.c | 4 +---
|
||||
ath10k-6.7/mac.c | 2 +-
|
||||
ath10k-6.14/core.h | 4 ++++
|
||||
ath10k-6.14/leds.c | 4 +---
|
||||
ath10k-6.14/mac.c | 2 +-
|
||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/ath10k-6.10/core.h
|
||||
+++ b/ath10k-6.10/core.h
|
||||
--- a/ath10k-6.14/core.h
|
||||
+++ b/ath10k-6.14/core.h
|
||||
@@ -1707,6 +1707,10 @@ struct ath10k {
|
||||
u8 csi_data[4096];
|
||||
u16 csi_data_len;
|
||||
@ -27,8 +27,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
/* must be last */
|
||||
u8 drv_priv[] __aligned(sizeof(void *));
|
||||
};
|
||||
--- a/ath10k-6.10/leds.c
|
||||
+++ b/ath10k-6.10/leds.c
|
||||
--- a/ath10k-6.14/leds.c
|
||||
+++ b/ath10k-6.14/leds.c
|
||||
@@ -70,7 +70,7 @@ int ath10k_leds_register(struct ath10k *
|
||||
|
||||
ar->leds.cdev.name = ar->leds.label;
|
||||
@ -38,9 +38,9 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
|
||||
ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
|
||||
if (ret)
|
||||
--- a/ath10k-6.10/mac.c
|
||||
+++ b/ath10k-6.10/mac.c
|
||||
@@ -11631,7 +11631,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -11651,7 +11651,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
|
@ -0,0 +1,34 @@
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 28 Mar 2025 20:26:04 +0800
|
||||
Subject: [PATCH] ath10k-ct: silence warning caused by unsupported retry_limit
|
||||
value
|
||||
|
||||
Some retry_limit values are not supported by ath10k wave2 chips.
|
||||
We can just skip config it for these chips. And it's safe to
|
||||
return 0 in this case because the hardware is still working.
|
||||
|
||||
Suggested-by: Ben Greear <greearb@candelatech.com>
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
ath10k-6.14/mac.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -5401,7 +5401,7 @@ static int ath10k_config_retry_limit(str
|
||||
*/
|
||||
ath10k_warn(ar, "Firmware lacks feature flag indicating a retry limit of > 2 is OK, requested limit: %d\n",
|
||||
limit);
|
||||
- return -EINVAL;
|
||||
+ goto skip_retry_limit;
|
||||
}
|
||||
|
||||
list_for_each_entry(arvif, &ar->arvifs, list) {
|
||||
@@ -5412,6 +5412,7 @@ static int ath10k_config_retry_limit(str
|
||||
}
|
||||
}
|
||||
|
||||
+skip_retry_limit:
|
||||
return ret;
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 28 Mar 2025 21:02:27 +0800
|
||||
Subject: [PATCH] ath10k-ct: silence noisy log caused by flushing queue
|
||||
|
||||
.flush() is a regular mac80211 operation aims to clear all pending
|
||||
frames from the hardware queue. Only developers need to care about it.
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
ath10k-6.14/mac.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -9081,12 +9081,12 @@ static void ath10k_flush(struct ieee8021
|
||||
if (vif) {
|
||||
arvif = (void *)vif->drv_priv;
|
||||
vid = arvif->vdev_id;
|
||||
- ath10k_info(ar, "mac flush vdev %d drop %d queues 0x%x ar->paused: 0x%lx arvif->paused: 0x%lx\n",
|
||||
- arvif->vdev_id, drop, queues, ar->tx_paused, arvif->tx_paused);
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac flush vdev %d drop %d queues 0x%x ar->paused: 0x%lx arvif->paused: 0x%lx\n",
|
||||
+ arvif->vdev_id, drop, queues, ar->tx_paused, arvif->tx_paused);
|
||||
}
|
||||
else {
|
||||
- ath10k_info(ar, "mac flush null vif, drop %d queues 0x%x\n",
|
||||
- drop, queues);
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac flush null vif, drop %d queues 0x%x\n",
|
||||
+ drop, queues);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- a/ath10k-6.10/wmi.h
|
||||
+++ b/ath10k-6.10/wmi.h
|
||||
--- a/ath10k-6.14/wmi.h
|
||||
+++ b/ath10k-6.14/wmi.h
|
||||
@@ -6310,7 +6310,7 @@ struct qca9880_set_ctl_table_cmd {
|
||||
__le32 ctl_len; /* in bytes. This may be ignored in firmware,
|
||||
* make sure ctl_info data is sizeof(qca9880_power_ctl) */
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- a/ath10k-6.10/htt.h
|
||||
+++ b/ath10k-6.10/htt.h
|
||||
--- a/ath10k-6.14/htt.h
|
||||
+++ b/ath10k-6.14/htt.h
|
||||
@@ -238,7 +238,11 @@ enum htt_rx_ring_flags {
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- a/ath10k-6.10/pci.c
|
||||
+++ b/ath10k-6.10/pci.c
|
||||
--- a/ath10k-6.14/pci.c
|
||||
+++ b/ath10k-6.14/pci.c
|
||||
@@ -132,7 +132,11 @@ static const struct ce_attr pci_host_ce_
|
||||
.flags = CE_ATTR_FLAGS,
|
||||
.src_nentries = 0,
|
||||
|
@ -13,12 +13,12 @@ own loss detection mechanism.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
ath10k-6.10/mac.c | 1 -
|
||||
ath10k-6.14/mac.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/ath10k-6.10/mac.c
|
||||
+++ b/ath10k-6.10/mac.c
|
||||
@@ -11316,7 +11316,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
--- a/ath10k-6.14/mac.c
|
||||
+++ b/ath10k-6.14/mac.c
|
||||
@@ -11337,7 +11337,6 @@ int ath10k_mac_register(struct ath10k *a
|
||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||
|
@ -24,6 +24,23 @@ $(eval $(call KernelPackage,leds-gpio))
|
||||
|
||||
LED_TRIGGER_DIR=$(LINUX_DIR)/drivers/leds/trigger
|
||||
|
||||
define KernelPackage/led-group-multi-color
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LEDs group multi-color support
|
||||
KCONFIG:=CONFIG_LEDS_GROUP_MULTICOLOR
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/rgb/leds-group-multicolor.ko
|
||||
AUTOLOAD:=$(call AutoProbe,led-group-multi-color)
|
||||
endef
|
||||
|
||||
define KernelPackage/led-group-multi-color/description
|
||||
This option enables support for monochrome LEDs that are grouped
|
||||
into multicolor LEDs which is useful in the case where LEDs of
|
||||
different colors are physically grouped in a single multi-color LED
|
||||
and driven by a controller that does not have multi-color support.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,led-group-multi-color))
|
||||
|
||||
define KernelPackage/ledtrig-activity
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED Activity Trigger
|
||||
@ -330,4 +347,4 @@ define KernelPackage/leds-lp5562/description
|
||||
LED controllers.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-lp5562))
|
||||
$(eval $(call KernelPackage,leds-lp5562))
|
||||
|
@ -1146,7 +1146,6 @@ define KernelPackage/ixgbe
|
||||
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +kmod-mdio-devres
|
||||
KCONFIG:=CONFIG_IXGBE \
|
||||
CONFIG_IXGBE_VXLAN=n \
|
||||
CONFIG_IXGBE_HWMON=y \
|
||||
CONFIG_IXGBE_DCA=n \
|
||||
CONFIG_IXGBE_DCB=y
|
||||
@ -1166,7 +1165,6 @@ define KernelPackage/ixgbevf
|
||||
TITLE:=Intel(R) 82599 Virtual Function Ethernet support
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ixgbe
|
||||
KCONFIG:=CONFIG_IXGBEVF \
|
||||
CONFIG_IXGBE_VXLAN=n \
|
||||
CONFIG_IXGBE_HWMON=y \
|
||||
CONFIG_IXGBE_DCA=n
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbevf/ixgbevf.ko
|
||||
@ -1183,11 +1181,8 @@ $(eval $(call KernelPackage,ixgbevf))
|
||||
define KernelPackage/i40e
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Intel(R) Ethernet Controller XL710 Family support
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp
|
||||
KCONFIG:=CONFIG_I40E \
|
||||
CONFIG_I40E_VXLAN=n \
|
||||
CONFIG_I40E_HWMON=y \
|
||||
CONFIG_I40E_DCA=n \
|
||||
CONFIG_I40E_DCB=y
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko
|
||||
AUTOLOAD:=$(call AutoLoad,36,i40e,1)
|
||||
|
@ -0,0 +1,91 @@
|
||||
wifi: ath11k: Fix DMA buffer allocation to resolve SWIOTLB issues
|
||||
Currently, the driver allocates cacheable DMA buffers for rings like
|
||||
HAL_REO_DST and HAL_WBM2SW_RELEASE. The buffers for HAL_WBM2SW_RELEASE
|
||||
are large (1024 KiB), exceeding the SWIOTLB slot size of 256 KiB. This
|
||||
leads to "swiotlb buffer is full" error messages on systems without an
|
||||
IOMMU that use SWIOTLB, causing driver initialization failures. The driver
|
||||
calls dma_map_single() with these large buffers obtained from kzalloc(),
|
||||
resulting in ring initialization errors on systems without an IOMMU that
|
||||
use SWIOTLB.
|
||||
|
||||
To address these issues, replace the flawed buffer allocation mechanism
|
||||
with the appropriate DMA API. Specifically, use dma_alloc_noncoherent()
|
||||
for cacheable DMA buffers, ensuring proper freeing of buffers with
|
||||
dma_free_noncoherent().
|
||||
|
||||
Error log:
|
||||
[ 10.194343] ath11k_pci 0000:04:00.0: swiotlb buffer is full (sz:1048583 bytes), total 32768 (slots), used 2529 (slots)
|
||||
[ 10.194406] ath11k_pci 0000:04:00.0: failed to set up tcl_comp ring (0) :-12
|
||||
[ 10.194781] ath11k_pci 0000:04:00.0: failed to init DP: -12
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
|
||||
Reported-by: Tim Harvey <tharvey@gateworks.com>
|
||||
Closes: https://lore.kernel.org/all/20241210041133.GA17116@lst.de/
|
||||
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
Tested-by: Tim Harvey <tharvey@gateworks.com>
|
||||
Link: https://patch.msgid.link/20250119164219.647059-2-quic_ppranees@quicinc.com
|
||||
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.c
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <crypto/hash.h>
|
||||
@@ -104,14 +104,12 @@ void ath11k_dp_srng_cleanup(struct ath11
|
||||
if (!ring->vaddr_unaligned)
|
||||
return;
|
||||
|
||||
- if (ring->cached) {
|
||||
- dma_unmap_single(ab->dev, ring->paddr_unaligned, ring->size,
|
||||
- DMA_FROM_DEVICE);
|
||||
- kfree(ring->vaddr_unaligned);
|
||||
- } else {
|
||||
+ if (ring->cached)
|
||||
+ dma_free_noncoherent(ab->dev, ring->size, ring->vaddr_unaligned,
|
||||
+ ring->paddr_unaligned, DMA_FROM_DEVICE);
|
||||
+ else
|
||||
dma_free_coherent(ab->dev, ring->size, ring->vaddr_unaligned,
|
||||
ring->paddr_unaligned);
|
||||
- }
|
||||
|
||||
ring->vaddr_unaligned = NULL;
|
||||
}
|
||||
@@ -249,25 +247,14 @@ int ath11k_dp_srng_setup(struct ath11k_b
|
||||
default:
|
||||
cached = false;
|
||||
}
|
||||
-
|
||||
- if (cached) {
|
||||
- ring->vaddr_unaligned = kzalloc(ring->size, GFP_KERNEL);
|
||||
- if (!ring->vaddr_unaligned)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
- ring->paddr_unaligned = dma_map_single(ab->dev,
|
||||
- ring->vaddr_unaligned,
|
||||
- ring->size,
|
||||
- DMA_FROM_DEVICE);
|
||||
- if (dma_mapping_error(ab->dev, ring->paddr_unaligned)) {
|
||||
- kfree(ring->vaddr_unaligned);
|
||||
- ring->vaddr_unaligned = NULL;
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
- if (!cached)
|
||||
+ if (cached)
|
||||
+ ring->vaddr_unaligned = dma_alloc_noncoherent(ab->dev, ring->size,
|
||||
+ &ring->paddr_unaligned,
|
||||
+ DMA_FROM_DEVICE,
|
||||
+ GFP_KERNEL);
|
||||
+ else
|
||||
ring->vaddr_unaligned = dma_alloc_coherent(ab->dev, ring->size,
|
||||
&ring->paddr_unaligned,
|
||||
GFP_KERNEL);
|
@ -0,0 +1,255 @@
|
||||
wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
|
||||
|
||||
Currently, the driver allocates cacheable DMA buffers for the rx_tid
|
||||
structure using kzalloc() and dma_map_single(). These buffers are
|
||||
long-lived and can persist for the lifetime of the peer, which is not
|
||||
advisable. Instead of using kzalloc() and dma_map_single() for allocating
|
||||
cacheable DMA buffers, utilize the dma_alloc_noncoherent() helper for the
|
||||
allocation of long-lived cacheable DMA buffers, such as the peer's rx_tid.
|
||||
Since dma_alloc_noncoherent() returns unaligned physical and virtual
|
||||
addresses, align them internally before use within the driver. This
|
||||
ensures proper allocation of non-coherent memory through the kernel
|
||||
helper.
|
||||
|
||||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
|
||||
|
||||
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp.h
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef ATH11K_DP_H
|
||||
@@ -20,7 +20,6 @@ struct ath11k_ext_irq_grp;
|
||||
|
||||
struct dp_rx_tid {
|
||||
u8 tid;
|
||||
- u32 *vaddr;
|
||||
dma_addr_t paddr;
|
||||
u32 size;
|
||||
u32 ba_win_sz;
|
||||
@@ -37,6 +36,9 @@ struct dp_rx_tid {
|
||||
/* Timer info related to fragments */
|
||||
struct timer_list frag_timer;
|
||||
struct ath11k_base *ab;
|
||||
+ u32 *vaddr_unaligned;
|
||||
+ dma_addr_t paddr_unaligned;
|
||||
+ u32 unaligned_size;
|
||||
};
|
||||
|
||||
#define DP_REO_DESC_FREE_THRESHOLD 64
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/ieee80211.h>
|
||||
@@ -675,11 +675,11 @@ void ath11k_dp_reo_cmd_list_cleanup(stru
|
||||
list_for_each_entry_safe(cmd, tmp, &dp->reo_cmd_list, list) {
|
||||
list_del(&cmd->list);
|
||||
rx_tid = &cmd->data;
|
||||
- if (rx_tid->vaddr) {
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr,
|
||||
- rx_tid->size, DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ if (rx_tid->vaddr_unaligned) {
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
kfree(cmd);
|
||||
}
|
||||
@@ -689,11 +689,11 @@ void ath11k_dp_reo_cmd_list_cleanup(stru
|
||||
list_del(&cmd_cache->list);
|
||||
dp->reo_cmd_cache_flush_count--;
|
||||
rx_tid = &cmd_cache->data;
|
||||
- if (rx_tid->vaddr) {
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr,
|
||||
- rx_tid->size, DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ if (rx_tid->vaddr_unaligned) {
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
kfree(cmd_cache);
|
||||
}
|
||||
@@ -708,11 +708,11 @@ static void ath11k_dp_reo_cmd_free(struc
|
||||
if (status != HAL_REO_CMD_SUCCESS)
|
||||
ath11k_warn(dp->ab, "failed to flush rx tid hw desc, tid %d status %d\n",
|
||||
rx_tid->tid, status);
|
||||
- if (rx_tid->vaddr) {
|
||||
- dma_unmap_single(dp->ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ if (rx_tid->vaddr_unaligned) {
|
||||
+ dma_free_noncoherent(dp->ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,10 +749,10 @@ static void ath11k_dp_reo_cache_flush(st
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to send HAL_REO_CMD_FLUSH_CACHE cmd, tid %d (%d)\n",
|
||||
rx_tid->tid, ret);
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,10 +802,10 @@ static void ath11k_dp_rx_tid_del_func(st
|
||||
|
||||
return;
|
||||
free_desc:
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
|
||||
void ath11k_peer_rx_tid_delete(struct ath11k *ar,
|
||||
@@ -831,14 +831,16 @@ void ath11k_peer_rx_tid_delete(struct at
|
||||
if (ret != -ESHUTDOWN)
|
||||
ath11k_err(ar->ab, "failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid %d (%d)\n",
|
||||
tid, ret);
|
||||
- dma_unmap_single(ar->ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ar->ab->dev, rx_tid->unaligned_size,
|
||||
+ rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
}
|
||||
|
||||
rx_tid->paddr = 0;
|
||||
+ rx_tid->paddr_unaligned = 0;
|
||||
rx_tid->size = 0;
|
||||
+ rx_tid->unaligned_size = 0;
|
||||
}
|
||||
|
||||
static int ath11k_dp_rx_link_desc_return(struct ath11k_base *ab,
|
||||
@@ -982,10 +984,9 @@ static void ath11k_dp_rx_tid_mem_free(st
|
||||
if (!rx_tid->active)
|
||||
goto unlock_exit;
|
||||
|
||||
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size, rx_tid->vaddr_unaligned,
|
||||
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
|
||||
+ rx_tid->vaddr_unaligned = NULL;
|
||||
|
||||
rx_tid->active = false;
|
||||
|
||||
@@ -1000,9 +1001,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
|
||||
struct ath11k_base *ab = ar->ab;
|
||||
struct ath11k_peer *peer;
|
||||
struct dp_rx_tid *rx_tid;
|
||||
- u32 hw_desc_sz;
|
||||
- u32 *addr_aligned;
|
||||
- void *vaddr;
|
||||
+ u32 hw_desc_sz, *vaddr;
|
||||
+ void *vaddr_unaligned;
|
||||
dma_addr_t paddr;
|
||||
int ret;
|
||||
|
||||
@@ -1050,37 +1050,34 @@ int ath11k_peer_rx_tid_setup(struct ath1
|
||||
else
|
||||
hw_desc_sz = ath11k_hal_reo_qdesc_size(DP_BA_WIN_SZ_MAX, tid);
|
||||
|
||||
- vaddr = kzalloc(hw_desc_sz + HAL_LINK_DESC_ALIGN - 1, GFP_ATOMIC);
|
||||
- if (!vaddr) {
|
||||
+ rx_tid->unaligned_size = hw_desc_sz + HAL_LINK_DESC_ALIGN - 1;
|
||||
+ vaddr_unaligned = dma_alloc_noncoherent(ab->dev, rx_tid->unaligned_size, &paddr,
|
||||
+ DMA_BIDIRECTIONAL, GFP_ATOMIC);
|
||||
+ if (!vaddr_unaligned) {
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- addr_aligned = PTR_ALIGN(vaddr, HAL_LINK_DESC_ALIGN);
|
||||
-
|
||||
- ath11k_hal_reo_qdesc_setup(addr_aligned, tid, ba_win_sz,
|
||||
- ssn, pn_type);
|
||||
-
|
||||
- paddr = dma_map_single(ab->dev, addr_aligned, hw_desc_sz,
|
||||
- DMA_BIDIRECTIONAL);
|
||||
-
|
||||
- ret = dma_mapping_error(ab->dev, paddr);
|
||||
- if (ret) {
|
||||
- spin_unlock_bh(&ab->base_lock);
|
||||
- ath11k_warn(ab, "failed to setup dma map for peer %pM rx tid %d: %d\n",
|
||||
- peer_mac, tid, ret);
|
||||
- goto err_mem_free;
|
||||
- }
|
||||
-
|
||||
- rx_tid->vaddr = vaddr;
|
||||
- rx_tid->paddr = paddr;
|
||||
+ rx_tid->vaddr_unaligned = vaddr_unaligned;
|
||||
+ vaddr = PTR_ALIGN(vaddr_unaligned, HAL_LINK_DESC_ALIGN);
|
||||
+ rx_tid->paddr_unaligned = paddr;
|
||||
+ rx_tid->paddr = rx_tid->paddr_unaligned + ((unsigned long)vaddr -
|
||||
+ (unsigned long)rx_tid->vaddr_unaligned);
|
||||
+ ath11k_hal_reo_qdesc_setup(vaddr, tid, ba_win_sz, ssn, pn_type);
|
||||
rx_tid->size = hw_desc_sz;
|
||||
rx_tid->active = true;
|
||||
|
||||
+ /* After dma_alloc_noncoherent, vaddr is being modified for reo qdesc setup.
|
||||
+ * Since these changes are not reflected in the device, driver now needs to
|
||||
+ * explicitly call dma_sync_single_for_device.
|
||||
+ */
|
||||
+ dma_sync_single_for_device(ab->dev, rx_tid->paddr,
|
||||
+ rx_tid->size,
|
||||
+ DMA_TO_DEVICE);
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
|
||||
- ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id, peer_mac,
|
||||
- paddr, tid, 1, ba_win_sz);
|
||||
+ ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id, peer_mac, rx_tid->paddr,
|
||||
+ tid, 1, ba_win_sz);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to setup rx reorder queue for peer %pM tid %d: %d\n",
|
||||
peer_mac, tid, ret);
|
||||
@@ -1088,12 +1085,6 @@ int ath11k_peer_rx_tid_setup(struct ath1
|
||||
}
|
||||
|
||||
return ret;
|
||||
-
|
||||
-err_mem_free:
|
||||
- kfree(rx_tid->vaddr);
|
||||
- rx_tid->vaddr = NULL;
|
||||
-
|
||||
- return ret;
|
||||
}
|
||||
|
||||
int ath11k_dp_rx_ampdu_start(struct ath11k *ar,
|
@ -0,0 +1,121 @@
|
||||
From 8dc94a59cfad70ec3a808add56718255eee39ab2 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sat, 29 Mar 2025 12:50:55 +0100
|
||||
Subject: [PATCH] backports: handle genlmsg_multicast_allns upstream backport
|
||||
changes
|
||||
|
||||
Better handle genlmsg_multicast_allns upstream backport changes that
|
||||
dropped a flag to the function middle version. Use a backport function
|
||||
if backports project is tried to be built on older kernel version.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
backport-include/net/genetlink.h | 11 +++++
|
||||
compat/Makefile | 3 +-
|
||||
compat/backport-genetlink.c | 60 +++++++++++++++++++++++
|
||||
3 files changed, 73 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/backport-include/net/genetlink.h
|
||||
+++ b/backport-include/net/genetlink.h
|
||||
@@ -172,4 +172,15 @@ static inline int genlmsg_parse(const st
|
||||
}
|
||||
#endif /* LINUX_VERSION_IS_LESS(5,2,0) */
|
||||
|
||||
+#if LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) || \
|
||||
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) || \
|
||||
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58)
|
||||
+#define genlmsg_multicast_allns LINUX_BACKPORT(genlmsg_multicast_allns)
|
||||
+int backport_genlmsg_multicast_allns(const struct genl_family *family,
|
||||
+ struct sk_buff *skb, u32 portid,
|
||||
+ unsigned int group);
|
||||
+#endif /* LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) ||
|
||||
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) ||
|
||||
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58) */
|
||||
+
|
||||
#endif /* __BACKPORT_NET_GENETLINK_H */
|
||||
--- a/compat/Makefile
|
||||
+++ b/compat/Makefile
|
||||
@@ -16,7 +16,8 @@ compat-$(CPTCFG_KERNEL_5_9) += backport-
|
||||
compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o
|
||||
compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o
|
||||
compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o
|
||||
-compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o
|
||||
+compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o backport-genetlink.o
|
||||
+compat-$(CPTCFG_KERNEL_6_1) += backport-genetlink.o
|
||||
compat-$(CPTCFG_KERNEL_6_4) += backport-6.4.o
|
||||
|
||||
compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_LIB_ARC4) += lib-crypto-arc4.o
|
||||
--- a/compat/backport-genetlink.c
|
||||
+++ b/compat/backport-genetlink.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <net/netlink.h>
|
||||
#include <net/sock.h>
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(5,2,0)
|
||||
static const struct genl_family *find_family_real_ops(const struct genl_ops **ops)
|
||||
{
|
||||
const struct genl_family *family;
|
||||
@@ -249,3 +250,63 @@ int backport_genlmsg_multicast_allns(con
|
||||
return genlmsg_mcast(skb, portid, group);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(backport_genlmsg_multicast_allns);
|
||||
+#endif /* LINUX_VERSION_IS_LESS(5,2,0) */
|
||||
+
|
||||
+#if LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) || \
|
||||
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) || \
|
||||
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58)
|
||||
+static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group)
|
||||
+{
|
||||
+ struct sk_buff *tmp;
|
||||
+ struct net *net, *prev = NULL;
|
||||
+ bool delivered = false;
|
||||
+ int err;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+ for_each_net_rcu(net) {
|
||||
+ if (prev) {
|
||||
+ tmp = skb_clone(skb, GFP_ATOMIC);
|
||||
+ if (!tmp) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto error;
|
||||
+ }
|
||||
+ err = nlmsg_multicast(prev->genl_sock, tmp,
|
||||
+ portid, group, GFP_ATOMIC);
|
||||
+ if (!err)
|
||||
+ delivered = true;
|
||||
+ else if (err != -ESRCH)
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ prev = net;
|
||||
+ }
|
||||
+ err = nlmsg_multicast(prev->genl_sock, skb, portid, group, GFP_ATOMIC);
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
+ if (!err)
|
||||
+ delivered = true;
|
||||
+ else if (err != -ESRCH)
|
||||
+ return err;
|
||||
+ return delivered ? 0 : -ESRCH;
|
||||
+ error:
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
+ kfree_skb(skb);
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+int backport_genlmsg_multicast_allns(const struct genl_family *family,
|
||||
+ struct sk_buff *skb, u32 portid,
|
||||
+ unsigned int group)
|
||||
+{
|
||||
+ if (WARN_ON_ONCE(group >= family->n_mcgrps))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ group = family->mcgrp_offset + group;
|
||||
+ return genlmsg_mcast(skb, portid, group);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(backport_genlmsg_multicast_allns);
|
||||
+#endif /* LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) ||
|
||||
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) ||
|
||||
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58) */
|
@ -9,9 +9,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
|
||||
PKG_SOURCE_DATE:=2024-12-18
|
||||
PKG_SOURCE_VERSION:=18fc0ead19faf06b8ce7ec5be84957278e942dfa
|
||||
PKG_MIRROR_HASH:=123d1b5d00cdbbfa77813b3eb694d00949171037a0fa26e6d36a75a37066ba48
|
||||
PKG_SOURCE_DATE:=2025-03-17
|
||||
PKG_SOURCE_VERSION:=b6e5157527d361f99ad52eaa6da273cb0f2dfd59
|
||||
PKG_MIRROR_HASH:=fb563b493411922a8fbddf6a5a6766cffa47f87621e056b8dcf38309091835eb
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
@ -464,9 +464,6 @@ tplink,tl-wr902ac-v1)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_led_netdev "internet" "Internet" "green:internet" "eth0"
|
||||
;;
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1|\
|
||||
tplink,re450-v2|\
|
||||
tplink,re450-v3|\
|
||||
tplink,re455-v1)
|
||||
ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan_data" "eth0" "tx rx"
|
||||
|
@ -98,9 +98,6 @@ ath79_setup_interfaces()
|
||||
tplink,eap225-v4|\
|
||||
tplink,eap245-v1|\
|
||||
tplink,re350k-v1|\
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1|\
|
||||
tplink,re450-v2|\
|
||||
tplink,re450-v3|\
|
||||
tplink,re455-v1|\
|
||||
tplink,tl-wa1201-v2|\
|
||||
|
@ -538,45 +538,6 @@ define Device/tplink_re350k-v1
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re350k-v1
|
||||
|
||||
define Device/tplink_rex5x-v1
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := qca9558
|
||||
IMAGE_SIZE := 6016k
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
|
||||
DEFAULT := n
|
||||
endef
|
||||
|
||||
define Device/tplink_re355-v1
|
||||
$(Device/tplink_rex5x-v1)
|
||||
DEVICE_MODEL := RE355
|
||||
DEVICE_VARIANT := v1
|
||||
TPLINK_BOARD_ID := RE355
|
||||
SUPPORTED_DEVICES += re355
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re355-v1
|
||||
|
||||
define Device/tplink_re450-v1
|
||||
$(Device/tplink_rex5x-v1)
|
||||
DEVICE_MODEL := RE450
|
||||
DEVICE_VARIANT := v1
|
||||
TPLINK_BOARD_ID := RE450
|
||||
SUPPORTED_DEVICES += re450
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re450-v1
|
||||
|
||||
define Device/tplink_re450-v2
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := qca9563
|
||||
IMAGE_SIZE := 6016k
|
||||
DEVICE_MODEL := RE450
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
|
||||
TPLINK_BOARD_ID := RE450-V2
|
||||
LOADER_TYPE := elf
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re450-v2
|
||||
|
||||
define Device/tplink_re450-v3
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := qca9563
|
||||
|
@ -1,5 +1,44 @@
|
||||
include ./common-tp-link.mk
|
||||
|
||||
define Device/tplink_rex5x-v1
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := qca9558
|
||||
IMAGE_SIZE := 6016k
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
|
||||
DEFAULT := n
|
||||
endef
|
||||
|
||||
define Device/tplink_re355-v1
|
||||
$(Device/tplink_rex5x-v1)
|
||||
DEVICE_MODEL := RE355
|
||||
DEVICE_VARIANT := v1
|
||||
TPLINK_BOARD_ID := RE355
|
||||
SUPPORTED_DEVICES += re355
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re355-v1
|
||||
|
||||
define Device/tplink_re450-v1
|
||||
$(Device/tplink_rex5x-v1)
|
||||
DEVICE_MODEL := RE450
|
||||
DEVICE_VARIANT := v1
|
||||
TPLINK_BOARD_ID := RE450
|
||||
SUPPORTED_DEVICES += re450
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re450-v1
|
||||
|
||||
define Device/tplink_re450-v2
|
||||
$(Device/tplink-safeloader)
|
||||
SOC := qca9563
|
||||
IMAGE_SIZE := 6016k
|
||||
DEVICE_MODEL := RE450
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
|
||||
TPLINK_BOARD_ID := RE450-V2
|
||||
LOADER_TYPE := elf
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re450-v2
|
||||
|
||||
define Device/tplink_tl-mr10u
|
||||
$(Device/tplink-4mlzma)
|
||||
SOC := ar9331
|
||||
|
@ -59,6 +59,12 @@ on,n150r)
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02" "0x0f"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04" "0x0f"
|
||||
;;
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1|\
|
||||
tplink,re450-v2)
|
||||
ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan_data" "eth0" "tx rx"
|
||||
ucidef_set_led_netdev "lan_link" "LAN Link" "green:lan_link" "eth0" "link"
|
||||
;;
|
||||
tplink,tl-mr3020-v1|\
|
||||
tplink,tl-mr3040-v2|\
|
||||
tplink,tl-wa701nd-v1|\
|
||||
|
@ -16,6 +16,9 @@ ath79_setup_interfaces()
|
||||
engenius,eap350-v1|\
|
||||
engenius,ecb350-v1|\
|
||||
pqi,air-pen|\
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1|\
|
||||
tplink,re450-v2|\
|
||||
tplink,tl-mr10u|\
|
||||
tplink,tl-mr3020-v1|\
|
||||
tplink,tl-mr3040-v2|\
|
||||
|
@ -423,7 +423,7 @@ Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
|
||||
v3d_switch_perfmon(v3d, &job->base);
|
||||
|
||||
/* XXX: Set the QCFG */
|
||||
@@ -190,6 +301,7 @@ v3d_tfu_job_run(struct drm_sched_job *sc
|
||||
@@ -194,6 +305,7 @@ v3d_tfu_job_run(struct drm_sched_job *sc
|
||||
|
||||
trace_v3d_submit_tfu(dev, to_v3d_fence(fence)->seqno);
|
||||
|
||||
@ -431,7 +431,7 @@ Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
|
||||
V3D_WRITE(V3D_TFU_IIA, job->args.iia);
|
||||
V3D_WRITE(V3D_TFU_IIS, job->args.iis);
|
||||
V3D_WRITE(V3D_TFU_ICA, job->args.ica);
|
||||
@@ -231,6 +343,7 @@ v3d_csd_job_run(struct drm_sched_job *sc
|
||||
@@ -238,6 +350,7 @@ v3d_csd_job_run(struct drm_sched_job *sc
|
||||
|
||||
trace_v3d_submit_csd(dev, to_v3d_fence(fence)->seqno);
|
||||
|
||||
@ -439,7 +439,7 @@ Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
|
||||
v3d_switch_perfmon(v3d, &job->base);
|
||||
|
||||
for (i = 1; i <= 6; i++)
|
||||
@@ -247,7 +360,10 @@ v3d_cache_clean_job_run(struct drm_sched
|
||||
@@ -254,7 +367,10 @@ v3d_cache_clean_job_run(struct drm_sched
|
||||
struct v3d_job *job = to_v3d_job(sched_job);
|
||||
struct v3d_dev *v3d = job->v3d;
|
||||
|
||||
@ -450,7 +450,7 @@ Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -385,8 +501,18 @@ v3d_sched_init(struct v3d_dev *v3d)
|
||||
@@ -392,8 +508,18 @@ v3d_sched_init(struct v3d_dev *v3d)
|
||||
int hw_jobs_limit = 1;
|
||||
int job_hang_limit = 0;
|
||||
int hang_limit_ms = 500;
|
||||
@ -469,7 +469,7 @@ Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
|
||||
ret = drm_sched_init(&v3d->queue[V3D_BIN].sched,
|
||||
&v3d_bin_sched_ops,
|
||||
hw_jobs_limit, job_hang_limit,
|
||||
@@ -440,9 +566,20 @@ void
|
||||
@@ -447,9 +573,20 @@ void
|
||||
v3d_sched_fini(struct v3d_dev *v3d)
|
||||
{
|
||||
enum v3d_queue q;
|
||||
|
@ -600,7 +600,7 @@ v2: fix kernel panic with debug-fs interface to list registers
|
||||
static struct dma_fence *
|
||||
v3d_tfu_job_run(struct drm_sched_job *sched_job)
|
||||
{
|
||||
@@ -302,20 +304,22 @@ v3d_tfu_job_run(struct drm_sched_job *sc
|
||||
@@ -306,20 +308,22 @@ v3d_tfu_job_run(struct drm_sched_job *sc
|
||||
trace_v3d_submit_tfu(dev, to_v3d_fence(fence)->seqno);
|
||||
|
||||
v3d_sched_stats_add_job(&v3d->gpu_queue_stats[V3D_TFU], sched_job);
|
||||
@ -635,16 +635,16 @@ v2: fix kernel panic with debug-fs interface to list registers
|
||||
|
||||
return fence;
|
||||
}
|
||||
@@ -327,7 +331,7 @@ v3d_csd_job_run(struct drm_sched_job *sc
|
||||
@@ -331,7 +335,7 @@ v3d_csd_job_run(struct drm_sched_job *sc
|
||||
struct v3d_dev *v3d = job->base.v3d;
|
||||
struct drm_device *dev = &v3d->drm;
|
||||
struct dma_fence *fence;
|
||||
- int i;
|
||||
+ int i, csd_cfg0_reg, csd_cfg_reg_count;
|
||||
|
||||
v3d->csd_job = job;
|
||||
|
||||
@@ -346,10 +350,12 @@ v3d_csd_job_run(struct drm_sched_job *sc
|
||||
if (unlikely(job->base.base.s_fence->finished.error))
|
||||
return NULL;
|
||||
@@ -353,10 +357,12 @@ v3d_csd_job_run(struct drm_sched_job *sc
|
||||
v3d_sched_stats_add_job(&v3d->gpu_queue_stats[V3D_CSD], sched_job);
|
||||
v3d_switch_perfmon(v3d, &job->base);
|
||||
|
||||
@ -660,7 +660,7 @@ v2: fix kernel panic with debug-fs interface to list registers
|
||||
|
||||
return fence;
|
||||
}
|
||||
@@ -452,7 +458,8 @@ v3d_csd_job_timedout(struct drm_sched_jo
|
||||
@@ -459,7 +465,8 @@ v3d_csd_job_timedout(struct drm_sched_jo
|
||||
{
|
||||
struct v3d_csd_job *job = to_csd_job(sched_job);
|
||||
struct v3d_dev *v3d = job->base.v3d;
|
||||
|
@ -1,60 +0,0 @@
|
||||
From 87fc066350358ce45f5ad52424c8a2e351b1720c Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Tue, 7 Jan 2025 12:05:41 +0000
|
||||
Subject: [PATCH] dts: bcm2711: PL011 UARTs are actually r1p5
|
||||
|
||||
The ARM PL011 UART instances in BCM2711 are r1p5 spec, which means they
|
||||
have 32-entry FIFOs. The correct periphid value for this is 0x00341011.
|
||||
Thanks to N Buchwitz for pointing this out.
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm2711.dtsi | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
|
||||
@@ -134,7 +134,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
- arm,primecell-periphid = <0x00241011>;
|
||||
+ arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
- arm,primecell-periphid = <0x00241011>;
|
||||
+ arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
- arm,primecell-periphid = <0x00241011>;
|
||||
+ arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
<&clocks BCM2835_CLOCK_VPU>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
- arm,primecell-periphid = <0x00241011>;
|
||||
+ arm,primecell-periphid = <0x00341011>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -1155,6 +1155,7 @@
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
+ arm,primecell-periphid = <0x00341011>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
@ -20,17 +20,6 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 2 --
|
||||
2 files changed, 4 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
|
||||
@@ -451,8 +451,6 @@
|
||||
IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
|
||||
IRQ_TYPE_LEVEL_LOW)>;
|
||||
- /* This only applies to the ARMv7 stub */
|
||||
- arm,cpu-registers-not-fw-configured;
|
||||
};
|
||||
|
||||
cpus: cpus {
|
||||
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
|
||||
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
|
||||
@@ -741,8 +741,6 @@
|
||||
|
@ -1,61 +0,0 @@
|
||||
From 5258ca4ad089548a72657522443b9c3e46fd125b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ma=C3=ADra=20Canal?= <mcanal@igalia.com>
|
||||
Date: Sat, 22 Feb 2025 14:40:21 -0300
|
||||
Subject: [PATCH] drm/v3d: Don't run jobs that have errors flagged in its fence
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The V3D driver still relies on `drm_sched_increase_karma()` and
|
||||
`drm_sched_resubmit_jobs()` for resubmissions when a timeout occurs.
|
||||
The function `drm_sched_increase_karma()` marks the job as guilty, while
|
||||
`drm_sched_resubmit_jobs()` sets an error (-ECANCELED) in the DMA fence of
|
||||
that guilty job.
|
||||
|
||||
Because of this, we must check whether the job’s DMA fence has been
|
||||
flagged with an error before executing the job. Otherwise, the same guilty
|
||||
job may be resubmitted indefinitely, causing repeated GPU resets.
|
||||
|
||||
This patch adds a check for an error on the job's fence to prevent running
|
||||
a guilty job that was previously flagged when the GPU timed out.
|
||||
|
||||
Note that the CPU and CACHE_CLEAN queues do not require this check, as
|
||||
their jobs are executed synchronously once the DRM scheduler starts them.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: d223f98f0209 ("drm/v3d: Add support for compute shader dispatch.")
|
||||
Fixes: 1584f16ca96e ("drm/v3d: Add support for submitting jobs to the TFU.")
|
||||
Signed-off-by: Maíra Canal <mcanal@igalia.com>
|
||||
---
|
||||
drivers/gpu/drm/v3d/v3d_sched.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/gpu/drm/v3d/v3d_sched.c
|
||||
+++ b/drivers/gpu/drm/v3d/v3d_sched.c
|
||||
@@ -292,11 +292,15 @@ v3d_tfu_job_run(struct drm_sched_job *sc
|
||||
struct drm_device *dev = &v3d->drm;
|
||||
struct dma_fence *fence;
|
||||
|
||||
+ if (unlikely(job->base.base.s_fence->finished.error))
|
||||
+ return NULL;
|
||||
+
|
||||
+ v3d->tfu_job = job;
|
||||
+
|
||||
fence = v3d_fence_create(v3d, V3D_TFU);
|
||||
if (IS_ERR(fence))
|
||||
return NULL;
|
||||
|
||||
- v3d->tfu_job = job;
|
||||
if (job->base.irq_fence)
|
||||
dma_fence_put(job->base.irq_fence);
|
||||
job->base.irq_fence = dma_fence_get(fence);
|
||||
@@ -333,6 +337,9 @@ v3d_csd_job_run(struct drm_sched_job *sc
|
||||
struct dma_fence *fence;
|
||||
int i, csd_cfg0_reg, csd_cfg_reg_count;
|
||||
|
||||
+ if (unlikely(job->base.base.s_fence->finished.error))
|
||||
+ return NULL;
|
||||
+
|
||||
v3d->csd_job = job;
|
||||
|
||||
v3d_invalidate_caches(v3d);
|
@ -15,7 +15,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||
@@ -439,7 +439,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e
|
||||
@@ -425,7 +425,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e
|
||||
}
|
||||
|
||||
int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry,
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
{
|
||||
struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry);
|
||||
u32 *ib2 = mtk_foe_entry_ib2(eth, entry);
|
||||
@@ -451,6 +452,7 @@ int mtk_foe_entry_set_wdma(struct mtk_et
|
||||
@@ -437,6 +438,7 @@ int mtk_foe_entry_set_wdma(struct mtk_et
|
||||
MTK_FOE_IB2_WDMA_WINFO_V2;
|
||||
l2->w3info = FIELD_PREP(MTK_FOE_WINFO_WCID_V3, wcid) |
|
||||
FIELD_PREP(MTK_FOE_WINFO_BSS_V3, bss);
|
||||
@ -65,7 +65,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
};
|
||||
|
||||
/* software-only entry type */
|
||||
@@ -394,7 +394,8 @@ int mtk_foe_entry_set_vlan(struct mtk_et
|
||||
@@ -392,7 +392,8 @@ int mtk_foe_entry_set_vlan(struct mtk_et
|
||||
int mtk_foe_entry_set_pppoe(struct mtk_eth *eth, struct mtk_foe_entry *entry,
|
||||
int sid);
|
||||
int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry,
|
||||
|
@ -358,7 +358,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
} else {
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -630,7 +641,9 @@ int mtk_eth_setup_tc(struct net_device *
|
||||
@@ -633,7 +644,9 @@ int mtk_eth_setup_tc(struct net_device *
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,34 +23,23 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||
MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
|
||||
MAC_MCR_FORCE_RX_FC);
|
||||
|
||||
@@ -811,6 +812,18 @@ static void mtk_mac_link_up(struct phyli
|
||||
@@ -811,6 +812,15 @@ static void mtk_mac_link_up(struct phyli
|
||||
if (rx_pause)
|
||||
mcr |= MAC_MCR_FORCE_RX_FC;
|
||||
|
||||
+ if (mode == MLO_AN_PHY && phy && phy_init_eee(phy, false) >= 0) {
|
||||
+ switch (speed) {
|
||||
+ case SPEED_2500:
|
||||
+ case SPEED_1000:
|
||||
+ mcr |= MAC_MCR_EEE1G;
|
||||
+ break;
|
||||
+ case SPEED_100:
|
||||
+ mcr |= MAC_MCR_EEE100M;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (mode == MLO_AN_PHY && phy && mac->tx_lpi_enabled && phy_init_eee(phy, false) >= 0) {
|
||||
+ mcr |= MAC_MCR_EEE100M | MAC_MCR_EEE1G;
|
||||
+ mtk_w32(mac->hw,
|
||||
+ FIELD_PREP(MAC_EEE_WAKEUP_TIME_1000, 17) |
|
||||
+ FIELD_PREP(MAC_EEE_WAKEUP_TIME_100, 36) |
|
||||
+ FIELD_PREP(MAC_EEE_LPI_TXIDLE_THD, mac->txidle_thd_ms),
|
||||
+ MTK_MAC_EEECR(mac->id));
|
||||
+ }
|
||||
+
|
||||
mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK;
|
||||
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
|
||||
}
|
||||
@@ -3956,6 +3969,7 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||
continue;
|
||||
|
||||
mtk_w32(eth, MAC_MCR_FORCE_LINK_DOWN, MTK_MAC_MCR(i));
|
||||
+ mtk_w32(eth, FIELD_PREP(MAC_EEE_LPI_TXIDLE_THD, 1), MTK_MAC_EEECR(i));
|
||||
mtk_set_mcr_max_rx(netdev_priv(dev),
|
||||
dev->mtu + MTK_RX_ETH_HLEN);
|
||||
}
|
||||
@@ -4476,6 +4490,55 @@ static int mtk_set_pauseparam(struct net
|
||||
@@ -4476,6 +4486,61 @@ static int mtk_set_pauseparam(struct net
|
||||
return phylink_ethtool_set_pauseparam(mac->phylink, pause);
|
||||
}
|
||||
|
||||
@ -65,7 +54,7 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||
+ return ret;
|
||||
+
|
||||
+ reg = mtk_r32(mac->hw, MTK_MAC_EEECR(mac->id));
|
||||
+ eee->tx_lpi_enabled = !(reg & MAC_EEE_LPI_MODE);
|
||||
+ eee->tx_lpi_enabled = mac->tx_lpi_enabled;
|
||||
+ eee->tx_lpi_timer = FIELD_GET(MAC_EEE_LPI_TXIDLE_THD, reg) * 1000;
|
||||
+
|
||||
+ return 0;
|
||||
@ -98,7 +87,13 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ mac->tx_lpi_enabled = eee->tx_lpi_enabled;
|
||||
+ mac->txidle_thd_ms = txidle_thd_ms;
|
||||
+ mtk_w32(mac->hw, reg, MTK_MAC_EEECR(mac->id));
|
||||
+ if (eee->eee_enabled && eee->eee_active && eee->tx_lpi_enabled)
|
||||
+ mtk_m32(mac->hw, 0, MAC_MCR_EEE100M | MAC_MCR_EEE1G, MTK_MAC_MCR(mac->id));
|
||||
+ else
|
||||
+ mtk_m32(mac->hw, MAC_MCR_EEE100M | MAC_MCR_EEE1G, 0, MTK_MAC_MCR(mac->id));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
@ -106,7 +101,7 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||
static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
struct net_device *sb_dev)
|
||||
{
|
||||
@@ -4508,6 +4571,8 @@ static const struct ethtool_ops mtk_etht
|
||||
@@ -4508,6 +4573,8 @@ static const struct ethtool_ops mtk_etht
|
||||
.set_pauseparam = mtk_set_pauseparam,
|
||||
.get_rxnfc = mtk_get_rxnfc,
|
||||
.set_rxnfc = mtk_set_rxnfc,
|
||||
@ -115,6 +110,15 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||
};
|
||||
|
||||
static const struct net_device_ops mtk_netdev_ops = {
|
||||
@@ -4568,6 +4635,8 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
}
|
||||
mac = netdev_priv(eth->netdev[id]);
|
||||
eth->mac[id] = mac;
|
||||
+ mac->tx_lpi_enabled = true;
|
||||
+ mac->txidle_thd_ms = 1;
|
||||
mac->id = id;
|
||||
mac->hw = eth;
|
||||
mac->of_node = np;
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -453,6 +453,8 @@
|
||||
@ -142,3 +146,12 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||
/* Mac status registers */
|
||||
#define MTK_MAC_MSR(x) (0x10108 + (x * 0x100))
|
||||
#define MAC_MSR_EEE1G BIT(7)
|
||||
@@ -1321,6 +1332,8 @@ struct mtk_mac {
|
||||
int id;
|
||||
phy_interface_t interface;
|
||||
u8 ppe_idx;
|
||||
+ bool tx_lpi_enabled;
|
||||
+ u8 txidle_thd_ms;
|
||||
int speed;
|
||||
struct device_node *of_node;
|
||||
struct phylink *phylink;
|
||||
|
@ -37,7 +37,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
|
||||
.glo_cfg = 0x4604,
|
||||
.rst_idx = 0x4608,
|
||||
.delay_irq = 0x460c,
|
||||
@@ -3898,6 +3901,56 @@ static void mtk_set_mcr_max_rx(struct mt
|
||||
@@ -3895,6 +3898,56 @@ static void mtk_set_mcr_max_rx(struct mt
|
||||
mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
|
||||
static void mtk_hw_reset(struct mtk_eth *eth)
|
||||
{
|
||||
u32 val;
|
||||
@@ -4358,6 +4411,8 @@ static void mtk_pending_work(struct work
|
||||
@@ -4354,6 +4407,8 @@ static void mtk_pending_work(struct work
|
||||
rtnl_lock();
|
||||
set_bit(MTK_RESETTING, ð->state);
|
||||
|
||||
|
@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
case RTN_THROW:
|
||||
case RTN_UNREACHABLE:
|
||||
default:
|
||||
@@ -4551,6 +4570,17 @@ static int ip6_pkt_prohibit_out(struct n
|
||||
@@ -4554,6 +4573,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 <jogo@openwrt.org>
|
||||
/*
|
||||
* Allocate a dst for local (unicast / anycast) address.
|
||||
*/
|
||||
@@ -5042,7 +5072,8 @@ static int rtm_to_fib6_config(struct sk_
|
||||
@@ -5045,7 +5075,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 <jogo@openwrt.org>
|
||||
cfg->fc_flags |= RTF_REJECT;
|
||||
|
||||
if (rtm->rtm_type == RTN_LOCAL)
|
||||
@@ -6304,6 +6335,8 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -6307,6 +6338,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 <jogo@openwrt.org>
|
||||
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
|
||||
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
|
||||
#endif
|
||||
@@ -6315,6 +6348,7 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -6318,6 +6351,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 <jogo@openwrt.org>
|
||||
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
|
||||
#endif
|
||||
}
|
||||
@@ -6515,6 +6549,8 @@ static int __net_init ip6_route_net_init
|
||||
@@ -6518,6 +6552,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 <jogo@openwrt.org>
|
||||
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
|
||||
sizeof(*net->ipv6.ip6_prohibit_entry),
|
||||
GFP_KERNEL);
|
||||
@@ -6525,11 +6561,21 @@ static int __net_init ip6_route_net_init
|
||||
@@ -6528,11 +6564,21 @@ static int __net_init ip6_route_net_init
|
||||
ip6_template_metrics, true);
|
||||
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached);
|
||||
|
||||
@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
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);
|
||||
@@ -6556,6 +6602,8 @@ out:
|
||||
@@ -6559,6 +6605,8 @@ out:
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
out_ip6_prohibit_entry:
|
||||
kfree(net->ipv6.ip6_prohibit_entry);
|
||||
out_ip6_null_entry:
|
||||
@@ -6575,6 +6623,7 @@ static void __net_exit ip6_route_net_exi
|
||||
@@ -6578,6 +6626,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 <jogo@openwrt.org>
|
||||
kfree(net->ipv6.ip6_blk_hole_entry);
|
||||
#endif
|
||||
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
|
||||
@@ -6658,6 +6707,9 @@ void __init ip6_route_init_special_entri
|
||||
@@ -6661,6 +6710,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);
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -5101,6 +5101,8 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -5105,6 +5105,8 @@ static int mtk_probe(struct platform_dev
|
||||
* for NAPI to work
|
||||
*/
|
||||
init_dummy_netdev(ð->dummy_dev);
|
||||
|
@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3148,11 +3148,19 @@ static int mtk_dma_init(struct mtk_eth *
|
||||
@@ -3145,11 +3145,19 @@ static int mtk_dma_init(struct mtk_eth *
|
||||
static void mtk_dma_free(struct mtk_eth *eth)
|
||||
{
|
||||
const struct mtk_soc_data *soc = eth->soc;
|
||||
|
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -1347,6 +1347,22 @@ struct mtk_mac {
|
||||
@@ -1349,6 +1349,22 @@ struct mtk_mac {
|
||||
/* the struct describing the SoC. these are declared in the soc_xyz.c files */
|
||||
extern const struct of_device_id of_mtk_match[];
|
||||
|
||||
@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static inline bool mtk_is_netsys_v1(struct mtk_eth *eth)
|
||||
{
|
||||
return eth->soc->version == 1;
|
||||
@@ -1361,6 +1377,7 @@ static inline bool mtk_is_netsys_v3_or_g
|
||||
@@ -1363,6 +1379,7 @@ static inline bool mtk_is_netsys_v3_or_g
|
||||
{
|
||||
return eth->soc->version > 2;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#include <net/page_pool/helpers.h>
|
||||
|
||||
#include "mtk_eth_soc.h"
|
||||
@@ -1609,12 +1610,28 @@ static void mtk_wake_queue(struct mtk_et
|
||||
@@ -1606,12 +1607,28 @@ static void mtk_wake_queue(struct mtk_et
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
bool gso = false;
|
||||
int tx_num;
|
||||
|
||||
@@ -1636,6 +1653,18 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
@@ -1633,6 +1650,18 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* TSO: fill MSS info in tcp checksum field */
|
||||
if (skb_is_gso(skb)) {
|
||||
if (skb_cow_head(skb, 0)) {
|
||||
@@ -1651,8 +1680,14 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
@@ -1648,8 +1677,14 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -2153,7 +2153,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -2150,7 +2150,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
if (ret != XDP_PASS)
|
||||
goto skip_rx;
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (unlikely(!skb)) {
|
||||
page_pool_put_full_page(ring->page_pool,
|
||||
page, true);
|
||||
@@ -2191,7 +2191,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
@@ -2188,7 +2188,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
dma_unmap_single(eth->dma_dev, ((u64)trxd.rxd1 | addr64),
|
||||
ring->buf_size, DMA_FROM_DEVICE);
|
||||
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Chad Monroe <chad@monroe.io>
|
||||
/* QDMA Flow Control Register */
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3322,12 +3322,14 @@ static int mtk_start_dma(struct mtk_eth
|
||||
@@ -3319,12 +3319,14 @@ static int mtk_start_dma(struct mtk_eth
|
||||
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
|
||||
MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE;
|
||||
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -1185,7 +1185,7 @@ static int mtk_init_fq_dma(struct mtk_et
|
||||
@@ -1182,7 +1182,7 @@ static int mtk_init_fq_dma(struct mtk_et
|
||||
if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr)))
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||
@@ -477,42 +477,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
|
||||
@@ -479,42 +479,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, entry->hash);
|
||||
|
||||
hwe->ib1 &= ~MTK_FOE_IB1_STATE;
|
||||
@@ -533,7 +534,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
|
||||
@@ -535,7 +536,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
|
||||
if (entry->type != MTK_FLOW_TYPE_L2_SUBFLOW)
|
||||
return;
|
||||
|
||||
@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
kfree(entry);
|
||||
}
|
||||
|
||||
@@ -549,66 +551,55 @@ static int __mtk_foe_entry_idle_time(str
|
||||
@@ -551,66 +553,55 @@ static int __mtk_foe_entry_idle_time(str
|
||||
return now - timestamp;
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -651,7 +642,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
|
||||
@@ -653,7 +644,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
|
||||
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
|
||||
{
|
||||
spin_lock_bh(&ppe_lock);
|
||||
@ -191,7 +191,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
spin_unlock_bh(&ppe_lock);
|
||||
}
|
||||
|
||||
@@ -698,8 +690,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
|
||||
@@ -700,8 +692,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
|
||||
{
|
||||
const struct mtk_soc_data *soc = ppe->eth->soc;
|
||||
struct mtk_flow_entry *flow_info;
|
||||
@ -201,7 +201,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP;
|
||||
int type;
|
||||
|
||||
@@ -707,30 +699,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
|
||||
@@ -709,30 +701,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
|
||||
if (!flow_info)
|
||||
return;
|
||||
|
||||
@ -242,7 +242,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)
|
||||
@@ -740,9 +732,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
|
||||
@@ -742,9 +734,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
|
||||
struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, hash);
|
||||
struct mtk_flow_entry *entry;
|
||||
struct mtk_foe_bridge key = {};
|
||||
@ -254,7 +254,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u8 *tag;
|
||||
|
||||
spin_lock_bh(&ppe_lock);
|
||||
@@ -750,20 +744,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
|
||||
@@ -752,20 +746,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
|
||||
if (FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == MTK_FOE_STATE_BIND)
|
||||
goto out;
|
||||
|
||||
@ -281,7 +281,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -814,9 +802,17 @@ out:
|
||||
@@ -816,9 +804,17 @@ out:
|
||||
|
||||
int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
|
||||
{
|
@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void mtk_ppe_cache_clear(struct mtk_ppe *ppe)
|
||||
@@ -520,14 +534,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
|
||||
@@ -522,14 +536,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
|
||||
hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID);
|
||||
dma_wmb();
|
||||
mtk_ppe_cache_clear(ppe);
|
||||
@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
entry->hash = 0xffff;
|
||||
|
||||
@@ -552,11 +558,14 @@ static int __mtk_foe_entry_idle_time(str
|
||||
@@ -554,11 +560,14 @@ static int __mtk_foe_entry_idle_time(str
|
||||
}
|
||||
|
||||
static bool
|
||||
@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int len;
|
||||
|
||||
if (hash == 0xffff)
|
||||
@@ -567,18 +576,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp
|
||||
@@ -569,18 +578,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp
|
||||
memcpy(&foe, hwe, len);
|
||||
|
||||
if (!mtk_flow_entry_match(ppe->eth, entry, &foe, len) ||
|
||||
@ -156,7 +156,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct mtk_flow_entry *cur;
|
||||
struct hlist_node *tmp;
|
||||
int idle;
|
||||
@@ -587,7 +613,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe
|
||||
@@ -589,7 +615,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe
|
||||
hlist_for_each_entry_safe(cur, tmp, &entry->l2_flows, l2_list) {
|
||||
int cur_idle;
|
||||
|
||||
@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
__mtk_foe_entry_clear(ppe, entry, false);
|
||||
continue;
|
||||
}
|
||||
@@ -602,10 +630,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe
|
||||
@@ -604,10 +632,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct mtk_eth *eth = ppe->eth;
|
||||
u16 timestamp = mtk_eth_timestamp(eth);
|
||||
struct mtk_foe_entry *hwe;
|
||||
@@ -636,6 +683,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
|
||||
@@ -638,6 +685,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
|
||||
|
||||
dma_wmb();
|
||||
|
||||
@ -210,7 +210,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
mtk_ppe_cache_clear(ppe);
|
||||
}
|
||||
|
||||
@@ -800,21 +853,6 @@ out:
|
||||
@@ -802,21 +855,6 @@ out:
|
||||
spin_unlock_bh(&ppe_lock);
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int mtk_ppe_prepare_reset(struct mtk_ppe *ppe)
|
||||
{
|
||||
if (!ppe)
|
||||
@@ -842,32 +880,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
|
||||
@@ -844,32 +882,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
|
||||
return mtk_ppe_wait_busy(ppe);
|
||||
}
|
||||
|
||||
@ -284,7 +284,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash);
|
||||
|
||||
@@ -396,9 +399,8 @@ int mtk_foe_entry_set_queue(struct mtk_e
|
||||
@@ -397,9 +400,8 @@ int mtk_foe_entry_set_queue(struct mtk_e
|
||||
unsigned int queue);
|
||||
int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
|
||||
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
|
||||
@ -309,7 +309,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
seq_printf(m, "%05x %s %7s", i,
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
|
||||
@@ -501,24 +501,21 @@ static int
|
||||
@@ -516,24 +516,21 @@ static int
|
||||
mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
|
||||
{
|
||||
struct mtk_flow_entry *entry;
|
@ -426,7 +426,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
u32 mcr;
|
||||
|
||||
mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
|
||||
@@ -829,9 +916,63 @@ static void mtk_mac_link_up(struct phyli
|
||||
@@ -826,9 +913,63 @@ static void mtk_mac_link_up(struct phyli
|
||||
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
.mac_finish = mtk_mac_finish,
|
||||
.mac_link_down = mtk_mac_link_down,
|
||||
.mac_link_up = mtk_mac_link_up,
|
||||
@@ -3430,6 +3571,9 @@ static int mtk_open(struct net_device *d
|
||||
@@ -3427,6 +3568,9 @@ static int mtk_open(struct net_device *d
|
||||
|
||||
ppe_num = eth->soc->ppe_num;
|
||||
|
||||
@ -500,7 +500,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
|
||||
if (err) {
|
||||
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
|
||||
@@ -3580,6 +3724,9 @@ static int mtk_stop(struct net_device *d
|
||||
@@ -3577,6 +3721,9 @@ static int mtk_stop(struct net_device *d
|
||||
for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
|
||||
mtk_ppe_stop(eth->ppe[i]);
|
||||
|
||||
@ -510,7 +510,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4645,6 +4792,7 @@ static const struct net_device_ops mtk_n
|
||||
@@ -4647,6 +4794,7 @@ static const struct net_device_ops mtk_n
|
||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||
{
|
||||
const __be32 *_id = of_get_property(np, "reg", NULL);
|
||||
@ -518,7 +518,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
phy_interface_t phy_mode;
|
||||
struct phylink *phylink;
|
||||
struct mtk_mac *mac;
|
||||
@@ -4681,16 +4829,41 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -4685,16 +4833,41 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
mac->id = id;
|
||||
mac->hw = eth;
|
||||
mac->of_node = np;
|
||||
@ -568,7 +568,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
}
|
||||
|
||||
memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip));
|
||||
@@ -4773,8 +4946,21 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -4777,8 +4950,21 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
phy_interface_zero(mac->phylink_config.supported_interfaces);
|
||||
__set_bit(PHY_INTERFACE_MODE_INTERNAL,
|
||||
mac->phylink_config.supported_interfaces);
|
||||
@ -590,7 +590,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
phylink = phylink_create(&mac->phylink_config,
|
||||
of_fwnode_handle(mac->of_node),
|
||||
phy_mode, &mtk_phylink_ops);
|
||||
@@ -4825,6 +5011,26 @@ free_netdev:
|
||||
@@ -4829,6 +5015,26 @@ free_netdev:
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -617,7 +617,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev)
|
||||
{
|
||||
struct net_device *dev, *tmp;
|
||||
@@ -4971,7 +5177,8 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -4975,7 +5181,8 @@ static int mtk_probe(struct platform_dev
|
||||
regmap_write(cci, 0, 3);
|
||||
}
|
||||
|
||||
@ -627,7 +627,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
err = mtk_sgmii_init(eth);
|
||||
|
||||
if (err)
|
||||
@@ -5082,6 +5289,24 @@ static int mtk_probe(struct platform_dev
|
||||
@@ -5086,6 +5293,24 @@ static int mtk_probe(struct platform_dev
|
||||
}
|
||||
}
|
||||
|
||||
@ -652,7 +652,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
|
||||
err = devm_request_irq(eth->dev, eth->irq[0],
|
||||
mtk_handle_irq, 0,
|
||||
@@ -5185,6 +5410,11 @@ static int mtk_remove(struct platform_de
|
||||
@@ -5189,6 +5414,11 @@ static int mtk_remove(struct platform_de
|
||||
mtk_stop(eth->netdev[i]);
|
||||
mac = netdev_priv(eth->netdev[i]);
|
||||
phylink_disconnect_phy(mac->phylink);
|
||||
@ -893,7 +893,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
struct mtk_tx_dma_desc_info {
|
||||
dma_addr_t addr;
|
||||
@@ -1336,6 +1393,9 @@ struct mtk_mac {
|
||||
@@ -1338,6 +1395,9 @@ struct mtk_mac {
|
||||
struct device_node *of_node;
|
||||
struct phylink *phylink;
|
||||
struct phylink_config phylink_config;
|
||||
@ -903,7 +903,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
struct mtk_eth *hw;
|
||||
struct mtk_hw_stats *hw_stats;
|
||||
__be32 hwlro_ip[MTK_MAX_LRO_IP_CNT];
|
||||
@@ -1459,6 +1519,19 @@ static inline u32 mtk_get_ib2_multicast_
|
||||
@@ -1461,6 +1521,19 @@ static inline u32 mtk_get_ib2_multicast_
|
||||
return MTK_FOE_IB2_MULTICAST;
|
||||
}
|
||||
|
||||
@ -923,7 +923,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
/* read the hardware status register */
|
||||
void mtk_stats_update_mac(struct mtk_mac *mac);
|
||||
|
||||
@@ -1467,8 +1540,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
|
||||
@@ -1469,8 +1542,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
|
||||
u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg);
|
||||
|
||||
int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id);
|
||||
|
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -5446,7 +5446,7 @@ static const struct mtk_soc_data mt2701_
|
||||
@@ -5450,7 +5450,7 @@ static const struct mtk_soc_data mt2701_
|
||||
.desc_size = sizeof(struct mtk_rx_dma),
|
||||
.irq_done_mask = MTK_RX_DONE_INT,
|
||||
.dma_l4_valid = RX_DMA_L4_VALID,
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
},
|
||||
@@ -5474,7 +5474,7 @@ static const struct mtk_soc_data mt7621_
|
||||
@@ -5478,7 +5478,7 @@ static const struct mtk_soc_data mt7621_
|
||||
.desc_size = sizeof(struct mtk_rx_dma),
|
||||
.irq_done_mask = MTK_RX_DONE_INT,
|
||||
.dma_l4_valid = RX_DMA_L4_VALID,
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
},
|
||||
@@ -5504,7 +5504,7 @@ static const struct mtk_soc_data mt7622_
|
||||
@@ -5508,7 +5508,7 @@ static const struct mtk_soc_data mt7622_
|
||||
.desc_size = sizeof(struct mtk_rx_dma),
|
||||
.irq_done_mask = MTK_RX_DONE_INT,
|
||||
.dma_l4_valid = RX_DMA_L4_VALID,
|
||||
@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
},
|
||||
@@ -5533,7 +5533,7 @@ static const struct mtk_soc_data mt7623_
|
||||
@@ -5537,7 +5537,7 @@ static const struct mtk_soc_data mt7623_
|
||||
.desc_size = sizeof(struct mtk_rx_dma),
|
||||
.irq_done_mask = MTK_RX_DONE_INT,
|
||||
.dma_l4_valid = RX_DMA_L4_VALID,
|
||||
@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
},
|
||||
@@ -5559,7 +5559,7 @@ static const struct mtk_soc_data mt7629_
|
||||
@@ -5563,7 +5563,7 @@ static const struct mtk_soc_data mt7629_
|
||||
.desc_size = sizeof(struct mtk_rx_dma),
|
||||
.irq_done_mask = MTK_RX_DONE_INT,
|
||||
.dma_l4_valid = RX_DMA_L4_VALID,
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
},
|
||||
@@ -5591,7 +5591,7 @@ static const struct mtk_soc_data mt7981_
|
||||
@@ -5595,7 +5595,7 @@ static const struct mtk_soc_data mt7981_
|
||||
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5621,7 +5621,7 @@ static const struct mtk_soc_data mt7986_
|
||||
@@ -5625,7 +5625,7 @@ static const struct mtk_soc_data mt7986_
|
||||
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5674,7 +5674,7 @@ static const struct mtk_soc_data rt5350_
|
||||
@@ -5678,7 +5678,7 @@ static const struct mtk_soc_data rt5350_
|
||||
.dma_l4_valid = RX_DMA_L4_VALID_PDMA,
|
||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||
.dma_len_offset = 16,
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
help
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -4566,6 +4566,7 @@ static int mtk_get_sset_count(struct net
|
||||
@@ -4562,6 +4562,7 @@ static int mtk_get_sset_count(struct net
|
||||
|
||||
static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data)
|
||||
{
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct page_pool_stats stats = {};
|
||||
int i;
|
||||
|
||||
@@ -4578,6 +4579,7 @@ static void mtk_ethtool_pp_stats(struct
|
||||
@@ -4574,6 +4575,7 @@ static void mtk_ethtool_pp_stats(struct
|
||||
page_pool_get_stats(ring->page_pool, &stats);
|
||||
}
|
||||
page_pool_ethtool_stats_get(data, &stats);
|
||||
|
@ -5,8 +5,11 @@ case "$(board_name)" in
|
||||
bananapi,bpi-r3-mini|\
|
||||
cetron,ct3003-ubootmod|\
|
||||
livinet,zr-3020-ubootmod)
|
||||
uci set system.@system[0].compat_version="1.2"
|
||||
uci commit system
|
||||
compat_version="$(uci get system.@system[0].compat_version)"
|
||||
if [ "${compat_version%%.*}" = "1" ] && [ "${compat_version##*.}" -le 1 ]; then
|
||||
uci set system.@system[0].compat_version="1.2"
|
||||
uci commit system
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
209
target/linux/ramips/dts/mt7628an_keenetic_kn-1221.dts
Normal file
209
target/linux/ramips/dts/mt7628an_keenetic_kn-1221.dts
Normal file
@ -0,0 +1,209 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7628an.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
compatible = "keenetic,kn-1221", "mediatek,mt7628an-soc";
|
||||
model = "Keenetic KN-1221";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ðernet;
|
||||
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
regulator-usb {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "USB-power";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
internet {
|
||||
function = LED_FUNCTION_WAN;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
fn {
|
||||
function = LED_FUNCTION_WLAN;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "restart";
|
||||
gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
virtual_flash {
|
||||
compatible = "mtd-concat";
|
||||
devices = <&firmware1 &firmware2>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x0 0x1cc0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "spi cs1", "gpio", "refclk", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <32000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-config";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "rf-eeprom";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x400>;
|
||||
};
|
||||
|
||||
macaddr_factory_4: macaddr@4 {
|
||||
reg = <0x4 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
firmware1: partition@50000 {
|
||||
label = "firmware_1";
|
||||
reg = <0x50000 0xe60000>;
|
||||
};
|
||||
|
||||
partition@eb0000 {
|
||||
label = "config_1";
|
||||
reg = <0xeb0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@ef0000 {
|
||||
label = "storage";
|
||||
reg = <0xef0000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@ff0000 {
|
||||
label = "dump";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1000000 {
|
||||
label = "u-state";
|
||||
reg = <0x1000000 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1030000 {
|
||||
label = "u-config_res";
|
||||
reg = <0x1030000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1040000 {
|
||||
label = "rf-eeprom_res";
|
||||
reg = <0x1040000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
firmware2: partition@1050000 {
|
||||
label = "firmware_2";
|
||||
reg = <0x1050000 0xe60000>;
|
||||
};
|
||||
|
||||
partition@1eb0000 {
|
||||
label = "Config_2";
|
||||
reg = <0x1eb0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
nvmem-cells = <&macaddr_factory_4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&esw {
|
||||
mediatek,portmap = <0x3e>;
|
||||
mediatek,portdisable = <0x38>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
};
|
@ -367,6 +367,18 @@ define Device/jotale_js76x8-32m
|
||||
endef
|
||||
TARGET_DEVICES += jotale_js76x8-32m
|
||||
|
||||
define Device/keenetic_kn-1221
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 29440k
|
||||
DEVICE_VENDOR := Keenetic
|
||||
DEVICE_MODEL := KN-1221
|
||||
DEVICE_PACKAGES := kmod-usb2
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to $$$$(BLOCKSIZE) | \
|
||||
check-size 14720k | zyimage -d 0x801221 -v "KN-1221"
|
||||
endef
|
||||
TARGET_DEVICES += keenetic_kn-1221
|
||||
|
||||
define Device/keenetic_kn-1613
|
||||
IMAGE_SIZE := 15073280
|
||||
DEVICE_VENDOR := Keenetic
|
||||
|
@ -248,7 +248,7 @@ ramips_setup_interfaces()
|
||||
tplink,archer-mr200)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0"
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_set_interface_wan "usb0"
|
||||
;;
|
||||
tplink,ec220-g5-v2)
|
||||
ucidef_add_switch "switch0"
|
||||
|
@ -58,6 +58,7 @@ hiwifi,hc5661a|\
|
||||
hiwifi,hc5761a)
|
||||
ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10"
|
||||
;;
|
||||
keenetic,kn-1221|\
|
||||
keenetic,kn-1613|\
|
||||
keenetic,kn-1711|\
|
||||
keenetic,kn-1713)
|
||||
|
@ -131,6 +131,10 @@ ramips_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "6@eth0"
|
||||
;;
|
||||
keenetic,kn-1221)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "0:wan" "6@eth0"
|
||||
;;
|
||||
keenetic,kn-1613|\
|
||||
keenetic,kn-1713|\
|
||||
motorola,mwr03)
|
||||
@ -287,6 +291,7 @@ ramips_setup_macs()
|
||||
totolink,lr1200)
|
||||
wan_mac=$(mtd_get_mac_binary factory 0x2e)
|
||||
;;
|
||||
keenetic,kn-1221|\
|
||||
keenetic,kn-1613|\
|
||||
keenetic,kn-3211|\
|
||||
zyxel,keenetic-extra-ii)
|
||||
|
@ -274,7 +274,6 @@ CONFIG_KERNEL_GZIP=y
|
||||
CONFIG_KMAP_LOCAL=y
|
||||
CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
|
||||
# CONFIG_LEDS_CLASS_MULTICOLOR is not set
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||
|
Loading…
x
Reference in New Issue
Block a user