From nobody Wed Apr 23 16:25:26 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 4ZjPbW4lr5z5tbXg; Wed, 23 Apr 2025 16:25:27 +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 4ZjPbW20xHz49m8; Wed, 23 Apr 2025 16:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745425527; 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=3gcaAtHy+7jG4Wqh0v8cMxLReUndtHww7kmL/DiCO0k=; b=rbnWXYkQoBty6GGYnp2as0p4l58RVZ8XMMHqbpsG7mpQf1AHcQskCnhuTPrBOtJNGOzPm8 qbqB98pcSewIoMPLXc8EhtmUrPgVcj4cZQPc0sSjhx3BL//f6K4o8W1ftRYMa+SxsO47nO VHwM90ZhlxJyJFO9dBnCkplCJyEcMO8OS1UqEUPgpX39bcK7b5IdDatIxVs0wFgidvrXuH qEma4S7segg9hpO1v0MMRHoPY+1ybdOKVCEAWtRIGMT/HOoWgl4NsAiM+Vcs36sKE8jR/s c0fz2AcIkOhKetOQkOeC3UU/4QMFxMJNUppKqBuxmgAsR2XU8Kduoo7oKKZxAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745425527; a=rsa-sha256; cv=none; b=BWqQzv30HU9ESmhlSv4vlIuJXVje0KDCg1gprATQ7WT5gVDhMS0697cWVpSsDKViI6gi9y MzcDLTXP61Mj+885H69cFhH0DX0rQ/CUQX/pREhofGB7KE+Up/rqUjPMV/jvWl4oPKHnV7 rTc9DslPiMsFF9Gv9+meWLMa6fGoJ1qrzxK8c6Xk3t1jpimK98pp/Pb3UExKe2C/E9hKoh CQOLL6x2gWgIa6erg9wp+tDvUZASZrKsTM3ez/v/kWz6Al+LqvqvCEgoU8GpNvFbBjbZrl kyJ4hVadQwvFlg3fopWkEH1S8J190o0j6W8LImQlJOy8cbgqoNH0QR5wEfRxrA== 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=1745425527; 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=3gcaAtHy+7jG4Wqh0v8cMxLReUndtHww7kmL/DiCO0k=; b=bI/shwkIT6Qo6WEWawjPjptc6JXN+AohvnqvOut+nlYxlkq7B/EMxMUfQUKIQJLZzh8wYd s1n0oXXluoykX6bTBgahIEDlCnEdFg1wkseavOCylWBwvIsat9JOcj23+DTirIgMCNHtKT Pa5kpZDUP2EM1iX2Hk199iDVyKjozvddW4XtOXXQsQSfVk8n66X3rU1az4n/1gc2aOo+T4 NeCm9iuvwYz6eSQFHAEoS/7kt8W0KmVCgRJqFoLW//KZlCalnCIu6Ea7kMg+BweGfPR3l0 LV0s5Mg6pz6+QLrcG3ZdEa7dE6AiSNJvEU8ckcHAXjGOoc9N1kRrBwtFDDTGFQ== 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 4ZjPbW0Cj5z19VR; Wed, 23 Apr 2025 16:25:27 +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 53NGPQg5082140; Wed, 23 Apr 2025 16:25:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53NGPQxL082137; Wed, 23 Apr 2025 16:25:26 GMT (envelope-from git) Date: Wed, 23 Apr 2025 16:25:26 GMT Message-Id: <202504231625.53NGPQxL082137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b71d3043c38a - main - 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/main X-Git-Reftype: branch X-Git-Commit: b71d3043c38acbde2fff7ed184a057d631e0d656 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b71d3043c38acbde2fff7ed184a057d631e0d656 commit b71d3043c38acbde2fff7ed184a057d631e0d656 Author: Bjoern A. Zeeb AuthorDate: 2025-04-23 00:29:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-04-23 16:24:21 +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 MFC after: 3 days --- 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 6f9fda2e2234..5b2950338456 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. */ @@ -6085,8 +6089,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