From nobody Wed Sep 21 14:01:25 2022 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 4MXg7T6JG3z4cYG1; Wed, 21 Sep 2022 14:01:25 +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 4MXg7T3Ln8z49pp; Wed, 21 Sep 2022 14:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768885; 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=NRLSTl6Wb3iqxBXbcUyFka628PAqHusUeRiGdlFJuf8=; b=vinsP4nCFiDCrYiN4idfWDZzBM8sGGBLl8x7izDSTBnrOJBXNAraymLP5+NAmAX0xBnVV1 Rephr9NfJXUVTkZKnOxspXpEKTYGAYrcOS3zMsmoNc/3Sd2nafJpYxQMbP/0QwaqYFb/C/ K2DQNhZx6aKCBXk8n6/NcRe14KmufFccoZI8aACH7lgGuSiwg6vySE2YXW2TtOWJ3dFFHx LHurKEpTvJlBxzOW+/XUh76eyfh8RkZyt6Rbqk/CVGxOiCe8kWHnDWnDPSg9/qdZghBgmw /Aujq03RUZOo0jH7pE9Ri8DkL56nMcqQmLKngqL2c3uGriPWZREU0wSmNZ2EQw== 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 4MXg7T2Rpxz153S; Wed, 21 Sep 2022 14:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28LE1PO1000120; Wed, 21 Sep 2022 14:01:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28LE1P1S000119; Wed, 21 Sep 2022 14:01:25 GMT (envelope-from git) Date: Wed, 21 Sep 2022 14:01:25 GMT Message-Id: <202209211401.28LE1P1S000119@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: 13c39a6015e1 - stable/13 - LinuxKPI: 80211: make HW_CRYPTO compileable again 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 13c39a6015e188e4095c619a7d2e7df3ae3863c0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768885; 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=NRLSTl6Wb3iqxBXbcUyFka628PAqHusUeRiGdlFJuf8=; b=QoyzcF/RFNNIGcPdPHnZ2bFGOwpM49WKSpUHu0Udi7FHi3R8NxZhpcu8bb792ivIAo+RNb V50GrY57gVhTeCyoIGYv3XtCjwFOAbaxWI1aHFkPzEbQLQlwm7zBgxjHrnkCM85hwvFoKY 8g/oLHGRkJdYvgTHk3RLO3+cUr+dcBp/WKE+Dc0QrVVHmEuUii3130q38oiyykzA/a4JRa etLDZwdq7dQLgZnYD/itWkgFYY723Tbsf2QClIcuhaLznJi71mPAR6l/UsPrMBHyFYpke+ 5TNhmBFn4/WcoAtHtdkx5N6oyZPnqB0mhaJXCHdubWyiEo2Zf266qhlYojk5kQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663768885; a=rsa-sha256; cv=none; b=BSirPN9nwXcm8spLGctDidc/OF98i7zL7xHMIxhpqYDPHZZZ6W4VfNFD7+0ALdGA+Hg+RS wvIDvIDKVHqDsbS696gJ2/MLsuxYhiDivxZttg2iWB37AQXblj7YRcM7BJRctPfa7RuD93 8bY2A5sQSDDKAZ91jQq/AriJcRYOScdZJ9D9FvNBHSsacQZnXVT1M5G9WJeFeNRTu1HAbc nSDs/ok1bnX6bzSt/q0ok4u/0Xl9oTo1FaOifwsYPzGwiYzLhHQC4tNIiu6aTJreijiYb6 Rz5BanZp9AGM4Q1eFu0mOLbiFWokQjWZ5t5vVbcZmdntJtJ0NI38bqxzRZcwIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=13c39a6015e188e4095c619a7d2e7df3ae3863c0 commit 13c39a6015e188e4095c619a7d2e7df3ae3863c0 Author: Bjoern A. Zeeb AuthorDate: 2022-09-03 22:51:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-21 11:46:45 +0000 LinuxKPI: 80211: make HW_CRYPTO compileable again Rename TRY_HW_CRYPTO to LKPI_80211_HW_CRYPTO for consitency and make it compileable again in case someone wants to sit down and make it work. It's probably not too much to do. Otherwise I might eventually get around to it. Obtained from: bz/wireless-dev Sponsored by: The FreeBSD Foundation (cherry picked from commit b35f6cd066128f8cf0b7f3125529f59dd8ba3059) --- sys/compat/linuxkpi/common/src/linux_80211.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index a123e7ccaa4a..9095890c3dbc 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -70,6 +70,8 @@ __FBSDID("$FreeBSD$"); #include #include "linux_80211.h" +/* #define LKPI_80211_HW_CRYPTO */ + static MALLOC_DEFINE(M_LKPI80211, "lkpi80211", "LinuxKPI 80211 compat"); /* -------------------------------------------------------------------------- */ @@ -364,7 +366,7 @@ lkpi_opmode_to_vif_type(enum ieee80211_opmode opmode) return (NL80211_IFTYPE_UNSPECIFIED); } -#ifdef __notyet__ +#ifdef LKPI_80211_HW_CRYPTO static uint32_t lkpi_l80211_to_net80211_cyphers(uint32_t wlan_cipher_suite) { @@ -395,9 +397,7 @@ lkpi_l80211_to_net80211_cyphers(uint32_t wlan_cipher_suite) return (0); } -#endif -#ifdef TRY_HW_CRYPTO static uint32_t lkpi_net80211_to_l80211_cipher_suite(uint32_t cipher, uint8_t keylen) { @@ -558,7 +558,7 @@ linuxkpi_cfg80211_bss_flush(struct wiphy *wiphy) IEEE80211_UNLOCK(ic); } -#ifdef TRY_HW_CRYPTO +#ifdef LKPI_80211_HW_CRYPTO static int _lkpi_iv_key_set_delete(struct ieee80211vap *vap, const struct ieee80211_key *k, enum set_key_cmd cmd) @@ -2295,7 +2295,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], /* Key management. */ if (lhw->ops->set_key != NULL) { -#ifdef TRY_HW_CRYPTO +#ifdef LKPI_80211_HW_CRYPTO vap->iv_key_set = lkpi_iv_key_set; vap->iv_key_delete = lkpi_iv_key_delete; #endif @@ -2925,7 +2925,9 @@ static void lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) { struct ieee80211_node *ni; +#ifndef LKPI_80211_HW_CRYPTO struct ieee80211_frame *wh; +#endif struct ieee80211_key *k; struct sk_buff *skb; struct ieee80211com *ic; @@ -2947,7 +2949,8 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) #endif ni = lsta->ni; -#ifndef TRY_HW_CRYPTO + k = NULL; +#ifndef LKPI_80211_HW_CRYPTO /* Encrypt the frame if need be; XXX-BZ info->control.hw_key. */ wh = mtod(m, struct ieee80211_frame *); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { @@ -3037,7 +3040,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) lsta = lkpi_find_lsta_by_ni(lvif, ni); if (lsta != NULL) { sta = LSTA_TO_STA(lsta); -#ifdef TRY_HW_CRYPTO +#ifdef LKPI_80211_HW_CRYPTO info->control.hw_key = lsta->kc; #endif } else { @@ -3493,7 +3496,7 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) #endif ic->ic_cryptocaps = 0; -#ifdef TRY_HW_CRYPTO +#ifdef LKPI_80211_HW_CRYPTO if (hw->wiphy->n_cipher_suites > 0) { for (i = 0; i < hw->wiphy->n_cipher_suites; i++) ic->ic_cryptocaps |= lkpi_l80211_to_net80211_cyphers(