From patchwork Wed May 28 05:44:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarika Sharma X-Patchwork-Id: 893112 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 55CCD1C84B2 for ; Wed, 28 May 2025 05:44:43 +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=1748411086; cv=none; b=VPvCgzuhT0KG7ohZ1NA0PDLfkEHK9q46l1PSQumHx5Cz/ZABDBtl+IbqHir/sBtKUeBQtp15z0y9KPt+GGZEUyD95RUWqsNWuNWmP6G4Rjhc8P6VIQmmwwo2Y1yZVxfu30YR9f6OFMemkiKG2D+hW9TCKHDZanMm+LCyljQLMV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748411086; c=relaxed/simple; bh=nh2FK0MC/oIdGQ6IGrpr25NBb91bk/p6W1J7wDL7WHk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=f6+VYprjdhcfOHlHSnzF000e89OOpaGyo0dQwT6hZsaJEA/9N2Fp2l8xI8/ADpuUQjUabvVc4k/pk1QzPLfHva8PkM0wfEbCeI4XinGoYMgWxJiu3OCi1SCXn7mq4FmH2CF2acukXhLgVbebFlJUKfgZdoy0dBBjaBav8oDNfk0= 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=FaiSCGtG; 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="FaiSCGtG" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54RJvJXw014923; Wed, 28 May 2025 05:44:40 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=GNw90Eoerl77Y0BxFo1xOS +JUC1alOYBP/D6Vqbk1nM=; b=FaiSCGtGIw7SwCktoBVCzU/zaiMR2zTmeBg5h5 5NVXMjNhqdi62CfI43oY7dwzVQzU1PgcVYpgJwO9KiNaItpSY08b2S3zgGNDVgSa BP8zMnnKltqFGiu4sdeVDkT2aarAc1bHWmJ5vGPaLxs7qlUavq4epeHes8hqdg7J BGNnoNp6g2VCkr2IeS5Wla7Mc40CWbjtcMZqPhk6AiBP+nBDuWCUfdMHFLnYz77R 266Le+B707frljkuXDJAxeZ6Gxu8Ut5WSARSC26TY8O92KcHajw2VydQfqJ5/ZfO YwAUgEk2bbh5/0j9Uvgb4oGRK0hywQJc4Oa+XZ1VJ2VZcBvg== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46u66whdqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 May 2025 05:44:39 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 54S5icsq000476 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 May 2025 05:44:38 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; Tue, 27 May 2025 22:44:37 -0700 From: Sarika Sharma To: CC: , Sarika Sharma Subject: [PATCH wireless-next v10 00/10] wifi: cfg80211/mac80211: add support to handle per link statistics of multi-link station Date: Wed, 28 May 2025 11:14:10 +0530 Message-ID: <20250528054420.3050133-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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-Authority-Analysis: v=2.4 cv=aYJhnQot c=1 sm=1 tr=0 ts=6836a2c8 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=4PRjSwI9XOQZNU6qe1oA:9 X-Proofpoint-ORIG-GUID: LdYGiDY9GlinPvHFsx1_FCKbdZmAdoFy X-Proofpoint-GUID: LdYGiDY9GlinPvHFsx1_FCKbdZmAdoFy X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI4MDA0OSBTYWx0ZWRfXzlOTx/E9bFTP BpDIx7dNLRzFIDrWssfScFqC6+/lwu2A3QXpPtjxm7e/uZVXNqhmN3Qm7R+nPNtoomDyBRnwzp6 z1efYfDIoQysZ8O1Ri0k0F0sUgxRZVyFjdR3fAD10S/dDmfqS/kEX+0Czb0fHyW6EyJHo+b6of8 BRPR5euWAn85L2qDcov2fqB1r5VPwTbliK6Xg4G5vuMofPnRFZYJIZUZYdSabOF2p5Yj8jRl8ud FH4tr9AHwk9qQrCPTCwOwo3aCMEtZXDMZjGKv4+Dqhv8vyrZwBiyKCRsThZODgezDx/YXe2F1IP kQoPygPZVbiv3dIjNk9EavjOB4ovl0260pRpwjBEGrlglBO67E+IJORvCpnsU3VlqB3VWwcibjz BXNpnqLunKpl1acCYeO8g9LDAnXAi9BeKD44nXH35H+FFwemQAejqssD3EXYmUG9P0pSmwO8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-28_03,2025-05-27_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 mlxscore=0 spamscore=0 clxscore=1015 bulkscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505280049 Current implementation of NL80211_CMD_GET_STATION does not work for multi-link operation(MLO) since in case of MLO only deflink (or one of the links) is considered and not all links. Hence, add the link_sinfo structure to provide infrastructure for link-level station statistics for multi-link operation(MLO). Additionally, accumulated stats for MLO are included in a concise manner to provide a comprehensive overview of the ML stations. V10: - Add WARN_ON_ONCE(!link_sinfo), if valid links. - Fixed kernel doc error. - Corrected logic for setting sinfo->valid_links only if memory is allocated for link_sinfo. V9: - Remove link_id from link_sinfo structure. - Simplified code at possible places. - Added fields in removed link sta statistics. - Corrected pertid filling logic for MLO level. - Passed link_sta to .link_sta_statistics mac80211 ops. V8: - Fix locking issue. V7: - Redesign the approach according to provided comments( mentioned the current implemented approach below in "Purposed Flow"). V6: - Fix compilation failure. - Add expected_throughput, beacon_loss_count, rx_dropped_misc at MLO level. - Removed is_per_link_stats_support boolean from sinfo structure. - Used ether_addr_copy() instead of memcpy(). V5: - Rebased the patches. V4: - Update helper function for link_sta derefrence. - Instead of using unnecessary rssi variable directly use return. - Correct commit tittle and message for some patches. - Corrected cfg80211_sinfo_release_content() unnecessary logic. - Split the patches for cfg80211/mac80211. - Add additional fields at MLO level. - Remove Ath12k patche from this series. - Remove unnecessary if condition check from "add additional MLO statistics". V3: - Convert RFC patch to actual PATCH with each patch bisectable. - Add logic for MLO level signal and rates. V2: - Update cover letter to give more details on structural changes. - Split the patch(1/7) in two patches. - Do the required changes for MLO bringup before as seperate patches. - Remove link_sinfo naming to sinfo for better clarity on changes. - Add accumulated stats logic in cfg80211. - Add flag to indicate driver supports per-link station statistics or not. Current flow: cfg80211: - Structure station_info is used to fill all station information (station level as well link level). - Nl80211_get_station() - locally define sinfo, call -.get_station() ops mac80211: - Sta_set_sinfo() - fill station information and call mac80211 ops - .sta_statistics()(to fill the station_info structure). Purposed Flow: cfg80211: - introduce link_station_info structure for link level statistics structure link_station_info { filled rates ...etc // all link specific fields } - add link_station_info for MAX links in station_info structure structure station_info { filled packets sta_flags ... etc valid_links link_station_info *links[IEEE80211_MLD_MAX_NUM_LINKS] } - Station_info structure is used for non-ML station statistics and update the sinfo_structure for MLO, for accumulated, best, least among all valid links in cfg80211_sta_set_mld_sinfo(). - Allocate and free memory for link_sinfo for all links. - Embed NL message to include link level data, if valid_links are present. mac80211: - Sta_set_sinfo() - fill station specific information as filled before if non-ML: - call mac80211 ops .sta_statistics() to fill station_info structure. if MLO: - call sta_set_link_sinfo(), for all valid links to fill link_station_info in *links[link_id]. - introduce and call mac80211 ops for each link- .link_sta_statistics() to fill link statistics from drivers. - Maintain accumulated data for removed links in sta_info structure and fill in to station_info structure for consistency. Sarika Sharma (10): wifi: mac80211: add support towards MLO handling of station statistics wifi: cfg80211: add link_station_info structure to support MLO statistics wifi: cfg80211: extend to embed link level statistics in NL message wifi: cfg80211: add statistics for providing overview for MLO station wifi: cfg80211: allocate memory for link_station info structure wifi: mac80211: add support to accumulate removed link statistics wifi: cfg80211: clear sinfo->filled for MLO station statistics wifi: mac80211: extend support to fill link level sinfo structure wifi: mac80211: correct RX stats packet increment for multi-link wifi: mac80211: add link_sta_statistics ops to fill link station statistics drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 2 +- include/net/cfg80211.h | 119 +++++ include/net/mac80211.h | 16 +- net/mac80211/cfg.c | 13 + net/mac80211/driver-ops.h | 19 + net/mac80211/ibss.c | 4 +- net/mac80211/rx.c | 15 +- net/mac80211/sta_info.c | 416 ++++++++++++++++-- net/mac80211/sta_info.h | 59 ++- net/mac80211/trace.h | 27 ++ net/mac80211/util.c | 14 +- net/wireless/nl80211.c | 437 ++++++++++++++++++- net/wireless/util.c | 12 + 13 files changed, 1114 insertions(+), 39 deletions(-) base-commit: ea15e046263b19e91ffd827645ae5dfa44ebd044