Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp595702ybl; Thu, 22 Aug 2019 01:47:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFs5mO3TlqhdtxwiAIDTlUrafAYdeOotbl3X6VuZKkXDPTgfx6ZzDJ+gJaydLSulrk5gBV X-Received: by 2002:a17:902:7108:: with SMTP id a8mr7300825pll.1.1566463622199; Thu, 22 Aug 2019 01:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566463622; cv=none; d=google.com; s=arc-20160816; b=HK+L3xQtY08JM6K+pAFH8ZJsxXcpYZphrO9p5i0qaVOBe51nYxM/WVXClLtbAqCZVW aqFDGOF9NtklxcuF2IqQJE9/q21DFW73vfq/mACMr6rDIwTLKQIc5IsPmqIc7LIzts+n kaZw5A5nbjXw8PolEXEfPDr0NQFD2PiMin25TNSqHQ7Lj37a16lS0xFffGhq/h5FYNhT QbSkjq2fhNhKCeb5nQJF+oSRqfxBcgus33VqkdnTGbytxwdAd1dXW8rg95Ld7zzMmiZ+ ZLN3K3LVksgoyT6ILLepPwfXZp3KDe1QZCx2jW5N83vaK1cPY54/VlFjcEi89D4Fe6U5 J1MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=4UbZBAtKMdW9eRXallmw+x2PGiUizCpLIyoNyqs2rEA=; b=WOHK4HrxBqPvXzyMBCPN/IolSBAzUbslj33AfegGPw9/xJkqs7GNoNqAvIUkKVIdC2 VhtjZCb2qAbkzhgZ1Nref7ZEd5Emrjnrp5GOmHh4Ownga7UNk0/ZxcatXX+bmTTTtKJO dB7FSA01wm/k7ymM3rif7Bgag/2X41ZxDx79tjHzdF1KN6lz/krP+eI7pN1ASJuWtSFn RVemesWo5thBHFAMX5w2flmBZh+H/fS9cr8+zoqkX49rkrY0v0i2FnmRX6/1zxvkdxXH 4ZedGm4W3d2bBKKB+va5pjWt57WZR63dtvUZkHb3t2b4Qxey9vS4uxBZtEqL0Kv8APEM gFzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=MweCc1qK; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r9si16812763plo.104.2019.08.22.01.46.48; Thu, 22 Aug 2019 01:47:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=MweCc1qK; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731609AbfHVHdH (ORCPT + 99 others); Thu, 22 Aug 2019 03:33:07 -0400 Received: from nbd.name ([46.4.11.11]:48310 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbfHVHdH (ORCPT ); Thu, 22 Aug 2019 03:33:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4UbZBAtKMdW9eRXallmw+x2PGiUizCpLIyoNyqs2rEA=; b=MweCc1qK3ifgmIPM0kON22XDS9 hLnx2ExvgUtO1Ci7ANCuaYmriAY598HZb5ziH+FjeyTckDRjyP2bkyfq5AGSfmzV2RERzODpMrrkF 2RqZMXVeulUNf0KRDJk//BZ8A9CRyTqXNoltjG6tabKV4SGe7WsbVeoHFlLfjmvzfldc=; Received: from p54ae9443.dip0.t-ipconnect.de ([84.174.148.67] helo=maeck.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i0hak-0002gv-0U for linux-wireless@vger.kernel.org; Thu, 22 Aug 2019 09:33:06 +0200 Received: by maeck.local (Postfix, from userid 501) id 7967A63FD13D; Thu, 22 Aug 2019 09:33:05 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 1/2] mt76: dma: reset q->rx_head on rx reset Date: Thu, 22 Aug 2019 09:33:04 +0200 Message-Id: <20190822073305.37840-1-nbd@nbd.name> X-Mailer: git-send-email 2.17.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fixes rx of the first frame if a fragmented rx was interrupted by the reset Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/dma.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 46f5223b4d89..c747eb24581c 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -431,6 +431,12 @@ mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid) mt76_dma_rx_cleanup(dev, q); mt76_dma_sync_idx(dev, q); mt76_dma_rx_fill(dev, q); + + if (!q->rx_head) + return; + + dev_kfree_skb(q->rx_head); + q->rx_head = NULL; } static void -- 2.17.0