Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3809023pxb; Sat, 13 Feb 2021 09:54:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwM1fS5qypZcwhTsI48keS3TfhX5MXzTl2oVPc0lrwfKWO0CgH5czfkwFVbzz6vrwpGR0n X-Received: by 2002:a50:ee0e:: with SMTP id g14mr6610427eds.159.1613238871441; Sat, 13 Feb 2021 09:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613238871; cv=none; d=google.com; s=arc-20160816; b=s6FZPzRmFYZ1r4BFvl215mQtPUV8Rb7cwfF8irg0XCvc5/BhpounKNYJlYx12dhKWa zR4pEiqsggBb3/lqRnr6rP+K9OKb6JERs3BgXswBL/2CHdGvrjNhPATxmIDk31dsiCns Y4ygpStEiOkNk2+eId61fRoFRJMzchcaB8GPuf7VbnZOAVvR7jxmS9RU+6D5Anif0zo/ 6yz+dBS7mMzl0Z5ztfYXKSyDOBa0A7b3wTec0iTk1Fo/BJfsGgSnbg6DjhK572VGWRct osbLo+07XS9BE5j57voV0AxQOeDBHt4o0EdUzuWWT829rkGrmeAkX2NA9WAx45Y5CxAq dg5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=G9F6VKR3TSxKc9JsmX1NhvtHG6bhVYS5d9vOIttb2Xg=; b=sDS64VBfIgqxmpjg4R9OD4hH5bGa+uKPO8xD73D4Ibfvg9vrfHr05J9rSSXbnDQFyx rreWrtfDXXx9PKIbDhgsP+ZJ8TxSqMKqakiH4pJLakHCoA/Xv6yMoE62RjQgX2epgyeN UANZEgFDAFoeA75yA4WuS5GEbF/puEbFuR4g31TIQuEK3SeFNps+nwIpjeb+YqbBck87 cX6Xy3Uh8lV/7qcpHCnmg4h6qVI25d/iDBrZQs2j3/dUH6PacW6eOwQhN3/Cx21f9fpw KjvJM9Sptd/titJfzf0PxkrxRACrGzpAWyEY6sRwrCtOeQPZwKI7riZ4ipwrI9vhWhx1 NRNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=PbiFJvhe; 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 d2si9109175edv.274.2021.02.13.09.54.09; Sat, 13 Feb 2021 09:54:31 -0800 (PST) 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=PbiFJvhe; 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 S229744AbhBMRwM (ORCPT + 99 others); Sat, 13 Feb 2021 12:52:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbhBMRwK (ORCPT ); Sat, 13 Feb 2021 12:52:10 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E090FC06178B for ; Sat, 13 Feb 2021 09:51:05 -0800 (PST) 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:To:From:Sender:Reply-To:Cc: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=G9F6VKR3TSxKc9JsmX1NhvtHG6bhVYS5d9vOIttb2Xg=; b=PbiFJvheUJ4FrQt30QaRf09nn9 viBdVcFVSv0DthUbNkQuMT0qL94jfjVByJVZwo213f90n3pOuWO74shmUEvA6gr1N1owHBmAhjrvc WbQ8Az/2sIwIl1BaLCu9DfhradeEZu5wARVDI0HyvqwmCcOY5A/rzYqOeX3q6YN7KNc8=; Received: from p4ff13c8d.dip0.t-ipconnect.de ([79.241.60.141] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1lAz4R-0007si-0c for linux-wireless@vger.kernel.org; Sat, 13 Feb 2021 18:51:03 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 6/7] mt76: mt7615: fix tx skb dma unmap Date: Sat, 13 Feb 2021 18:50:59 +0100 Message-Id: <20210213175100.22608-6-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210213175100.22608-1-nbd@nbd.name> References: <20210213175100.22608-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The first pointer in the txp needs to be unmapped as well, otherwise it will leak DMA mapping entries Fixes: 27d5c528a7ca ("mt76: fix double DMA unmap of the first buffer on 7615/7915") Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index c97ec70772f3..9bae2f66e1ce 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -690,7 +690,7 @@ mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) { int i; - for (i = 1; i < txp->nbuf; i++) + for (i = 0; i < txp->nbuf; i++) dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE); } -- 2.28.0