Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp91066pxa; Fri, 21 Aug 2020 01:55:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgqvjFuNgpuJ0zl8mG6ezUS9Lg8oQ7ZZ9BeSaijJC1Jau5Kxj4RFAglc5qPpMDlCc440BO X-Received: by 2002:a05:6402:180d:: with SMTP id g13mr1653874edy.277.1598000146117; Fri, 21 Aug 2020 01:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598000146; cv=none; d=google.com; s=arc-20160816; b=ssVrAcG6B4lwI0hNBobiku0qG9nOj05MK6NF3L2iSbNVu7aRqcEz5kdpJ0qCLxSkr6 K/Pzx90ImxiCrSih7oPWyTVBEJ4TJqAkLK1v2IzrHNGxRQ775qcfQV7hp7c1HqYB+JIv OnTPwlqfytuDIzDHew+pDwu0y3aVAJktIfFelTKbtOh0EZIn2olRCgNEEJGDVqkls8aR Ucc1GEhOb09HSwmDUJZxGf/IcO2xKmutywajXElGpehKzdpvuD2tu8Pdec5FYYYXp1R2 +ERWJ4PaHCgIqRBddbkqE2ttYh7KVR6k9yNETh8L3x7pnKAdsKpMW2q2QCAZfnK4MVX9 qTEg== 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=u/ULvyrFXFStRPF2UCZRPegSH5Ly2n9+rYoDqYAwl6ATsXT2soHgEr4JFGxxHviJnU vQFGkcmePjq/GNKvQxe7GFfYcTc5c3Lc/JC8KwKSDnZwMrN2cxso9KAc9FcsnoGU8PEF Bx0lU7kB33vQcGEm34itXKDMpeHj/NG/DSqx1mhLo5MAcn7lVmgdX9ntZqqh/mUCH2cx +ofCqIzq+WxjJDw3ENh6egPlxLjOVPPm2Lxio2tR75Qm40IM95pg9Jp0uNt0eS3kO0rx KKAkUOJ9BcpVknS1qZ4Tyx3FJ1db1LiNpcptls7OYbez5lXErdN99Sj1QLojGX0qa0FM j7+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=FV7DWwVi; 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 u22si692656eja.418.2020.08.21.01.55.22; Fri, 21 Aug 2020 01:55:46 -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=FV7DWwVi; 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 S1727006AbgHUIzL (ORCPT + 99 others); Fri, 21 Aug 2020 04:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbgHUIzJ (ORCPT ); Fri, 21 Aug 2020 04:55:09 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDECCC061385 for ; Fri, 21 Aug 2020 01:55:08 -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=FV7DWwViNzfvm5G6b9vanVFmT0 IJ8uygSy/dfqf0WQT7KfI8ziRHLTz9lqbvFOmwBr19t+kXYLC8V0JvRjJ/Au2jwA9KqXMJddSjXTv MtP8ObNC4sjjUXZh2dRBZWKyzhRmBceB1g50iDOGYnbc8QE3e2Z5t/bRWnHajQsSmlDY=; 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 1k92jr-0005lO-Jy; Fri, 21 Aug 2020 10:49:31 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH v3 13/13] mac80211: set info->control.hw_key for encap offload packets Date: Fri, 21 Aug 2020 10:49:26 +0200 Message-Id: <20200821084926.10650-14-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200821084926.10650-1-nbd@nbd.name> References: <20200821084926.10650-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