From patchwork Tue Jan 23 10:23:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Dziedzic X-Patchwork-Id: 1889625 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=J5BM2PFa; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=AjgIFlAz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.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 [198.137.202.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 4TK3CB01gHz23g0 for ; Tue, 23 Jan 2024 21:25:57 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Q8oVFcaxUI59hq4yGN4Ao2dczoSQ+fx/Phm+Nofj1d0=; b=J5BM2PFaDX8GoD oqpRhovcza5/sB5gSpqXr1NnA11hBet82WLo82BhaUSxF7Yc/O+o3TlxtEqGHSatfMbV6Jm5DN6If MnRW3dFXeezuSEB+WdKBW1DNvzI3IVaGAO1DPPzeJCBYUeC9GBouDlvUnAlMzuWIRZSAy6o03ZHTk w/TvF01peCGN1h/0ROqyKGS/8VCG4Ymaoh3GsHT+s8HIyRfXOTkC0fBSWMPnxOsDr6CfNSJrDNzWf sUKjiQguERMIQG6avzcKQ9/VFHBcr0Z7gpitXpRw0ObfwXB3U0jsUyjBQYOxP7Qge5LnajB+JKGcD QnWn1hDgCTl+plytjctA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSDwl-00Fujb-2b; Tue, 23 Jan 2024 10:23:59 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSDwi-00Fuij-2z for openwrt-devel@lists.openwrt.org; Tue, 23 Jan 2024 10:23:58 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50e5a9bcec9so4465934e87.3 for ; Tue, 23 Jan 2024 02:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706005433; x=1706610233; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WF79R2MNRHwfOWmk3t0rcDoPc4LdnlZE8Tj3Ns81+jg=; b=AjgIFlAzX1XHWaG0159bDq//rUvcUcrhxzINvhZHGjZDYKXOSb3LYxhYhL2RincDCt IuwtxfboI6+A3BqLe7KoZZbqWs19deTkfEcgn5kaR60cmCGMCANa5+olLkNmycsd86LF JNDSnThgpRA10Ipfm+8WMYbM/mTMMWmApSp+7D28NW1zCFKz+teFP6s97q6TopYejDQX UdKmEiizqi3PppcFwuaqimZ/WHg9cKFnKLZvgRbk+uxcu8xvajwbbZb9JpVy57Wb7u30 hksODG81lX7Fqj4ID/yBHO+2cupBZMyFNxQy00yXaRWquNvPE1YkmTNYFjVWYMmL5+ui DiSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706005433; x=1706610233; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WF79R2MNRHwfOWmk3t0rcDoPc4LdnlZE8Tj3Ns81+jg=; b=bAwsZX+IoTwnowZTbpAwFHENt2JkDBWilfLJeAzNiwafD+ViNrtM30UeZmq/dOT6nk Mm1o4XnnSK1/7JGc4JNC/BEKQ//xNNV3IEx4PJYm3wwtIvfLl2PqxrrYpg7YHEJXyBJw BNK2ci6hGBPKuN9eyTf1snzYhELsMfXRh95l9S7lw2FNXtsKY9DEVfjCtHTcyQw5xjL5 ig19wD+2opHmxvM1AGNkDAWonSzrjOkfWB39ntAL3rjk+H4yrc5aR/5U2L5sX4Zbayt0 ZHqWJIWmi36SCCnhG9gM2Rxpjdjknrd2Di2mj7JKtHWQgr7LSMOEMBaNbl5Psiuu1LDc ymxA== X-Gm-Message-State: AOJu0Yyk7IHxkHyPc2mXt5hxKW7Ne/iA7tWEv+lMVCR6Ew4QzqvOkno2 aaNv2gZp8ML4UN4yGwcdH2l5UiD2ntyk5ul4wXbIvUYTSN+KZ6BIe8IeLU6ltSA= X-Google-Smtp-Source: AGHT+IE2T24wjW5fV15iaoYtmcMF0pF2vsStO7royNV6Lhpq3RN1VyfjNaZqJdbjPaURO1ELHLXnnQ== X-Received: by 2002:a05:6512:1dc:b0:50e:8efa:cd91 with SMTP id f28-20020a05651201dc00b0050e8efacd91mr2774744lfp.6.1706005433275; Tue, 23 Jan 2024 02:23:53 -0800 (PST) Received: from e850.lan ([62.141.192.106]) by smtp.gmail.com with ESMTPSA id wb9-20020a170907d50900b00a2fe4463711sm3281600ejc.0.2024.01.23.02.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:23:52 -0800 (PST) From: Janusz Dziedzic To: openwrt-devel@lists.openwrt.org Cc: Janusz Dziedzic Subject: [PATCH 1/2] ath12k: enable compilation Date: Tue, 23 Jan 2024 11:23:26 +0100 Message-Id: <20240123102327.549758-1-janusz.dziedzic@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_022356_963377_945C0557 X-CRM114-Status: GOOD ( 12.25 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Signed-off-by: Janusz Dziedzic --- package/kernel/mac80211/Makefile | 2 ++ package/kernel/mac80211/ath.mk | 22 +++++++++++++-- ...2k-fix-compilation-with-older-kernel.patch | 28 +++++++++++++++++++ [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:129 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [janusz.dziedzic[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Janusz Dziedzic --- package/kernel/mac80211/Makefile | 2 ++ package/kernel/mac80211/ath.mk | 22 +++++++++++++-- ...2k-fix-compilation-with-older-kernel.patch | 28 +++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 package/kernel/mac80211/patches/ath12k/0001-wifi-ath12k-fix-compilation-with-older-kernel.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 17e0d9451e..f980d1deb6 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -341,6 +341,7 @@ define Build/Patch $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/) + $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath12k,ath12k/) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mt7601u,mt7601u/) $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/) @@ -357,6 +358,7 @@ define Quilt/Refresh/Package $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath9k,ath9k/) $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath10k,ath10k/) $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath11k,ath11k/) + $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath12k,ath12k/) $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/) $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mt7601u,mt7601u/) $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/) diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index 881c89db25..beb1b2ae4f 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -1,6 +1,6 @@ PKG_DRIVERS += \ ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k ath10k-smallbuffers \ - ath11k ath11k-ahb ath11k-pci carl9170 owl-loader ar5523 wil6210 + ath11k ath11k-ahb ath11k-pci ath12k carl9170 owl-loader ar5523 wil6210 PKG_CONFIG_DEPENDS += \ CONFIG_PACKAGE_ATH_DEBUG \ @@ -21,6 +21,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS ATH9K_HTC_DEBUGFS \ ATH10K_DEBUGFS \ ATH11K_DEBUGFS \ + ATH12K_DEBUGFS \ CARL9170_DEBUGFS \ ATH5K_DEBUG \ ATH6KL_DEBUG \ @@ -31,6 +32,7 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING config-y += \ ATH10K_TRACING \ ATH11K_TRACING \ + ATH12K_TRACING \ ATH6KL_TRACING \ ATH_TRACEPOINTS \ ATH5K_TRACER \ @@ -38,7 +40,7 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING endif config-$(call config_package,ath) += ATH_CARDS ATH_COMMON -config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS +config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH12K_DEBUG ATH9K_STATION_STATISTICS config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL ATH11K_SPECTRAL config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK @@ -63,6 +65,7 @@ config-$(call config_package,ath10k-smallbuffers) += ATH10K ATH10K_PCI ATH10K_SM config-$(call config_package,ath11k) += ATH11K config-$(call config_package,ath11k-ahb) += ATH11K_AHB config-$(call config_package,ath11k-pci) += ATH11K_PCI +config-$(call config_package,ath12k) += ATH12K config-$(call config_package,ath5k) += ATH5K ifdef CONFIG_TARGET_ath25 @@ -349,6 +352,21 @@ This module adds support for Qualcomm Technologies 802.11ax family of chipsets with PCI bus. endef +define KernelPackage/ath12k + $(call KernelPackage/mac80211/Default) + TITLE:=Qualcomm 802.11be wireless chipset support + URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath12k + DEPENDS+= +kmod-ath +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT \ + +@DRIVER_11BE_SUPPORT +kmod-crypto-michael-mic +kmod-qrtr-mhi + FILES:=$(PKG_BUILD_DIR)/drivers/soc/qcom/qmi_helpers.ko \ + $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath12k/ath12k.ko +endef + +define KernelPackage/ath12k/description +This module adds support for Qualcomm Technologies 802.11be family of +chipsets with PCI bus. +endef + define KernelPackage/carl9170 $(call KernelPackage/mac80211/Default) TITLE:=Driver for Atheros AR9170 USB sticks diff --git a/package/kernel/mac80211/patches/ath12k/0001-wifi-ath12k-fix-compilation-with-older-kernel.patch b/package/kernel/mac80211/patches/ath12k/0001-wifi-ath12k-fix-compilation-with-older-kernel.patch new file mode 100644 index 0000000000..d51e5f8e9c --- /dev/null +++ b/package/kernel/mac80211/patches/ath12k/0001-wifi-ath12k-fix-compilation-with-older-kernel.patch @@ -0,0 +1,28 @@ +--- a/drivers/net/wireless/ath/ath12k/core.c ++++ b/drivers/net/wireless/ath/ath12k/core.c +@@ -886,7 +886,11 @@ void ath12k_core_deinit(struct ath12k_ba + + void ath12k_core_free(struct ath12k_base *ab) + { ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 2, 0)) + timer_delete_sync(&ab->rx_replenish_retry); ++#else ++ del_timer_sync(&ab->rx_replenish_retry); ++#endif + destroy_workqueue(ab->workqueue_aux); + destroy_workqueue(ab->workqueue); + kfree(ab); +--- a/drivers/net/wireless/ath/ath12k/pci.c ++++ b/drivers/net/wireless/ath/ath12k/pci.c +@@ -690,7 +690,11 @@ static int ath12k_pci_msi_alloc(struct a + } + + ab_pci->msi_ep_base_data = msi_desc->msg.data; ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0)) + if (msi_desc->pci.msi_attrib.is_64) ++#else ++ if (msi_desc->msi_attrib.is_64) ++#endif + set_bit(ATH12K_PCI_FLAG_IS_MSI_64, &ab_pci->flags); + + ath12k_dbg(ab, ATH12K_DBG_PCI, "msi base data is %d\n", ab_pci->msi_ep_base_data);