Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp867908rdb; Fri, 19 Jan 2024 00:58:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+BjXuq2Pspk2RqJOCnoiPTHbfk0y7oiy109JhPFVIEHWmP85VxRY57IGWai0ZqEcIIoo8 X-Received: by 2002:a17:906:704:b0:a2c:cf26:3f5c with SMTP id y4-20020a170906070400b00a2ccf263f5cmr1354609ejb.109.1705654706827; Fri, 19 Jan 2024 00:58:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705654706; cv=pass; d=google.com; s=arc-20160816; b=mNed1NU2C9qUTKqpweBM0D61Xh0XYWaVW1WpGKR9IWIkg0wuaBWcOoN1hOOFsVxsM0 WKRoC4IxyX5wIeWxaxU5PuO947UDq+r145Ilv2trLlQwJoz+Pnk9cmJjvoefSE5B4OHT 7mm8IFHekZDh8g6oZudAPhI+BAOmDrawuariHLKYHqF2dFyYGXbaA4glz/AmgYqgzYVH uiA7G343lQIJ41JZttcIR8/ljgzOER+3pxcI5CV4hoHodUIy0rU28NzoOJiOhkJ6MFxv CQloAW4Hm39RJGzrq7m70j25uJwZiaHZ72p7D/iDHxP0qLa8+NIep52Dg2Q/8Bvvm1RR Z6Ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SwFyHTrfsGQICXRvxIQhK56mgj4YCkqjfngDkZlF91U=; fh=7C7YVp+0PjKaRfztwfnK3t116drZsM1TAGznzzXJkag=; b=Wt3QVGMzKlFKDLMeQmOYIJOJTvuTCV9VvXMtx6j8H56BYj1U0akhuJgCIG2jSsirDo vdjr14+5a4ivkYDjQWlNcUcl4KaclaTTpoYT+zO3U+xmNnlraH5OZFsWFxf3sh7QzLZK lGFqQtx1WhtY5LEZiZifrGgbzabB5uq/KNdb/nQOCqGsByfadnN8K4rMFbEaN0PT2Yyi PVYUZFE4difl3Uz30OxnNxlDGJs+s0dRzP3GqGmo0PjWGZDo4ztD8lMUDhY0KMIcc7ba xUrHeb/beq+8xMXIUIw9I1wfsz33k9/pfiKgmekC7zcD9vLz3XMC+pSqR88t2KvDw3W1 77DQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=afvsAkwL; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-2243-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2243-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j18-20020a170906279200b00a2c29ce2d44si7503028ejc.235.2024.01.19.00.58.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 00:58:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2243-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=afvsAkwL; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-2243-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2243-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 964F41F23950 for ; Fri, 19 Jan 2024 08:58:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F07728E21; Fri, 19 Jan 2024 08:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="afvsAkwL" X-Original-To: linux-wireless@vger.kernel.org Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66EB725772 for ; Fri, 19 Jan 2024 08:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705654667; cv=none; b=lexLwI0kNnUFNWjZkx1II9fBK1UriMvqTAYN//IQSfaH3TSP7usVX1NpRdizQPNqgwlOIne/pT6jPv2T7pAK+moiEFFgw237F10VxQULEtZszTv3BwUpYYOJ0fPuxniX1e1fjS29/LxT8cwuXjDrfnWYy88WqWb1HlopT2UxhCQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705654667; c=relaxed/simple; bh=BxwgrU0ofL3JmxkJYtFcfTfbjdR19Rtt1wMPgUwUpu4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nfV1/hBZflLTYiBbuCqDFvv8YBAE45CC0dtmlMsP37gnqG7gDTeSEoTGVY9g2B/rKfCa1usjSssI7oQgtQkMHE4d8V0QzWXBkt7vdwq3GtJAjXdYnHaMrV48WC3fb/wG67KmcNEbFYdKuOLxvoyQZyawIQRHu0U00bqKR7dZpe8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=afvsAkwL; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: cae3d072b6a811eea2298b7352fd921d-20240119 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=SwFyHTrfsGQICXRvxIQhK56mgj4YCkqjfngDkZlF91U=; b=afvsAkwLOzlQ/akP7PCxLF9ZlcI3ShfC0zPIbRq/osikYHb32JQ2KTMxcIIBi1S83Ch3oGe+7SI9Lm2I/5H5wjFpc0aTd37RGRs3drQmFUow46TEZOGQCiSZmVTZUDPrtBvCRAiVIH4pH6JGWXNIKLNx6XI8ry43WS0EXm8/NaY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.36,REQID:49a48be3-5ba9-4501-b204-c08e4ae20392,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6e16cf4,CLOUDID:48bd582f-1ab8-4133-9780-81938111c800,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: cae3d072b6a811eea2298b7352fd921d-20240119 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1789610462; Fri, 19 Jan 2024 16:57:36 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 19 Jan 2024 16:57:35 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 19 Jan 2024 16:57:35 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , Peter Chiu , Shayne Chen Subject: [PATCH 03/12] wifi: mt76: mt7996: disable AMSDU for non-data frames Date: Fri, 19 Jan 2024 16:56:59 +0800 Message-ID: <20240119085708.23592-3-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240119085708.23592-1-shayne.chen@mediatek.com> References: <20240119085708.23592-1-shayne.chen@mediatek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N From: Peter Chiu Disable AMSDU for non-data frames to prevent TX token leak issues. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c index 63d34844c122..0384fb059ddf 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c @@ -732,6 +732,9 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi, FIELD_PREP(MT_TXD2_SUB_TYPE, fc_stype); txwi[2] |= cpu_to_le32(val); + + if (wcid->amsdu) + txwi[3] |= cpu_to_le32(MT_TXD3_HW_AMSDU); } static void @@ -862,8 +865,6 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, val |= MT_TXD3_PROTECT_FRAME; if (info->flags & IEEE80211_TX_CTL_NO_ACK) val |= MT_TXD3_NO_ACK; - if (wcid->amsdu) - val |= MT_TXD3_HW_AMSDU; txwi[3] = cpu_to_le32(val); txwi[4] = 0; -- 2.39.2