Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp256558lqh; Thu, 28 Mar 2024 00:30:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMhhh9YjNRVjrkBHq0k2lLsjElU8XlCrhJooc5v/XltMdCEIdXxog65Ra6YK9VgnPC2fRlugxSmvPswgo2hT5FRZ/VC6N1hQNMbHOJ2A== X-Google-Smtp-Source: AGHT+IEqIp4cn73rRdhC5jBzO5f2hzjLjcZIpIy1QsnLCy0fQMdE4ovoLyRmJ27TUrL8OzL2PHsj X-Received: by 2002:a17:906:4101:b0:a46:11a9:430 with SMTP id j1-20020a170906410100b00a4611a90430mr1020513ejk.76.1711611018411; Thu, 28 Mar 2024 00:30:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711611018; cv=pass; d=google.com; s=arc-20160816; b=jlSp/5wczzSl4Kk0ULb0vX9olzzcCuazxAnaZKDHA18d3oV92gxI6vssxL0BHdv4Vo 5pwrX/LIWt7bezQIXFLcXf/k4kH5+HCl1ZZc5gxoBImBvz3B2r8RGaFIZGEKgREFjGc1 /kmywCf4L/Pr/GqawznTzIwUF23+Jc63TE6zlFtNKFTzF/G09ABQDc5K+1xMu4B5M1rG wMXDPZyh4bKdBStRzwLDAKXTMoGwiuznJSy79wkeqdDiLzbdBDoRHMakMX1yyzBSQv1K TiQPBznYOHV/D5gnC62Q56V0u2C2iy6BGQIPPqKKUij/rssrf0wx2cOAHJGc/2aBw3jP oUZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mAA7rlFgKmMrThlT0BEckk99yJ8QCub2J11vEDLCuZ8=; fh=VDIWaDVpsOpnkRodDuOuy02GlDwdD3gubJ+kGPJ+A4I=; b=oUNYZBU4J+B3krIREKlUwk3Q5xdlq2SdLpNCQtgWY3hJihjEexqKul6fg6S6ZVcjSC Cre0dU4IbfQUOZknek9FvrFA5j+9Pg207Ixz7+flsADt1k0Tuok7b54pfLSNJt2n0AMn LLB7bYgaThs8Z1JGx+TfqFaPmpJ7uJ7vE0vEU29Kz5WMJYZ1BsAQjSYIdEa5zLGgHmuK yNDAUcF5GVYAZIcvTkhorWKTOpgINb/gTrvUjzXut3Lz3qpi2DEiZdTOPqTOPN31xbns 1R8oShAOA/KO/tuse4+Jj0MUSYKdfzxYipjDnnrBSBaNciW6pIBP3z17h41ndbdrpyfq s3kw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=afwzXtg4; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-5435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f14-20020a1709062c4e00b00a471f96d59asi434745ejh.674.2024.03.28.00.30.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 00:30:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=afwzXtg4; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-5435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 029C21F27641 for ; Thu, 28 Mar 2024 07:30:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72F2850A80; Thu, 28 Mar 2024 07:30:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="afwzXtg4" X-Original-To: linux-wireless@vger.kernel.org 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 E9DDF535C8 for ; Thu, 28 Mar 2024 07:30:06 +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=1711611008; cv=none; b=sM+++S8W5R8FGuKTFSu5BCUXVnKZPT4jJrOpDp9al1HkWGWiTM85XeAAx1FQeoDbcUEUnp8cI3YAOi29tz3olmQ/NMdQDM5vuARdS+a5bxGNaqLvYpg5hYhYpgEWZq7ZSJOdUUjOn+HVhF+9dS1doDHwArG0qnMSuxRiIVQrWoM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711611008; c=relaxed/simple; bh=yJBunkAK0QHItVcWofovBlnil12JFPgiOotyzjn288Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=no9cjj2BboBYK3XFD0HOPrk5g56ipDUmsSANKWxXTO7ZvkuRcLsYnYZ/Ijt8jx9rxGIirjqugFhUEM9xK7ONLdtgFZP9wrbp7+oUSe/OZYTAESdfG0HwSf3ucj5EZECXYTMT/yVv1jhqr/jrxx+1Vnh4rpaQNy6iTivLxEa1NPI= 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=afwzXtg4; 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 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42S6qjdr027622; Thu, 28 Mar 2024 07:30:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=mAA7rlFgKmMrThlT0BEckk99yJ8QCub2J11vEDLCuZ8=; b=af wzXtg4gPNeQqliKrh/oN5NY5CYZlz/0gML45xWN2MdP/3GMNTNTuJc8eBgJ39KgO MbMWrfglYDzn4YroVX5WrEcHZGuWqwh0N5roI9zhiQ+5LxPYzimBP125WFdiBPH3 Ig4lpqdGFKCC1rPqJzvecNCndW9etmTffhiCvNf73ECdp7pRp9fxAdtam/No5r3g 9nUehTsgkaYGlGexsLqwK3C9GnmdtNAYwkLvuxm2Q50FOGLBeKOjl3JmvsvNcBUT +WWmBeHq4uW0q5dNGlN4nRFEoxNPM/7p4XdIbzDh+oLcqnkYDb42k9+FYHMHDT7M BwnV3cn4N4RkQ8YnJERQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3x53nxg4wg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Mar 2024 07:30:00 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42S7U01T001180 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Mar 2024 07:30:00 GMT Received: from hu-periyasa-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.1118.40; Thu, 28 Mar 2024 00:29:57 -0700 From: Karthikeyan Periyasamy To: , CC: , Vasanthakumar Thiagarajan , Karthikeyan Periyasamy Subject: [PATCH 07/13] wifi: cfg80211/mac80211: Refactor iface comb iterate callback for multi-hardware dev Date: Thu, 28 Mar 2024 12:59:10 +0530 Message-ID: <20240328072916.1164195-8-quic_periyasa@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240328072916.1164195-1-quic_periyasa@quicinc.com> References: <20240328072916.1164195-1-quic_periyasa@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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-GUID: 8S-Xuw1nM8TK4Aai6Z_1qdbLzqAKqstW X-Proofpoint-ORIG-GUID: 8S-Xuw1nM8TK4Aai6Z_1qdbLzqAKqstW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-28_06,2024-03-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=916 impostorscore=0 spamscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 malwarescore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403210001 definitions=main-2403280048 From: Vasanthakumar Thiagarajan Currently, interface combination iterate callback gets notified for each matching combination. To support multi-physical hardware interface combination advertisements, the callback subscriber should additionally receive the hardware index information to indicate which physical hardware is chosen in the matching combination. Refactor the iterate callback by introducing an argument for passing the hardware index. This hardware index is valid for the multi-hardware advertisements and invalid (-1) for the single hardware combination advertisement. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Signed-off-by: Vasanthakumar Thiagarajan Co-developed-by: Karthikeyan Periyasamy Signed-off-by: Karthikeyan Periyasamy --- include/net/cfg80211.h | 2 +- net/mac80211/util.c | 2 +- net/wireless/util.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 491d074fe430..246a8c07becf 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -9233,7 +9233,7 @@ int cfg80211_check_combinations(struct wiphy *wiphy, int cfg80211_iter_combinations(struct wiphy *wiphy, struct iface_combination_params *params, void (*iter)(const struct ieee80211_iface_combination *c, - void *data), + int hw_chan_idx, void *data), void *data); /* diff --git a/net/mac80211/util.c b/net/mac80211/util.c index cda398d8f60d..b1f3b1eb053d 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -4014,7 +4014,7 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata, static void ieee80211_iter_max_chans(const struct ieee80211_iface_combination *c, - void *data) + int hw_chan_idx, void *data) { u32 *max_num_different_channels = data; diff --git a/net/wireless/util.c b/net/wireless/util.c index 2bde8a354631..b60a6a6da744 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -2363,13 +2363,13 @@ int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev, int cfg80211_iter_combinations(struct wiphy *wiphy, struct iface_combination_params *params, void (*iter)(const struct ieee80211_iface_combination *c, - void *data), + int hw_chan_idx, void *data), void *data) { const struct ieee80211_regdomain *regdom; enum nl80211_dfs_regions region = 0; int i, j, iftype; - int num_interfaces = 0; + int num_interfaces = 0, hw_chan_idx = -1; u32 used_iftypes = 0; u32 beacon_int_gcd; bool beacon_int_different; @@ -2460,7 +2460,7 @@ int cfg80211_iter_combinations(struct wiphy *wiphy, * supported the requested numbers, so we're good. */ - (*iter)(c, data); + (*iter)(c, hw_chan_idx, data); cont: kfree(limits); } @@ -2471,7 +2471,7 @@ EXPORT_SYMBOL(cfg80211_iter_combinations); static void cfg80211_iter_sum_ifcombs(const struct ieee80211_iface_combination *c, - void *data) + int hw_chan_idx, void *data) { int *num = data; (*num)++; -- 2.34.1