Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2466309pxb; Tue, 13 Apr 2021 02:34:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4y6kGltGKQ7AA5K6jrxS7wc9Cm+ro0p5YtuIqrexJGvRgsOOq01v0+C4FOD7yzOUY6kUv X-Received: by 2002:a17:90b:388d:: with SMTP id mu13mr3930300pjb.34.1618306495828; Tue, 13 Apr 2021 02:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618306495; cv=none; d=google.com; s=arc-20160816; b=AefILk9wKwxaTRwAlD9CmiFv7s4zUbIez8r/8uZHPzGJqKg46jbHLwtMKAy20RIDr1 DP7jZEtsNRYAtH+V0cEnmIqbl7PEmlbgwTNJz9iD6WmklKo0ckhSqgWHCTjfpmld1x9r CV1jEmZDn2TSdlJK9908fiSQjPspYoN5RKmvb5jUTa4RHPs9A1eP1cNk8+fvpQL+cwwa WkuuhmzcwU25xFhm3SwV060Ux4PPzZu7q7IVnviCTqfYMnzw0TzSFrEMH4mmFuIKHhR/ RyP54zOz8r2TulKcPGlCbopt2vpEGLdx/6zkHN5XdGufmL2KJnAsbGogIfiiE7q3x/QO vn0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=mpRb1aQ6v4SWOWTKsMUXv+NwCii2KlFog9sUnhQsZ/s=; b=M6otVKGFG0ILunf2bukKEBuhIOOT4Djbm/4V/bU0P1s8frhM/diJW98avpLeVkyXVV CxxehNWA+ZzPdiRckWUfPRPgJu3vQF6qXTg6yxql0W6+k56RieQYFgxFRehleGBCycaf 9JQ75QoL0bOkzX3TXRkGWqotGd7cc5c0Rs/qElPlYJ41H4StY2VSyXIVCzg7NhLmdmVJ 1tYiJqLZeRQIb7muNA67KZRGJLS+1xJjtQ114RrFq8HH5RkGqNwr98wPqOOfV3hHNKtk 0bErARiFEMoHvb+CvV+9VtJI4ayR/LJDfA9h1eXZIBKI/Evq+pfD6XIps021JJ933JKy bKhA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx7si2484395pjb.96.2021.04.13.02.34.42; Tue, 13 Apr 2021 02:34:55 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238045AbhDMIAk (ORCPT + 99 others); Tue, 13 Apr 2021 04:00:40 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:44754 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S237910AbhDMIAf (ORCPT ); Tue, 13 Apr 2021 04:00:35 -0400 X-UUID: 7bd0954bab934350b01f5778b6da6092-20210413 X-UUID: 7bd0954bab934350b01f5778b6da6092-20210413 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 824413820; Tue, 13 Apr 2021 16:00:12 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Apr 2021 16:00:10 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 13 Apr 2021 16:00:09 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH v2 2/2] mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put() Date: Tue, 13 Apr 2021 16:00:07 +0800 Message-ID: <8fb069c7b6ceb980eb3507db65e4c29fd0aa502a.1618300405.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 6DCE9685DFB0582C41650AD57142A7B045E2BC8EA23BAA34EC97A8422B0FFDA72000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org We should use ieee80211_free_txskb() to report skb status avoid wrong aql accounting after reset. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 60aadf8a09cc..ce71e2c5a8d3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -2037,8 +2037,12 @@ void mt7615_tx_token_put(struct mt7615_dev *dev) spin_lock_bh(&dev->token_lock); idr_for_each_entry(&dev->token, txwi, id) { mt7615_txp_skb_unmap(&dev->mt76, txwi); - if (txwi->skb) - dev_kfree_skb_any(txwi->skb); + if (txwi->skb) { + struct ieee80211_hw *hw; + + hw = mt76_tx_status_get_hw(&dev->mt76, txwi->skb); + ieee80211_free_txskb(hw, txwi->skb); + } mt76_put_txwi(&dev->mt76, txwi); } spin_unlock_bh(&dev->token_lock); -- 2.18.0