From patchwork Fri Nov 22 17:34:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamizh Chelvam Raja X-Patchwork-Id: 845105 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 8EC0E41C72 for ; Fri, 22 Nov 2024 17:35:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732296926; cv=none; b=or3TaCrVQmBIo35zndjuN6bYVvh9s+DnRRCf/kb5EzVnDsG/VZkqybLlWpn197iJD2cYN3mFWSMVO7g5toVLArqFruFa7EjWBAHBg5TaGP4Iab9ftu7cXUL/0yYEvQ162Jf0YkJfI37JgPEzm8m9yGtMwog3GV+Jwy5+a2GkEC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732296926; c=relaxed/simple; bh=ERXRrwz7Q/uDo7OIQvVWkSZdsjEOkTbrtZGFiJG6gBM=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=MyRm6bNbIa9V+p5GKPMfZPsRWZBpgjgBmRLdGmLn2sEtofLlWSNJy8w8McVxbBlryB1F5LClV9K+t+gDWlkZXFc7a1oTpgEQiMSgym5PIWnlPphqI3lIGbHRo8+kPlan/hi7UAd9O9XukR24ey+mImL2Gr/XaWKWftnurF1fVEA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=F/mN5cT4; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="F/mN5cT4" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AMD9NOp029407; Fri, 22 Nov 2024 17:35:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=MW6N2mczE5GjK4ZclRJsLE zf77XG78DTDwG6qLCHtG8=; b=F/mN5cT4+xRhNxFJG+BhHCBxfmKdh3wEd/ZS+C 8CslBAy6w8dcJbJoHcpngUz+jrojFSO/O7z9t0qqwakl8/1FNo3YCYcnSJ1tBdyy YZVWDSvgBjALcEhXv/VIr6K5Vh8EBk0Fq3mUyj1gIvq+RVlaE8s/Bofc0ab/RZz7 HEGKODj0keYtubXNDoicyq2pciWi58zb86RdhwgZdTtTz2PmHckfwRXdi3O4O/c3 NSblSXB0Ug8z4+H9ay+/4ncfpeJoG38pBvk6dJ0zA9amEtALMQcsU3Resm+QBhpV b0jSAXsIGNr5Tf9IZGGKXkvt9W/s0luoOsqO0HP7cuV4Ubqw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 432h4dt4h3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Nov 2024 17:35:20 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AMHZJCE004519 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Nov 2024 17:35:19 GMT Received: from hu-tamizhr-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 22 Nov 2024 09:35:17 -0800 From: Tamizh Chelvam Raja To: CC: , Vinith Kumar R , Tamizh Chelvam Raja Subject: [PATCH] wifi: ath12k: Report proper tx completion status to mac80211 Date: Fri, 22 Nov 2024 23:04:32 +0530 Message-ID: <20241122173432.2064858-1-quic_tamizhr@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: p8HOH-6aSkGSKtNT6VAZh6ulTVJWJ5BW X-Proofpoint-GUID: p8HOH-6aSkGSKtNT6VAZh6ulTVJWJ5BW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 clxscore=1011 phishscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 adultscore=0 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411220147 From: Vinith Kumar R Currently Tx completion for few exception packets are received from firmware and the tx status updated to mac80211. The tx status values of HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP and HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL are considered as tx failure and reported as tx failure to mac80211. But these failure status is due to internal firmware tx drop and these packets were not tried to transmit in the air. In case of mesh this invalid tx status report might trigger mpath broken issue due to increase in mpath fail average. So do not report these tx status as tx failure instead free the skb by calling ieee80211_free_txskb(), and that will be accounted as dropped frame. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Vinith Kumar R Signed-off-by: Tamizh Chelvam Raja Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/dp_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: 96c092f0dfaf2f41ad0a253fa32f689484d158c9 diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c index a8d341a6df01..f8974ef25952 100644 --- a/drivers/net/wireless/ath/ath12k/dp_tx.c +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c @@ -558,13 +558,13 @@ ath12k_dp_tx_process_htt_tx_complete(struct ath12k_base *ab, switch (wbm_status) { case HAL_WBM_REL_HTT_TX_COMP_STATUS_OK: - case HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP: - case HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL: ts.acked = (wbm_status == HAL_WBM_REL_HTT_TX_COMP_STATUS_OK); ts.ack_rssi = le32_get_bits(status_desc->info2, HTT_TX_WBM_COMP_INFO2_ACK_RSSI); ath12k_dp_tx_htt_tx_complete_buf(ab, msdu, tx_ring, &ts); break; + case HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP: + case HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL: case HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ: case HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT: ath12k_dp_tx_free_txbuf(ab, msdu, mac_id, tx_ring);