Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1763186pxa; Thu, 20 Aug 2020 21:28:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNRwQjlaRqKMIBWrYoo1U44ThFssEsFxnVeeE7fKjNvXT0pAye4pyWsrVCGc/4aS0FE62i X-Received: by 2002:a17:906:7492:: with SMTP id e18mr953649ejl.375.1597984129633; Thu, 20 Aug 2020 21:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597984129; cv=none; d=google.com; s=arc-20160816; b=hLpC7+Uog/CL5+9S7DG+V5sNolupRUIsubmpOZC6TJjiLudqn3pI/vXcy+rh44kLUS 9mE4y4yrylPrm8nD1NRQIi0253hv2Ioz7ZFHudTzpdH2xAyA0oGjPzQ36EAQd/uiYP2n ZL863OcX/hhdSJlg58Wh/yy6aRagrbOcNjezNgcSt9ByAF7x5Vm1B69uET5VNmPv+KYz kYVXKxfhMpiTJitMdjJ9QrTmoCzgg+Iq7jPVBT7VKXXrJ7lPzlj4LW1bKBszlWiFqQsR HkYg/0h/WHleLVQ+m3UoB9H55vW3mqMm/CccgAOMiLrEaw5Q3fq6zOv3vwDi30EgqbS4 GF9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Ph7ZH4jmXu/uxMcDwQcp83/aBFYb/qx5NJX2udfT6s=; b=VN6cX6Jg911soFtWUct778A1GYpsxeloMxODU75+PooEIle7kPLkEtql9gbaRFNLWq adxYokHMRSIMCQuNBPw6VXfnOH1rg0cgoTgVRz8VOJBxMExTme8RcH3Fbsl3G1Z7AZq0 lRXsBB7yJpkKUmnaxarNmhTpgAS+1gr0foxxR59ev78C0W0K0cZF7VIGlsQGF2Q3dBZu xkMhoTJpFgjw4s54vDZBti2eEHS0yPWthobqldY/xJsVUm3qDux89H0ncOc9PGIiT29D /nlmyFKZ+AhRkFzIEyeVCygwTlVyy3XlNhKt3g7QMcrarQgNdl3K7LRhh8SZLkYMcWoo bbDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=DIqdEo7q; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay7si476958edb.183.2020.08.20.21.28.24; Thu, 20 Aug 2020 21:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=DIqdEo7q; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbgHUEZN (ORCPT + 99 others); Fri, 21 Aug 2020 00:25:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbgHUEZL (ORCPT ); Fri, 21 Aug 2020 00:25:11 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83ECFC061385 for ; Thu, 20 Aug 2020 21:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3Ph7ZH4jmXu/uxMcDwQcp83/aBFYb/qx5NJX2udfT6s=; b=DIqdEo7qUzgF+BgeW0OAe+GbCk Ybqu0XVyeALdWpHzjwtrtmpN8wrvVhlY+F26BAxPmLOkJ14QDqjEMS0Hmm6Jn17Cra/5eDT2nsWlW dxrtxGxsoQs1qlrqoMnCSYQMx4+wZc2UaiJAp9Ssq3TzUrYHZJcavBupnKxJamm01QRs=; Received: from p5b206497.dip0.t-ipconnect.de ([91.32.100.151] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1k8yX8-0005s7-Li; Fri, 21 Aug 2020 06:20:06 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH v2 13/13] mac80211: set info->control.hw_key for encap offload packets Date: Fri, 21 Aug 2020 06:20:01 +0200 Message-Id: <20200821042001.23388-14-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200821042001.23388-1-nbd@nbd.name> References: <20200821042001.23388-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is needed for drivers that don't do the key lookup themselves Signed-off-by: Felix Fietkau --- net/mac80211/tx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 4cf4840f2886..e3d061308113 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4194,6 +4194,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata, { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_local *local = sdata->local; + struct ieee80211_key *key; struct tid_ampdu_tx *tid_tx; u8 tid; @@ -4242,6 +4243,10 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata, info->flags |= IEEE80211_TX_CTL_HW_80211_ENCAP; info->control.vif = &sdata->vif; + key = rcu_dereference(sta->ptk[sta->ptk_idx]); + if (key) + info->control.hw_key = &key->conf; + ieee80211_tx_8023(sdata, skb, skb->len, sta, false); return; -- 2.28.0