Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp498803rdb; Fri, 26 Jan 2024 02:00:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzBi3W81BtPtnttRpNH1S9NRKVCEYW/R/gt0Krcbf2J8SFLiSAg9m0jdQVXe1AoYRfNPeG X-Received: by 2002:a17:906:eb58:b0:a2d:357a:f5f8 with SMTP id mc24-20020a170906eb5800b00a2d357af5f8mr575184ejb.39.1706263219312; Fri, 26 Jan 2024 02:00:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706263219; cv=pass; d=google.com; s=arc-20160816; b=jxYH29FjjOUFaNW7FgTDiTOmDJPC97b5eepGD7oaNuSQldrBdfxxag51luLCWRpumn gj9uB+CkDhHMMtYU1zAwvF3K4W4+RMrJcmxvzJsSBd9YRjXGj+p+FBtlBapEc/X9gjnu qgVsVl10xPSje/AbVqY0QAJNOSaWZpEVH7dylM44/P/i33IZS4KYXNfoBya5VfbxiLUn wk1/fvEtg8oFiOqiDYacA9UPEwTgxHy/1fxKOqW6I6nom1/J5lubj3ocCt+5Rg0l6dZK n5H7JEsgk7aSvUKiR5KlKRWzACqB90nKGp6DEg1HpMzCNpQ5TjmchKLvmFVr9G6Q2dHJ 8oog== 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=unek80EtUWQr3LnsBnDbLhlsOeW0iRTfFxZ5Aaq2400NWdIVvtCkTU54hcBW/xnDez qpcxWYQtoWqcJIFvmhNnxFyXjjcgKVmwwSje5odvtE36JQuc2RxJ6TNKLP1yTcBbY7A4 TYCyiUuUZcCPzFRL6ZpuIfejFagyIqhvbLGrrdjqEmvm/d8U1/tWogL9xyaFhttuCIRN FDgCXE2OwNXQGTARp4Xv78kGiGrRgfsLkhPmIExFQueHcXCgKZhd61uKRbsb8w92pCCr 86tnz9K+MXB/PdNgUeDyxzmSOuCJyPMGbR5zLaPIchkYKjZ0qzWy4jO8RYXwP8vxiJc4 KhTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ANMCx5un; 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-2537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2537-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 ay21-20020a170906d29500b00a316b67c0e7si439969ejb.851.2024.01.26.02.00.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 02:00:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2537-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=ANMCx5un; 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-2537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2537-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 2F5DD1F2849F for ; Fri, 26 Jan 2024 09:59:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2CA5163416; Fri, 26 Jan 2024 09:10:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="ANMCx5un" 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 6D91563122 for ; Fri, 26 Jan 2024 09:10:05 +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=1706260207; cv=none; b=SC+mKzO6lkvDUKGlPh0wUl6aA+L5xuq/PAPfKDSgPKQutfTh4ACOijBSbk1632CacVtqTqbM/SzGnqoXGuL3IYghlaMaX2uMKdeh13lP+YbJcetMgxnSd8lozGA/Z1YlPDIpSAQvXBzOS650iOvnQrOddWan95DeD7PwtSvQ9HE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706260207; c=relaxed/simple; bh=BxwgrU0ofL3JmxkJYtFcfTfbjdR19Rtt1wMPgUwUpu4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sVu1/ZTtCsS9LmlXghdr/e1qt6924oQZtHVIWpPvWsbRFD30JzAAeMn4G/PCfravM+k2W9rVrM1Sc567NSAINfLsxT5QToqPntN6IU3LWmsgPHJXpfDAc5H6704RyjTanDZixoUfz4U/YzGkR4c9nlBTTyW5hsYLc6KF9NPFM4o= 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=ANMCx5un; 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: a912c9dabc2a11eea2298b7352fd921d-20240126 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=ANMCx5und86J+mKal5Xw5Y86sFvMqX/FAw5mDaB5a6OAyp5Gr7uzryM/EyeBk4TQccfJhmM0ezjSgSrT4E3z8X57GLMSn8jS6RTLD+088mOSERNbatqQzBZo1TD+I/YC9ymOW9XehN5OpnUWeFY225oDEnv1m0RHUNUfFpAtf+Y=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.36,REQID:41273fe9-4175-49a8-97fb-1a86cb83dbbd,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:b955b08e-e2c0-40b0-a8fe-7c7e47299109,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: a912c9dabc2a11eea2298b7352fd921d-20240126 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1463373812; Fri, 26 Jan 2024 17:09:50 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) 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, 26 Jan 2024 17:09:49 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 26 Jan 2024 17:09:49 +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 v2 03/12] wifi: mt76: mt7996: disable AMSDU for non-data frames Date: Fri, 26 Jan 2024 17:09:14 +0800 Message-ID: <20240126090923.6357-3-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240126090923.6357-1-shayne.chen@mediatek.com> References: <20240126090923.6357-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