Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3642049pxb; Mon, 24 Jan 2022 14:13:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2Hf566XUIi8H2dkTFG1jr7TeLSZgfMSk1JP+2QDqVgBb/jebzy1CnjsnVnzoeU10tg25N X-Received: by 2002:a17:90b:1108:: with SMTP id gi8mr399742pjb.222.1643062386034; Mon, 24 Jan 2022 14:13:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643062386; cv=none; d=google.com; s=arc-20160816; b=iUeRK3iGP+GNSQDAAOD761y5/cv5psRrF9yVZmAnojISdBQyi+rHt6hNU5wFak+jYa +ISvHK2nKk/0hJKKMb4xL0N/HAqBwZ7n0OLMOjo5TzDnN4iORZHpg8Eh9e8sX9vAc0pT Nf7IFG5xqFVEBWWQzvUVTr9hhaz7BMmQCSE7OCHuSEZaP8WKwfIND8/mavj0RuqkzNOm 1IHgq+lcGzvQnsBV//C9rNPs9Rh5CH5lnarmjnnaD+Fw/WT+knjqCI4InSsWJEpXOkEJ VTnDzOlY1qP91DACBCS+8ML+1jHMhSd8d4MTQkIQc/JQtC7kNB+LoX+DRL679GxSDTUa 8Vaw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GU51dogTJ+PPQNCRbgLmfFHlavHiqO01wYqDxe+EvKw=; b=qcP1LuRWk7XGKzUrWyCDQaDSutD1CPeG+/kEASdf2HEZ8ZIOKlVC6AF2ytJ17HNUFO YHgrz/5SiYZj9jr2yuUXX+7ULOchU9i3zyTXxf2+yLP7cfU8r9UXoY6ZZkUAGLij26FE h7fJFcHJRczIHupgm8DHCk+a69+aqf2xVCx+UVBgxt7gMU8s9b3UtvWBE8ytd9WoXoTq 1mNdl6caEyLPBCNrJyWqquA2Eq0Fh0iZq0gZGrFtD1sgTo57QDk4Ag0K41IvBzJUhQF/ Ecu5LvatD/OnnPLayfXveofNZP4S+bDaVnOLEZWv+VJ7eRrGdu/HyFxZYl+5Wu6RdS8C HYKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PS1WVTHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si10794372pgb.674.2022.01.24.14.12.53; Mon, 24 Jan 2022 14:13:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PS1WVTHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574295AbiAXV5h (ORCPT + 99 others); Mon, 24 Jan 2022 16:57:37 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:44732 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1451155AbiAXVWS (ORCPT ); Mon, 24 Jan 2022 16:22:18 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8B68861469; Mon, 24 Jan 2022 21:22:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70DE1C340E4; Mon, 24 Jan 2022 21:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059337; bh=HFolmNo+c+aMlXO4NpVNNdLLeHerT2CSqgdw0YSR8sc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PS1WVTHwgWsa3AXLC/FIFz+X8dECP8jyRRpaTelFkbfI6mijmzmqZS/bp36XV7ABA yLS+Y3f7Rf78AW0uGrhtgjWjnDvtt9oawO3/x/PcjkvMfnlqOFe+Uf2hTjcwb1aYxx Yy06IiGLnHuNZ4HejDAZ3XAQAsPFWyYbIXLqpkpo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anilkumar Kolli , Kalle Valo , Sasha Levin Subject: [PATCH 5.16 0581/1039] ath11k: Fix mon status ring rx tlv processing Date: Mon, 24 Jan 2022 19:39:30 +0100 Message-Id: <20220124184144.872005397@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anilkumar Kolli [ Upstream commit 09f16f7390f302937409738d6cb6ce99b265f455 ] In HE monitor capture, HAL_TLV_STATUS_PPDU_DONE is received on processing multiple skb. Do not clear the ppdu_info till the HAL_TLV_STATUS_PPDU_DONE is received. This fixes below warning and packet drops in monitor mode. "Rate marked as an HE rate but data is invalid: MCS: 6, NSS: 0" WARNING: at PC is at ieee80211_rx_napi+0x624/0x840 [mac80211] Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01693-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1637249433-10316-1-git-send-email-akolli@codeaurora.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/dp_rx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 22b6b6a470d4c..621372c568d2c 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -3064,10 +3064,10 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, if (!num_buffs_reaped) goto exit; - while ((skb = __skb_dequeue(&skb_list))) { - memset(&ppdu_info, 0, sizeof(ppdu_info)); - ppdu_info.peer_id = HAL_INVALID_PEERID; + memset(&ppdu_info, 0, sizeof(ppdu_info)); + ppdu_info.peer_id = HAL_INVALID_PEERID; + while ((skb = __skb_dequeue(&skb_list))) { if (ath11k_debugfs_is_pktlog_lite_mode_enabled(ar)) { log_type = ATH11K_PKTLOG_TYPE_LITE_RX; rx_buf_sz = DP_RX_BUFFER_SIZE_LITE; @@ -3095,10 +3095,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, ath11k_dbg(ab, ATH11K_DBG_DATA, "failed to find the peer with peer_id %d\n", ppdu_info.peer_id); - spin_unlock_bh(&ab->base_lock); - rcu_read_unlock(); - dev_kfree_skb_any(skb); - continue; + goto next_skb; } arsta = (struct ath11k_sta *)peer->sta->drv_priv; @@ -3107,10 +3104,13 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, if (ath11k_debugfs_is_pktlog_peer_valid(ar, peer->addr)) trace_ath11k_htt_rxdesc(ar, skb->data, log_type, rx_buf_sz); +next_skb: spin_unlock_bh(&ab->base_lock); rcu_read_unlock(); dev_kfree_skb_any(skb); + memset(&ppdu_info, 0, sizeof(ppdu_info)); + ppdu_info.peer_id = HAL_INVALID_PEERID; } exit: return num_buffs_reaped; -- 2.34.1