From nobody Tue Apr 29 11:42:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Zmz1k6t2Xz5tvZ5; Tue, 29 Apr 2025 11:42:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zmz1j6pGPz3xP5; Tue, 29 Apr 2025 11:42:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745926922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4JVBvGcKiZvPJhhE99J09RBSuTOA/AERTXtKk7hzGg=; b=X6bDZcvWnMJW/KaGPkvC+RExNq7UJrWiPJdq24HdX7ogncQvRJ7fbODAxODm0AuiRxWj21 0KFeIZcmF72LraovDsZ5epGU+Q9FlQZAoVUYEjCKtQx0Tp00vF35xFCvGgThsTYrUcxTMe D0ugHf1vvdkHeYZFqzONeBNO6GVr72k9ku4aWac1s7s4JX864kdUrv3q1s//KYt4NRv5eP K8Z2O55rccnpDoCh2G8Bbz1x+KxrgylYAI/Z7oNbLnYVbBKxv5Khmmw7YNl3F8xezgyZBl sihp3oSqOAFSByrltQ5g5izlC9JVIy8xmT1eMbddADqr+Fd3WdLxc3z4XPfZ/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745926922; a=rsa-sha256; cv=none; b=UUyej5zlWyqv7M0O3vEjUSXFhpQeLI7N4Rkni6yGFJ2ofu3Go5Euk8yxm2samOHXQQCw0d Wv0TIXU00u41ipnR4JU1AWLcFnBHx5w4ehuAk/zC7SPOl5EVQG+DCMGDQlTUx/eJbzFf1H +B9uP8qEoIMndvk3yZnuKb23ux2/cTa+Fnsl45sDQYF8p+EQCErGj/Emj75t7BbkPYmtfb IK1gR3aToVYL8WvJIaYUJh8aQZAb6zoNH1C6D+jx9I2IDK0VOWVwdCq6LDrdmFo3T/B5kW q9nfnecUr1WKS31JwXYIGKYtqXo26MB9o8yRD2HNXl2DhJeYkaTw/OA7UbUM6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745926922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4JVBvGcKiZvPJhhE99J09RBSuTOA/AERTXtKk7hzGg=; b=cKLnv0bmIvh1HVJOptTp5dnwP8ClVoWaNt74N8XlvoJe7Mfb4fx9Sq/PDaPxK8wMGHxip+ S5Ccfp5j5ew26bQqgC+q2Sy6sTu8qdUY1zeIiDN1AfdJyBSoXMdafBVdrf7qH70js6aLYQ Iu2IkLAhEvwCTOc13kgWiptqdoxrugkix4WQSJZUvtxSW4yZ639NErcjIy/+q/cHn7LPY3 ryeS/7xHGIUq/kSsqWEvylST5VvnoaC/s8MBytCTSwYMvO0W3srPfd8rFe2KfT9WYLrq+X kvEim1xpTptmnS+AtY8tIBRJdkZLk7gf1k5MnKyWWviy5DTLLPIkY6ihBeOI2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zmz1j6C8Kz3ym; Tue, 29 Apr 2025 11:42:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53TBg1rt047546; Tue, 29 Apr 2025 11:42:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53TBg1x7047543; Tue, 29 Apr 2025 11:42:01 GMT (envelope-from git) Date: Tue, 29 Apr 2025 11:42:01 GMT Message-Id: <202504291142.53TBg1x7047543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9c29ee712c96 - stable/14 - LinuxKPI: 802.11: add tunable to enable TKIP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9c29ee712c969641de8c9f62c43b5bcc9b97d034 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9c29ee712c969641de8c9f62c43b5bcc9b97d034 commit 9c29ee712c969641de8c9f62c43b5bcc9b97d034 Author: Bjoern A. Zeeb AuthorDate: 2025-04-23 00:29:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-04-29 10:49:32 +0000 LinuxKPI: 802.11: add tunable to enable TKIP On one hand TKIP support for other drivers or older iwlwifi chipsets likely needs more work (see mac80211.h), on the other hand we should no longer use TKIP (but we understand people still need to). Add a tunable to enable it for those who want to test it with modern iwlwifi chipsets. hw_crypto also still needs to be enabled. I could only test it with legacy rates as none of my (non-FreeBSD) APs allowed me by default to use TKIP anymore (had to force it on) and then they would not let me associate with HT or VHT at all if TKIP was on. Sponsored by: The FreeBSD Foundation (cherry picked from commit b71d3043c38acbde2fff7ed184a057d631e0d656) --- sys/compat/linuxkpi/common/src/linux_80211.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 4ac8856a09e5..3edbcb141dd8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -107,6 +107,10 @@ SYSCTL_NODE(_compat_linuxkpi, OID_AUTO, 80211, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, static bool lkpi_hwcrypto = false; SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, hw_crypto, CTLFLAG_RDTUN, &lkpi_hwcrypto, 0, "Enable LinuxKPI 802.11 hardware crypto offload"); + +static bool lkpi_hwcrypto_tkip = false; +SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, tkip, CTLFLAG_RDTUN, + &lkpi_hwcrypto_tkip, 0, "Enable LinuxKPI 802.11 TKIP crypto offload"); #endif /* Keep public for as long as header files are using it too. */ @@ -6086,8 +6090,13 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) hwciphers &= (IEEE80211_CRYPTO_WEP | IEEE80211_CRYPTO_TKIP | IEEE80211_CRYPTO_TKIPMIC | IEEE80211_CRYPTO_AES_CCM | IEEE80211_CRYPTO_AES_GCM_128); - /* We only support CCMP here, so further filter. */ - hwciphers &= IEEE80211_CRYPTO_AES_CCM; + /* + * We only support CCMP here, so further filter. + * Also permit TKIP if turned on. + */ + hwciphers &= (IEEE80211_CRYPTO_AES_CCM | + (lkpi_hwcrypto_tkip ? (IEEE80211_CRYPTO_TKIP | + IEEE80211_CRYPTO_TKIPMIC) : 0)); ieee80211_set_hardware_ciphers(ic, hwciphers); } #endif