From nobody Tue Mar 12 23:00:36 2024 X-Original-To: dev-commits-src-main@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 4TvTdJ3ytxz5ChgH; Tue, 12 Mar 2024 23:00:36 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvTdJ3W36z4n58; Tue, 12 Mar 2024 23:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710284436; 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=z4NhnjIjHC3N0rIfmD/ieS24D8Yc2KblOECAUNF1tGE=; b=dKDLtAPSDn1nfmD5Npgk1VPJTs5GlbTakjf+NXPYWEaLiukdOf5UP69Qhka0Je/tTBO45R N0tVF7UgxGCfowCOC5clqQfiyKq8BrS9XYgNRO5chE5qYjoj2/q0j6JJGtTl/Ltru099MH M112TXlkAVw9Nzpo6HrTpHacV4FBuEvXuAnbyjTsOG62+bBfTZcJZrIVv8JAoIYtqLBddb Ddb+823Hwny9q56FEmWfwJnSMqzxNfrQzhPTaITR2BODy6m+02CNz3PdJVbEkBd1FOY1dJ EWwVAs+AV9G3A/Faj09o4slDo8hGlfEFHkDXWZGwX4DZzL47Ean3IUxbPfziIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710284436; a=rsa-sha256; cv=none; b=tgncmW+MFyUB2I1vncv/mHKP6Ft3LdjNRFf1679ntWYxMyyq5e9Q1n7bC06QZqWsr8ZpUK rYkhV0sXi+5PyikDscWeS6IN6gC7vpaDlSu8hYaRlmXZCZ5nrDJCf8Ngji7jf+PAgvCffz TuyNgIKA44jot2nBhfNrTCQTDLcOxMRiOBnYmwPp6/E0/I8jfpDnyfKVW1+ogXp43IWzfM COXC5H1xblMIJNx/+u8wB8Z/UNmXR9FbP4aIPsvAjjqrnG0DzgcHrsWpu4WWEED1GqVBDE qzmHhjRH8i9jTZeS85qgUz8VW5LesGzpo3qf0gIczbpHrMF41bxhPUD1LFdoAg== 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=1710284436; 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=z4NhnjIjHC3N0rIfmD/ieS24D8Yc2KblOECAUNF1tGE=; b=W8UlmMz7mKRlogZEnKoHLnDpivzYL4TqbMbDjmHeWLh9Bc33qcBJdPqQ7DoKDftLslMFeX 7GuPMrsmEIqakzKgsiq3iUtKfrm+87OTOeH5FAyo2l+9WvdHMEF1cuqqJoOMeJaj1J2/3F /Ebb1Iesh6tIUvbi6x1RnmKpFi6IGeRqgL6y1Yx2Bm/HoShMaiMGHZxKNdsut1y7iGXf4A JTfTDaphvG1McUw8tEIHA7SxV6fmv7UFuoTrFs8rTpDWLY6ivZLYG787vMhh3MOrsRhOcl FVn/2wPQl7ZNNGAJzDfh9vsApv0DZU3JkUikXbkL3bO+Dy6u76Q3GKgTH78CFg== 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 4TvTdJ36PQzJPy; Tue, 12 Mar 2024 23:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42CN0aim022482; Tue, 12 Mar 2024 23:00:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42CN0afu022479; Tue, 12 Mar 2024 23:00:36 GMT (envelope-from git) Date: Tue, 12 Mar 2024 23:00:36 GMT Message-Id: <202403122300.42CN0afu022479@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: 906521f8176b - main - LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 906521f8176b13533556d742db4ab28e847b85c0 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=906521f8176b13533556d742db4ab28e847b85c0 commit 906521f8176b13533556d742db4ab28e847b85c0 Author: Bjoern A. Zeeb AuthorDate: 2024-03-04 23:03:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-03-12 22:59:11 +0000 LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we accidentally returned the bit number instead of the shifted value which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT, which in turned lead to us trying to decode the frame again despite HW had already done it. This was found out of a discussion in D43634. MFC after: 3 days Reviewed by: cc, adrian Differential Revision: https://reviews.freebsd.org/D44208 --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ced2f2dc8cca..df3b0bc467f2 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -546,7 +546,7 @@ lkpi_l80211_to_net80211_cyphers(uint32_t wlan_cipher_suite) case WLAN_CIPHER_SUITE_TKIP: return (IEEE80211_CRYPTO_TKIP); case WLAN_CIPHER_SUITE_CCMP: - return (IEEE80211_CIPHER_AES_CCM); + return (IEEE80211_CRYPTO_AES_CCM); case WLAN_CIPHER_SUITE_WEP104: return (IEEE80211_CRYPTO_WEP); case WLAN_CIPHER_SUITE_AES_CMAC: