From patchwork Thu Mar 6 06:24:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarika Sharma X-Patchwork-Id: 871522 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 EBAA019CC3A for ; Thu, 6 Mar 2025 06:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741242343; cv=none; b=gghtprvd8w1GZzenn2MhR8gV8GUQ348k0wWwAU216cGt//zHBWO4D48uklIvON02uy1y3oUuQwD1KhMjQxLgzooddPiflAQZ3Uvy8+F84531HhqO49nxE0QGsyjNv2WXGxDkqs2hdthrgYflKDS5x1B+WtaeF+tljVNVURN+c8U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741242343; c=relaxed/simple; bh=BUWA658ny29ij7CJ9qmejRUUVBA63vAwyKnbDZ875fc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=kKrqQx7/s7TyOxHcvFaX53HIw0pZHEtxEmxrlnXI4Uv6MdzdCoZlVs/xlv1DDd5ELxm60x3sIKXeUAX/vrSfyoh2sgkk8sJz8ldnunYgvVO72ySmlF/M/zV6trMUe8bb+o4mfVuvNwN2MH6j1z2p9P3zijux6qppK6t1gcn7+Gc= 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=YhyYD+vq; arc=none smtp.client-ip=205.220.168.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="YhyYD+vq" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 525KXOGp003372; Thu, 6 Mar 2025 06:25:34 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=GRcS/URXFnSH7i058FsypP bM5KAi5+bGp1cZRzWx8Hc=; b=YhyYD+vq8xawAglLUDeNgyv/IYxy1AEwhHERLm w7t34FuvJ83rPg/iLglLBcZku3vCCLop2ak3ssEDZY5kDrIWQdbHNgpjifI/89b2 O/L05i+HD1e/N3Vt0EGhNPUmogldZYQonf64pv/68WJLK3avvX2gjuVJlPzVU06k ICKDZAPnEelYY7Y0g4oa/H8aToZttRwDLfjUUWb4MOs7OyEYE09GarZc0hQC6mE2 OAFIWxYHX9dAvoByGwlkrTb+whLX1aRzELrbLfdm791MQVlW2EfSWqHvRQJK1Jlo dJNu9iaF+puzhGCboA2H4UVc2QEftTof/8OrxNH1pik8M/2g== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 456wrj96j9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Mar 2025 06:25:34 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5266PXZp027291 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 6 Mar 2025 06:25:34 GMT Received: from hu-sarishar-blr.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 5 Mar 2025 22:25:32 -0800 From: Sarika Sharma To: CC: , Sarika Sharma Subject: [PATCH wireless-next v4] wifi: mac80211: correct RX stats packet increment for multi-link Date: Thu, 6 Mar 2025 11:54:59 +0530 Message-ID: <20250306062459.4089284-1-quic_sarishar@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 nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: mlyEhGz7jT3tKPh-JEoeWA4ug4E-X62U X-Authority-Analysis: v=2.4 cv=FYDNxI+6 c=1 sm=1 tr=0 ts=67c93fde cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Vs1iUdzkB0EA:10 a=COk6AnOGAAAA:8 a=032gDEdhww1wZPsVp_cA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: mlyEhGz7jT3tKPh-JEoeWA4ug4E-X62U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-06_03,2025-03-06_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 adultscore=0 mlxscore=0 spamscore=0 clxscore=1015 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2503060046 Currently, RX stats packets are incremented for deflink member for non-ML and multi-link(ML) station case. However, for ML station, packets should be incremented based on the specific link. Therefore, if a valid link_id is present, fetch the corresponding link station information and increment the RX packets for that link. For non-MLO stations, the deflink will still be used. Signed-off-by: Sarika Sharma --- V4: - Removed driver patches. - Added branch tree tag. V3: - Fix kernel test robot build error v2: - Convert RFC patch to actual PATCH with each patch bisectable. - Add new patch to update bw for ofdma packets. - Add new patch to fetch tx_retry and tx_failed packets. --- net/mac80211/rx.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) base-commit: 71f8992e34a9f358a53da6bfcd8b00226df177a2 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index f40e2ea1b09a..c9a6a94e254b 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -231,8 +231,19 @@ static void __ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata, skb_queue_tail(&sdata->skb_queue, skb); wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work); - if (sta) - sta->deflink.rx_stats.packets++; + if (sta) { + struct link_sta_info *link_sta_info; + + if (link_id >= 0) { + link_sta_info = rcu_dereference(sta->link[link_id]); + if (!link_sta_info) + return; + } else { + link_sta_info = &sta->deflink; + } + + link_sta_info->rx_stats.packets++; + } } static void ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata,