From patchwork Sat Nov 4 04:48:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexis_Lothor=C3=A9?= X-Patchwork-Id: 1859213 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ip92boxS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SMlYh150Kz1yQ5 for ; Sat, 4 Nov 2023 15:51:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:List-Help: Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From:List-Post:List-Id: Message-ID:MIME-Version:References:In-Reply-To:Date:Subject:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pbFz7OS8ManEPEjO1BZ5WGhiLWideNJOZEP+Q4voBzI=; b=ip92boxSei/TKn12I8TFS6sKXW nzAHdqGGZhvAW4ZaAWe1jI3d55+P5fodRt0LHcQYJUQcHV8dmxsxa1YXoQwpGs1ITuAoFaL3hegy6 eUWd/3IF1Di3f8F2HuaADDsbZkE592TVw8NFkoH4VQmmOwuO64FGS9UFNVQWV90fP9dSll0SbFCmB Q78F88nDAnpuPy1uIeTOHkIfYfGbs+jLeMDH0NDBCvBvE+f2uLuiLTbEx32WT6Or1u8gjFDW2ItKu 577bdJlthQtFJcbwbAxToWgcbwJwjmPY32aVIzGbMzOiYk6C7S3wD5esJSWQpiL56yn7QXxNXQM9M ZbrUQZIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qz8Zb-00Cd5w-38; Sat, 04 Nov 2023 04:47:51 +0000 To: Felix Fietkau Subject: [PATCH v2 1/2] mac80211: split rtw88 configuration for each supported chip Date: Fri, 3 Nov 2023 21:48:41 -0700 In-Reply-To: <20231104044842.726651-1-alexis.lothore@bootlin.com> References: <20231104044842.726651-1-alexis.lothore@bootlin.com> MIME-Version: 1.0 Message-ID: List-Id: OpenWrt Development List List-Post: X-Patchwork-Original-From: =?utf-8?q?Alexis_Lothor=C3=A9_via_openwrt-devel?= From: =?utf-8?q?Alexis_Lothor=C3=A9?= Precedence: list X-Mailman-Version: 2.1.34 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: =?utf-8?q?Alexis_Lothor=C3=A9?= List-Help: Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. From: Alexis Lothoré Current rtw88 build configuration builds modules for all chips supported by rtw88 driver family. This brings the following issues: - adding a chip with a different bus is not convenient (all chips currently depends on PCI) - some features requirements are not relevant for all chips in family (eg 802.11AC is enforced but RTW88-8723DE is only a 802.11b/g/n chip) Remove those constraints/issues by adding one module build option per supported chip, and add intermediate options to properly cascade dependencies. Signed-off-by: Alexis Lothoré --- package/kernel/mac80211/realtek.mk | 90 +++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 15 deletions(-) diff --git a/package/kernel/mac80211/realtek.mk b/package/kernel/mac80211/realtek.mk index 9c143583265e..3cd6740e6c6e 100644 --- a/package/kernel/mac80211/realtek.mk +++ b/package/kernel/mac80211/realtek.mk @@ -1,7 +1,8 @@ PKG_DRIVERS += \ rtlwifi rtlwifi-pci rtlwifi-btcoexist rtlwifi-usb rtl8192c-common \ rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8723bs rtl8821ae \ - rtl8xxxu rtw88 + rtl8xxxu rtw88 rtw88-pci rtw88-8822b rtw88-8822c rtw88-8723d \ + rtw88-8822be rtw88-8822ce rtw88-8723de config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI @@ -21,8 +22,14 @@ config-y += RTL8XXXU_UNTESTED config-$(call config_package,rtl8723bs) += RTL8723BS config-y += STAGING -config-$(call config_package,rtw88) += RTW88 RTW88_CORE RTW88_PCI -config-y += RTW88_8822BE RTW88_8822CE RTW88_8723DE +config-$(call config_package,rtw88) += RTW88 RTW88_CORE +config-$(call config_package,rtw88-pci) += RTW88_PCI +config-$(call config_package,rtw88-8822b) += RTW88_8822B +config-$(call config_package,rtw88-8822be) += RTW88_8822BE +config-$(call config_package,rtw88-8822c) += RTW88_8822C +config-$(call config_package,rtw88-8822ce) += RTW88_8822CE +config-$(call config_package,rtw88-8723d) += RTW88_8723D +config-$(call config_package,rtw88-8723de) += RTW88_8723DE config-$(CONFIG_PACKAGE_RTW88_DEBUG) += RTW88_DEBUG config-$(CONFIG_PACKAGE_RTW88_DEBUGFS) += RTW88_DEBUGFS @@ -168,18 +175,71 @@ endef define KernelPackage/rtw88 $(call KernelPackage/mac80211/Default) - TITLE:=Realtek RTL8822BE/RTL8822CE/RTL8723DE - DEPENDS+= @(PCI_SUPPORT) +kmod-mac80211 +@DRIVER_11AC_SUPPORT - FILES:=\ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822be.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723de.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723d.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_core.ko \ - $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko - AUTOLOAD:=$(call AutoProbe,rtw88_8822be rtw88_8822ce rtw88_8723de) + TITLE:=Realtek RTW88 common part + DEPENDS+= @PCI_SUPPORT +kmod-mac80211 + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_core.ko + AUTOLOAD:=$(call AutoProbe,rtw88_core) + HIDDEN:=1 +endef + +define KernelPackage/rtw88-pci + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTW88 PCI chips support + DEPENDS+= @PCI_SUPPORT +kmod-rtw88 + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko + AUTOLOAD:=$(call AutoProbe,rtw88_pci) + HIDDEN:=1 +endef + +define KernelPackage/rtw88-8822b + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTL8822B family support + DEPENDS+= +kmod-rtw88 +@DRIVER_11AC_SUPPORT + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko + AUTOLOAD:=$(call AutoProbe,rtw88_8822b) + HIDDEN:=1 +endef + +define KernelPackage/rtw88-8822c + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTL8822C family support + DEPENDS+= +kmod-rtw88 +@DRIVER_11AC_SUPPORT + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko + AUTOLOAD:=$(call AutoProbe,rtw88_8822c) + HIDDEN:=1 +endef + +define KernelPackage/rtw88-8723d + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTL8723D family support + DEPENDS+= +kmod-rtw88 + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723d.ko + AUTOLOAD:=$(call AutoProbe,rtw88_8723d) + HIDDEN:=1 +endef + +define KernelPackage/rtw88-8822be + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTL8822BE support + DEPENDS+= +kmod-rtw88-pci +kmod-rtw88-8822b + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822be.ko + AUTOLOAD:=$(call AutoProbe,rtw88_8822be) +endef + +define KernelPackage/rtw88-8822ce + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTL8822CE support + DEPENDS+= +kmod-rtw88-pci +kmod-rtw88-8822c + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko + AUTOLOAD:=$(call AutoProbe,rtw88_8822ce) +endef + +define KernelPackage/rtw88-8723de + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTL8723DE support + DEPENDS+= +kmod-rtw88-pci +kmod-rtw88-8723d + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723de.ko + AUTOLOAD:=$(call AutoProbe,rtw88_8723) endef define KernelPackage/rtl8723bs From patchwork Sat Nov 4 04:48:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexis_Lothor=C3=A9?= X-Patchwork-Id: 1859211 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EqXgC7pa; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SMlYh17QCz1yR4 for ; Sat, 4 Nov 2023 15:51:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:List-Help: Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From:List-Post:List-Id: Message-ID:MIME-Version:References:In-Reply-To:Date:Subject:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wHyptedrJ1gkkv2fQzJdRxaqqAKiTwriiRTdJHWC+/Y=; b=EqXgC7pa/qD7N1NqSaBEW+mK+f /HNdt4oBUAOnI3LlhWjzu9uQ9Ci0nyFY8oQHm7XCRx9aZ4R8PBDDdMJtHIR4H1jAGmgQWuCLvWpGr qpbZz7U0DHoViiqKMjHCXYd/bavOusl/B26eVe6gkfAyPrOPF6liBlz5Gm2EioL5y04HYHFH+nMgI U//UY8YJhQ/Ys1a7B4OnffD+tXDqkyKae/0B/OrJ9lMk8XtevPBfaR7fa1P5E7XjRt3nNncjK0+/j 4PPh4zkk04YB0eoFlYLj41aib6gaQOmM0HDjwDnghYWfpIPrwI1p0V0cN6pZi6EsRD7il8ohgZYcZ o+skY5Dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qz8Za-00Cd5m-2V; Sat, 04 Nov 2023 04:47:50 +0000 To: Felix Fietkau Subject: [PATCH v2 2/2] mac80211: add support for rtw88_8822bu Date: Fri, 3 Nov 2023 21:48:42 -0700 In-Reply-To: <20231104044842.726651-1-alexis.lothore@bootlin.com> References: <20231104044842.726651-1-alexis.lothore@bootlin.com> MIME-Version: 1.0 Message-ID: List-Id: OpenWrt Development List List-Post: X-Patchwork-Original-From: =?utf-8?q?Alexis_Lothor=C3=A9_via_openwrt-devel?= From: =?utf-8?q?Alexis_Lothor=C3=A9?= Precedence: list X-Mailman-Version: 2.1.34 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: =?utf-8?q?Alexis_Lothor=C3=A9?= List-Help: Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. From: Alexis Lothoré Kernel 6.1 has introduced support for RTW8822BU network adapter, which is an USB variant of the rtw8822b 802.11ac chipset family. Build and install the corresponding module in the rtw88 package Signed-off-by: Alexis Lothoré --- package/kernel/mac80211/realtek.mk | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/package/kernel/mac80211/realtek.mk b/package/kernel/mac80211/realtek.mk index 3cd6740e6c6e..db2c4e395c16 100644 --- a/package/kernel/mac80211/realtek.mk +++ b/package/kernel/mac80211/realtek.mk @@ -1,8 +1,8 @@ PKG_DRIVERS += \ rtlwifi rtlwifi-pci rtlwifi-btcoexist rtlwifi-usb rtl8192c-common \ rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8723bs rtl8821ae \ - rtl8xxxu rtw88 rtw88-pci rtw88-8822b rtw88-8822c rtw88-8723d \ - rtw88-8822be rtw88-8822ce rtw88-8723de + rtl8xxxu rtw88 rtw88-pci rtw88-usb rtw88-8822b rtw88-8822c rtw88-8723d \ + rtw88-8822be rtw88-8822bu rtw88-8822ce rtw88-8723de config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI @@ -24,8 +24,10 @@ config-y += STAGING config-$(call config_package,rtw88) += RTW88 RTW88_CORE config-$(call config_package,rtw88-pci) += RTW88_PCI +config-$(call config_package,rtw88-usb) += RTW88_USB config-$(call config_package,rtw88-8822b) += RTW88_8822B config-$(call config_package,rtw88-8822be) += RTW88_8822BE +config-$(call config_package,rtw88-8822bu) += RTW88_8822BU config-$(call config_package,rtw88-8822c) += RTW88_8822C config-$(call config_package,rtw88-8822ce) += RTW88_8822CE config-$(call config_package,rtw88-8723d) += RTW88_8723D @@ -176,7 +178,7 @@ endef define KernelPackage/rtw88 $(call KernelPackage/mac80211/Default) TITLE:=Realtek RTW88 common part - DEPENDS+= @PCI_SUPPORT +kmod-mac80211 + DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_core.ko AUTOLOAD:=$(call AutoProbe,rtw88_core) HIDDEN:=1 @@ -191,6 +193,15 @@ define KernelPackage/rtw88-pci HIDDEN:=1 endef +define KernelPackage/rtw88-usb + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTW88 USB chips support + DEPENDS+= @USB_SUPPORT +kmod-rtw88 + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_usb.ko + AUTOLOAD:=$(call AutoProbe,rtw88_usb) + HIDDEN:=1 +endef + define KernelPackage/rtw88-8822b $(call KernelPackage/mac80211/Default) TITLE:=Realtek RTL8822B family support @@ -226,6 +237,14 @@ define KernelPackage/rtw88-8822be AUTOLOAD:=$(call AutoProbe,rtw88_8822be) endef +define KernelPackage/rtw88-8822bu + $(call KernelPackage/mac80211/Default) + TITLE:=Realtek RTL8822BU support + DEPENDS+= +kmod-rtw88-usb +rtl8822be-firmware +kmod-rtw88-8822b + FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822bu.ko + AUTOLOAD:=$(call AutoProbe,rtw88_8822bu) +endef + define KernelPackage/rtw88-8822ce $(call KernelPackage/mac80211/Default) TITLE:=Realtek RTL8822CE support