From patchwork Wed May 14 16:48:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarika Sharma X-Patchwork-Id: 891019 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 99CC41A2391 for ; Wed, 14 May 2025 16:49:25 +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=1747241367; cv=none; b=JCUrMwVGA/CXh8SSfiyicgj/+bni9SRrQHd/eXhgQr0aYj74g8Opm6ibAOOVOwXxeXr5mTn4oojRhC9pBOpa/bQggEaFcXktpsfCmEjKgFBXRdi8byqyIjJaxVXoLFEEyCkcsoj07JNYK4QPSb+Duvj6o1P9uZyk7R1mXLKz1Y0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747241367; c=relaxed/simple; bh=z1pKH1qz/6ht+PdXxr2dPFHkvES+d19KJFlqBTQcipA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=YS0/xbqClbwVyeogeHK52HruzBD1NX9xye0QDTjBR81LJLPwl6qxDVucQF11VUweOAklRGuPTuCbuoP+1aWcaGI8d4iPxAJtd6Kca5nDNTJOFf7ez8KuOvyBw9Hu0z8EdTD7Eqo7UDpNhLTDLjLr0Yh4MDwJmDwMMsseHi49etI= 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=I6UlKGfU; 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="I6UlKGfU" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54EAuxN2003121; Wed, 14 May 2025 16:49:21 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=tzkn8j26MHS52uT30KZdga d6FId2oELnmlaG9ypaTS8=; b=I6UlKGfUlX6DCBrQ/L7goMnH9uFa2dz9c7wB+g OoDAMs7PK2hD/Sael20nlcvKhDfk6Sr63tc6u8Oo8RiZikANZN9B4QYLJNhl84dD kHOqvmvlgtllLzq53q7BCQPLiojw3ZwnJohsipQaGzL+OUdChYfWTGnnQtXa4KvV BL+dP90OpeJQoTAYttRkcJYvulWa8A2GDykLuSkSIrfJfzJuzXBbdTU0u1X4Xr2/ 3kFfNqJ7hZO6BIYlmpPS4mZjuTQ09fQlo21+FXQwOdiyhsbtE8rlms8cL/sjryAl MTIv4kA5L3z9dfiPPbobm9MUscfT6Oc//coqwHer5l5J/iOA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46mbcrbbv9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 May 2025 16:49:21 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 54EGnKHA028088 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 May 2025 16:49:20 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, 14 May 2025 09:49:18 -0700 From: Sarika Sharma To: CC: , Sarika Sharma Subject: [PATCH wireless-next v7 00/10] wifi: cfg80211/mac80211: add support to handle per link statistics of multi-link station Date: Wed, 14 May 2025 22:18:47 +0530 Message-ID: <20250514164857.227540-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-ORIG-GUID: GpuAArd8b2c8YeP9b2NJYUTCUquDEV35 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTE0MDE1MSBTYWx0ZWRfX/yGi78N9No6C Ncplb+Uv7DEcGU9qEudtPdKMjCkx/IhNAa8lX8vN8/kDsNNxU0FI6inBUkY6D8sP4QTZQUGRpwo HOAi3opFe02Y6jSXFX9rmJ6U1fhW6lhVVj12dmrDIS+Fc10C4OjeV4X5/F6u0viWjCGltruO3Ak eSgj9vNXJ797C9C1B7MkCDUer10rH8uO4yH/BT1G4jEHunKEJkqolzd0YlsinqE4BoGA2aD+KB4 Xg0ITHv/eoKIHrzSfNFPO0SNXDbwYSjwPFLmIWODTEYFhF9wD/kRsW3oSg5gE1k3I+FdfH1ekGS 3mzabl0/AyJ+CtOe4K3HMkzJcLcbDEUPlz+ub0+TNZpsmxSIF+F5BLSWyBU+0OFVqQZ9OYZbuTP pu5Gi8BNBXJeOHphhDiYsFjvbD5S/K1bfszX85AwlWd7XA9LaDK3hFwi772LH6oYbl+2lz45 X-Authority-Analysis: v=2.4 cv=K7UiHzWI c=1 sm=1 tr=0 ts=6824c991 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=dt9VzEwgFbYA:10 a=0tEs9va4rEXjYGKJGLgA:9 X-Proofpoint-GUID: GpuAArd8b2c8YeP9b2NJYUTCUquDEV35 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-14_04,2025-05-14_03,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505070000 definitions=main-2505140151 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. 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: reset sinfo->filled for MLO station statistics wifi: mac80211: extend support to fill link level sinfo structure wifi: mac80211: add link_sta_statistics ops to fill link station statistics wifi: mac80211: correct RX stats packet increment for multi-link drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 2 +- include/net/cfg80211.h | 124 ++++++ 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 | 393 +++++++++++++++-- net/mac80211/sta_info.h | 36 +- net/mac80211/trace.h | 7 + net/mac80211/util.c | 14 +- net/wireless/nl80211.c | 434 ++++++++++++++++++- net/wireless/util.c | 12 + 13 files changed, 1051 insertions(+), 38 deletions(-) base-commit: 63a9a727d373fa5b8ce509eef50dbc45e0f745b9